ifconfig -a 查看linux下的网卡配置
dhclient dhcp获得IP
vi /etc/sysconfig/netwaork-scripts/ifcfg-eth0
IPADDR=192.168.199.200
NETMASK=255.255.255.0
GATEWAY=192.168.199.1
DNS1=192.168.199.1
DNS2=223.5.5.5
service network restart
ifdown eth0
ifup eth0
时间: 2024-11-10 00:52:09