环境:rhel5.4

目的:如题

结果如下:

[root@localhost network-scripts]# route -n
Kernel IP routing table
Destination     Gateway            Genmask              Flags Metric Ref    Use  Iface
192.168.1.0     0.0.0.0               255.255.255.0       U         0        0        0       eth0
169.254.0.0     0.0.0.0               255.255.0.0           U          0        0        0       eth0
0.0.0.0             192.168.1.10    0.0.0.0                    UG        0        0        0       eth0

中间那条169.254.0.0非我所愿,原因待查

参考如下博客中的第一种方法

http://tilt.lib.tsinghua.edu.cn/node/659

vi /etc/sysconfig/network-scripts/route-eth0

192.168.1.0/24 dev eth0
0.0.0.0/0 via 192.168.1.10 dev eth0

service network restart

ping 163.com


/* the end */

相关文章:

  • 2021-11-20
  • 2022-02-22
  • 2021-12-30
  • 2021-06-02
  • 2022-12-23
  • 2021-11-20
  • 2022-01-07
  • 2021-07-29
猜你喜欢
  • 2021-10-19
  • 2022-01-02
  • 2021-05-28
  • 2021-12-22
  • 2021-10-18
  • 2021-11-01
相关资源
相似解决方案