Manual nic setting


1 edit /etc/sysconfig/network-scripts/ifcfg-*

2 key value

 BOOTPROTO=dhcp
or

 BOOTPROTO=static
 IPADDR=192.168.123.1
NETMASK=255.255.255.0
GATEWAY=192.168.123.254


  • ONBOOT=yes:enable this nic on boot。 =no : disable

3 example
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno1
UUID=e5a55129-fb86-4f21-9d8a-1f0bf9450e65
DEVICE=eno1
ONBOOT=yes
IPADDR=192.168.123.1
NETMASK=255.255.255.0
GATEWAY=192.168.123.254


 systemctl restart network
or
 service network restart
or

/etc/init.d/network restart

留言

熱門文章