Ifconfig command
Ifconfig-a
Ifconfig eth0 [Up|down]
Ifconfig eth0 172.16.6.14/16 [up]
Ifconfig eth0 172.16.6.14/16 (16 subnet mask length)
Ifconfig eth0 172.16.6.14 netmask 255.255.0.0
Note: effective immediately.
Enable promiscuous mode: [-]promisc
Route command
Routing Management Commands
View Route-n
Adding a route add
Route add-host 192.168.1.44 GW 172.16.6.1 Dev eth0 (destination host routing)
Route add-net 192.168.0.0 netmask 255.255.255.0 gw 172.16.6.1 Dev eth0
Default route, Gateway:
Route add-net 0.0.0.0 netmask 0.0.0.0 GW 172.16.6.1
Route add default GW 172.16.6.1
Route Del-host 192.168.1.44
Route del-net 192.168.0.0 netmask 255.255.255.0
DNS server Specifies
/etc/resolv.cnfg
NameServer DNS_IP1
NameServer DNS_IP2
NameServer DNS_IP3
Positive solution: Fqdn-->ip
Dig-t A FQDN
Host-t A FQDN
Inverse solution: Ip-->fqdn
Dig-x IP
Host-x IP
Netstat: Network Status View command
Netstat-print network connections, routing tables, interface statis-
Tics, masquerade connections, and multicast memberships
Show Network Connections:
Netstat-t
Netstat-tn
Netstat-atn
-t:tcp
-u:udp
-r:raw socket
-L: Monitor
-A: all States
-N: Displayed in numeric format, not reversed
-e: Extended format information
-P: Show dependent process PID
Common combinations:
-TAN,-UAN,-TNL,-UNL
Show route Table
Netstat-rn
Display interface Statistics
Netstat-i
Netstat-ieth0
Ifconfig-route-netstat