Friday, 23 May 2014

NETWORK BASIC COMMANDS

  
Objectives:

Gather information including connection, host name, Layer 2 MAC address and Layer 3 TCP/IP network address information.

Compare network information to other PCs on the network.
Learn to use the TCP/IP Packet Internet Groper (ping) command from a workstation.
Learn to use the Trace Route (tracert) command from a workstation.

Step 1 Connect into the Internet

Establish and verify connectivity to the Internet. This ensures the computer has an IP address.

Step 2 Gather TCP/IP configuration information

Use the Start menu to open the Command Prompt, an MS-DOS-like window. Press Start > Programs > Accessories > Command Prompt

OR
Start > Programs > Command Prompt. OR
Press Start>Run Then type cmd.

The following figure shows the Command screen. Type ipconfig and press the Enter key. The spelling of ipconfig is critical while case is not. It is short for IP Configuration.  i do this task with my friend laptop sufyan and its cmd snip shot is given below



Fig: 1


Fig: 2
This first screen shows the IP address, subnet mask, and default gateway. The IP address and the default gateway should be in the same network or subnet, otherwise this host would not be able to communicate outside the network. In the figure the subnet mask tells us that the first three octets must be the same to be in the same network.

Note: If this computer is on a LAN, the default gateway might not be seen if it is running behind a Proxy Server. Record the following information for this computer.

Step 3 Record the following TCP/IP information for this computer

IP address: 192.168.1.6

Subnet Mask: 255.255.255.0

Default Gateway: 192.168.1.1

Difference between Fig.1 and Fig.2: The features of wireless LAN adaptor, wireless network connection are absent

Step 4 Compare the TCP/IP configuration of this computer to others on the LAN

If this computer is on a LAN, compare the information of several machines.

Are there any similarities? Yes, the Subnet mask and default gateway are similar.

What is similar about the IP addresses? The Network ID is same.

What is similar about the default gateways? Both of the machine's Default Gateway are same.

The IP addresses should share the same network portion. All machines in the LAN should share the same default gateway.
Record a couple of the IP Addresses:

192.168.1.2 , 192.168.1.6
Step 5: Check additional TCP/IP configuration information

To see detailed information, type ipconfig /all and press Enter. The figure shows the detailed IP configuration screen.


Fig.3: Command Screen for ipconfig /all


The host name, including the computer name and NetBIOS name should be displayed. Also, the DHCP server address, if used, and the date the IP lease starts and ends should be displayed. Look over the information. Entries for the DNS, used in name resolution servers, may also be present. The previous figure reveals that the router is performing both DHCP and DNS services for this network. This would likely be a small office or home office (SOHO) or small branch office implementation.

Notice the Physical Address (MAC) and the NIC model (Description).

(74-DE-2B-72-91-1E) and (Bluetooth Device <Personal Area Network>)Write down the IP addresses of any servers listed:

(192.168.1.2), (192.168.1.6) (192.168.1.102)

Write down the computer Host Name:
Sufiyan

Write down the Host Names of a couple other computers:

(HASHIM ELAHI),  (monA).

Do all of the servers and workstations share the same network portion of the IP address as the student workstation?  Yes

It would not be unusual for some or all of the servers and workstations to be in another network. It means that the computer default gateway is going to forward requests to the other network.

Step 6 Close the screen

Close the screen when finished examining network settings.
Repeat the previous steps as necessary. Make sure that it is possible to return to and interpret this screen.


Based on observations, what can be deduced about the following results taken from two computers connected to one switch?

Computer 1

IP Address: 192.168.1.2
Subnet Mask: 255.255.255.
Default Gateway: 192.168.1.1

Computer 2
IP Address: 192.168.1.6
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

Computer 3
IP Address: 192.168.1.3
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

Should they be able to talk to each other?

______________________________________________________________________________

Are they all on the same network? Why or why not?
Yes, to make sure that the IP address should be close enough.2. Using “ping” and “tracert “

Objective

Learn to use the TCP/IP Packet Internet Groper (ping) command.

Learn to use the Trace Route (tracert) command.
Observe name resolution occurrences using WINS and/or DNS servers.

Background

This lab assumes the use of any version of Windows. This is a non-destructive lab and can be done on any machine without concern of changing the system configuration.

Ideally, this lab is performed in a LAN environment that connects to the Internet. It can be done from a single remote connection via a modem or DSL-type connection. The student will need the IP addresses that were recorded in the previous part of the lab.

PING Command SET:

Ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] -t ==> repetitive.

-n ==> number of echo to be sent
-l ==> sending buffer size [Max: 65500 bytes] -f ==> don’t fragment.
-r count ==> record route for count hops [3rd layer device] -j ==> loose source route
-k ==> strict source route -i TTL ==> time to live

-v TOS ==> Type of Service


Example:

Ping -t -l 60000 192.168.230.1 -f -l 1000

-l 1000
To see the difference between fragmenting and non-fragmenting, use -f

ping -r 3 192.168.230.1

Step 1 Establish and verify connectivity to the Internet

This ensures the computer has an IP address.

Step 2 Access the command prompt

As accessed in previous part of the lab.
Step 3 ping the IP address of another computer

Ping 192.168.1.2

In the window, type ping, a space, and the IP address of a computer recorded in the previous lab. The following figure shows the successful results of ping to this IP address. Ping uses the ICMP echo reply feature to test physical connectivity. Since ping reports on four attempts, it gives an indication of the reliability of the connection. Look over the results and verify that the ping was successful. Is the ping successful?

Step 4 ping the IP address of the default gateway
Ping 192.168.1.1


Try to ping the IP address of the default gateway if one was listed in the last exercise. If the ping is successful, it means there is physical connectivity to the router on the local network and probably the rest of the world.

Step 5 ping the IP address of a DHCP or DNS servers

Try to ping the IP address of any DHCP and/or DNS servers listed in the last exercise. If this works for both server and they are not in the network, what does this indicate?
No idea.


Was the ping successful? NO

Step 6 ping the Loopback IP address of this computer

Type the following command: ping 127.0.0.1

The 127.0.0.0 network is reserved for loopback testing. If the ping is successful, then TCP/IP is properly installed and functioning on this computer.


Was the ping successful? YES

Step 7t ping the hostname of another compuer

Try to ping the hostname of the computer that was recorded in the previous lab.

Step 8 ping the hostname of another computer using

Try to ping repetitively, the hostname of the computer

How can we stop the ping: CTL+C


Step 9 ping the Yahoo web site

Type the following command: ping www.yahoo.com
 The first output line shows the Fully Qualified Domain Name (FQDN) followed by the IP    address. A Domain Name Service (DNS) server somewhere in the network was able to resolve the name to an IP address. DNS servers resolve domain names, not hostnames, to IP addresses.
Without this name resolution, the ping would have failed because TCP/IP only understands valid IP addresses. It would not be possible to use the web browser without this name resolution.
With DNS, connectivity to computers on the Internet can be verified using a familiar web address, or domain name, without having to know the actual IP address. If the nearest DNS server does not know the IP address, the server asks a DNS server higher in the Internet structure.

What is the IP Address of www.yahoo.com: 46.228.47.115

How much time did our ping took to reach www.yahoo.com: 286Ms


Tracert Command SET:

tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

-d ==> do not resolve address to hostname.

-h maximum_hops ==> maximum number of Hosts to Search for Target -j host-list ==> loose source router along host-list
-w timeout ==> wait timeout milliseconds for each reply

Step 10 Trace the route to the Yahoo web site

Type tracert www.yahoo.com and press Enter.


Tracert is TCP/IP abbreviation for trace route. The preceding figure shows the successful result when running tracert from Bavaria in Germany. The first output line shows the FQDN followed by the IP address. Therefore, a DNS server was able to resolve the name to an IP address. Then there are listings of all routers the tracert requests had to pass through to get to the destination. tracert uses the same echo requests and replies as the ping command but in a slightly different way. Observe that tracert actually contacted each router three times. Compare the results to determine the consistency of the route. Notice in the above example that there were relatively long delays after router 11 and 13, possibly due to congestion. The main thing is that there seems to be relatively consistent connectivity. Each router represents a point where one network connects to another network and the packet was forwarded through.

What is the difference between the following commands?

Tracert www.yahoo.com
Tracert –h 20 www.yahoo.com


Tracert shows how much HOPS  the desired location is away, and Tracer -h20 declares the location which is at 20 hops distance away.Step 11 Trace a local host name or IP address
Tracert 192.168.1.1

Count the number of Hops: 30 Hops

No comments: