Tuesday, 2 September 2014

Back|Track OS Tools Tutorials Episode 2: Network Debugging commands



Back|Track OS Tools Tutorials
                Episode 2 
Network debugging commands



What i'm going to talk about today are some command which some of you might be familiar with, If you know all about these commands then you're free to skip this episode, If not then stay, you might learn a thing or two to look cool in front of your friends.

Warning: Running a PING command in front of someone to impress them is only going to make you look like a complete and utter dumbass, Please don't.

So the first command we got is Ping, what ping basically does is that it checks if the website, computer or server in question is online and responding.
ping has one mandatory argument which is the address that you want to ping and it's used as follows: 

/>ping www.blogger.com
Pinging blogger.l.google.com  [173.194.39.44] with 32 bytes of data:
Reply from 173.194.39.44: bytes=32 time=77ms TTL=57
Reply from 173.194.39.44: bytes=32 time=78ms TTL=57
Reply from 173.194.39.44: bytes=32 time=78ms TTL=57
Reply from 173.194.39.44: bytes=32 time=78ms TTL=57

Ping statistics for 173.194.39.44:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:

    Minimum = 77ms, Maximum = 78ms, Average = 77ms

What we did there was "pinging" the Blogger.com website to see if its online and we can see it responded pretty well judging from the "Reply from" part.
if we try to ping a host that is offline, doesn't exist or doesn't respond to ICMP packets which are what ping packets are called you'll get a "Request time out" error which means that the program sent a packet but didn't get a reply.

The best analogy for the ping command is that its like a blind man with a ball which he throws around to see if there's something ahead of him, if he threw a ball and it hit a wall it'll rebound back to him and then he'll know that there's something there, if he threw a ball and it never came back (THE TRAITOR !) then there's nothing there, also the guy lost his ball (no pun intended)

the second command we got is the traceroute command and what that one does is that it gives you the route the packet took to arrive at the destination you sat for it, its sorta like the flight tracking thing that you see at the airport.
the traceroute command also takes a mandatory argument which is the destination which you want the packet to reach and its used as follows: 



/>traceroute www.cnn.com
static.121.168.4.46.clients.your-server.de 46.4.168.121 de 1.099 ms 1.208 ms 1.206 ms
2 hos-tr1.juniper1.rz13.hetzner.de 213.239.224.1 de 0.123 ms
hos-tr4.juniper2.rz13.hetzner.de 213.239.224.97 de 0.243 ms
hos-tr3.juniper2.rz13.hetzner.de 213.239.224.65 de 0.242 ms
3 core22.hetzner.de 213.239.245.121 de 0.245 ms
core21.hetzner.de 213.239.245.81 de 0.233 ms 0.230 ms
4 core11.hetzner.de 213.239.245.225 de 2.740 ms
core11.hetzner.de 213.239.245.221 de 2.778 ms 2.777 ms
5 juniper4.rz2.hetzner.de 213.239.203.138 de 2.799 ms
juniper4.rz2.hetzner.de 213.239.245.26 de 2.766 ms
juniper4.rz2.hetzner.de 213.239.203.138 de 2.799 ms
6 ae51.bar2.Munich1.Level3.net 62.140.25.101 gb 5.440 ms 5.413 ms
ae55.edge7.Frankfurt1.Level3.net 195.16.162.253 gb 9.250 ms
7 ae-0-11.bar1.Munich1.Level3.net 4.69.153.253 us 5.884 ms 5.866 ms 5.846 ms
8 * * *
9 * * *
10 * * *



what you're seeing there are the names of the gateways or routers that forwarded you package on it journey till it reached the cnn.com land.

Both of these commands can be used to troubleshoot a faulty connection to a device as we will encounter later on in the series, so play around with them and use the man command if you want to know more about the syntax and their available options.



Next Episode: DNSDICT6

No comments:

Post a Comment