[root@kk]# vim /etc/sysconfig/networ
配置:
NETWORKING=yes
hostname=gateway
FORWARD_IPV4="yes"
GATEWAY=222.66.*.*
拨号上网的话,则注释掉网关设置:# GATEWAY=222.66.75.113
1.配置/etc/sysconfig/network-scripts/ifcfg-eth0内网网卡
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.254
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
2.配置/etc/sysconfig/network-scripts/ifcfg-eth1外网网卡
DEVICE=eth1
BOOTPROTO=static
BROADCAST=222.66.*.*
IPADDR=222.66.75.114
NETMASK=255.255.255.252
NETWORK=222.66.75.112
ONBOOT=yes
至此完成网卡的基本配置,实现了服务器自身的上网。