信息化 频道

专注EITM CA展开“隐形翅膀”

4. 测试静态路由

 在子网C的一个linux 计算机上配置网络接口和网关:
#ifconfig 192.168.100.10 up #route add default gw 192.168.100.1 #route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.100.0 * 255.255.255.0 U 0 0 0 et0 127.0.0.1 * 255.0.0.0 U 0 0 0 lo Default 192.168.100.1 0.0.0.0 UG 0 0 0 eth0
 在子网B的一个Windows 2000 计算机上配置网络接口和网关,如图2 。

    图2 Windows 2000 计算机上配置网络接口和网关


 从子网C中的一个Linux 计算机上进行路由测试:

    首先ping子网B中ip地址为:192.168.10.83 的计算机
# ping 192.168.10.83 -c 3 PING 192.168.10.83 (192.168.10.83)from 912.168.100.10:56(84) bytes of data. 64 bytes from 192.168.10.83: icmp_seq=0 ttl=64 time=0.113 ms 64 bytes from 192.168.10.83: icmp_seq=1 ttl=64 time=0.102 ms 64 bytes from 192.168.10.83: icmp_seq=2 ttl=64 time=0.099 ms --- 192.168.10.83 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.099/0.104/0.113/0.013 ms, pipe 2
使用traceroute命令
# traceroute 192.168.10.83 traceroute to 192.168.10.83 (192.168.10.83), 30 hops max, 38 byte packets 1 192.168.10.83 (192.168.10.83) 4.316 ms 1.018 ms 0.419 ms

    到此为止,Linux服务器的静态路由配置结束。
0
相关文章