Basic Network Commands | For Beginners - GoTechTalk


Thursday, January 21, 2021

Basic Network Commands | For Beginners

There are various switches available for all these commands and based on your understanding and usage you can use these five commands. 
By Sudarshan Yerunkar |  | Posted on 21th January 2021 | 🛍 Support me with your Amazon purchases:
Basic Network Commands | For Beginners
Hey everyone, Sudarshan here and today we will understand 5 basic network commands which should help you do the fix some basic network problems. I know networking can be daunting task especially for people who do not know how networking exactly works. 

So these 5 commands which you should always have in your kitty as soon as you face any kind of networking issues these basic commands will help you actually diagnose the problem to an extent obviously you might need expertise at certain point but this will at least give you some clues as to where the problem could be and I'm pretty sure that these commands will help you in future so let's get started. 

Basic Network Command #1: IPCONFIG
So the most basic command I think you have already used it a lot is "ipconfig" I know you already used it most of you already know but again this is for someone who does not know a word about networking. So ipconfig gives you all the details of your network it will give you all the details which are required to exactly understand what is your IP address what is your DNS what is your gateway all those kind of information, an there is a special switch if you use ipconfig with the /all switch (ipconfig /all) then it will give you much more information than a standard ipconfig command, it will also give you the host name of your particular machine and this will definitely help you understand what exactly the network configurations are there on your machine. So whenever you are finding any kind of network issues you should first try to understand the IP address the subnet mask the default gateway, all this kind of information. 

Basic Network Command #2: NSLOOKUP
NSlookup is the command which give you the IP address of the domain name server which is assigned that particular domain name which you are trying to query. Suppose if you are quering then the comman will be nslookup this will give you the exact IP address for that particular domain name. So this is what will be given by your NS look query where you can identify what is your name server and then the ip address which will be resolving to your Google server. Now where it can be used suppose there is a scenario where you are able to reach one of your application using its IP address but when you're trying to type the host name of that particular application it is not reaching and you are getting some error like not able to recognize the name or something like that some error some random error you are getting while you're querying the host name or the domain name of that particular application. Now there can be some issue with the DNS So what you can do a reverse look up. Reverse look up instead of passing query through the domain name it will pass through the IP then it will tell you that the particular domain name it is resolving to. This might happen that the IP which you know which you are trying to reach is not exactly assigned to that particular application so NS look up is a very good command if you are trying to identify an fix DNS related issues. 

Basic Network Command #3: PING
Ping command is simply a command wherein you try to understand whether a particular host is reachable over the network or not. So, suppose if you want to test your application and it is not working and your application is a three-tier application where there is a web server then there's an application server and then there is a database server. So it's a three tier architecture and whenever you're hitting you are getting some error so the basic thing that you can do is you try to ping the first server with which you are making that connection. Try to ping that server by this simple command for example ping to see if its reachable or not. We were trying to hit some query on the database server but you're not able to establish the connection try to hit that particular database server with this ping command and understand that whether the response is coming back or not. Ping is a very important command, whenever you try to check the reachability of any particular server or service these commands will come handy. 

Basic Network Command #4: TRACEROUTE.
Tracerouteis a very good command if you are trying to diagnose some sort of a performance issue because traceroute as the name suggests when you do a traceroute onto a particular destination like traceroute this particular traceroute command will show you all the hops that particular packet receives and takes over multiple routers. so suppose you are a source and you are trying to connect to the destination, so there must be different network devices with which the packet is going to that particular destination, so this particular trace would exactly tells you whether you are able to go through those hops correctly or not and when you are doing the traceroute you can see that in one particular hop the request timeout error, request timeout means that at that particular hop that particular router is not further passing the packet to the next router. Always look for those signals and it also give you the time it took for sending a packet from one source to the destination. This also goes to show that one particular hop whether it is taking more time than usual so traceroute again a very important command when you are trying to identify intermittent performance kind of issues. 

Basic Network Command #5: NETSTAT.
Netstat command is used to identify all the active connections you have over the network. so whenever you try to establish any kind of TCP IP connections you know you connect to a particular port. suppose for example you try to connect to an Oracle database now what is the default port for Oracle database people who don't know it is 1521, so whenever you're doing netstat you will get all the list of active connections your computer is listening to and the port of the scene. so suppose you're trying to reach a particular server over the network on a specific port and you are you're getting error like connection refused or something like that so in that case it would be worth running a netstat command to identify all the open active TCP IP connections and identify whether there is this particular port is already consumed by some other kind of connection so this netstat command is very helpful when you are trying to troubleshoot something to do with your connectivity and your open TCP IP connections. 

There are various switches available for all these commands and based on your understanding and usage you can use these five commands. 

I hope now you know what are these five basic commands and how it can help you in order to troubleshoot your networking issues. There are lot of advanced switches which are available to use.

No comments:

Post a Comment