1.配置文件/etc/work-scripts/config-eth0DEVICE=eth0BOOTPROTO="static"IPADDR=ipNETMASK=子网掩码GATEWAY=网关注:以ROOT用户,配置完之后重启网络
2.在命令行敲setup在图形界面配置(打开之后你就明白)
展开全部
1.临时设置网卡IP:/sbin/ifconfigeth0网卡IPbroadcastbroadcast网卡广播mask子网掩码up/sbin/routeadddefaultgw网卡网关例如:/sbin/mask255.255.255.0up/sbin/routeadddefaultgw192.168.1.12.linux配置IP:vi/etc/hosts再添加一条网卡i/etc/resolv.conf里面写入:searchlocaldomainnameserver202.106.0.20nameserver202.106.46.151202.106.195.68vi/etc/work写入:NETWORKING=yesHOSTNAME=localhost.localdomainvi/etc/work-scripts/ifcfg-eth0写入:DEVICE=eth0ONBOOT=yesNATMASK=要设置的子网掩码IPADDR=要设置的IP地址GATEWAY=要设置的网关/etc/rc.d/workrestart重启网络服务,使配置生效。卢韬旭