网络网关

机器增加外网访问方法:

vi /etc/sysconfig/network-scripts/ifcfg-bond0 

---- 【配置网关内容如下】 ---

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=static

USERCTL=no

PEERDNS=no

NM_CONTROLLED=no

IPV6INIT=no

IPADDR=10.33.33.171

NETMASK=255.255.255.0

GATEWAY=10.33.33.254

BROADCAST=10.33.33.255

BONDING_OPTS="miimon=80 mode=6"

配置好后执行:service netwrok restart

配置dns

cat /etc/resolv.conf 

# Generated by NetworkManager

search szbd.33e9cloud.com

# No nameservers found; try putting DNS servers into your

# ifcfg files in /etc/sysconfig/network-scripts like so:

#

# DNS1=xxx.xxx.xxx.xxx

# DNS2=xxx.xxx.xxx.xxx

# DOMAIN=lab.foo.com bar.foo.com

nameserver 223.5.5.5

nameserver 223.6.6.6

search localdomain

相关推荐