Networking session-4-final by aravind.R
-
Upload
navaneethan-naveen -
Category
Education
-
view
65 -
download
0
description
Transcript of Networking session-4-final by aravind.R
Networking Session 4
Network Commands
By Aravindan R
Network Commands
Ping Tracert Host Whois Telnet Nslookup Netstat
Ping(Packet INternet Groper)
Ping helps to test connectivity between two nodes be it LAN or in WAN
Ping used ICMP protocol It sends an ICMP Echo_request to a specified host If the host reponds we get an ICMP packet back
Syntax:
ping ip-address or ping domainnname
Tracert or Traceroute
Traceroute is a network troubleshooting utility. It shows number of hops taken to reach destination
also determine packets traveling path It uses UDP protocol In linux based OS we use Traceroute whereas in
windows we use tracert
Syntax:
tracert ip-address or tracert hostname
tracerroute ip-address/hostname
Host
Host is a simple utility for performing DNS lookups
It is normally used to convert names to IP addresses and vice versa
Syntax:
host 8.8.8.8
8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com
Host
Eg:
host google-public-dns-a.google.com
google-public-dns-a.google.com has address 8.8.8.8
google-public-dns-a.google.com has IPv6 address 2001:4860:4860::8888
Whois
Helps to find out the owner of the domainname or an IP address
You can install it using
yum install jwhois in rpm based linux machine
Syntax:
whois domainname or whois ip-addr
Whois
Eg 1:
whois 209.85.231.104
Sample output:
NetRange : 209.85.128.0 - 209.85.255.255
CIDR : 209.85.128.0/17
NetName : GOOGLE
NetHandle : NET-209-85-128-0-1
Parent : NET-209-0-0-0-0
NetType : Direct Allocation
NameServer : NS2.GOOGLE.COM
Telnet
Using telnet you can connect to any machine that has certain ports open.
It uses TELNET protocol
Syntax
telnet ,press enter
telnet > help , for more options
Telnet
Telnet > open google.com 80
telnet> open facebook.com 80
Trying 173.252.110.27...
Connected to facebook.com.
Escape character is '^]'.
telnet> status
Connected to facebook.com.
Escape character is '^]'.
telnet> close
Connection closed.
telnet> status
No connection.
Nslookup It is used to troubleshoot DNS related problems. Nslookup command will query the DNS server to obtain
the ipaddress or domainname or any other DNS records
Syntax
nslookup redhat.com (Forward Lookup)
Server: 192.168.19.2
Address:192.168.19.2#53
Non-authoritative answer:
Name: redhat.com
Address: 209.132.183.181
$ nslookup 209.132.183.181(Reverse lookup)
Server: 192.168.19.2
Address: 192.168.19.2#53
Non-authoritative answer:
181.183.132.209.in-addr.arpa name = origin-www2.redhat.com.
Netstat Netstat command displays various network related
information such as network connections, routing tables, interface statistics.
Syntax
netstat -a (List all ports)
netstat -at (List Tcp port)
netstat -au (List Udp port)
netstat -l (listening port)
netstat -s (Show statistics for all ports)
netstat -r (kernel routing information)
netstat -an | grep ':80' (Find out what process is running in port 80)
netstat -i ( Display list of interfaces available in server)
netstat -n ( It wont resolv the hostname , diplays the ip address)