1.ifconfig Interface Up/down/mtu/netmask/broadcast
Ifconfig eth0 192.168.1.1 #不加参数, automatically add masks by standard A/B/C class
Ifconfig eth0 192.168.100.100 netmask 255.255.252.0 MTU 8000
Ifconfig eth0:0 192.168.100.101 #给一张网卡添加多个ip
Ifconfig settings expire after restarting the network service
Ifconfig wl0 up #启动无线网卡 without configuring any parameters
2. Ifup/ifdown using the/etc/sysconfig/network-scripts/ifcfg-eth* configuration to enable the NIC
3.route
Router Add/del–net/host netmask Gw/dev
Route add–net 192.168.100.0 netmask 255.255.255.0 Dev eth0
Route add default GW 192.168.1.254
Route del–net 169.254.0.0 netmask 255.255.0.0 Dev eth0
4.ip
IP link show/set device up/down/address/name/mtu
IP link set eth0 down
IP link set eth0 MTU 1000
IP link Set eth0 name Virbird address Aa:aa:aa:aa:aa:aa
IP address add/del IP dev broadcast/label/scope (global,site,link,host)
IP address add 192.168.1.2/24 broadcast + dev eth0 label Eth0:vbird
IP addresss del 192.168.1.2/24 dev eth0
IP route
IP route Add/del ip/network via Gateway/dev MTU
IP route add 192.168.5.0/24 dev eth0
IP route add 192.168.10.0/24 via 192.168.5.100 Dev eth0
IP route add default via 192.168.1.254 dev eth0
IP route Delete 192.168.10.0/24
5 dhclient IP Request via DHCP
6 Ping
Ping–c2–s 8000–m do 192.168.1.254 #发大包并且不允许交换机或路由器将封包重组
IP header 20bytes,icmp20bytes, ETHERNET Baotou 1500
7netstat
-N uses a number instead of a host name
-A lists all online statuses, including the Tcp/udp/unix socket
-T only TCP packets
-U UDP packets only
-L All in the listening service
-p list PID and program file name
-C refresh every few seconds
View network services that are currently started
Netstat–tulnp
View all network online status for this computer
The netstat–atunp# client randomly takes more than 1024 ports, and only root can start ports below 1024.
8 nslookup
-query=type
9 wget
Vim/etc/wgetrc
Http_proxy =
Ftp_proxy =
Use_proxy= on
Ten tcpdump
-A ASCII format to display packet contents
-E is displayed in two-layer packet format
-NN Digital Display Host
-x 16 in binary form
-I listener Port
-W Output listening content
Tcpdump–i Eth0–nn Port 21