Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

The Islamia University of Bahawalpur

University College of Engineering & Technology


Department of Telecommunication Engineering
Computer Communication Networks (CS-343)

LAB # 01 BASIC NETWORKING COMMANDS

Lab Instructor Signature: _________________________ Date: ________________

Lab Objectives:

 To become familiar how to get basic information about the user end system,
 To get the information about the connected nodes with LAN
 To perform different networking tasks
 To troubleshoot the connection problems.

Introduction to LAN (Local Area Network):

A local area network (LAN) is a group of computers and associated devices that share a common
communications line or wireless link to a server. Typically, a LAN encompasses computers and
peripherals connected to a server within a distinct geographic area such as an office or a
commercial establishment. Computers and other mobile devices use a LAN connection to share
resources such as a printer or network storage.

A local area network may serve as few as two or three users (for example, in a small-office
network) or several hundred users in a larger office. LAN networking comprises cables,
switches, routers and other components that let users connect to internal servers, websites and
other LANs via wide area networks.

Ethernet and Wi-Fi are the two primary ways to enable LAN connections. Ethernet is a
specification that enables computers to communicate with each other. Wi-Fi uses radio waves to
connect computers to the LAN. Other LAN technologies have lost favor as Ethernet and Wi-Fi
speeds have increased. The rise of virtualization has fueled the development of virtual LANS,
which allows network administrators to logically group network nodes and partition their
networks without the need for major infrastructure changes.

Getting the hostname of your computer

The hostname can be obtained using the command prompt. Press Windows Key + R and type
“cmd” in the Run box, and then press enter. In the command window type “hostname” and press
enter, the output will be:

Lab Manual [Computer Networking]


Hostname of your computer: kumailPC

Basic information about your network

Type the following command in command prompt and answer the questions in the table ( also
attach the snapshot of your command prompt).

>>ipconfig /all

Question Answer
How many network connections are shown for 1- Total Connections = ________
your PC? 2- Ethernet = __________
3- Wireless = __________
4- Tunnel = __________
Which connection/s is/are active at the moment? 1- __________
2- __________

What is the physical address of your host? What MAC: __________


is its length? Length: __________
Is DHCP enabled for your connection?
What is the IPv4 address of your host?
What is the length of IP address?
What subnet mask is used for your end system?
What is the total lease time for your computer?
IP address of default gateway?
IP address of DHCP server?
IP address of DNS server?

Releasing and renewing your LAN connection

You can disconnect yourself from the local area network and you can also obtain new lease from
the DHCP server. Type the following commands and answer the questions.

>>ipconfig /release

Question Answer
Can you use the Internet after releasing the
connection?
Can you see the IP addresses of your host,
DHCP server, DNS server and default
gateway?

Now execute the renew command to obtain a fresh lease from the server and answer the
following questions.

>>ipconfig /renew

Lab Manual [Computer Networking]


Question Answer
Can you use the Internet after renewing the
connection?
Can you see the IP addresses of your host,
DHCP server, DNS server and default
gateway? Are the addresses same as before?

Viewing and clearing the history of visited servers

The details of your browsing history are saved by the DNS server. You can view and delete this
history.

>>ipconfig /displaydns

>>ipconfig /flushdns

Testing the connection between two machines

You can test the TCP/IP connection between two communicating entities by using the “ping”
command. The ping command is a Command Prompt command used to test the ability of the
source computer to reach a specified destination computer. The ping command is usually used as
a simple way verify that a computer can communicate over the network with another computer
or network device.

The ping command operates by sending Internet Control Message Protocol (ICMP) Echo
Request messages to the destination computer and waiting for a response. How many of those
responses are returned, and how long it takes for them to return, are the two major pieces of
information that the ping command provides.

>>ping www.facebook.com

Question Answer
How many packets were sent by your
computer to Facebook server?
How many packets were lost in the way and
could not reach Facebook?
How many packets were received back?
What is the minimum, maximum and average
round trip time (RTT) for the ping?
What is the IP address of Facebook server?
What is the maximum value of time to live
(TTL)?

Trace Route Command

Lab Manual [Computer Networking]


Traceroute is a command which can show you the path a packet of information takes from your
computer to one you specify. It will list all the routers it passes through until it reaches its
destination, or fails to and is discarded. In addition to this, it will tell you how long each 'hop'
from router to router takes.

In Windows, select Start > Programs > Accessories > Command Prompt. This will give you a
window like the one below.

Enter the word tracert, followed by a space, then the domain name. The following is a successful
traceroute from a home computer in New Zealand to mediacollege.com:

Firstly it tells you that it's tracing the route to mediacollege.com, tells you the IP address of that
domain, and what the maximum number of hops will be before it times out. Next it gives
information about each router it passes through on the way to its destination.

1 is the internet gateway on the network this traceroute was done from (an ADSL modem in this
case)
2 is the ISP the origin computer is connected to
3 is also in the extra network
4 timed out
5 - 9 are all routers on the global-gateway.net.nz network (the domain that is the internet gateway
out of New Zealand)
10 - 14 are all gnaps.net in the USA (a telecom supplier in the USA)
15 - 17 are on the nac network (Net Access Corporation, an ISP in the New York area)
18 is a router on the network mediacollege.com is hosted on
and finally, line 19 is the computer mediacollege.com is hosted on (sol.yourhost.co.nz)

Each of the 3 columns are a response from that router, and how long it took (each hop is tested 3
times). For example, in line 2, the first try took 240ms (240 milliseconds), the second took 421
ms, and the third took 70ms.You will notice that line 4 'timed out', that is, there was no response
from the router, so another one was tried (202.50.245.197) which was successful.

Lab Manual [Computer Networking]


You will also notice that the time it took quadrupled while passing through the global-gateway
network.

This is extremely useful when trying to find out why a website is unreachable, as you will be
able to see where the connection fails. If you have a website hosted somewhere, it would be a
good idea to do a traceroute to it when it is working, so that when it fails, you can do another
traceroute to it (which will probably time out if the website is unreachable) and compare them.
Be aware though, that it will probably take a different route each time, but the networks it passes
through will generally be very similar. If the example above had continued to time out after line

9, you could suspect that global-gateway.co.nz was the problem, and not mediacollege.com.
If it timed out after line 1, you would know there was a problem connecting to your ISP (in this
case you would not be able to access anything on the internet).

POST LAB QUESTIONS

Q1. Apply the command ipconfig /? And find its possible options. Also complete the table
given in the start of the lab using ipconfig/all using the information of your computer.
(Attach the snapshots of your command window as well).

Answer:

Q2. Apply ping command for any website and complete the table as shown in the lab
manual.

Answer:

Q3. Apply the trace route command for any 2 websites. Discuss its results and attach the
snapshot of your output.

Answer:

Q4. Investigate the following commands Netstat, Getmac. Implement them in the command
window. Explain and show the results.

Answer:

Lab Manual [Computer Networking]

You might also like