linux的静态ip配置:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static 动态为dhcp
IPADDR=静态ip
NETMASK=子网掩码
GATEWAY=默认网关
DNS=8.8.8.8
DNS=114.114.114.114
保存退出
service network restart
ping DNS
时间: 2024-10-07 15:43:10
linux的静态ip配置:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static 动态为dhcp
IPADDR=静态ip
NETMASK=子网掩码
GATEWAY=默认网关
DNS=8.8.8.8
DNS=114.114.114.114
保存退出
service network restart
ping DNS