前言
现在有一台sun 280的服务器是192.192.192..0网段的 , 现在需要和172.172.172.0网段的网络通讯 , 现在需要在Solaris上配置双网卡实现路由器的功能 。
本人声明如需转载请保留如下信息:
作者:SOLARIS小兵
MAIL:solarisxb@hotmail.com
FROM:WWW.CHINAUnix.NET
一、 系统环境:
1、 应用目的说明:
现在所有的应用都是192网段的服务器 , 现在配置sun服务器双网卡的目的是通过sun服务器 , 192网段的所有服务器通过sun服务器访问172.172.172.170.
设置目的:192.192.192.3和192.192.192.151都可以ping通172.16.128.170
2、 系统网络配置:
系统现在有两块网卡:分别是hme0和eri0 , 打算hme0配192网段 , eri0配置172网段 。
网卡配置:
bash-2.03# ifconfig -a
lo0: flags=19200849
eri0: flags=19200843
ffffff00 broadcast 172.16.255.255 ether 0:3:ba:29:cf:3a
hme0: lags=19200843
bash-2.03#
3、 系统路由表配置:
路由配置:
bash-2.03# netstat -nr
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.192.192..0 192.192.192..2 U 1 19 hme0
172.172.172.0 172.172.172.33 U 1 192 eri0
172.172.172.0 192.192.192..2 UG 1 0
224.0.0.0 192.192.192..2 U 1 0 hme0
default 192.192.192..1 UG 1 16
127.0.0.1 127.0.0.1 UH 2 5382 lo0
bash-2.03#
说明:
默认路由:192.192.192..1(互联网线路路由)
172.172.172.33(外联172网段路由)
4、 Solaris网络更改:
保证网络转发打开默认是关闭的:
#ndd -set /dev/ip ip_forwarding 1
#ndd -set /dev/ip ip_forward_directed_broadcasts 1
#ndd -set /dev/ip ip_forward_src_routed 1
5、 Windows客户端192.192.192..151测试:
Windows系统需要添加静态路由:
route add 172.172.172.0 mask 255.255.255.0 192.192.192..2
6、 从Windows客户端192.192.192..151测试:
C:Documents and Settingsguyhu>ping 192.192.192..2
Reply from 192.192.192..2: bytes=32 time<1ms TTL=255
C:Documents and Settingsguyhu>ping 172.172.172.33
Reply from 172.172.172.33: bytes=32 time<1ms TTL=255
C:Documents and Settingsguyhu>ping 172.172.172.170
Reply from 172.172.172.170: bytes=32 time=5ms TTL=254
C:Documents and Settingsguyhu>
7、 总结:
配置过程中一定要添加“#ndd -set /dev/ip ip_forwarding 1“ , 这个很重要 。
- 子母路由器是什么意思
- 火的用途
- 数字示波器的用途
- 蜂蜡的用途 蜂蜡有什么用途
- QQ坦白说道具卡有哪些作用 道具卡用途说明
- 斐讯路由器如何刷固件 刷固件的方法分享
- 修改路由器登录密码会断网吗
- antbang无线路由器设置
- 人造卫星的工作原理简介 人造卫星的作用和用途是什么
- 100m宽带用什么路由器
