Uploaded by diyczwork

DataCommunicationandComputerNetworkingLabManual

advertisement
See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/362834215
Data Communication and Computer Networking Lab Manual
Technical Report · August 2022
CITATIONS
READS
0
6,819
1 author:
Md. Humayun Kabir
International Islamic University Chittagong
38 PUBLICATIONS 93 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Red Hat Enterprise Linux View project
Power Line Communication View project
All content following this page was uploaded by Md. Humayun Kabir on 21 August 2022.
The user has requested enhancement of the downloaded file.
International Islamic University Chittagong (IIUC)
Department of Computer & Communication Engineering (CCE)
Lab Manual
Course Code: CCE – 4702
Course Title: Data Communication and Computer Networking
Sessional
Md. Humayun Kabir
Assistant Lecturer
Dept. of CCE, IIUC
Experiment No: 01
Experiment Name: Concept of Network Device, OSI Model, IP Address and Subnetting
Objectives:
✓ To learn basics of Local Area Network (LAN)
✓ Understand different types of LAN devices
✓ To learn IP Address and Subnetting
Description:
Data Communication:
Data communications is the process of using computing and communication technologies
to transfer data from one place to another, or between participating parties. It enables
the movement of electronic or digital data between two or more network nodes,
regardless of geographical location, technological medium or data contents.
Some common types of data communications technologies include telecommunications,
computer networking and radio/satellite communication. Data communication usually
requires the existence of a transportation or communication medium between the nodes
wanting to communicate with each other, such as copper wire, fiber optic cables, or
wireless signals.
For example, a common example of data communications is a computer connected to the
Internet via a Wi-Fi connection, which uses a wireless medium to send and receive data
from one or more remote servers.
Some devices/technologies used in data communications are known as data
communication equipment (DCE) and data terminal equipment (DTE). DCE is used at the
sending node, and DTE is used at the receiving node. Data communication also relies on
various types of protocols, depending on the environment in which the messages sent.
Internet protocols like FTP, HTTP and HTTPS.
New advances like the Internet of Things promise different connectivity and different data
communications models.
Computer Network:
A computer network is a system that connects numerous independent computers in order
to share information (data) and resources. The integration of computers and other
different devices allows users to communicate more easily.
A computer network is a collection of two or more computer systems that are linked
together. A network connection can be established using either cable or wireless media.
Hardware and software are used to connect computers and tools in any network.
A computer network consists of various kinds of nodes. Servers, networking hardware,
personal computers, and other specialized or general-purpose hosts can all be nodes in
a computer network. Hostnames and network addresses are used to identify them.
Computer Network Types
A computer network can be categorized by their size. A computer network is mainly of
four types:
✓
✓
✓
✓
LAN (Local Area Network)
PAN (Personal Area Network)
MAN (Metropolitan Area Network)
WAN (Wide Area Network)
Local Area Network (LAN): A LAN is a network that covers an area of around 10
kilometers. For example, a college network or an office network. Depending upon the
needs of the organization, a LAN can be a single office, building, or Campus. We can have
two PCs and one printer in-home office or it can extend throughout a company and
include audio and video devices. Each host in LAN has an identifier, an address that
defines hists in LAN. A packet sent by the host to another host carries both the source
host’s and the destination host’s address.
Personal Area Network (PAN): Personal Area Network is a network arranged within
an individual person, typically within a range of 10 meters. Personal Area Network is used
for connecting the computer devices of personal use is known as Personal Area Network.
Personal Area Network covers an area of 30 feet. Personal computer devices that are
used to develop the personal area network are the laptop, mobile phones, media player
and play stations.
There are two types of Personal Area Network:
✓ Wired Personal Area Network
✓ Wireless Personal Area Network
Wireless Personal Area Network: Wireless Personal Area Network is developed by simply
using wireless technologies such as WiFi, Bluetooth. It is a low range network.
Wired Personal Area Network: Wired Personal Area Network is created by using the USB.
Metropolitan Area Network (MAN): A metropolitan area network is a network that
covers a larger geographic area by interconnecting a different LAN to form a larger
network. Government agencies use MAN to connect to the citizens and private industries.
In MAN, various LANs are connected to each other through a telephone exchange line.
MAN refers to a network that covers an entire city. For example: consider the cable
television network.
Wide Area Network (WAN): WAN refers to a network that connects countries or
continents. For example, the Internet allows users to access a distributed system called
www from anywhere around the globe. WAN interconnects connecting devices such as
switches, routers, or modems. A LAN is normally privately owned by an organization that
uses it. We see two distinct examples of WANs today: point-to-point WANs and Switched
WANs.
Networking Devices:
Figure 1: Networking Devices
Basic hardware interconnecting network nodes, such as Network Interface Cards (NICs),
Bridges, Hubs, Switches, and Routers, are used in all networks. In addition, a mechanism
for connecting these building parts is necessary, which is usually galvanic cable and
optical cable are less popular (“optical fiber”) The following are the network devices:
NIC (Network Interface Card): A network card, often known as a network adapter or
NIC (network interface card), is computer hardware that enables computers to
communicate via a network. It offers physical access to networking media and, in many
cases, MAC addresses serve as a low-level addressing scheme. Each network interface
card has a distinct identifier. This is stored on a chip that is attached to the card.
Repeater: A repeater is an electrical device that receives a signal, cleans it of unwanted
noise, regenerates it, and retransmits it at a higher power level or to the opposite side of
an obstruction, allowing the signal to travel greater distances without degradation. In the
majority of twisted pair Ethernet networks, Repeaters are necessary for cable lengths
longer than 100 meters in some systems. Repeaters are based on physics.
Hub: A hub is a device that joins together many twisted pairs or fiber optic Ethernet
devices to give the illusion as a formation of a single network segment. The device can
be visualized as a multiport repeater. A network hub is a relatively simple broadcast
device. Any packet entering any port is regenerated and broadcast out on all other ports,
and hubs do not control any of the traffic that passes through them. Packet collisions
occur as a result of every packet being sent out through all other ports, substantially
impeding the smooth flow of communication.
Bridges: Bridges broadcast data to all the ports but not on the one that received the
transmission. Bridges, on the other hand, learn which MAC addresses are reachable
through specific ports rather than copying messages to all ports as hubs do. Once a port
and an address are associated, the bridge will only transport traffic for that address to
that port.
Switches: A switch differs from a hub in that it only forwards frames to the ports that
are participating in the communication, rather than all of the ports that are connected.
The collision domain is broken by a switch, yet the switch depicts itself as a broadcast
domain. Frame forwarding decisions are made by switches based on MAC addresses.
Routers: Routers are networking devices that use headers and forwarding tables to find
the optimal way to forward data packets between networks. A router is a computer
networking device that links two or more computer networks and selectively exchanges
data packets between them. A router can use address information in each data packet to
determine if the source and destination are on the same network or if the data packet
has to be transported between networks. When numerous routers are deployed in a wide
collection of interconnected networks, the routers share target system addresses so that
each router can develop a table displaying the preferred pathways between any two
systems on the associated networks.
Gateways: To provide system compatibility, a gateway may contain devices such as
protocol translators, impedance matching devices, rate converters, fault isolators, or
signal translators. It also necessitates the development of administrative procedures that
are acceptable to both networks. By completing the necessary protocol conversions, a
protocol translation/mapping gateway joins networks that use distinct network protocol
technologies.
Modem: A modem is a hardware device that allows the computer to connect to the
internet over the existing telephone line. It stands for Modulator/Demodulator. It converts
the digital data into an analog signal over the telephone lines. Based on the differences
in speed and transmission rate, a modem can be classified in the following categories:
✓ Standard PC modem or Dial-up modem
✓ Cellular Modem
✓ Cable modem
Cables and Connectors: Cable is a transmission media used for transmitting a signal.
There are three types of cables used in transmission:
✓ Twisted pair cable
✓ Coaxial cable
✓ Fibre-optic cable
Open System Interconnection (OSI) Model:
✓ The Open System Interconnection (OSI) reference model describes how
information from a software application in one computer moves through a network
medium to a software application in another computer.
✓ The OSI reference model is a conceptual model composed of seven layers, each
specifying particular network functions.
✓ The OSI model divides the tasks involved with moving information between
networked computers into seven smaller, more manageable task groups.
✓ A task or group of tasks is then assigned to each of the seven OSI layers.
The following list details the seven layers of the Open System Interconnection (OSI)
reference model:
Layer 7 — Application
Layer 6 — Presentation
Layer 5 — Session
Layer 4 — Transport
Layer 3 — Network
Layer 2 — Data link
Layer 1 — Physical
Figure 1: OSI Model
Internet Protocol (IP) Address:
An IP stands for internet protocol. An IP address is assigned to each device connected to
a network. Each device uses an IP address for communication. It also behaves as an
identifier as this address is used to identify the device on a network. It defines the
technical format of the packets. Mainly, both the networks, i.e., IP and TCP, are combined
together, so together, they are referred to as a TCP/IP. It creates a virtual connection
between the source and the destination. We can also define an IP address as a numeric
address assigned to each device on a network. An IP address is assigned to each device
so that the device on a network can be identified uniquely. To facilitate the routing of
packets, TCP/IP protocol uses a 32-bit logical address known as IPv4(Internet Protocol
version 4). An IP address consists of two parts, i.e., the first one is a network address,
and the other one is a host address.
The process of IP address works in the following way:
✓ Your computer, smartphone, or any other Wi-Fi-enabled device firstly connects to
a network that is further connected to the internet. The network is responsible for
giving your device access to the internet.
✓ While working from home, your device would be probably using that network
provided by your Internet Service Provider (ISP). In a professional environment,
your device uses your company network.
✓ Your ISP is responsible to generate the IP address for your device.
✓ Your internet request penetrates through the ISP, and they place the requested
data back to your device using your IP address. Since they provide you access to
the internet, ISP's are responsible for allocating an IP address to your computer
or respective device.
✓ Your IP address is never consistent and can change if there occur any changes in
its internal environment. For instance, if you turn your modem or router on or off,
it will change your IP address. Or the user can also connect the ISP to change
their IP address.
✓ When you are out of your home or office, mainly if you travel and carry your device
with you, your computer won't be accessing your home IP address anymore. This
is because you will be accessing the different networks (your phone hotspot, WiFi at a cafe, resort, or airport, etc.) to connect the device with the internet.
Therefore, your device will be allocated a different (temporary) IP address by the
ISP of the hotel or cafe.
There are two types of IP addresses:
✓ IPv4
✓ IPv6
Classful Addressing
The 32-bit IP address is divided into five sub-classes. These are:
✓
✓
✓
✓
✓
Class
Class
Class
Class
Class
A
B
C
D (Multicast Address)
E (Reserved)
IP Header Classes:
Class
Address
Range
Subnet
masking
Example
IP
Leading
bits
Max
number of
networks
IP Class A
1 to 126
255.0.0.0
1.1.1.1
8
128
IP Class B
128 to 191
255.255.0.0
128.1.1.1
16
16384
IP Class C
192 to 223
255.255.255.0
192.1.11.
24
2097157
IP Class D
224 to 239
NA
NA
NA
NA
IP Class E
240 to 254
NA
NA
NA
NA
Application
Used for large number of
hosts.
Used for medium size
network.
Used for local area
network.
Reserve for multi-tasking.
This class is reserved for
research and
Development Purposes.
How to make RJ45 cable
RJ45 cable is used for connect the ALL HMI and engineer station through a switch to
communicated each other. It is used to download the any modification and which is made
in graphics in engineering station. RJ45 cable also used for communicate the printer with
computer.
Required tool and materials:
1. Ethernet Cable – Category 5e or CAT5e or CAT6
2. RJ-45 Crimping tool
3. RJ45 Crimp able Connectors
There are two kinds of Ethernet cable is used for communication.
1. Straight Through
2. Cross over cable
Straight Through cable:
STRAIGHT THROUGH Ethernet cables are the standard cable used for almost all
purposes, and are often called “patch cables”. It is highly recommended you duplicate
the color order as shown on the left. Note how the green pair is not side-by-side as are
all the other pairs. This configuration allows for longer wire runs.
Important Instruction: Always remember that both end connector clip facing away from
you when check the color.
Crossover Cables –
The purpose of a Crossover Ethernet cable is to directly connect one computer to another
computer (or device) without going through a router, switch or hub.
Procedure to make RJ45 cable:
Step 1: Cut into the plastic sheath about 1 inch (2.5 cm) from the end of the cut cable.
Do not cut deep which may cause damage the insulation of core.
Step 2: Unwind and pair the similar colors. Pinch the wires between your fingers and
straighten them out in a sequence of color as u want to make cable (Straight cable or
cross over cable). The color order is important to get correct
Step 3: A straight cut across the 8 wires to shorten them to 1/2 Inch (1.3 cm) from the
cut sleeve to the end of the wires by crimping tool. Carefully push all 8 unstrapped colored
wires into the connector. Plastic sleeve should be inserted proper in connector.
Wrong way: The plastic sleeve is not inside the connector where it can be locked into
place. The wires are too long. The wires should extend only 1/2 inch from the blue cut
sleeve. The wires do not go all the way to the end of the connector. The wires are too
short.
Crimping the cable: Carefully place the connector into the Ethernet Crimper and cinch
down on the handles tightly. The copper splicing tabs on the connector will pierce into
each of the eight wires. There is also a locking tab that holds the plastic sleeve in place
for a tight compression fit. When you remove the cable from the crimper, that end is
ready to use.
Step 4: Repeat steps 1-3 for the other end of the cable.
Step 5: To make sure you've successfully terminated each end of the cable, use a cable
tester to test each pin. Check the continuity of both connectors each other. Check the
cable threw a cable tester or ping from a computer. To check the cable through computer
connects both connector in two computers for cross cable and straight cable connect
through a switch then ping the computer.
Conclusion:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Questions:
1.
2.
3.
4.
5.
What is network topology?
What are the types of enterprise computer networks?
List the advantages and disadvantages of the internet.
Compare the Internet & the World Wide Web.
What is the basic difference between the Internet and the network?
Experiment No: 02
Experiment Name: Introduction to Network Simulator – Packet Tracer and Connect
Computer using Different Network Topology with Wired Media
Objectives:
✓ Introduction to Packet Tracer Interface.
✓ To learn how to use different components and build a simple network.
✓ Understand to create Local Area Network (LAN) using star topology.
Description:
A peer-to-peer network is a type of decentralized and distributed network architecture in
which the individual nodes (computers, printers) act in the networks act as both suppliers
and consumers of resources. It differs from the client server networking model where
certain devices have the responsibility of providing all serving data and other devices
consumes or act as a client. Computers in peer-to-peer network run the same networking
protocol and software. These networks are usually situated physically close to each other.
P2P networks are robust. If one attached device goes down, the network continues. It is
possible to configure computers in peer-to-peer workgroups to allow sharing of files,
printers, and other resources across all the devices. Peer networks allow data to be shared
easily in both directions, whether for downloads to a computer or uploads from the same
computer. Since each device participates in routing traffic through the network, hackers
can easily launch denial of service attacks. P2P software acts as server and client, which
makes peer-to-peer networks more vulnerable to remote attacks than client-server
networks. Data that is corrupt can be shared on P2P networks by modifying files that are
already on the network to introduce malicious code.
Figure 1: Peer-to-Peer Network
Topology types:
Following are different types of topologies which mainly used to connect computers with
each other to form a network.
Bus Topology:
✓ A bus topology consists of main System Bus with a terminator at each end in which
all computers (node) are connected to the cable.
✓ A signal from the source travels in both directions to all computers connected on
the bus cable until it finds the intended recipient. If the computer address does
not match the intended address for the data, the computer ignores the data.
Figure 2: Bus Network Topology
Ring Topology:
✓ In this all the computers (nodes) are connected to each-other in such a way that
they make a closed loop.
✓ Each computer is connected to two other components on either side, and it
communicated with these two adjacent neighbors. Data is sent around the ring
until it reaches its final destination.
Figure 3: Ring Network Topology
Mesh Topology:
✓ This topology employs either or two schemes, called full mesh and partial mesh.
✓ In the full mesh topology, each computer is connected directly to each of the
others. In the partial mesh topology. some computers are connected to all the
others, and some are connected only to those other nodes with which they
exchange the most data.
✓ If there are n computers, there will be (n x (n-1)), 2 cables in the network. For
examples, if you have five computers in a mesh network, it will use 5 x (5 - 1), 2,
which equals 10 cables.
Figure 4: Mesh Network Topology
Star Topology:
✓ In this every node (computer workstation or any other peripheral) is connected to
central node or device called hub or switch)
✓ All the data on the star topology passes through the central device before reaching
the intended destination.
✓ A hub forwards data packets to all the ports. A switch is more intelligent. It
recognizes which computer is connected to which port based on the MAC address
and saves this information in a table. When a switch receives a data packet, it
determines the recipient and forwards the packet to the correct computer.
✓ An advantage of the star topology is the simplicity of adding additional nodes. The
primary disadvantage of the star topology is that the hub/switch represents a
single point of failure.
✓ Extended Star topology uses the star topology to be created. It links individual
stars together by linking the hubs/switches. this will extend the length of the
network.
Figure 5: Star Network Topology
Hybrid Topology:
✓ The combination of various different topologies is known as Hybrid topology. A
Hybrid topology is a connection between different links and nodes to transfer the
data.
✓ When two or more different topologies are combined together is termed as Hybrid
topology and if similar topologies are connected with each other will not result in
Hybrid topology.
✓ For example, if there exist a ring topology in one branch of ICICI bank and bus
topology in another branch of ICICI bank, connecting these two topologies will
result in Hybrid topology.
Figure 6: Hybrid Network Topology
Exercises 1:
1. Design a Bus, Ring, Star topology using 4 PC and a Switch with following IP
address:
Host
PC1
PC2
PC3
PC4
IP Address
192.68.1.10
192.68.1.11
192.68.1.12
192.68.1.13
Subnet Mask
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
2. Design a Hybrid topology using following PC and a Switch with following IP
address:
Host IP Address Subnet Mask
Host
IP Address
Subnet Mask
PC1 192.68.1.10 255.255.255.0
PC6
192.68.1.15
255.255.255.0
PC2 192.68.1.11 255.255.255.0
PC7
192.68.1.16
255.255.255.0
PC3 192.68.1.12 255.255.255.0
PC8
192.68.1.17
255.255.255.0
PC4 192.68.1.13 255.255.255.0
PC9
192.68.1.18
255.255.255.0
PC5 192.68.1.14 255.255.255.0
PC10
192.68.1.19
255.255.255.0
3. Observe the flow of data from host to host by creating network traffic.
Conclusion:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Questions:
1.
2.
3.
4.
5.
6.
7.
8.
9.
What is Network topology?
What is use of physical and logical topology?
Which topology required terminator at both the ends of cable?
State why topology required in laboratory.
List out names of transmission media and network devices required to form star topology.
Give the meaning of extended star topology.
What is difference between hub and switch?
Give the use of NIC card. Is it required to connect computers in star topology?
Write a formula to calculate how many cables are required to connect n computers in
mesh topology?
10. Complete the following table by writing type of the cable required to connect two devices:
Device
Switch
Router
Computer
Hub
Switch
Router
Computer
Hub
Experiment No: 03
Experiment Name: Basic Router Configuration
Objectives:
✓ Understanding Basic Networking Commands
✓ Configuring the Router Configuration Commands
Description:
A router is a layer 3 device used to forward packets from one network to another. It
forwards the packet through one of its ports on the basis of destination IP address and
the entry in the routing table. By using a routing table, it finds an optimized path between
the source and destination network.
Figure 1: Cisco Router Port
Types of Ports in Cisco Router
✓
✓
✓
✓
✓
Ethernet Port
Auxilary Port
Console Port
WIC slot 0 (WIC0)
WIC slot 1 (WIC1)
Functions of ports in Cisco Router
Connector/slot
Label/color
Ethernet port
10/100 ETHERNET u
(yellow)
Auxiliary port
AUX (black)
Console port
CONSOLE (blue)
Description
The router is connected to the local
Ethernet network through this port. The
port senses the speed and the duplex
mode of the device and then operates at
the same speed and mode.
Connects to the modem for remote
configuration
Connects to a terminal or PC for local
configuration
WIC slot 0
(WICO)
WIC slot 1
(WIC1)
No label
Supports one Cisco WIC
No label
Supports one Cisco WIC
When you first power up a new Cisco Router, you have the option of using the “setup”
utility which allows you to create a basic initial configuration.
However, in this post I will show you how to do this basic setup with the Command Line
Interface (CLI).
Mastering the Cisco Router CLI is essential for more complex configuration tasks and it is
the most important knowledge you should acquire if you want to become a Cisco network
administrator.
CLI Configuration Modes
The basic CLI modes that we will be referring below are as following:
Modes
User Execution
Mode
Access method
Prompt
Exit method
login
router>
use logout command
Privilege Mode
use enable command
in user mode
router#
use disable command to
enter user mode
Global
Configuration
Mode
use configure terminal
command
router(config)#
use the exit command to
enter into privilege mode
Interface Mode
use interface command
and specify an
interface in global
configuration mode
router(config-if)#
use the exit command to
enter into global
configuration mode or use
the end command to enter
into privilege mode.
I assume that you already have some basic knowledge of CLI and how to navigate
between different configuration modes (user mode, privileged exec mode etc), so let’s
get started:
Here, we will talk about Cisco router’s basic commands like assigning an IP address to an
interface, bringing up an interface, applying to enable and secret passwords.
Administrative Configuration:
Configuration – 1
1. The user execution mode:
router>
2. Entering into privilege mode from user execution mode:
router>enable
router#
3. Entering in global configuration mode from privilege mode:
router#configure terminal
router(config)#
4. Entering into interface mode from global configuration mode. Here we have to
specify the router’s interface.
router(config)#interface fa0/0
router(config-if)#
5. Exiting from interface mode to global configuration mode to privilege mode to user
execution mode.
router(config-if)#exit
router(config)#exit
router#exit
router>
Configuration – 2: Setting Hostname & Banner to the Router
1. Giving hostname to the router –
It is used to set a name to a device stating an identity to a device. This is important
as these hostnames are used in WAN for authentication purposes. We can set the
hostname as:
router>enable
router#configure
router(config)#hostname BTCL
BTCL(config)#
2. Giving banner to the routerApplying banners – These are specifically used to give a small security notice to
the user who wants to access the router. We can customize it According to our
needs as like asking for credentials needed for the login.
BTCL>enable
BTCL#configure
BTCL(config)#banner motd #No unauthorized access allowed. Enter
your credentials!! #
Here motd means a message of the day and # means delimiter i.e message should
end with the symbol provided. This message will be shown while entering into the
router’s user execution mode.
Configuration – 3: Setting password –
There are three passwords used to secure a Cisco device:
1. Enable password – The enable password is used for securing privilege mode.
This password will be shown in clear text by the command “show runningconfiguration”. These are replaced by secret passwords nowadays.
BTCL>enable
BTCL#configure
BTCL(config)#enable password Cisco12345
2. Enable secret password – This is also used for securing privilege mode but
the d the difference is that it will be displayed as a cipher in “show runningconfiguration”. This password will override the enable password if both
passwords are set.
BTCL>enable
BTCL#configure
BTCL(config)#enable secret Cisco12345
3. Service password-encryption – The first method of encryption that Cisco
provides is through the command service password-encryption. You enable this
feature from global configuration mode.
BTCL>enable
BTCL#configure
BTCL(config)# service password-encryption
Configuration – 4: Configure IP addresses for Router Interfaces
This is an essential step in order for your router to be able to forward packets in
the network. The most basic parameter for a Router Interface is the IP address.
In this example, BTCL router in the topology diagram will be configured with
initial settings. the Cisco 1841 router is equipped with two First-Ethernet
interfaces:
FirstEthernet 0/0 (f0/0)
FirstEthernet 0/1 (f0/1)
From Global Configuration Mode you need to enter into Interface Configuration
Mode:
Figure 2: Network Topology 1
BTCL>enable
BTCL#configure
BTCL(config)#interface fastEthernet 0/0
BTCL(config-if)#ip address 192.168.10.1 255.255.255.0
BTCL(config-if)#no shutdown
BTCL(config-if)#exit
BTCL(config)#interface fastEthernet 0/1
BTCL(config-if)#ip address 192.168.11.1 255.255.255.0
BTCL(config-if)#no shutdown
BTCL(config-if)#exit
BTCL(config)#exit
BTCL#show ip interface brief
Observe the flow of data from host to host by creating network traffic.
Lab Task 1:
1. Design a network topology using following IP address:
Network 1 IP Address
192.168.10.1
Network 2 IP Address
192.168.11.1
Mother Switch 1
A1: 192.168.10.10
B1: 192.168.10.11
C1: 192.168.10.12
Mother Switch 1
A1: 192.168.11.10
B1: 192.168.11.11
C1: 192.168.11.12
Child Switch 2
A2: 192.168.10.20
B2: 192.168.10.21
C2: 192.168.10.22
Child Switch 2
A2: 192.168.11.20
B2: 192.168.11.21
C2: 192.168.11.22
2. Observe the flow of data from host to host by creating network traffic.
Lab Task 2:
1. Design a network topology using following IP address:
Network 1 IP Address
192.168.10.1
Network 2 IP Address
192.168.11.1
Mother Switch 1
A1: 192.168.10.10
B1: 192.168.10.11
C1: 192.168.10.12
Mother Switch 1
AAA1: 192.168.11.10
BBB1: 192.168.11.11
Child Switch 2
AA2: 192.168.10.20
BB2: 192.168.10.21
CC2: 192.168.10.22
Child Switch 2
AAAA2: 192.168.11.20
BBBB2: 192.168.11.21
Network 3 IP Address
192.168.12.1
CCC1: 192.168.11.12
Mother Switch 1
PC1: 192.168.12.10
PC2: 192.168.12.11
PC3: 192.168.12.12
CCCC2: 192.168.11.22
Child Switch 2
PC4: 192.168.12.20
PC5: 192.168.12.21
PC6: 192.168.12.22
2. Observe the flow of data from host to host by creating network traffic.
Conclusion:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Experiment No: 04
Experiment Name: Configuring a Cisco Router as a DHCP (Dynamic Host Configuration
Protocol) Server
Objectives:
✓ Configure a router for Dynamic Host Configuration Protocol (DHCP) to dynamically
assign addresses to attached hosts.
Description:
DHCP is a service. It allows devices to acquire their IP configuration dynamically. It works
in the server/client model. The server offers and delivers IP configurations. Clients
request and acquire their IP configurations.
DHCP (Dynamic Host Configuration Protocol) configuration is performed on routers to
assign an IP address, subnet mask, gateway address ad DNS server address to the host
systems. With this configuration, the dynamic IP address is assigned, which enables the
administrator to easily connect a new host in the configured network.
DHCP Address Allocation Methods:
To provide an IP configuration, a DHCP server can use three mechanisms. These
mechanisms are the following.
Figure 1: DHCP Address Allocation Methods
Static Allocation
In this method, the administrator configures an allocation table on the DHCP server. In
this table, the administrator fills the MAC addresses of all clients and assigns an IP
configuration to each client.
The DHCP server uses the allocation table to provide IP configurations. When a client
requests an IP configuration, the DHCP server checks the table and finds a match. If the
DHCP server finds a match, the DHCP server offers the IP configuration that is associated
with the MAC address of the client in the match.
Dynamic Allocation
In this method, the administrator configures a range of IP addresses on the DHCP server.
The DHCP server assigns an IP configuration from the configured range to each client
that requests an IP configuration.
In this method, the DHCP offers the IP configuration only for a specific time. This specific
time is known as the lease. The IP configuration remains valid until the lease duration is
over. Once the lease duration is over, the client is required to obtain a new IP
configuration from the server.
Automatic Allocation
Same as the dynamic method, in this method, the administrator also configures a range
of IP addresses on the DHCP server and the DHCP server assigns an IP configuration
from the configured range to each client that requests an IP configuration.
Unlike the dynamic method, in this method, the DHCP server assigns the IP configuration
permanently. To assigns an IP configuration permanently, the DHCP server sets the lease
duration to infinite. As a result, once the DHCP server chooses an IP configuration from
the pool and assigns the IP configuration to a client, the IP configuration remains with
that same client indefinitely.
DHCP works
When a host (DHCP client) needs an IP configuration, it connects to a DHCP server and
requests for an IP configuration. A DHCP server contains several pre-configured IP
configurations. When it receives a DHCP request from a DHCP client, it provides an IP
configuration to the client from all available IP configurations.
This entire process goes through the four steps: Discover, Offer, Request, and
Acknowledgment. In this tutorial, we will understand these four steps in detail. The
following image shows all four steps of DHCP communication.
Figure 2: DHCP Address Allocation Process
The following table summarizes messages that are used in each stage.
Discover
The DHCP client broadcasts this message to find a DHCP server.
The DHCP server broadcasts this message to lease an IP
Offer
configuration to the DHCP client.
The DHCP client uses this message to notify the DHCP server
Request
whether it accepts the proposed IP configuration or not.
The DHCP server uses this message to confirm the DHCP client
Acknowledgment
that it can use the offered IP configuration.
LAB Setup for the practice of DHCP Server
Figure 3: Lab Setup 1
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip dhcp pool Network_1
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#dns-server 192.168.1.10
Router(dhcp-config)#exit
Router(config)#ip dhcp excluded-address 192.168.1.0 192.168.1.10
Router(config)#exit
Router#wr
Building configuration...
[OK]
Verifying the DHCP Server
Router# show ip dhcp binding
Router# show ip dhcp pool
Lab Task 1:
In this lab, there are two networks: Left_network and Right_Network. Both
networks are connected to the router's Fast Ethernet 0/0 and 0/1 interfaces,
respectively. Now our objective is to configure the following IP configuration on both
networks.
Configuration
Left_Network
Right_Network
IP addresses
192.168.1.0 to 192.168.1.255
192.168.2.0 to 192.168.2.255
Available IP addresses
for hosts
192168.1.10 to 192.168.1.254
192.168.2.10 to 192.168.2.254
Subnet mask
255.255.255.0
255.255.255.0
Default Gateway
192.168.1.1
192.168.2.1
DNS Server
192.168.1.2
192.168.2.2
Reserved
192.168.1.4 to 192.168.1.10
192.168.2.4 to 192.168.2.10
Lab Task 1:
In this lab, there are four networks: CCE_network, ETE_Network, CSE_Network
and EEE_Network. Both networks are connected to the router's Fast Ethernet
0/0 and 0/1 interfaces, Ethernet 0/0/0 and 0/1/0 interfaces respectively. Now our
objective is to configure the following IP configuration on both networks.
Configuration
CCE_Network
ETE_Network
IP addresses
10.10.1.0 to 10.10.1.255
150.10.2.0 to 150.10.2.255
Available IP addresses
for hosts
10.10.1.10 to 10.10.1.254
150.10.2.10 to 150.10.2.254
Subnet mask
255.0.0.0
255.255.0.0
Default Gateway
10.10.1.1
150.10.2.1
DNS Server
10.10.1.2
150.10.2.2
Reserved
10.10.1.0 to 10.10.1.10
150.10.2.0 to 150.10.2.10
Configuration
CSE_Network
EEE_Network
IP addresses
192.168.1.0 to 192.168.1.255
210.168.2.0 to 210.168.2.255
Available IP addresses
for hosts
192168.1.10 to 192.168.1.254
210.168.2.10 to 210.168.2.254
Subnet mask
255.255.255.0
255.255.255.0
Default Gateway
192.168.1.1
210.168.2.1
DNS Server
192.168.1.2
210.168.2.2
Reserved
192.168.1.4 to 192.168.1.10
210.168.2.0 to 210.168.2.10
Conclusion:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Questions:
1.
2.
3.
4.
5.
6.
7.
What is the purpose of DHCP on the customer network?
Describe the process of installing a DHCP server in an AD infrastructure?
Process of DHCP (DORA)?
What is an IP Lease?
What is the default duration of a lease?
How does it work?
How can I prevent unauthorized laptops from using a network that uses DHCP for
dynamic addressing?
8. What IP address is assigned to the workstation after its IP address is renewed?
9. What other DHCP options can be defined on the Cisco 1841 ISR router that are
not configured in this activity?
View publication stats
Download