NETWORK DEBUGGING..

Network debugging….
A) Tcpdump:- is a packet analyzer
Note: tcpdump uses || (or), &&(and), !(not) concept
i) will show source and destination for 80 port through eth0 10 times:
# tcpdump -c 10 port 80 -i eth0

ii) # tcpdump dst 192.168.1.2 or dst 192.168.1.3 or dst 192.168.1.3 and tcp port 80

iii) You can use wireshark to get clear picture of tcpdump (using -w)
# tcpdump -w savingfile.txt
You can read the file using
# tcpdump -r savingfile.txt

iv) # tcpdump -n host 192.168.1.2 and src 122.53.66.20 and ! port 22
(-n = print IP not resolving.)

====================================================================

B) Network issues:
i) Trace the complete route:
# traceroute google.com
ii) add default gateway if not added (route -n):
# route add default gw 192.168.1.254 eth0
ii) add ip address/netmask:
# ifconfig eth0 192.168.1.13 netmask 255.255.255.0
iv) Lookup local ip address (equivalent to host `hostname`)
# hostname -i

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

one + six =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>