CentOS 如何设置缺省网关
假设CentOS缺省网关是74.86.49.129,通常做法
# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=wan.nixcraft.in
GATEWAY=74.86.49.129
# /etc/init.d/networking restart
根据网卡设置路由的方法是编辑 /etc/sysconfig/network-scripts/route-eth* 文件,
Open /etc/sysconfig/network and append
GATEWAY=eth0.gateway.IP.address
Open /etc/sysconfig/network-scripts/route-eth1 and add routing for eth1 and restart it. For example:
202.54.1.2/29 via 202.54.2.254
Also, set static route for /etc/sysconfig/network-scripts/route-eth0:
10.1.2.3/8 via 10.10.38.95
Do not add gateway entries to /etc/sysconfig/network-scripts/ifcfg-eth1 and /etc/sysconfig/network-scripts/ifcfg-eth0
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26