CentOS6.5:
eth0:/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="static" IPADDR="172.31.100.XXX" NETMASK="255.255.255.0" GATEWAY="172.31.100.1" ONBOOT="yes" DNS1="XXX.XXX.XXX.XXX" DNS2="XXX.XXX.XXX.XXX"
查看:ifconfig |
Redhat 7:
默认网卡名称叫ifcfg-eno16777736 修改方法:
将NAME属性修改为eth0
|
eth0:/etc/sysconfig/network-scripts/ifcfg-eth0 TYPE="Ethernet" BOOTPROTO="static" IPADDR="172.31.100.XXX" NETMASK="255.255.255.0" GATEWAY="172.31.100.1" NAME="eth0" DEVICE="eth0" ONBOOT="yes" USERCTL="no" DNS1="XXX.XXX.XXX.XXX" DNS2="XXX.XXX.XXX.XXX"
查看:ip addr 配置route:ip route [options] |
Kali(Debian):
eth0(interface):/etc/network/interfaces 查看:ifconfig iface lo inet loopback auto eth0 iface eth0 inet static address 172.31.100.XXX netmask 255.255.255.0 gateway 172.31.100.1
DNS:/etc/resolv.conf nameserverXXX.XXX.XXX.XXX nameserverXXX.XXX.XXX.XXX |
SUSE 11:
eth0:/etc/sysconfig/network/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes STARTMODE=auto BOOTPROTO=static IPADDR=172.31.100.XXX NETMASK=255.255.255.0 BROADCAST=172.31.100.255 GATEWAY=172.31.100.1
default gateway(route):/etc/sysconfig/network/routes Default 172.31.100.1 255.255.255.0 eth0
DNS:/etc/resolv.conf nameserverXXX.XXX.XXX.XXX nameserverXXX.XXX.XXX.XXX |
Ubuntu14.04
eth0:/etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 172.31.100.XXX netmask 255.255.255.0 network 172.31.100.0 broadcast 172.31.100.255 gateway 172.31.100.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers XXX.XXX.XXX.XXX |