0% found this document useful (0 votes)
6 views

Lab No 3

The document outlines the objectives and tasks for Lab 3 of the Computer Networks course, focusing on DHCP and static routing. It includes instructions for configuring a DHCP server and clients, as well as setting up static routes for network connectivity. Additionally, it provides a detailed step-by-step guide for implementing these configurations in a simulated environment using Packet Tracer.

Uploaded by

Mari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lab No 3

The document outlines the objectives and tasks for Lab 3 of the Computer Networks course, focusing on DHCP and static routing. It includes instructions for configuring a DHCP server and clients, as well as setting up static routes for network connectivity. Additionally, it provides a detailed step-by-step guide for implementing these configurations in a simulated environment using Packet Tracer.

Uploaded by

Mari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Table of Content

Lab No# Objective

3 1. DHCP Basics:
● Fundamental understanding of DHCP's role in network
configuration.
● Knowledge of DHCP client-server model.
● Practice DHCP server setup: IP range, subnet mask, default
gateway, DNS servers.
● Configure clients for automatic IP address and network
parameter retrieval.
● Explore DHCP scalability for larger networks.
2. Static Routing:
● Practice configuring static routes for network connectivity
and backup strategies.
● Explore routing tables for insights into how static routes are
represented.
● Configure static routes for diverse network architectures and
scenarios.
Lab 3

Course Name : Computer Networks


Course Code : CSC 319
Semester : Spring 2024
Program : BS
Credits :1
Faculty : Taha Shaikh
Student Name :
Student ID :
Total Marks : 100
Obtained Marks :
Submitted Date :
LAB 3

Objective:

The objective of this lab is to:

Dynamic Host Configuration Protocol (DHCP):

1. Understanding DHCP Basics:


● Gain a fundamental understanding of what DHCP is and how it functions in a
network.
● Learn about the DHCP client-server model and the role of each component.
2. Configuring DHCP Server:
● Practice configuring a DHCP server with appropriate settings, such as IP address
range, subnet mask, default gateway, and DNS servers.
3. Configuring DHCP Clients:
● Configure DHCP clients to automatically obtain IP addresses, subnet masks, and
other network configuration parameters from the DHCP server.
4. IP Address Management:
● Learn how DHCP dynamically allocates and manages IP addresses for devices on
a network.
● Understand the concept of lease duration and how it impacts IP address
assignments.
5. Scalability and Redundancy:
● Explore how DHCP can be implemented to scale for larger networks.

Static Routing

1. Configuration of Static Routes:


● Understand the syntax and parameters used to define static routes manually.
2. Routing Table Analysis:
● Explore and analyze routing tables to understand how static routes are
represented.
3. Connectivity in Simple Network Topologies:
● Practice configuring static routes to establish connectivity in simple network
topologies.
4. Redundancy and Backup Routes:
● Learn how to use static routes as backup routes in case of link failures or router
outages.
5. Integration with Diverse Network Architectures:
● Configure static routes to connect networks with different addressing schemes or
protocols.
● Understand how static routing fits into various network architectures and
scenarios.
Dynamic Host Configuration Protocol (DHCP)

What is it?
The answer to “What is DHCP?” is that it’s the standard mechanism to dynamically assign IP
addresses within a network. It stands for Dynamic Host Configuration Protocol.
IP, or Internet Protocol, addressing is a logical means of assigning addresses to devices on a
network. Each device connected to a network requires a unique IP address.
At home, dynamic host configuration protocol (DHCP) assigns IP addresses to your
smartphones, laptops, tablets, and devices like doorbell cameras. When you use Wi-Fi on your
home network, typically your router is a DHCP server.
In a large enterprise setting, a DHCP server is usually a dedicated computer. By simplifying IP
address management, it saves money, is more secure, and doesn’t eat up valuable admin time.

How DHCP works?


Communications to fulfill a DHCP request involves both the server and client. Furthermore, a
relay agent or IP helper often facilitates communication between the two. Relay agents receive
broadcast DHCP messages from clients and then re-send those messages with configuration
information to servers.
Communication happens via small units of data, called packets, that are routed through a
network. Networking protocols like IP govern all its rules.
Most of the time, communication occurs in four steps. Briefly, they are:
1. A discover packet is sent from the client to the server.
2. The server replies to the client with a DHCP offer packet containing an IP address.
3. The client receives and validates the offer, then sends a request packet back to the
server to accept the address.
4. The server sends an acknowledgement packet back to the client to confirm the chosen
IP address.

Configuring DHCP service on a generic server in Packet Tracer.


1. Build the network topology in packet tracer

2. Configure static IP address on the server (192.168.1.2/24).


3. Now configure DHCP service on the generic server.
To do this, click on the server, then click on Services tab. You will pick DHCP on the menu. Then
proceed to define the DHCP network parameters as follows:
Pool name: MY_LAN
Default Gateway: 192.168.1.1
DNS Server: 192.168.1.2
Start IP Address: 192.168.1.0
Subnet Mask: 255.255.255.0
Maximum Number of users: 256
Click on add then Save. The DHCP entry is included in the list.
Here are the configurations on the server:

Once you’ve configured everything, turn ON the DHCP service.


4. Finally, enable DHCP configuration on each PC. The three PCs should get automatically
configured.
As an example, here is the DHCP configuration on PC1:
IP Addressing Table For PCs:

S.NO Device IPv4 Address Subnet Mask Default Gateway

255.255.255.
pc0 192.168.1.2 192.168.1.1
1. 0

255.255.255.
pc1 192.168.1.3 192.168.1.1
2. 0

255.255.255.
pc2 192.168.2.2 192.168.2.1
3. 0

255.255.255.
pc3 192.168.2.3 192.168.2.1
4. 0

● Then, create a network topology as shown below the image.


● Use an Automatic connecting cable to connect the devices with others.
Correction: Default Gateway in 2nd network is 192.168.2.1
Step 2: Configure the PCs (hosts) with IPv4 address and Subnet Mask according to the IP
addressing table given above.
● To assign an IP address in PC0, click on PC0.
● Then, go to desktop and then IP configuration and there you will IPv4 configuration.
● Fill IPv4 address and subnet mask.
Step 3: Assigning IP address using the ipconfig command.
● We can also assign an IP address with the help of a command.
● Go to the command terminal of the PC.
● Then, type ipconfig <IPv4 address><subnet mask><default gateway>(if needed)
Example: ipconfig 192.168.1.3 255.255.255.0 192.168.1.1
● Repeat the same procedure with other PCs to configure them thoroughly.
Step 4: Configure router with IP address and subnet mask.

S.NO Device Interface IPv4 Addressing Subnet Mask

router FastEthernet0/ 255.255.255.


192.168.1.1
1. 0 0 0
S.NO Device Interface IPv4 Addressing Subnet Mask

255.255.255.
Serial2/0 11.0.0.1
0

FastEthernet0/ 255.255.255.
192.168.2.1
0 0
router
1
255.255.255.
Serial2/0 11.0.0.2
2. 0

● To assign an IP address in router0, click on router0.


● Then, go to config and then Interfaces.
● Then, configure the IP address in FastEthernet and serial ports according to IP addressing
Table.
● Fill IPv4 address and subnet mask.
● Repeat the same procedure with other routers to configure them thoroughly.
Step 5: After configuring all of the devices we need to assign the routes to the routers.
To assign static routes to the particular router:
● First, click on router0 then Go to CLI.
● Then type the commands and IP information given below.
CLI command : ip route <network id> <subnet mask><next hop>
Static Routes for Router0 are given below:
Router(config)#ip route 192.168.2.0 255.255.255.0 11.0.0.2
Static Routes for Router1 are given below:
Router(config)#ip route 192.168.1.0 255.255.255.0 11.0.0.1
Step 6: Verifying the network by pinging the IP address of any PC. We will use the ping
command to do so.
● First, click on PC1 then Go to the command prompt
● Then type ping <IP address of targeted node>
● As we can see in the below image we are getting replies which means the connection is
working very fine
Example : ping 192.168.2.2
Lab Tasks

1. Create a LAN of 5 PCs and assign IPs dynamically using DHCP.


2. Create a network topology of 4 LANS, each LAN must contain 1 switch and 4 end nodes.
Establish communication between different LANs with the help of static routing.
(Show connectivity with the help of routing table.)
Attach screen shots with every task

You might also like