【问题标题】:where is the configuration file for the routing and gateway under centos?centos下路由和网关的配置文件在哪里?
【发布时间】:2014-01-13 09:14:49
【问题描述】:

这些结果的配置文件在哪里?

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.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     1002   0        0 eth0
0.0.0.0         192.168.0.204   0.0.0.0         UG    0      0        0 eth0

在以下文件中找不到条目

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

当我在 /etc/sysconfig/network-scripts/ifcfg-eth0 中更新 GATEWAY 时,但当我运行时

route -n

它给了我旧的结果:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.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     1002   0        0 eth0
0.0.0.0         192.168.0.204   0.0.0.0         UG    0      0        0 eth0

我应该在哪里搜索才能找到这些条目?

【问题讨论】:

    标签: networking routing centos gateway


    【解决方案1】:

    请检查“/etc/network/interfaces”文件

    参考以下链接:

    http://www.cyberciti.biz/faq/centos-linux-add-route-command/

    ~湿婆

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-30
      • 2016-10-23
      • 2021-10-30
      • 2021-03-11
      • 2021-05-16
      • 1970-01-01
      • 2019-07-01
      • 1970-01-01
      相关资源
      最近更新 更多