zzzhongwei20112020-06-1416:42:44博主文章分类:linux
1网卡多ip配置NAME="eth0"DEVICE="eth0"ONBOOT=yesNETBOOT=yesUUID=1dad842d-1912-cf5a-a43a-bc238fb267c7BOOTPROTO=noneTYPE=PROXYMETHOD=noneBROWSERONLY=noIPADDR=222.186.133.24IPADDR2=222.186.133.2NETMASK=255.255.255.0NETMASK2=255.255.255.0GATEWAY=222.186.133.254*不管配多少IP只需要主IP配网关,副IP不需要加网关只要掩码就行了DNS1=114.114.114.114DNS2=8.8.8.8DEFROUTE=yesIPV4FAILUREFATAL=no
----下面这个是1网卡2个IP完整的另一种----TYPE=""PROXY_METHOD="none"BROWSER_ONLY="no"BOOTPROTO=staticDEFROUTE="yes"IPV4_FAILURE_FATAL="no"IPV6INIT="yes"IPV6_AUTOCONF="yes"IPV6_DEFROUTE="yes"IPV6_FAILURE_FATAL="no"IPV6_ADDR_GEN_MODE="stable-privacy"NAME="em1"UUID="278671b0-5d6d-4c28-9b3b-161e24b3fc76"DEVICE="em1"ONBOOT="yes"IPADDR=103.107.190.84*主IP信息IPADDR2=222.186.133.124NETMASK=255.255.255.0*主IP信息NETMASK2=255.255.255.0GATEWAY=103.107.190.254*主IP的网关,哪个主IP写哪个网关DNS1="114.114.114.114"DOMAIN="8.8.8.8"IPV6_PRIVACY="no"
TYPE=PROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=noneDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=enp2s0UUID=c71ed6d5-170f-47af-bb35-c1402251c717DEVICE=enp2s0ONBOOT=yesIPADDR=103.215.49.80PREFIX=24IPADDR1=103.215.49.81PREFIX1=24IPADDR2=103.215.49.82PREFIX2=24GATEWAY=103.215.49.1DNS1=8.8.8.8DNS2=8.8.4.4IPV6_PRIVACY=no