Friday, May 13, 2016

Some nice useful networking related commands

Send an arp command:
 
   arping 10.30.0.132
 
View arp cache:
 
   arp -n 
 
Display routing table using any of the following commands:
 
  ip route show
  route -n
  netstat -rn 
 
 
Show a route for a destination IP address:
 
  ip route get 10.0.2.14
 
Show traffic on a nic for a particular protocol:
 
  tcpdump -i eth0 -v arp    (arping)
  tcpdump -i eth0 -v icmp   (ping)
  tcpdump -i eth0 -v 


Capture packets with IP address:
 
   tcpdump -n -i eth0

No comments:

Post a Comment