# ifconfig——
# ifconfig接口(上|下)
ifconfiginterface [aftype]选项|地址…
#ifconfig INTERFACE IP/mask [up]
#ifconfig INTERFACE IP netmask MASK
route -n
route add
routeadd [-net|-host] target [netmask Nm] [gw Gw] [[dev] If]
route add [-net|-host] target [netmask Nm] [gw GW] [[dev] If]
route add-net 10.0.0.0/8 gw 192.168.10.1 dev eth2
route add -net 0.0.0.0/0.0.0.0 gw192.168.10.1
route add default gw 192.168.10.1
route del [-net|-host] target [gw Gw] [netmask Nm] [[dev] If]
route del -net 10.0.0.0/8 gw 192.168.10.1
route del default
Printnetwork connections, routing tables, interface statistics, masqueradeconnections, and multicast memberships
netstat -rn
-r
-n
netstat [--tcp|-t] [--udp|-u] [--udplite|-U] [--sctp|-S] [--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n] [--extend|-e[--extend|-e]] [--program|-p]
-tTCPFSMFinate State Machine
-uUDP
-wraw socket
-l
-a
-nIPPort
-e
-pPID
tcp
udp
netstat {--interfaces|-I|-i} [iface] [--all|-a] [--extend|-e] [--verbose|-v] [--program|-p] [--numeric|-n]
netstat -i
netstat -I
show/manipulate routing, devices, policy routing and tunnels
ip[ OPTIONS ] OBJECT { COMMAND | help }
OBJECT:={ link | addr | route | netns }
OBJECTOBJECT
ip OBJECT
iplink network device configuration
ip link set - change device attributes
devNAME (default)dev
updown
multicastonmulticast off
nameNAME
mtuNUMBERMTU1500
netnsPIDnsnamespace
ip link show - display device attributes
ip link help -
ip netns - manage network namespaces.
ip netns listnetns
ip netns添加NAMEnetns
ip netns del NAMEnetns
ip netns exec名称COMMANDnetns
ipaddress——协议地址管理。null