KEMBAR78
Practical File of Computer Network | PDF | Network Topology | Ip Address
0% found this document useful (0 votes)
10 views31 pages

Practical File of Computer Network

The document is a practical file for a Computer Networking course, detailing various networking components, transmission media, cable preparation, and LAN topologies. It includes sections on familiarization with devices like LAN adapters, hubs, switches, and routers, as well as the configuration of TCP/IP protocols and subnet planning. Additionally, it covers the advantages and disadvantages of different network topologies such as bus, star, ring, mesh, tree, and hybrid topologies.

Uploaded by

tarandeepk783
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views31 pages

Practical File of Computer Network

The document is a practical file for a Computer Networking course, detailing various networking components, transmission media, cable preparation, and LAN topologies. It includes sections on familiarization with devices like LAN adapters, hubs, switches, and routers, as well as the configuration of TCP/IP protocols and subnet planning. Additionally, it covers the advantages and disadvantages of different network topologies such as bus, star, ring, mesh, tree, and hybrid topologies.

Uploaded by

tarandeepk783
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

PRACTICAL FILE OF

COMPUTER NETWORK
Subject code:-UGCA1916

Submitted To: Submitted By:


Ass.Prof.kamaljit kaur Tarandeep kaur
Class: BCA 3rd sem
Roll No. 2308350

BABA SHRI CHAND COLLEGE OF MANAGEMENT,


NURPURA

1
INDEX

S.no. Description Page no. Remarks


1. Familiarization with networking 3 to 4
components and devices: LAN
Adapters, Hubs, Switches, Routers
2. Familiarization with transmission 5 to 6
media and tools: Coaxial cable, UTP
cable, Crimping tool, Connectors
3. Preparing straight and cross cables. 7 to 9

4. Study of various LAN tpologies and 10 to 15


their creation using network devices,
cables and computers.
5. Configuration of TCP/IP Protocols in 16 to 22
Windows and Linux.
6. Subnet planning and its 23 to 24
implementation
7. Implementation of resource sharing 25 to 26
(file, printer etc.)
8. Designing and implementing class A, B 27
and C networks
9. To configure dynamic IP address for a 28 to 29
computer connected to a LAN
10. Use of commands like ping, ipconfig etc for 30 to 31
troubleshooting network related problems

2
1.Familiarization with networking
components and devices: LAN Adapters,
Hubs, Switches, Routers

Network Devices: Network devices, also known as networking hardware, are physical
devices that allow hardware on a computer network to communicate and interact with one
another. For example Repeater, Hub, Bridge, Switch, Routers, Gateway, Brouter, and NIC, etc.
1.LAN adapter A LAN adapter is an expansion board that is used to connect a computer or
computing device to a network. LAN adapter is the most common and generic alternate
name for a Network Interface Card (NIC).

2. Hub – A hub is a basically multi-port repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects different
stations. Hubs cannot filter data, so data packets are sent to all connected devices. In other
words, the collision domain of all hosts connected through Hub remains one. Also, they do
not have the intelligence to find out the best path for data packets which leads to
inefficiencies and wastage.

3
3. Switch – A switch is a multiport bridge with a buffer and a design that can boost its
efficiency(a large number of ports imply less traffic) and performance. A switch is a data link
layer device. The switch can perform error checking before forwarding data, which makes it
very efficient as it does not forward packets that have errors and forward good packets
selectively to the correct port only. In other words, the switch divides the collision domain
of hosts, but the broadcast domain remains the same.

3.Routers – A router is a device like a switch that routes data packets based on their IP
addresses. The router is mainly a Network Layer device. Routers normally connect LANs and
WANs and have a dynamically updating routing table based on which they make decisions
on routing the data packets. The router divides the broadcast domains of hosts connected
through it.

4
2.Familiarization with transmission media
and tools: Coaxial cable, UTP cable,
Crimping tool, Connectors

What is transmission media?


Transmission media is a pathway that carries the information from sender to receiver. We
use different types of cables or waves to transmit data. Data is transmitted normally through
electrical or electromagnetic signals.
An electrical signal is in the form of current. An electromagnetic signal is series of
electromagnetic energy pulses at various frequencies. These signals can be transmitted
through copper wires, optical fibers, atmosphere, water and vacuum Different Medias have
different properties like bandwidth, delay, cost and ease of installation and maintenance.
Transmission media is also called Communication channel.

Coaxial Cable
Coaxial cable has two wires of copper. The core wire lies in center and is made of solid
conductor. Core is enclosed in an insulating sheath. Over the sheath the second wire is
wrapped around and that too in turn encased by insulator sheath. This all is covered by
plastic cover.

UTP Cables
UTP cable is a type of copper cable widely used for networking purposes. UTP cables consist
of pairs of insulated wires that are twisted together to reduce interference and crosstalk.
They are commonly used in Ethernet networks for transmitting data signals.

5
Crimping tool
A crimping tool is a tool designed to crimp or connect a connector to the end of a cable. For
example, network cables and phone cables are created using a crimping tool to connect the
RJ-45 and RJ-11 connectors to the end of the cable. In the example below picture, this
crimper is capable of crimping a RJ-11 (6-Pin) and RJ-45 (8-Pin) connectors and also includes
a wire cutter near the handles that can be used to cut phone or CAT5 cable.

Connector

The Connector tool (Ctrl+F2 or the o key) draws lines between objects that stay connected to
other objects as they are manipulated. Any object may be marked as an object to avoid,
which causes connectors to automatically route around the object. This is helpful for
creating technical illustrations like flowcharts.

6
3.Preparing straight and cross cables.

UTP cabling

 Eight wires make up a UTP cable. Four pairs of wires make up this collection.

 There are two twisted wires in each pair.


 The first wire has a single plastic coating with a colour code, but the second wire has
same colour plus a white colour striped coating.
 For the brown wire pair, for instance, one wire has a coating that is entirely brown,
while the other wire has a coating that is striped with brown and white.
 A UTP cable is shown in the figure below.

Exactly why are the cables twisted?


 Electromagnetic interference results from the passage of electrical current through
copper wires (EMI). The electrical signals travelling via nearby wires, including those
that are a part of the same cable, are hampered by EMI.
 It is referred to as the cross talk. Cross talk is eliminated by twisting the wires in pairs.
RJ-45 (UTP cable) connector
 Both the switch port and the NIC include an eight-pin RJ-45 (UTP cable) slot.

 The RJ-45 connection is utilized to link these pins to the wires of a UTP cable.
 The RJ-45 connector has eight physical locations, known as pin positions or simply
pins, into which the eight wires of the UTP cable can be inserted.
 These pins make it possible for the ends of copper wires to make contact with NIC or
switch port pins.
An RJ-45 connector is shown in the picture below.

Constructing a UTP cable:-


 Pins 1 and 2 are used by a NIC to send data. Using pins 3 and 6, it receives data. A
switch makes it do the reverse.

7
 Data is transmitted from pins 3 and 6 while being received on pins 1 and 2.
 A UTP cable can be created in two different methods depending on the type of end
devices.
 The first kind of connection, referred to as a straight-through cable, links two various
end devices, such as a PC and a switch.
 The second kind of cable, called a cross-over cable, links two identical end devices,
like a PC and a PC or a Switch and a Switch.
 Let's examine both forms of cable's construction in more depth.

Ethernet Straight-through cable


 The conductors in this cable are positioned the same way at both ends.
 The cable's pin 1 at one end is connected to pin 1 at the other end by a wire.
 Pin 2 on one end of the cable is connected to pin 2 on the other end, and so on.
 The wire positions for the straight-through cable on both sides are listed in the
following table.

Side A Side B

Green White Green White

Green Green

Orange White Orange White

Blue Blue

Blue White Blue White

Orange Orange

Brown White Brown White

Brown Brown

A straight-through cable is used to connect the following devices.

 PC to Switch
 PC to Hub
 Router to Switch
 Switch to Server

8
 Hub to Server
Ethernet cross-over cable
 The receiving pins on one side of this cable are connected to the sending pins on the
other.
 The cable's pin 1 on one end and pin 3 on the other end are connected by a wire. On
the opposite end of the cable, pin 6 is connected to the wire at pin 2. The remaining
wires join at both ends in the identical locations.
 The cross-over cable's wire placements on each side are listed in the following table.

Side A Side B

Green White Orange White

Green Orange

Orange White Green White

Blue Blue

Blue White Blue White

Orange Green

Brown White Brown White

Brown Brown

The cross-over cable is used to connect the following devices.


 Two computers
 Two hubs

 A hub to a switch
 A cable modem to a router
 Two router interfaces

9
4. Study of various LAN topologies and their
creation using network devices, cables and
computers.

Types of Topology:-

Bus topology

Bus Topology is the simplest of network topologies. In this type of topology, all the nodes
(computers as well as servers) are connected to the single cable (called bus), by the help of
interface connectors. This central cable is the backbone of the network and is known as Bus
(thus the name). Every workstation communicates with the other device through this Bus.

Advantages (benefits) of Bus Topology

1. It is easy to set-up and extend bus network.


2. Cable length required for this topology is the least compared to other networks.
3. Bus topology costs very less.

10
4. Linear Bus network is mostly used in small networks. Good for LAN.

Disadvantages (Drawbacks) of Bus Topology

1) There is a limit on central cable length and number of nodes that can be connected.
2) Dependency on central cable in this topology has its disadvantages. If the main cable (i.e.
bus ) encounters some problem, whole network breaks down.
3) Proper termination is required to dump signals. Use of terminators is must.

Star topology

In Star topology, all the components of network are connected to the central device called
“hub” which may be a hub, a router or a switch. Unlike Bus topology (discussed earlier),
where nodes were connected to central cable, here all the workstations are connected to
central device with a point-to-point connection. So it can be said that every computer is
indirectly connected to every other node by the help of “hub”.

Advantages of Star Topology


1) As compared to Bus topology it gives far much better performance, signals don’t
necessarily get transmitted to all the workstations.
2) Easy to connect new nodes or devices. In star topology new nodes can be added easily
without affecting rest of the network. Similarly components can also be removed easily.
Disadvantages of Star Topology
1) Too much dependency on central device has its own drawbacks. If it fails whole network
goes down.

11
2) The use of hub, a router or a switch as central device increases the overall cost of the
network.

Ring Topology
In Ring Topology, all the nodes are connected to each-other in such a way that they make a
closed loop. Each workstation is connected to two other components on either side, and it
communicates with these two adjacent neighbors. Data travels around the network, in one
direction. Sending and receiving of data takes place by the help of TOKEN.

Advantages of Ring Topology


1) This type of network topology is very organised. Each node gets to send the data when it
receives an empty token. This helps to reduces chances of collision. Also in ring topology all
the traffic flows in only one direction at very high speed.
2) Even when the load on the network increases, its performance is better than that of Bus
topology.

Disadvantages of Ring Topology


1) Each packet of data must pass through all the computers between source and destination.
This makes it slower than Star topology.
2) If one workstation or port goes down, the entire network gets affected.

Mesh Topology
In a mesh network topology, each of the network node, computer and other devices, are
interconnected with one another. Every node not only sends its own signals but also relays
data from other nodes. In fact a true mesh topology is the one where every node is
connected to every other node in the network. This type of topology is very expensive as
there are many redundant connections, thus it is not mostly used in computer networks. It is

12
commonly used in wireless networks. Flooding or routing technique is used in mesh
topology.

Advantages of Mesh topology


1) Data can be transmitted from different devices simultaneously. This topology can
withstand high traffic.2) Even if one of the components fails there is always an alternative
present. So data transfer doesn’t get affected.
3) Expansion and modification in topology can be done without disrupting other nodes.
Disadvantages of Mesh topology

1) There are high chances of redundancy in many of the network connections.


2) Overall cost of this network is way too high as compared to other network topologies.
3) Set-up and maintenance of this topology is very difficult. Even administration of
the network is tough.

Tree Topology
Tree Topology integrates the characteristics of Star and Bus Topology. Earlier we saw how in
Physical Star network Topology, computers (nodes) are connected by each other through
central hub. And we also saw in Bus Topology, work station devices are connected by the
common cable called Bus. After understanding these two network configurations, we can
understand tree topology better. In Tree Topology, the numbers of Star networks are
connected using Bus. This main cable seems like a main stem of a tree, and other star
networks as the branches. It is also called Expanded Star Topology. Ethernet protocol is
commonly used in this type of topology. The diagram below will make it clear.

13
Advantages of Tree Topology
1. It is an extension of Star and bus Topologies, so in networks where these topologies
can't be implemented individually for reasons related to scalability, tree topology is
the best alternative.
2. Expansion of Network is possible and easy.
3. Here, we divide the whole network into segments (star networks), which can be
easily managed and maintained.
Disadvantages of Tree Topology

1. Because of its basic structure, tree topology, relies heavily on the main bus cable, if it
breaks whole network is crippled.

2. As more and more nodes and segments are added, the maintenance becomes
difficult.

3. Scalability of the network depends on the type of cable used.

Hybrid Topology
Before starting about Hybrid topology, we saw that a network topology is a connection of
various links and nodes, communicating with each other for transfer of data. We also saw
various advantages and disadvantages of Star, Bus, Ring, Mesh and Tree topologies.
Now lets discuss what Hybrid Network topology is and why it finds its application in Wide
Area Networks. Hybrid, as the name suggests, is mixture of two different things. Similarly in
this type of topology we integrate two or more different topologies to form a resultant
topology which has good points (as well as weaknesses) of all the constituent basic
topologies rather than having characteristics of one specific topology. This combination of
topologies is done according to the requirements of the organization.

14
Let's see the benefits and drawbacks of this networking architecture

Advantages of Hybrid Network Topology


1) Reliable: Unlike other networks, fault detection and troubleshooting is easy in this type of
topology. The part in which fault is detected can be isolated from the rest of network and
required corrective measures can be taken, WITHOUT affecting the functioning of rest of the
network.

2) Scalable: Its easy to increase the size of network by adding new components, without
disturbing existing architecture.

Disadvantages of Hybrid Topology


1) Complexity of Design: One of the biggest drawback of hybrid topology is its design. Its not
easy to design this type of architecture and its a tough job for designers. Configuration and
installation process needs to be very efficient.
2) Costly Hub: The hubs used to connect two distinct networks, are very expensive. These
hubs are different from usual hubs as they need to be intelligent enough to work with
different architectures and should be function even if a part of network is down.
3) Costly Infrastructure: As hybrid architectures are usually larger in scale, they require a lot
of cables, cooling systems, sophisticate network devices, etc.

15
5.Configuration of TCP/IP Protocols in
Windows and Linux.

For Windows XP
Step 1
Click Start->Control Panel->select and double click Network and internet connections-

>select and double click Network Connections.


Step 2
Double-click the Local Area Connection icon; highlight Internet Protocol (TCP/IP) tab in the
Local Area Connection Properties window that appears.
Step 3

Double click it or click Properties. The TCP/IP Properties window will display.
Step 4
Now you have two ways to configure the TCP/IP protocol below:
1. Assigned by DHCP Sever
Select Obtain an IP address automatically and Obtain DNS Server address automatically, as
shown in the figure below. These may be selected by default. Then click OK to save setting.

2. Assigned manually
1) Select Use the following IP address, as shown in the following figure.

If the router’s LAN IP address is 192.168.1.1, please type in IP address 192.168.1.x (x is


from 2 to 253), subnet mask 255.255.255.0, and default gateway 192.168.1.1.

2) Select Use the following DNS server addresses, as shown in the following figure. And
then type the DNS server IP address, which should be provided by your ISP. Finally
remember to click OK to save settings.

Note: In most cases, type your local area DNS server IP addresses into it.
The Preferred DNS server is same to default gateway. For Secondary DNS server, you could
leave it blank or type in 8.8.8.8.

16
Step 5
Click OK to save and apply your settings.

For Windows Vista & Windows 7


Step 1
Click on windows key+ R key on the keyboard at the same time.

Step 2

Type ncpa.cpl in the box, then press OK.

Step 3
Select the local area connection, right click it and select Properties.

17
Step 4
Select Internet Protocol Version 4(TCP/IPv4), double click it or click Properties.

Step 5
There are two ways to configure the TCP/IP Properties, Assigned by DHCP server
automatically or manually.
1. Assigned by DHCP server
Select Obtain an IP address automatically and Obtain DNS server address automatically. If
necessary, then click OK to save the settings.
2. Assigned manually

1) Select Use the following IP address, type IP address, subnet mask and default gateway IP
address into it.

If the router’s LAN IP address is 192.168.1.1, please type in IP address 192.168.1.x (x is


from 2 to 253), subnet mask 255.255.255.0, and default gateway 192.168.1.1.

2) Select Use the following DNS server addresses, as shown in the following figure. And then
type the DNS server IP address, which should be provided by your ISP. If necessary, then click
OK to save the settings.
Note: In most cases, type your local area DNS server IP addresses into it.
The Preferred DNS server is same to default gateway. For Secondary DNS server, you could
leave it blank or type in 8.8.8.8.
Step 6
Click OK to save and apply your settings

Configuration of TCP/IP protocols in Linux:-

18
This article covers the main TCP/IP network configuration files used by Linux to configure
various network services of the system such as IP Address, Default Gateway, Name servers -
DNS, hostname and much more. Any Linux Administrator must be well aware where these
services are configured and to use them. The good news is that most of the information
provided on this article apply's to Red hat Fedora, Enterprise Linux, Ubunto and other similar
Linux distributions.
On most Linux systems, you can access the TCP/IP connection details within 'X
Windows' from Applications > Others > Network Connections. The same may also be
reched through Application > System Settings > Network > Configure. This opens up a
window, which offers configuration of IP parameters for wired, wireless, mobile broadband,
VPN and DSL connections:
The Basic Commands for Networking

The basic commands used in Linux are common to every distro:


1. ifconfig - Configures and displays the IP parameters of a network interface
2. route - Used to set static routes and view the routing table
3. hostname - Necessary for viewing and setting the hostname of the system
4. netstat - Flexible command for viewing information about network statistics, current
connections, listening ports
5. arp - Shows and manages the arp table

6. ip - Multi-purpose command for viewing and setting TCP/IP parameters and routes.
7. tc - Traffic control command, used for classifying, prioritizing, sharing, and limiting
both inbound and outbound traffic.

19
6. Implementation of file and printer sharing.
Instructions for Installing “File and Printer Sharing” in Windows XP
From the desktop on your PC, go to the Start Menu and right click on My Network Places
and select
Properties:

Select Local Area Connection and right click and select Properties.

20
In the next diagram File and Printer Sharing for Microsoft Networks has already been
installed, on your screen it should not be listed, if it is, it is already installed. Now hit the
Install button.

Now select Service form the list of component types and hit OK.

21
On the next screen select File and Printer Sharing for Microsoft Networks and hit OK.

File and Printer Sharing for Microsoft Networks should now be added to the list. Hit Close to
exit.

Reboot your computer.

22
6.Subnet planning and its implementation

Implementing Subnet Planning

In preparation of your CCNA exam, we want to make sure we cover the various concepts that we
could see on your Cisco CCNA exam. So to assist you, below we will discuss one of the more difficult
CCNA concepts; Implementing Subnet Planning. As you progress through your CCNA exam studies, I
am sure with repetition you will find this topic becomes easier. So even though it may be a difficult
concept and confusing at first, keep at it as no one said getting your Cisco certification would be
easy!

Without subnets, the organization operates as a single network. These flat topologies result in short
routing tables but, as the network grows, the use of bandwidth becomes inefficient. (All systems on
the network receive all the broadcasts on the network.) Network addressing can be made more
efficient by breaking the addresses into smaller segments, or subnets. Subnetting provides additional
structure to an addressing scheme without altering the addresses. In the figure, the network address
172.16.0.0 is subdivided into four subnets:
172.16.1.0, 172.16.2.0, 172.16.3.0, and 172.16.4.0. If traffic were evenly distributed to each end
station, the use of subnetting would reduce the overall traffic seen by each end station by 75
percent.

Subnet Mask

A subnet mask is a 32-bit value written as four octets. In the subnet mask, each bit determines how
the corresponding bit in the IP address should be interpreted (network, subnet, or host). The subnet
mask bits are coded as follows:


Binary 1 for the network bits


Binary 1 for the subnet bits


Binary 0 for the host bits
Although dotted decimal is the most common format, the subnet can be
represented in several ways:


Dotted decimal—172.16.0.0 255.255.0.0

Bitcount—172.16.0.0/16


Hexadecimal—172.16.0.0 0xFFFF0000

The ip netmask-format command can be used to specify the format of network masks for the current
session. Dotted decimal is the default.

Default Subnet Masks

23
Each address class has a default subnet mask. The default subnet masks only the network portion of
the address, the effect of which is no subnetting. With each bit of subnetting beyond the default, you
can create 2n – 2 subnets. These examples show the effect of adding subnet bits.

24
7.Implementation of resource sharing (file,
printer etc.)

File and printer sharing allows multiple devices on a network to access and use files and
printers connected to specific computers. Imagine it like a digital lending library within your
local network.
Here’s a breakdown of each element:
File Sharing:
 Concept: Makes files stored on one computer accessible to other devices on the
same network.
Benefits:
 Enables collaboration on documents, photos, videos, etc.
 Reduces the need for multiple copies of the same file.
 Allows for easy backups and data storage across devices.
Common methods:
 Operating system built-in features (like Windows File Sharing or macOS SMB).

 Cloud storage services like Dropbox or Google Drive.


 Dedicated file-sharing applications like Plex or MediaPortal.
Printer Sharing:
 Concept: Allows multiple devices on the network to print to a single shared printer.
Benefits:

 Saves money and physical space by requiring fewer printers.


 Convenient for printing from any network-connected device.
 Can be set up with different access levels and permissions.
Common methods:
 Operating system built-in features (like Windows Printer Sharing or macOS Printer
Sharing).

 Network-attached storage (NAS) devices with built-in printing capabilities.


 Dedicated print server software.
Things to remember:

25
 Both file and printer sharing require proper network configuration and security
measures.
 Permissions can be set to control who can access files or printers and what they can
do with them.
 Different operating systems and software may have varying configurations and
options.

26
8.Designing and implementing class A, B and
C networks

The A, B, and C classes of networks are different IP address classes that were defined in the
original version of the Internet Protocol (IPv4).
Each class of network is identified by the first few bits of the IP address, which are known as
the address class. The address class determines how many bits are used to represent the
network portion of the address, and how many bits are used to represent the host portion.
Here is a brief overview of the three classes:
Class A networks use the first octet (the first 8 bits) to identify the network, and the
remaining three octets to identify hosts on that network. The first bit of the first octet is
always 0, which leaves 7 bits to represent the network. This means that there can be a total
of 128 Class A networks, each of which can have up to 16,777,214 hosts.
Class B networks use the first two octets (the first 16 bits) to identify the network, and the
remaining two octets to identify hosts on that network. The first two bits of the first octet
are always 10, which leaves 14 bits to represent the network. This means that there can be a
total of 16,384 Class B networks, each of which can have up to 65,534 hosts.
Class C networks use the first three octets (the first 24 bits) to identify the network, and the
remaining octet to identify hosts on that network. The first three bits of the first octet are
always 110, which leaves 21 bits to represent the network. This means that there can be a
total of 2,097,152 Class C networks, each of which can have up to 254 hosts.

Each class of network has its own default subnet mask, which is used to determine which
bits of the IP address represent the network portion and which represent the host portion.
The subnet mask is used in conjunction with the IP address to determine whether a
destination address is on the same network or a different network, and to calculate the
appropriate routing information.

27
9.To configure dynamic IP address for a
computer connected to a LAN

Dynamic addresses are acceptable for a machine running client software, since the way things are
organized is that the client initiates communications with a server, and includes its "return address"
(the source IP address) in every packet sent to the server.

To communicate to a server, it is necessary to find out the numeric IP address of the server before
the client can communicate to it. That is often accomplished through the Domain Name System
(DNS), essentially tables where the IP address of a server can be looked up. To avoid having to
frequently update those tables, servers are generally assigned static addresses.

DHCP Discover Message

Addresses are assigned to a computer using the Dynamic Host Configuration Protocol (DHCP). The
system administrator provisions a DHCP server, configured to assign IP addresses within a defined
range to clients. Computers are loaded with DHCP client software.
Communications between the DHCP client and server are effectively application-layer messages,
coded into ASCII and carried in UDP protocol data units, which are carried in IP packets, which are
carried in MAC frames.

The desired recipient of the messages is indicated as being the DHCP on a machine by populating in
the UDP header destination port = 67 for messages to the server and destination port = 68 for
messages to the client.
The messages are "broadcast", which means that the destination IP address is all 1s and destination
MAC address is all 1s. The actual addresses are used for source MAC and IP addresses, except that
the client uses "0" as its IP address, since of course the whole point of the exercise is to get an IP
address.

Each computer will run a DHCP client when it starts, generating a DHCP Discover message as
illustrated above.

Any DHCP server that receives it, and there may be more than one, will respond with a DHCP Offer
message, with an offered IP address and a lease time:

DHCP Offer Message

The client will answer with a DHCP Request message to confirm its selection of an offered address:

DHCP Request Message

28
Then the server will complete the cycle with a DHCP ACK that usually includes other configuration
information such as the IP address of the default gateway (CE router), the IP address of one or more
DNS servers and the subnet mask, which indicates what bits in the address are the host or machine
ID:

DHCP ACK Message


There are several variations on the basic process, all of which are enumerated in the relevant
standards document, RFC 2131.

On expiry of the lease time, the DHCP client must begin the discover process anew. If a DHCP client
runs while still holding a valid lease, it will request to be assigned the same IP address. If there are
many clients constantly running DHCP (an ISP's customers, for example), then it is likely that a
different IP address will be offered by the server each time a computer runs its DHCP client.

The lease time may be configured by the system administrator to any value. This function might be
useful to help manage situations where there are more clients than addresses. If the DHCP server
reaches the end of its configured range of addresses, it attempts to re-assign previously-assigned
addresses to new requestors, beginning with those previously-assigned addresses for which the lease
has expired. Before re-assigning the address to a different machine, the server might optionally ping
the address to determine if it is still in use.

Even though it is the "dynamic" host configuration protocol, DHCP is also used to assign static
addresses to machines.

This is accomplished with a table in the server, configured by the system administrator, which relates
MAC addresses to IP addresses.

Whenever a computer with a MAC address contained in the table asks for an IP address, it will
always be assigned the IP address specified in the table.

This allows the assignment of static addresses to computers from a centralized management system
(the DHCP server), conveyance of other information like default gateway and netmask, and
eliminates the need for any human involvement (and its associated errors) in configuring computers.

In Windows, you can see the IP address currently assigned to a computer, as well as its LAN card
MAC address by opening the Network Connections folder and viewing the "status" of the LAN card.

If under "properties" of the TCP/IP protocol the choice "obtain a network address automatically" is
selected, the DHCP client is run at startup and when "repair this connection" is clicked.

29
10.Use of commands like ping, ipconfig etc
for troubleshooting network related
problems

Ping

The most commonly used network tool is the ping utility. This utility is used to provide a basic
connectivity test between the requesting host and a destination host. This is done by using the
Internet Control Message Protocol (ICMP) which has the ability to send an echo packet to a
destination host and a mechanism to listen for a response from this host. Simply stated, if the
requesting host receives a response from the destination host, this host is reachable. This utility is
commonly used to provide a basic picture of where a specific networking problem may exist. For
example, if an Internet connection is down at an office, the ping utility can be used to figure out
whether the problem exists within the office or within the network of the Internet provider. Figure 1
below shows an example of the ping utility being used to obtain the reachability status of the locally
connected router.

Tracert/traceroute
Typically, once the ping utility has been used to determine basic connectivity, the tracert/traceroute
utility can used to determine more specific information about the path to the destination host
including the route the packet takes and the response time of these intermediate hosts. Figure 2
below shows an example of the tracert utility being used to find the path from a host inside an office
to www.google.com. The tracert utility and traceroute utilities perform the same function but
operate on different operating systems, Tracert for Windows machines and traceroute for Linux/*nix
based machines.

Ipconfig/ifconfig

One of the most important things that must be completed when troubleshooting a networking issue
is to find out the specific IP configuration of the variously affected hosts. Sometimes this information
is already known when addressing is configured statically, but when a dynamic addressing method is
used, the IP address of each host can potentially change often. The utilities that can be used to find
out this IP configuration information include the ipconfig utility on Windows machines and the
ifconfig utility on Linux/*nix based machines. Figure 3 below shows an example of the ifconfig utility
showing the IP configuration information of a queries host.

Nslookup

Some of the most common networking issues revolve around issues with Dynamic Name System
(DNS) address resolution issues. DNS is used by everyone using the Internet to resolve commonly
known domain names (i.e. google.com) to commonly unknown IP addresses (i.e. 74.125.115.147).
When this system does not work, most of the functionality that people are used to goes away, as
there is no way to resolve this information. The nslookup utility can be used to lookup the specific IP
address(es) associated with a domain name. If this utility is unable to resolve this information, there
is a DNS issue. Along with simple lookup, the nslookup utility is able to query specific DNS servers to

30
determine an issue with the default DNS servers configured on a host. Figure 4 below shows an
example of how the nslookup utility can be used to query the associated IP address information.

Route

The last of the tools covered in this article is the route utility. This utility is used to display the current
status of the routing table on a host. While the use of the route utility is limited in common
situations where the host only has a single IP address with a single gateway, it is vital in other
situations where multiple IP address and multiple gateways are available.

31

You might also like