Networking session-4-final by aravind.R

15
Networking Session 4 Network Commands By Aravindan R

description

 

Transcript of Networking session-4-final by aravind.R

Page 1: Networking session-4-final by aravind.R

Networking Session 4

Network Commands

By Aravindan R

Page 2: Networking session-4-final by aravind.R

Network Commands

Ping Tracert Host Whois Telnet Nslookup Netstat

Page 3: Networking session-4-final by aravind.R

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

Page 4: Networking session-4-final by aravind.R

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

Page 5: Networking session-4-final by aravind.R

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

Page 6: Networking session-4-final by aravind.R

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

Page 7: Networking session-4-final by aravind.R

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

Page 8: Networking session-4-final by aravind.R

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

Page 9: Networking session-4-final by aravind.R

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

Page 10: Networking session-4-final by aravind.R

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.

Page 11: Networking session-4-final by aravind.R

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

Page 12: Networking session-4-final by aravind.R

$ 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.

Page 13: Networking session-4-final by aravind.R

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)

Page 14: Networking session-4-final by aravind.R

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)

Page 15: Networking session-4-final by aravind.R