常用Linux系统网卡配置

红帽7

网卡配置文件路径:/etc/sysconfig/network-scripts/

静态:

TYPE=EthernetBOOTPROTO=noneDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noNAME=eno16777736UUID=cb6a2006-91bd-4efb-8c1a-bbc33569e973ONBOOT=noHWADDR=00:0C:29:7B:00:ADIPADDR0=192.168.1.1PREFIX0=24GATEWAY0=192.168.1.254DNS1=114.114.114.114IPV6_PEERDNS=yesIPV6_PEERROUTES=yes

动态:

HWADDR=00:0C:29:7B:00:ADTYPE=EthernetBOOTPROTO=dhcpDEFROUTE=yesPEERDNS=yesPEERROUTES=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_FAILURE_FATAL=noNAME=eno16777736UUID=cb6a2006-91bd-4efb-8c1a-bbc33569e973ONBOOT=no

Centos

网卡配置文件路径:/etc/sysconfig/network-scripts/

静态:​​​​​​​

TYPE=EthrnetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=noneDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens33UUID=7da56860-8ebc-4005-8def-bec35a7ca67bDEVICE=ens33ONBOOT=yesZONE=publicIPADDR=192.168.1.1PREFIX=24GATEWAY=192.168.1.254DNS1=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=eth0BOOTPROTO=noneHWADDR=00:0C:29:FE:1F:B0ONBOOT=yesNETMASK=255.255.255.0IPADDR=192.168.1.1GATEWAY=192.168.1.254TYPE=EthernetUSERCTL=noIPV6INIT=noPEERDNS=yes

动态:​​​​​​​

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth0BOOTPROTO=dhcpHWADDR=00:0C:29:FE:1F:B0ONBOOT=yesTYPE=EthernetUSERCTL=noIPV6INIT=noPEERDNS=yes

KALI​​​​​​​

配置文件:/etc/network/interfaces
auto eth0iface eth0 inet staticaddress 192.168.1.100netmask 255.255.255.0gateway 192.168.1.1dns-nameserver 119.29.29.29 223.5.5.5

你可能感兴趣的:(服务器,linux,网络,服务器)