红帽7
网卡配置文件路径:/etc/sysconfig/network-scripts/
静态:
TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=cb6a2006-91bd-4efb-8c1a-bbc33569e973 ONBOOT=no HWADDR=00:0C:29:7B:00:AD IPADDR0=192.168.1.1 PREFIX0=24 GATEWAY0=192.168.1.254 DNS1=114.114.114.114 IPV6_PEERDNS=yes IPV6_PEERROUTES=yes
动态:
HWADDR=00:0C:29:7B:00:AD TYPE=Ethernet BOOTPROTO=dhcp 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 NAME=eno16777736 UUID=cb6a2006-91bd-4efb-8c1a-bbc33569e973 ONBOOT=no
Centos
网卡配置文件路径:/etc/sysconfig/network-scripts/
静态:
TYPE=Ethrnet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 UUID=7da56860-8ebc-4005-8def-bec35a7ca67b DEVICE=ens33 ONBOOT=yes ZONE=public IPADDR=192.168.1.1 PREFIX=24 GATEWAY=192.168.1.254 DNS1=114.114.114.114
动态:
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="dhcp" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="ens33" UUID="7da56860-8ebc-4005-8def-bec35a7ca67b" DEVICE="ens33" ONBOOT="yes" ZONE=public
红帽5
静态:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=none HWADDR=00:0C:29:FE:1F:B0 ONBOOT=yes NETMASK=255.255.255.0 IPADDR=192.168.1.1 GATEWAY=192.168.1.254 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes
动态:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:0C:29:FE:1F:B0 ONBOOT=yes TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes
KALI
配置文件:/etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameserver 119.29.29.29 223.5.5.5