 Hi everyone, in this video we will learn about various network debugging tools. So let's open a terminal and I'll start with nslookup. So nslookup is used to find out the IP address which is linked to various URLs. So whenever our computer accesses a website then first it needs to resolve it to an IP address so that it can add that IP address to the packet headers. So using nslookup we can find out whether it is able to resolve these names or not. So let's say I want to find out the IP address of google.com. So I'll type nslookupgoogle.com and it shows me the name server that is used to find out this particular mapping and it shows me both the addresses. One is the IPv4 address and other is IPv6 address. And it shows me non-authoritative also which means that this particular server is not responsible for this mapping but it knows this mapping because it was cached there so it might have dissolved this google.com earlier so it knows that this is the particular mapping. We can also run this nslookup command in interactive mode so we can just type nslookup and press enter and again we can type out various URLs to find out their IP addresses. Another thing that we can find out using nslookup is the addresses for various mail servers. So for that we need to change the type so I will set that type to mail exchange and now I can write various domain names and then it will give me the exchange servers for those domain names. So let's find out the mail servers for gmail.com. So again it gives me these addresses so these are various mail exchange servers which it is using for the gmail.com domain name. So we can set that type again to type equal to a and that will again give us the IP addresses. So we can exit this mode using exit so that was about nslookup so the next rule that we are going to discuss is ping tool. So ping is a very useful command it lets us find out whether our computer is connected to the internet and whether it is able to send packets to a server successfully or not. So I can type out the website URL and it will send packets to this particular server and see its response. So here you can see that it keeps sending various ICMP packets we can stop it using ctrl plus c and it shows that it transmitted 9 packets and it got back all the 9 packets from the server so there was 0% packet loss and here it shows the round trip time for sending these eco packets. So we can see that it is able to send packets to google.com successfully and it shows us the various minimum average maximum etc for this round trip time. So let's move on to trace route command the trace route command is used to show us the route that is taken by the data packets to reach a particular server. So whenever it sends some packets to let's say the google servers then it needs to first pass through various routers and then finally the packet reaches the google server. So trace route command is used to find out the addresses for each of those router which are there in the path and also it shows us the round trip time to each router. So how can we use trace route command? So I will write trace route www.google.com and I will give it minus iflag to use ICMP packets. Okay so I need to use sudo. So here it shows us the IP address of each of the router that it found in its path before finally reaching the google server and it also shows us 3 round trip times So it sends 3 packets to each of the router and finds out what is the round trip time. So these times are pretty consistent and the final round trip time to reach the destination server matches approximately the same with what we found out in the ping command. So here it shows stars for these 2 routers which means that they might not be configured to reply to this ICMP packets. So that's all the information that we get from the trace route command. So the final command that we will cover is ifconfig. The ifconfig command is used to list all the interfaces which are up in our computer. So if I just type ifconfig and press enter it shows me that there are 3 interfaces. This is the ethernet interface then the loopback interface and this is for the wifi. So here if we see that the ethernet is not running because I am currently using a wifi network. So here it is running and we can also see some transmitted and deceived packets here. So let's go through whatever information it shows. So it shows me that this interface is up and we can broadcast or multicast and it is running. Then it shows me the maximum transmission unit and what does this mean? This means that 1500 bytes is the maximum packet size that you can send using this interface. Then it shows me the IPv4 address and the IPv6 address which are linked to this interface. And some other details such as queue length and the received packets, received bytes or the transmitted packets or transmitted bytes. We can use ifconfig to turn any interface upward down. So let's say I want to shut down this ethernet interface. I can write ifconfig ENP0S31F6 down and I need to use sudo. So this will turn it down. So now if I type in ifconfig then it will list only two interfaces because only these two interfaces are up. And how can I see all the interfaces? I can use ifconfig hypheniflag to see all the interfaces and I can turn it up again using the same command. So I will just change down to up. And now it will show me all the interfaces again. Also we can change various IP address or the net mask etc. of any interface using ifconfig command if you want to do so. So those are some of the network debugging tools. If you want to go in detail about any of the tools you can see the main page of any of this. So let's say we open the main page of NSLookup. So here it lists various options that we can use with this command. Similarly you can go through main page of any command. So that's it for this video. Thanks and have a nice day.