??????????????÷??????????????
????(1)??????·???????
????TARGET via GW
????(2)????????·?????
????ADDRESS#=TARGET
????NETMASK#=MASK
????GATEWAY#=NETHOP
????ip route add 10.0.0.0/8 via 192.168.10.1
????ip route list
????systemctl restart network.service
?????????Ч??/etc/sysconfig/network-scripts?′???route-eno33554984
????(1)10.0.0.0/24 via 192.168.10.1
????systemctl restart network.service
????????????????
????(2)ADDRESS0=20.0.0.0
????NETMASK0=255.0.0.0
????GATEWAY0=192.168.10.2
????systemctl restart network.service
????/etc/hosts :??????????
?????????????????Hosts????????????IP????????????????????????????????????????????????????????DNS??????????????????IP??????????
[root@alpha ~]#cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.200.7 www.baidu.com good #????IP?????????
/etc/resolv.conf??????????????????????
nameserver    //????DNS????????IP???
domain       //???屾??????
search        //???????????????б?
sortlist        //??????????????????
[root@alpha ~]#cat /etc/resolv.conf
# Generated by NetworkManager
search day
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
?????趨??????
??????centos6?У?
????hostname :????????
????hostname HOSTNAME???????????????????
????/etc/sysconfig/network #????HOSTNAME??????????Ч?????????????????????????????
????[root@nieqiping ~]#cat /etc/sysconfig/network
????NETWORKING=yes
????HOSTNAME=nieqiping.com
????centos7??
????hostname?????????????????????hostnamectl?????????????????/etc/hostname
????hostnamectl status????????????
????hostnamectlset-hostname HOSTNAME????????????
????CentOS 7 ???????
????nmcli????:???????ifconfig???centos6???????????centos7??y??
nmcli  [ OPTIONS ] OBJECT { COMMAND | help }
device – show and manage  network interfaces #??????????????
COMMAND: ={status|show|connect|disconect|delete|wifi|wimax}
nmcli device show #????????????
nmcli device status #???????????
nmcli device disconnect eno33554984 #??????????????
nmcli device connect eno33554984 #????????????????
connection -start??stop ??and manage network connections#?????????????
COMMAND:={show| up | down | add | edit | modify | delete | reload | load }
nmcli connection show #????????????????????IP???
nmcli connection down en033554984??????
connection??????
modify [id| uuid | path ] <ID> [+|-] <setting>.<property><value>
nmcli modefy modify eno33554984 +ipv4.adress 192.168.100.254/24
??????????IP?????????:
????#nmcli connection modify IFACE [+|-]setting.property value
????ipv4.address
????ipv4.gateway
????ipv4.dns1
????ipv4.method :???÷???
????manual:??????