PRACTICAL FILE OF
COMPUTER NETWORK
BACHELOR OF TECHONOLOGY
(Electronics and Communication Engineering)
B.TECH ECE 3RD YEAR
SUBMITTED BY SUBMITTED TO
NAME : VRITIKA CHAUDHARY PROF. PREETI PANNU
URN : 2203775
CRN : 2217090
SEC. : ECB (B1)
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
GURU NANAK DEV ENGINEERING COLLLEGE LUDHIANA
(An Autonomous College Under UGC ACT)
INDEX
SR.NO. AIM DATE PAGE NO. SIGNATURE
EXPERIMENT- 1
AIM: To Connect the Computers in Local Area Network.
EXPERIMENT - 1
AIM: Connect the computers in Local Area Network:
Procedure: On the host computer:
Follow these steps to share the internet connection:
1. Logon to the host computer as administrator or as owner.
2. Click Start, and then click Control Panel.
3. Click Network and Internet Connections.
4. Click Network Connections.
5. Right - click the connection that you use to connect to the internet. For example, if you
connect to the internet by using a modern, right- click the connection that you want under
dial-up/ anther network available.
6. Click Properties.
7. Click the Advanced tab.
8. Under Internet connection Sharing, select the allow other network users to connect through
this computer’s internet connection check box.
9. If you are sharing a dial- up internet connection, select the Establish a dial-up connection
whenever a computer on my network attempts to access the internet check ox if you want to
permit your computer to automatically connect to the internet.
10. Click OK. You receive the following message: When Internet Connection Sharing is
enabled, your LAN adapter will be set to use IP address 192.168.0.1. Your computer may
lose connectivity with other computers on your network. If these other computers have static
IP addresses, it is a good idea to set them to obtain their IP addresses automatically. Are you
sure you want to enable Internet Connection Sharing?
11. Click YES. The connection to the internet is shared to other computer on the Local Area
Network (LAN).
The network adapter that is connected to the LAN is configured with a static IP address of
192.168.0.1 and a subnet mask of 225.225.255.0.
On the client computer:
To connect the internet by using the shared connection, you must confirm the LAN adapter IP
configuration and then configure the client computer. To confirm the LAN adapter IP
configuration, follow these steps:
1. Logon to the client computer as administrator or as owner.
2. Click Start, and Then Click Control Panel.
3. Click Network and Internet Connections.
4. Click network Connections.
5. Right – click Local Area Connection and then click Properties.
6. Click the general tab, click Internet Protocol (TCP/IP) in the connection uses the following
items list, and then clicks Properties.
7. In the Internet Protocol (TCP/IP) properties dialog box, click obtain an IP address
automatically (If it is not already selected), and then click OK.
NOTE: You can also assign a unique static IP address in the range 192.168.0.2 to 254. For
example, you can assign the following static IP address, subnet mask, and default gateway:
8. IP address 192.168.31.202.
9. Subnet mask 255.255.255.0.
10. Default Gateway 192.168.31.1.
11. In the Local Area Connection Properties dialog box, click ok.
12. Quit Control panel.
EXPERIMENT-2
AIM: To study and implement basic network commands and network configuration
commands.
EXPERIMENT – 2
Aim: Study of basic Network commands and Network Configuration commands.
Apparatus: Command Prompt and Cisco Packet Tracer.
Procedure: To do this experiment, follows these steps:
In this experiment, students have to understand basic networking commands example ping,
traceroute, etc. All commands related to network configuration which includes how to switch
to privilege mode and normal mode and how to configure router interface and how to save
this configuration to flash memory or permanent memory. These commands include:
• Configuring the Router commands.
• General Commands to configure network.
• Privileged Mode commands of a router.
• Router Processes & Statistics.
• IP commands.
• Other IP Commands e.g., show IP route, etc.
IP Configuration: It is used to view the TCP IP configuration in Windows operating system.
It displays the IP address subnet mask and default gateway of all the adapters.
IF Configuration: It is used to view the IP address in Linux and Unix operating systems.
IP Config All: It is used to give the full configuration of the system (show all the information
about the network adapter).
Ping: Ping is used to check the connectivity between networking devices. Ping (8) sends an
ICMP ECHO_REQUEST packet to the specified host. If the host responds, you get an ICMP
packet back. Sound strange? Well, you can "ping" an IP address to see if a machine is alive.
If there is no response, you know something is wrong.
Traceroute: Tracert is used in Windows operating system to view the entire part a packet
travels from one device to another device. It is a command which can show you the path, a
packet of information taken from your computer to one you specify. It will list all the routers
it passes through until it reaches its destination, or fails and is discarded. In addition to this, it
will tell you how long each ‘hop’ from routes to router takes.
Nslookup: Nslookup will look up the Domain Name System (DNS) server to look up the IP
address of any website. It is used for quering the main server for IP address of the given host.
It Displays information from DNS name servers.
Note: If you write the command as above it shows as default your pc's server name firstly.
Pathping: Pathping is same as traceroute that gives the statistics about the packet and its
information. It is a better version of tracert that gives you statics about packet lost and
latency.
Getting Help: In any command mode, you get a list of available commands by entering a
question mark (?).
Router>?
To obtain a list of commands that being with a particular character sequence, type in those
characters followed immediately by the question mark (?).
Router#co?
Configure connect copy
To list keywords or arguments, enter a question mark in place of a keyword or argument.
Include a space before the question mark.
Router#configure?
Memory Configure from NV memory network configure from a TFTP network host terminal
Configure from the terminal.
You can also abbreviate commands and Keywords by entering just enough characters to
make the command unique from other commands. For example, you can abbreviate the show
command to ‘sh’.
Configuration Files: Any time you make changes to the router configuration, you must save
the changes to memory because if you do not they will be lost if there is a system reload or
power outage. There are two types of configuration files: the running (current operating)
configuration and the startup configuration.
Use the following privileged mode commands to work with configuration files.
EXPERIMENT - 3
AIM: To Connect the device using Router:
EXPERIMENT - 3
AIM: To Connect the device using Router:
Apparatus: Cisco Packet Tracer Software.
Theory: A router is a device that connects two or more packets – switched networks or sub
network. It serves two primary functions: managing traffic between these networks by
forwarding data packets to their intended IP addresses, and allowing multiple devices to use
the same internet connection. A router is a networking device that forwards data packets
between computer networks. Routers perform the traffic directing functions on the internet.
Data sent through the internet, such as a web page or email, is in the form of data packets. A
packet is typically forwarded form one router to another router through the network that
constitutes an internetwork (e.g., the internet) until it reaches its destination node. In order to
direct packets effectively, a router uses an internal routing table: a list of paths to various
network destinations. The router reads a packet’s header to determine where it is going, and
then consults the routing table to figure out the most efficient path to the destination. It then
forwards the packets to the next network in the path.
PROCEDURE: To perform this experiment, follow these steps:
1. Click on the ‘END Devices’ icon and two PCs and drag and drop it on layout of the
software.
2. Click on the ‘Network Devices’ icon and choose 1841 router and drag and drop it on
layout of software.
3. Make the connections between PCs and the router by using ‘Automatically choose
Connections type’.
4. Assign IP addresses ‘192.167.1.2’ to the first PC and ‘192.167.2.2’ to second PC.
5. Set Default Gateway of the first PC as ‘192.167.1.1’ and enter Default Gateway of this PC
to ‘FastEthernet0/0’.
6. Set Default Gateway of the Second PC as ‘192.167.2.1’ and enter Default Gateway of this
PC to ‘FastEthernet0/1’.
7. Check working of the network by sending message from source to destination.
EXPERIMENT-4
Aim: To connect Devices using switch and router.
EXPERIMENT- 4
AIM: To connect a device using a router and switch:
Apparatus: Cisco Packet Tracer software.
Theory: Switches allow different devices on a network to communicate; routers allow
different networks to communicate.
A router is a networking device that routes data packets between computer networks. A
router can connect networked computers to the internet, so multiple users can share a
connection. Routers help to connect networks within an organisation or to connect the
networks of multiple branch locations. A router works as a dispatcher also. It directs data
traffic, choosing the best route for information to travel across the network, so that the data
can be transmitted as efficiently as possible.
If there is need to increase the number of ports that can be plugged into our router, we can
setup a network switch to connect with the router. Network switch connects to the router
through one of the ports on the router, extending the number of devices in our small office
network such as desktop computers, printers, laptops, etc. that have a wired connection to the
internet.
Procedure: To perform this experiment, follow these steps:
1. Click on the ‘End Devices’ icon and choose four PCs and drag & drop them on the layout
of the software.
2. Click on ‘Network Devices’ icon and choose two 2960 switches and drag & drop them on
the layout of the software.
3. Click on ‘Network Devices’ icon and choose 4331 router and drag & drop it on the layout
of the software.
4. Connect first and second PC with first switch using ‘Copper Straight-Through’ with
‘FastEthernet0’ on both the PCs and ‘FastEthernet0/1’ on the switch for the first PC and
‘FastEthernet0/2’ for the second PC.
5. Connect third and fourth PC with second switch using ‘Copper Straight-Through’ with
‘FastEthernet0’on both the PCs and ‘FastEthernet0/1’on the switch for third PC and
‘FastEthernet0/2’ for the fourth PC.
6. Connect first and second switch with the router using ‘Copper Straight-Through’ with
‘FastEthernet0/3’ on both the switches and ‘GigabitEthernet0/0/0’ on the router for first
switch and ‘GigabitEthernet0/0/1’ for the second switch.
7. Assign IP Address ‘10.1.1.1’ to the first PC and ‘10.1.1.2’ to the second PC.
8. Assign IP Address ‘192.168.1.1’ to the third PC and ‘192.168.1.2’ to the fourth PC.
9. Set the Default Gateway of first and second PC as ‘10.1.1.3’ and Default Gateway of third
and fourth PC as ‘192.168.1.3’.
10. Assign IP Address ‘10.1.1.3’ to the ‘GigabitEthernet0/0/0’ in ‘Config’ tab of the router
and turn ON the Port Status.
11. Assign IP Address ‘192.168.1.3’ to the ‘GigabitEthernet0/0/1’ in ‘Config’ tab of the
router and turn ON the Port Status.
12. Check working of the network by sending message from source to destination.
EXPERIMENT – 5
Aim: To connect device using a switch in a network:
EXPERIMENT – 5
Aim: To connect device using a switch in a network:
Objective: 1. Connect a switch to the network.
2. Verify the configuration on switches.
Theory:
In this experiment, we will verify the configuration on the customer Cisco catalyst PT-
Switch. The switch is already configured with all basic necessary information for connecting
to LAN at the customer site. The switch is currently not connected to customer workstation,
the customer’s server and router. We will verify that the switch has been connected and
configured successfully by pinging the LAN interface of the customer router.
Procedure: To perform this experiment, follow these steps:
1. Click on ‘Network Devices’ and choose three PT switches and drag & drop them on layout
of the software.
2. Click on ‘End Devices’ and choose seven PCs and one printer and drag & drop them on
layout of the software.
3. Make a connection between the PCs, switches and printer by using ‘Automatically Choose
Connection Type’.
4. Assign IP Address ‘10.1.1.1’ to the first PC, ‘10.1.1.2’ to the second PC, ‘10.1.1.3’ to the
third PC, ‘10.1.1.4’ to the fourth PC, ‘10.1.1.5’ to the fifth PC, ‘10.1.1.6’ to the sixth PC and
‘10.1.1.7’ to the seventh PC.
5. Check working of the network by sending message from source to destination.
EXPERIMENT-6
AIM: To connect the devices in a wide area network (WAN) using Static Routing:
EXPERIMENT-6
AIM: To connect the devices in a wide area network (WAN) using Static Routing:
Apparatus: Cisco packet tracer software.
Theory: A wide area network is a computer network that covers a large geographical area
comprising a region, a continent, or even the whole world. WAN includes the technology to
transmit data, image, audio and video information over a long distance and among different
LAN and MANs. A WAN a large computer network that connects group of computers over
large distances. WAN are often used by large business to connect their office networks; each
office typically has its own LAN and these LANs collect via WAN. WAN are designed to
provide network connectivity over a large distance. These are usually made of several
connected LAN. An organization that sets up it on WAN will almost rely on the network
infrastructure that is outside their control , For example a company with an office in ‘Paris’
and an office in ‘New York’ will have to send data between these offices over undersea
cables that cross the Atlantis ocean. Usually WAN will include multiple routers and switches.
A LAN only needs one router for connecting to the internet or all other LAN’s, although it
may use switches as well.
Procedure:-
1. Click on the ‘End Devices’ icon and choose four PCs and drag & drop it on the layout of
software.
2. Click on 'Network Devices icon and choose two PT-router and two switches and drag &
drop it on the layout of the software.
3. Connect the first, second and third PCs with switch and connect them to first router. Then
connect fourth, fifth and sixth PCs with second switch and connect them to the second
router. Then connect seventh, eighth and ninth PCs with third switch and connect them to
the third router by using ‘Automatically choose connection type’.
4. Assign the IP address ‘192.168.1.1', ‘192.168.1.2' and ‘192.168.1.3' to first PC, second
PC, third PC and respectively. Similarly assign ‘192.168.2.1',‘192.168.2.2' and
‘192.168.2.3' to fourth , fifth and sixth PCs and assign ‘192.168.3.1 ' , ‘192.168.3.2' and
‘192.168.3.3' to seventh , eighth and ninth PCs respectively.
5. Set the default gateway of first 3 PCs to ‘192.168.1.4', next 3 PCs to ‘192.168.2.4' and
next 3 PCs to ‘192.168.3.4’.
6. Click on Router 0 and enter the default gateway ‘192.168.1.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 2’ of same router and assign IP address to ‘192.168.4.1’
7. Click on Router 1 and enter the default gateway ‘192.168.2.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 2’ of same router and assign IP address to ‘192.168.4.2’ and ‘serial 3’IP
address to‘192.168.5.1’.
8. Click on Router 2 and enter the default gateway ‘192.168.3.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 3’ of same router and assign IP address to ‘192.168.5.2’.
9. Go to static tab in configuration of router 0, router 1 and router 2.
10. Check the working of the network by sending message from the source to the destination
and add the following parameters:
For Router 0
NETWORK MASK NEXT HOP
192.168.2.0 255.255.255.0 192.168.4.2
192.168.3.0 255.255.255.0 192.168.4.2
192.168.5.0 255.255.255.0 192.168.4.2
For Router 1
NETWORK MASK NEXT HOP
192.168.1.0 255.255.255.0 192.168.4.1
192.168.3.0 255.255.255.0 192.168.5.2
For Router 2
NETWORK MASK NEXT HOP
192.168.2.0 255.255.255.0 192.168.5.1
192.168.1.0 255.255.255.0 192.168.5.1
192.168.4.0 255.255.255.0 192.168.5.1
EXPERIMENT-7
AIM: To connect the devices in a wide area network using Dynamic Routing:
EXPERIMENT-7
AIM: To connect the devices in a wide area network using Dynamic Routing:
Apparatus: Cisco packet tracer software.
Theory: A wide area network is a computer network that covers a large geographical area
comprising a region, a continent, or even the whole world. WAN includes the technology to
transmit data, image, audio and video information over a long distance and among different
LAN and MANs. A WAN a large computer network that connects group of computers over
large distances. WAN are often used by large business to connect their office networks; each
office typically has its own LAN and these LANs collect via WAN. WAN are designed to
provide network connectivity over a large distance.
These are usually made of several connected LAN. An organization that sets up it on WAN
will almost rely on the network infrastructure that is outside their control , For example a
company with an office in ‘Paris’ and an office in ‘New York’ will have to send data between
these offices over undersea cables that cross the Atlantis ocean. Usually WAN will include
multiple routers and switches. A LAN only needs one router for connecting to the internet or
all other LAN s, although it may use switches as well.
STATIC ROUTING: Static Routing is also known as non-adaptive routing which
doesn’t change the routing table, unless the network administrator changes or modifies
them manually. Static routing does not use complex routing algorithm and it provides
high or more security then dynamic routing.
DYNAMIC ROUTING: Dynamic Routing is also known as Adaptive Routing. Which
changes the routing table according to the change in topology. Dynamic Routing uses
complex routing algorithms and it does not provide high security like static routing. When
the network changes occurs, it sends the messages to the router to ensure that changes
then the routers are recalculated for sending updated routing information.
SR. NO. STATIC ROUTING DYNAMIC ROUTING
1. In static routing routers are user In dynamic routing routers are
defined. updated according to the topology.
2. Does not use complex routing Uses complex routing algorithms.
algorithm.
3. Provides higher or more security. Provides Less security.
4. Manual. Automated.
5. Implements in small networks. Implements in large networks.
Procedure:-
1. Click on the ‘End Devices’ icon and choose four PCs and drag & drop it on the layout of
software.
2. Click on 'Network Devices icon and choose two PT-router and two switches and drag &
drop it on the layout of the software.
3. Connect the first, second and third PCs with switch and connect them to first router. Then
connect fourth, fifth and sixth PCs with second switch and connect them to the second
router. Then connect seventh, eighth and ninth PCs with third switch and connect them to
the third router by using ‘Automatically choose connection type’.
4. Assign the IP address ‘192.168.1.1', ‘192.168.1.2' and ‘192.168.1.3' to first PC, second
PC, third PC and respectively. Similarly assign ‘192.168.2.1 ' , ‘192.168.2.2' and
‘192.168.2.3' to fourth , fifth and sixth PCs and assign ‘192.168.3.1 ' , ‘192.168.3.2' and
‘192.168.3.3' to seventh , eighth and ninth PCs respectively.
5. Set the default gateway of first 3 PCs to ‘192.168.1.4', next 3 PCs to ‘192.168.2.4' and
next 3 PCs to ‘192.168.3.4’.
6. Click on Router 0 and enter the default gateway ‘192.168.1.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 2’ of same router and assign IP address to ‘192.168.4.1’
7. Click on Router 1 and enter the default gateway ‘192.168.2.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 2’ of same router and assign IP address to ‘192.168.4.2’ and ‘serial 3’IP
address to‘192.168.5.1’.
8. Click on Router 2 and enter the default gateway ‘192.168.3.4’ to the ‘Fast Ethernet 0/0’.
And go to ‘serial 3’ of same router and assign IP address to ‘192.168.5.2’
9. Go to Dynamic tab and press RIP in configuration of router 0, router 1 and router 2 and
add the all the networks: 192.168.1.0,192.168.2.0,192.168.3.0,192.168.4.0 and
192.168.5.0 .
10. Check the working of the network by sending message from the source to the destination.
Experiment – 9 (PROJECT)
AIM: Implementing an IP Addressing Scheme:-
Experiment – 9 (PROJECT)
AIM: Implementing an IP Addressing Scheme:-
Objectives:-
Subnet an address space based on the host requirements.
Assign host addresses to devices.
Configure devices with IP addressing.
Verify the addressing configuration.
Apparatus:-
Computer with network simulator (e.g., Cisco Packet Tracer)
Router with two LANs
Two hosts (HostA and HostB)
FastEthernet interfaces
Theory: IP addressing involves allocating unique addresses to devices on a network. The
concept of subnetting allows dividing a large network into smaller, more manageable sub-
networks, based on host requirements. Subnet masks help differentiate between the network
and host portions of an IP address. The subnetting process involves borrowing bits from the
host portion of the IP address to create additional subnets.
In this experiment, the given network address is 192.168.1.0/24. This address space needs to
be divided into subnets to meet the host requirements for two LANs: LAN-A (50 hosts) and
LAN-B (40 hosts). Subnetting will reduce wastage of IP addresses, and each LAN will be
assigned a unique subnet.
Procedure:-
Step 1: Subnet an Address Space Based on Host Requirements
You are provided with the private address space 192.168.1.0/24.
Subnet this address to accommodate 50 hosts for LAN-A and 40 hosts for LAN-B.
Calculate Subnet Requirements:
For LAN-A (50 hosts): You need at least 6 bits for hosts (26 - 2 = 62 hosts).
For LAN-B (40 hosts): You need at least 6 bits for hosts (26 - 2 = 62 hosts).
Borrow bits from the host portion to make the subnets. Since you need at least 6 bits for
hosts, you can use 2 bits for subnetting.
Number of subnets created: 22 = 4 subnets.
The new subnet mask will be 255.255.255.192 (/26).
Step 2: Assign Host Addresses to Devices
Subnet 0 Address: 192.168.1.0/26.
First usable address (for router FastEthernet0/0 interface): 192.168.1.1.
Last usable address (for HostA): 192.168.1.62.
Default gateway for HostA: 192.168.1.1.
Subnet 1 Address: 192.168.1.64/26.
First usable address (for router FastEthernet0/1 interface): 192.168.1.65.
Last usable address (for HostB): 192.168.1.126.
Default gateway for HostB: 192.168.1.65.
Step 3: Configure Devices with IP Addressing
Configure HostA:-
IP address: 192.168.1.62
Subnet mask: 255.255.255.192
Default gateway: 192.168.1.1
Configure HostB:-
IP address: 192.168.1.126
Subnet mask: 255.255.255.192
Default gateway: 192.168.1.65
Configure Router:-
Assign IP 192.168.1.1/26 to FastEthernet0/0 interface for LAN-A.
Assign IP 192.168.1.65/26 to FastEthernet0/1 interface for LAN-B.
Set the port status of both interfaces to "On."
Step 4: Verify the Addressing Configuration
Test Connectivity: Use the ping command to test network connectivity between HostA,
HostB, ISP Workstation, and ISP Server.
Verify Configuration: Check for green checkmarks in the assessment tab of the Packet
Tracer simulation, ensuring that devices are configured correctly.