**Ip/networking Exercises** Goals ==== * ifconfig * Practicing using ping, tracert and mtr Exercises ===== Log in as the sysadm user using ssh to your machine. ~~~ username: sysadm password: {given in class} ~~~ ~~~ ssh sysadm@pcN.ws.nsrc.org ~~~ ## Your machines' IP At the command prompt type the following command, ifconfig is used to configure network interfaces. To see switches and options, type "man ifconfig" ~~~ $ ifconfig ~~~ This will show you the network interfaces in your machine. You should see "eth0", "lo" ~~~ $ cat /etc/network/interfaces.d/eth0.cfg ~~~ You will see how your machine's IP is configured. How do you see if your neighbour's machine is up and reachable? The command ping is your friend. ~~~ $ ping pc{N+1).ws.nsrc.org ~~~ Ctrl + C to end the ping. Can you ping a google dns server? 8.8.8.8? what do you see? ~~~ $ ping 8.8.8.8 ~~~ Why is the time different when you ping google than your neighbours PC? ## traceroute and mtr The traceroute command is used to show the route packets trace to network host My Traceroute, mtr, is a network diagnsotic tool. NOTE: Ubuntu no longer installs traceroute by default. So use the command below to install it. ~~~ $ sudo apt-get install traceroute ~~~ When prompted, use the class password, _nsrc+ws_. Now use traceroute to various hosts, such as: 196.200.223.1 <-- our router 197.155.94.40 <-- liquid, our local internet provider 8.8.8.8 <-- google DNS 41.57.140.155 <-- South Africa DNS Can you ping them? What can you tell about the time? ~~~ $ traceroute _host_ ~~~ The results of traceroute have this infomation. ~~~ hop_number host_name (IP_address) packet_round_trip_times ~~~ Repeat the exercise using mtr, which combines the funtionality of ping and traceroute. --report switch makes mtr return the result other than interractively. ~~~ $ mtr --report _host_ ~~~ ## REPEAT the above exercises USING other target machines, say in your organization..