@
109109 @
icqdany @
princeofwales 网络设置
root@shserver1:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth2
iface eth2 inet static
address 10.4.69.150
netmask 255.255.255.0
network 10.4.69.0
broadcast 10.4.69.255
gateway 10.4.69.2
如上面提到的ip route结果
root@shserver1:~# ip route
default via 10.4.69.2 dev eth2 metric 100
10.4.69.0/24 dev eth2 proto kernel scope link src 10.4.69.150
traceroute异地一台机器第一跳不是网关
root@shserver1:~# traceroute xmserver1
traceroute to xmserver1 (10.125.159.218), 30 hops max, 60 byte packets
1 10.4.69.8 (10.4.69.8) 1.469 ms 1.666 ms 1.908 ms
2 * * *
3 xmserver1 (10.125.159.218) 33.137 ms 33.114 ms 33.067 ms
另一台机器则是网关
root@shserver1:~# traceroute xmserver2
traceroute to xmserver2 (10.125.159.223), 30 hops max, 60 byte packets
1 10.4.69.2 (10.4.69.2) 0.621 ms 1.180 ms 1.454 ms
2 * * *
3 * * *