Computer Networks Lab Guide
Computer Networks Lab Guide
OF
COMPUTER NETWORKS
(PCC-IT301-P)
2. 3-6
To implement the Static Routing in Cisco
Packet Tracer
3. 7-10
To implement the Default Routing in
Cisco Packet Tracer
7. 25-29
To implement the Open Shortest Path
First
THEORY:
Star topology is a topology for a Local Area Network (LAN) in which all computers are individually
connected to a central connection point, like a hub or a switch. This hub/ switch is the central node
and all others nodes are connected to the central node. Data on a star network passes through the hub
before continuing to its destination. The hub manages and controls all functions of the network.
Advantages -
1) Fast performance with few nodes and low network traffic.
2) Hub can be upgraded easily.
3) Easy to troubleshoot.
4) Easy to setup and modify.
5) Only that node is affected which has failed, rest of the nodes can work smoothly.
Disadvantages -
1) If the central device fails then the whole network is stopped because all the nodes depend on
the central device.
2) Performance is based on the hub/ switch that is it depends on its capacity.
3) Cost of installation is high.
4) 4) Expensive to use.
DIAGRAM:
1
ADDRESSING TABLE:
172.65.0.2 255.255.0.0
2. PC1 FastEthernet0
172.65.0.3 255.255.0.0
3. PC2 FastEthernet0
172.65.0.4 255.255.0.0
4. PC3 FastEthernet0
RESULT:
2
EXPERIMENT– 2 STATIC ROUTING
THEORY :
Static Routing is also known as non-adaptive routing which doesn’t change routing table unless the
network administrator changes or modify them manually.
Static Routing is a routing mechanism that is handled by the Internet Protocol (IP) and that depends
on manually configured routing tables. Routers that use static routing are called static routers.
Static routers are generally used in smaller networks that contain only a couple of routers or when
security is an issue. Each static router must be configured and maintained separately because static
routers do not exchange routing information with each other.
DIAGRAM :
3
ADDRESSING TABLE :
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
3) Router3
FastEthernet0/0 192.168.3.1 255.255.255.0
IP CONFIGURATION :
Router1 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
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)#interface serial 2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
4
Router2-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0 Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router 3-
Router>enable
Router (config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router>enable
5
Router#configure terminal
Enter configuration commands, one per line.
Router(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1
Router(config)#ip route 192.168.3.0 255.255.255.0 20.0.0.2 Router(config)#
Router3 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line.
Router(config)#ip route 192.168.1.0 255.255.255.0 20.0.0.1
Router(config)#ip route 192.168.2.0 255.255.255.0 20.0.0.1
Router(config)#ip route 10.0.0.0 255.0.0.0 20.0.01
Router (config)#
RESULT :
6
EXPERIMENT– 3 DEFAULT ROUTING
THEORY:
Default Routing is the method where all routers are configured to send all packets towards a single
router. This is a very useful method for small networks or for networks with a single entry and exit
point. It is usually used in addition to Static and/or Dynamic routing.
Default routing can be considered a special type of static routing. The difference between a normal
static route and a default route is that a default route is used to send packets destined to any unknown
destination to a single next hop address.
The only time the router will use the default route is when a specific route does not exist. Some
important points -
1. It is useful when if there is no route is entered in the routing table for routing.
2. It can be used for packet filtering, firewalling, or proxy servers.
3. It allows connectivity to remote networks that are not in the routing table.
4. They keep routing tables small.
5. More complex the network is, the more difficult it can be to set up and use efficiently. It depends
on the network topology.
6. The default route is error-prone.
DIAGRAM:
7
ADDRESSING TABLE :
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
2) Router2
FastEthernet0/0 192.168.2.1 255.255.255.0
3) Router3
FastEthernet0/0 192.168.3.1 255.255.255.0
5)
PC1 FastEthernet0 192.168.1.3 255.255.255.0
6)
PC2 FastEthernet0 192.168.2.2 255.255.255.0
7)
PC3 FastEthernet0 192.168.2.3 255.255.255.0
9)
PC5 FastEthernet0 192.168.3.3 255.255.255.0
IP CONFIGURATION :
Router1 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown
8
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router2-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router 3-
Router>enable
Router (config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0 Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
9
DEFAULT ROUTING CONFIGURATION :
Router1 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route
0.0.0.0 0.0.0.0 10.0.0.2 Router(config)#
Router2 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1
Router(config)#ip route 0.0.0.0 0.0.0.0 20.0.0.2
Router3-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#ip route 0.0.0.0 0.0.0.0 20.0.0.1 Router(config)#
RESULT :
10
EXPERIMENT - 4 ROUTING INFORMATION PROTOCOL (RIP) Version 1
AIM : To implement Routing Information Protocol (RIP) Version 1 using Cisco Packet Tracer.
THEORY:
Routing Information Protocol (RIP) protocol are the intradomain (interior) routing protocol which is
based on distance vector routing and it is used inside an autonomous system. Routers and network links
are called node. The first column of routing table is destination address.
RIP Version 1 – It is an open standard protocol means it works on the various vendors routers.
It works on most of the routers, it is a classful routing protocol. Updates are broadcasted. Its
administrative distance value is 120, which means it is not reliable, The lesser the administrative
distance value the reliability is much more. Its metric is hop count and max hop count is 15. There
will be a total of 16 routers in the network. When there will be the same number of hops to reach the
destination, Rip starts to perform load balancing. Load balancing means if there are three ways to
reach the destination and each way has the same number of routers then packets will be sent to each
path to reach the destination.
This reduces traffic and also the load is balanced. It is used in small companies, in this protocol
routing tables are updated in each 30 sec. Whenever a link breaks rip trace out another path to reach the
destination. It is one of the slowest protocols.
DIAGRAM:
11
ADDRESSING TABLE :
Device Name Interface IP Address Subnet Mask
Sr.
No.
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
2) Router2
FastEthernet0/0 192.168.2.1 255.255.255.0
3) Router3
FastEthernet0/0 192.168.3.1 255.255.255.0
IP CONFIGURATION:
Router1-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
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)#interface serial 2/0
12
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router2 - Router>enable
Router#configure terminal Enter configuration commands, one per line.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router3 -
Router>enable
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
13
Router(config-if)#no shutdown Router(config- if)#exit
Router(config)#
RIP v1 CONFIGURATION:
Router1 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#network 192.168.1.0
Router(config-router)#exit
Router(config)#
Router2 - Router>enable
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 30.0.0.0
Router(config-router)#network 192.168.2.0
Router(config-router)#exit
Router(config)#
Router3 - Router>enable
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 30.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#network 192.168.3.0 Router(config- router)#exit
Router(config)#
14
RESULT:
15
EXPERIMENT – 5 ROUTING INFORMATION PROTOCOL (RIP) Version 2
AIM: To implement Routing Information Protocol (RIP) Version 2 using Cisco Packet Tracer.
THEORY:
Routing Information Protocol (RIP) protocol are the intradomain (interior) routing protocol which is
based on distance vector routing and it is used inside anautonomous system. Routers and network l
links are called node. The first column of routing table is destination address.
RIP Version 2 – Due to some deficiencies in the original RIP specification, RIP version 2 was
developed in 1993. It supports classless Inter-Domain Routing (CIDR) and has the ability to carry
subnet information, its metric is also hop count and max hop count 15 is the same as rip version 1. It
supports authentication and does subnetting and multicasting. An auto summary can be done on every
router. In RIPv2 Subnet masks are included in the routing update. RIPv2 multicasts the entire routing
table to all adjacent routers at the address 224.0.0.9, as opposed to RIPv1 which uses (255.255.255.255).
Some important points –
1) It works only on hop count.
2) It’s VLSM compliant. 3) Provides fast convergence.
DIAGRAM:
ADDRESSING TABLE :
Device Name Interface IP Address Subnet Mask
Sr.
No.
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
16
Serial2/0 10.0.0.1 255.0.0.0
2) Router2
FastEthernet0/0 192.168.2.1 255.255.255.0
3) Router3
FastEthernet0/0 192.168.3.1 255.255.255.0
IP CONFIGURATION:
Router1Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
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)#interface serial 2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0 Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
17
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router2 -
Router>enable
Router#configure terminal Enter configuration commands, one per line.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit Router(config)#
Router3 Router>enable
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shutdown Router(config-if)#exit
Router(config)#
RIP v2 CONFIGURATION:
Router1 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
18
Router(config-router)#version 2
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#network 192.168.1.0
Router(config-router)#exit
Router(config)#
Router2 Router>enable
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 10.0.0.0
Router(config-router)#network 30.0.0.0
Router(config-router)#network 192.168.2.0
Router(config-router)#exit Router(config)#
Router3 Router>enable
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 30.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#network 192.168.3.0
Router(config-router)#exit Router(config)#
RESULT:
19
20
EXPERIMENT – 6 Enhanced
Interior Gateway Routing Protocol (EIGRP)
AIM: To implement Enhanced Interior Gateway Routing Protocol (EIGRP) using Cisco Packet Tracer.
THEORY:
Enhanced Interior Gateway Routing Protocol (EIGRP) is a dynamic routing protocol used for routers’
decisions and configuration. EIGRP only sends incremental updates, which in short reduces the workload
of the routers and the amount of information transmitted.
EIGRP is a classic hybrid protocol that supports classless routing, it supports automatic & manual
summarization on an EIGRP enabled interface. It uses metrics like bandwidth, load and delays to
calculate the shortest optimal network route.
SOME IMPORTANT POINTS:
3) EIGRP with protocol-dependent modules can route several different layer protocols.
4) EIGRP configuration was designed to be easy to configure. With EIGRP Autonomous number and
5) EIGRP is the protocol that performs unequal cost load balancing. If the destination has more than
DIAGRAM:
ADDRESSING TABLE:
21
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
IP CONFIGURATION :
Router 1Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
22
Router2 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit Router(config)#
Router3 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shutdown Router(config-if)#exit Router(config)#
EIGRP CONFIGURATION:
Router1 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 10
Router(config-router)#network 192.168.1.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
Router(config)#
23
Router2 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#router eigrp 10
Router(config-router)#network 192.168.2.0
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#exit Router(config)#
Router3 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#router eigrp 10
Router(config-router)#network 192.168.3.0
Router(config-router)#network 20.0.0.0
Router(config-router)#exit Router(config)#
RESULT:
24
EXPERIMENT -7
THEORY:
Open Shortest Path First (OSPF) is one of the Interior Gateway Protocol (IGP), which helps to find
the best routing path between the source and the destination router using its own shortest path first
(SPF) algorithm. It is a Link-state routing protocol that is used to distribute routing information about
data packets within a large Autonomous System.
Working – When it is configured, it listens to its neighbors in the networks, and it gathers all the link
state data available. This data is then used to make a topology map that contains all available paths
in the network. This database is saved for use, and we call it Link State Database.
Once the Link State Database is made, it is used to calculate the shortest path to subnets/networks
using an algorithm known as Shortest Path First, developed by Edsger W Dijkstra. OSPF creates 3
tables.
1) Open short first is easily scalable ,meaning with a very little Amount of hassal.
2) Open shortest path first protocol has full support for subnets.
3) It is more complex protocol to undestant and learn compared to other internet protocols.
DIAGRAM :
25
ADDRESSING TABLE :
Sr. No. Interface IP Address Subnet Mask
Device
Name
1) Router1
FastEthernet0/0 192.168.1.1 255.255.255.0
IP CONFIGURATION :
Router 1 Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
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)#interface serial
2/0
26
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit Router(config)#interface serial
3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router2 -
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit Router(config)#interface serial
2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 3/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#
Router3 –
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit Router(config)#interface serial
2/0
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#no shutdown
27
Router(config-if)#exit Router(config)#interface serial
3/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shutdown Router(config- if)#exit
Router(config)#
OSPF CONFIGURATION:
Router1Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 20.0.0.0 0.255.255.255 area 0
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#
Router2- Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 30.0.0.0 0.255.255.255 area 0
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#
Router3Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 1
Router(config-router)#network 20.0.0.0 0.255.255.255 area 0 Router(config-router)#network
30.0.0.0 0.255.255.255 area 0
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#exit Router(config)#
RESULT:
28
29
EXPERIMENT– 8 Dynamic Host Configuration Protocol (DHCP)
AIM: To implement Dynamic Host Configuration Protocol (DHCP) using Cisco Packet Tracer.
THEORY:
Components – DHCP Server: It is typically a server or a router that holds the network configuration
information
1) DHCP Client: It is the endpoint that gets the configuration information from the server like any
computer or mobile.
2) DHCP Relay Agent: If you have only one DHCP Server for multiple LAN’s then the DHCP relay
agent present in every network will forward the DHCP request to the servers. This because the
DHCP packets cannot travel across the router. Hence, the relay agent is required so that DHCP
servers can handle the request from all the networks.
3) IP address pool: It contains the list of IP address which are available for assignment to the client.
4) Subnet Mask: It tells the host that in which network it is currently present.
5) Lease Time: It is the amount of time for which the IP address is available to the client. After this
time the client must renew the IP address.
6) Gateway Address: The gateway address lets the host know where the gateway is to connect to the
internet.
Advantages –
2) The manual configuration of the IP address is not required. Hence, it saves time and workload for
the network administrators.
3) Duplicate or invalid IP assignments are not there which means there is no IP address conflict.
4) It is a great benefit for mobile users as the new valid configurations are automatically obtained
when they change their network. Disadvantages –
30
1) As the DHCP servers have no secure mechanism for the authentication of the client so any new
client can join the network. This possesses security risks like unauthorized clients being given IP
address and IP address depletion from unauthorized clients.
2) The DHCP server can be a single point of failure if the network has only one DHCP server.
DIAGRAM :
ADDRESSING TABLE :
Sr. No. Device Name Interface IP Address Subnet Mask
IP CONFIGURATION :
Router1-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
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)#
DHCP CONFIGURATION:
31
Router-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip dhcp pool ABC-POOL
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(config-router)#exit
Router(config)#
RESULT:
32
EXPERIMENT – 9 Network Address Translation (NAT)
AIM: To implement Network Address Translation (NAT) using Cisco Packet Tracer.
SOFTWARE REQUIRED: Cisco Packet Tracer THEORY:
Objective – To access the Internet, one public IP address is needed, but we can use a private IP address
in our private network. The idea of NAT is to allow multiple devices to access the Internet through a
single public address. To achieve this, the translation of private IP address to a public IP address is
required. Network Address Translation (NAT) is a process in which one or more local IP address is
translated into one or more Global IP address and vice versa in order to provide Internet access to the
local hosts. Also, it does the translation of port numbers i.e. masks the port number of the host with
another port number, in the packet that will be routed to the destination. It then makes the
corresponding entries of IP address and port number in the NAT table. NAT generally operates on
router or firewall.
Working – Generally, the border router is configured for NAT i.e the router which has one interface
in local (inside) network and one interface in the global (outside) network. When a packet traverse
outside the local (inside) network, then NAT converts that local (private) IP address to a global (public)
IP address. When a packet enters the local network, the global (public) IP address is converted to a
local (private) IP address.
If NAT run out of addresses, i.e., no address is left in the pool configured then the packets will be
dropped and an Internet Control Message Protocol (ICMP) host unreachable packet to the destination
is sent.
Advantages –
2) It provides privacy as the device IP address, sending and receiving the traffic, will be hidden.
Disadvantages –
4) Also, router being a network layer device, should not tamper with port numbers (transport layer)
but it has to do so because of NAT.
DIAGRAM:
33
ADDRESSING TABLE :
Sr. No. Interface IP Address Subnet Mask
Device
Name
1) Router1
IP CONFIGURATION:
Router 1Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
34
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)z#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 200.0.0.1 255.0.0.0
Router(config-if)#no shutdown Router(config- if)#exit
Router(config)#
NAT CONFIGURATION:
Router1Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# ip nat inside source static 192.168.1.2 155.21.21.2
Router(config)# ip nat inside source static 192.168.1.3 155.21.21.3
Router(config)# ip nat inside source static 192.168.1.4 155.21.21.4
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip nat outside Router(config-
if)#exit Router(config)#
RESULT:
35
EXPERIMENT – 10 Packet tracing using wireshark
AIM: To trace packets using wireshark SOFTWARE
Theory:
Wireshark is a network protocol analyzer, or an application that captures packets from a network
connection, such as from your computer to your home office or the internet. Packet is the name
given to a discrete unit of data in a typical Ethernet network.
Wireshark is the most often-used packet sniffer in the world. Like any other packet sniffer, Wireshark
does three things:
Packet Capture Wireshark listens to a network connection in real time and then grabs entire streams
of traffic – quite possibly tens of thousands of packets at a time.
Filtering : Wireshark is capable of slicing and dicing all of this random live data using filters. By
applying a filter, you can obtain just the information you need to see.
Visualization : Wireshark, like any good packet sniffer, allows you to dive right into the very
middle of a network packet. It also allows you to visualize entire conversations and network
streams.
DIAGRAM :
PACKET CAPTURING :
After downloading and installing Wireshark, you can launch it and click the name of an interface
under Interface List to start capturing packets on that interface. For example, if you want to capture
traffic on the wireless network click your wireless interface. You can configure advanced features by
clicking Capture Options, but this isn’t necessary for now.
As soon as you click the interface’s name, you’ll see the packets start to appear in real time. Wireshark
captures each packet sent to or from your system. If you’re capturing on a wireless interface and have
36
promiscuous mode enabled in your capture options, you’ll also see other the other packets on the
network.
Click the stop capture button near the top left corner of the window when you want to stop capturing
traffic.
COLOR CODING :
37
You’ll probably see packets highlighted in green, blue, and black. Wireshark uses colours to help you
identify the types of traffic at a glance. By default, green is TCP traffic, dark blue is DNS traffic, light
blue is UDP traffic, and black identifies TCP packets with problems — for example, they could have
been delivered out-of-order.
You’ll probably see packets highlighted in green, blue, and black. Wireshark uses colours to help you
identify the types of traffic at a glance. By default, green is TCP traffic, dark blue is DNS traffic, light
blue is UDP traffic, and black identifies TCP packets with problems — for example, they could have
been delivered out-of-order.
38