0% found this document useful (0 votes)
38 views21 pages

Experiment 8 to 13 (1)

Uploaded by

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

Experiment 8 to 13 (1)

Uploaded by

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

Experiment – 8

AIM: To Implement Default Routing using Cisco Packet Tracer

MATERIAL REQUIRED:

 Cisco Packet Tracer Software


 2 Routers
 2 Switches
 6 PCs (PC0 to PC5)
 Straight-through cables for PC-Switch connections
 Cross-over cable (or Serial connection) for Router-Router connection
THEORY:

Default Routing: Default routing is a type of routing in which a router is configured to forward
packets to a specified "default" next hop or destination when no specific route exists for the
packet's destination in the routing table. This is often used when routing information for all
possible destinations is unavailable, but a default route can direct packets to a central router or
gateway. Default routing simplifies network configuration by reducing the need to define
individual routes for each destination, making it particularly useful in smaller or less complex
networks.
In default routing, the router typically uses the IP address of the next-hop router as the
destination for all packets that do not match any other specific route. It is commonly used in
edge routers that connect a local network to an external network, such as the Internet. The
default route is typically represented by the destination network 0.0.0.0 with a subnet mask of
0.0.0.0, indicating that it applies to any destination not explicitly listed in the routing table.

NETWORK TOPOLOGY:
Refer to the image given below:
IP ADDRESSING TABLE:

Device Interface IP Address Subnet Mask Default Gateway

Router0 FastEthernet0/1 192.168.1.1 255.255.255.0 -

Router0 GigabitEthernet0/0 10.0.0.1 255.255.255.252 -

Router1 FastEthernet0/1 192.168.2.1 255.255.255.0 -

Router1 GigabitEthernet0/0 10.0.0.2 255.255.255.252 -

PC0 FastEthernet0 192.168.1.2 255.255.255.0 192.168.1.1

PC1 FastEthernet0 192.168.1.3 255.255.255.0 192.168.1.1

PC2 FastEthernet0 192.168.1.4 255.255.255.0 192.168.1.1

PC3 FastEthernet0 192.168.2.2 255.255.255.0 192.168.2.1

PC4 FastEthernet0 192.168.2.3 255.255.255.0 192.168.2.1

PC5 FastEthernet0 192.168.2.4 255.255.255.0 192.168.2.1

PROCEDURE:

Step 1: Add Devices to the Workspace

 Open Cisco Packet Tracer.

 Add:
o 2 Routers (Router0, Router1)
o 2 Switches (Switch0, Switch1)
o 6 PCs (PC0–PC5)
Step 2: Connecting the Devices

1. Connect Router0 and Router1:


o Use a Copper Cross-Over Cable.
o Connect Router0's GigabitEthernet0/0 to Router1's GigabitEthernet0/0.
2. Connect Router0 to Switch0:
o Use a Copper Straight-Through Cable.
o Connect Router0’s FastEthernet0/1 interface to Switch0's
FastEthernet0/1 port.
3. Connect Router1 to Switch1:
o Use a Copper Straight-Through Cable.
o Connect Router1’s FastEthernet0/1 interface to Switch1's
FastEthernet0/1 port.

4. Connect PCs to Switches:


o Use Copper Straight-Through Cables.
o Connect:
 PC0, PC1, and PC2 to Switch0 (FastEthernet ports).

 PC3, PC4, and PC5 to Switch1 (FastEthernet ports).

Step 3: Assigning IP Addresses to Devices

1. Assign IP Address to Router0:


o FastEthernet0/1: 192.168.1.1 255.255.255.0
o GigabitEthernet0/0: 10.0.0.1 255.255.255.252
2. Assign IP Address to Router1:
o FastEthernet0/1: 192.168.2.1 255.255.255.0
o GigabitEthernet0/0: 10.0.0.2 255.255.255.252
3. Assign IP Addresses to PCs:

 Network 1 (PCs on Switch0):

o PC0: IP: 192.168.1.2 255.255.255.0, Gateway: 192.168.1.1


o PC1: IP: 192.168.1.3 255.255.255.0, Gateway: 192.168.1.1

o PC2: IP: 192.168.1.4 255.255.255.0, Gateway: 192.168.1.1

 Network 2 (PCs on Switch1):


o PC3: IP: 192.168.2.2 255.255.255.0, Gateway: 192.168.2.1

o PC4: IP: 192.168.2.3 255.255.255.0, Gateway: 192.168.2.1


o PC5: IP: 192.168.2.4 255.255.255.0, Gateway: 192.168.2.1

Step 4: Configuring Routing on Routers

1. Configure Routing on Router0:


o Access Router0’s CLI.
o Enter Global Configuration Mode:
Router> enable

Router# configure terminal

Set the default route pointing to Router1:

Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2


Exit configuration mode:

Router(config)# exit

2. Configure Routing on Router1:


o Access Router1’s CLI.
o Enter Global Configuration Mode:
Router> enable

Router# configure terminal

Set the default route pointing to Router0:

Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1

Exit configuration mode:

Router(config)# exit

OUTPUT: Test Connectivity Between PCs:

 From PC0 (192.168.1.2), open the command prompt and ping PC3 (192.168.2.2).

 Successful ping replies confirm that the default routing setup is working
correctly between both networks.
Experiment - 9
AIM: To configure a DHCP Server using Cisco Packet Tracer.

MATERIAL REQUIRED:
 4 PC

 1 Router

 1 Switch
 Ethernet Cables

THEORY:
DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to
automatically assign IP addresses, subnet masks, default gateways, and DNS servers to devices
in a network.
Without DHCP, each device must be configured manually. DHCP automates this process,
simplifies network management, and avoids IP conflicts.
The DHCP server maintains a pool of IP addresses and assigns them to devices when requested.
It reduces administrative tasks and supports scalability in large networks.

NETWORK TOPOLOGY:
Refer to the Cisco Packet Tracer topology where are connected to a router ,4 PC (PC0, PC1,
PC2, PC3) with dynamic IP assigned via 1 Server as a DHCP Server. Both devices
connected through a switch.

IP ADDRESSING TABLE:

Device Interface IP Address Subnet Mask

DHCP Server FastEthernet0 10.0.0.5 255.0.0.0


Device Interface IP Address Subnet Mask

PC0 FastEthernet DHCP 255.0.0.0

PC1 FastEthernet DHCP 255.0.0.0

PC2 FastEthernet DHCP 255.0.0.0

PC3 FastEthernet DHCP 255.0.0.0

Switch - NA NA

PROCEDURE:

Step 1: Configure the DHCP Server


1. Click on the Server → Go to the Config tab

2. Under FastEthernet0:

o IP Address: 10.0.0.5

o Subnet Mask: 255.0.0.0

Under PC1:

o IP Address: 10.0.0.4

o Subnet Mask: 255.0.0.0


Under PC2:

o IP Address: 10.0.0.3

o Subnet Mask: 255.0.0.0

Under PC3:

o IP Address: 10.0.0.2

o Subnet Mask: 255.0.0.0


3. Go to the Services tab → Select DHCP

o Turn DHCP Service ON


o Fill in the fields: Pool Name: LAN

 Default Gateway: 10.0.0.1

 DNS Server: 0.0.0.0

Step 2: Configure PC0, PC1, PC2, PC3


1. Click on PC0, PC1, PC2, PC3 respectively.
2. Go to Desktop tab → Select IP Configuration

3. Choose DHCP

o The PC will automatically request and obtain an IP address from the DHCP
server.

OUTPUT:
 PC0, PC1, PC2, PC3 should now display:

o IP Address: 10.0.0.5, 10.0.0.4, 10.0.0.3, 10.0.0.2 etc.

o Subnet Mask: 255.0.0.0

o Default Gateway: 10.0.0.1


o DNS Server: 0.0.0.0

You can confirm this using Command Prompt → ipconfig


Experiment – 10
AIM: To Configure DNS Server Using Cisco Packet Tracker.

MATERIAL REQUIRED:
 1 PC (PC0)

 1 DNS Server

 1 Switch (2960 series)


 Ethernet Cables

THEORY:
DNS (Domain Name System) is responsible for resolving domain names (like
www.google.com) into IP addresses (like 142.250.64.78). In a local network, configuring a
DNS server allows you to assign and resolve custom domain names to internal IP addresses.
By configuring a DNS server in Cisco Packet Tracer, we simulate how a client (PC) sends a
domain query to the DNS server, which replies with the associated IP address. This process is
essential for understanding name resolution in real and virtual networks.

NETWORK TOPOLOGY:
A simple network consisting of:

 1 PC (PC0) with IP 192.168.1.2

 1 Server acting as a DNS server with IP 192.168.1.1

 Both connected to a switch

IP ADDRESSING TABLE:

Device Interface IP Address Subnet Mask

Server0 FastEthernet0 192.168.1.1 255.255.255.0

PC0 FastEthernet0 192.168.1.2 255.255.255.0

Switch0 - NA NA
PROCEDURE:

Step 1: Configure the Server


1. Click on the Server.

2. Go to the Config tab: Interface Settings → FastEthernet0


 IP Address: 192.168.1.1

 Subnet Mask: 255.255.255.0

3. Go to the Services tab → DNS

o Turn DNS Service ON

o Under DNS Records, add:

 Name: My Website

 Address: 192.168.1.1

 Click Add

Step 2: Configure the PC (PC0)


1. Click on PC0

2. Go to Desktop → IP Configuration

o IP Address: 192.168.1.2

o Subnet Mask: 255.255.255.0

o Default Gateway: 192.168.1.1

o DNS Server: 192.168.1.1

Step 3: Test DNS Configuration


1. Go to Desktop → WEB BROWSER on PC0

2. Type the following command: http://My Website

OUTPUT:
The PC was able to successfully resolve the domain http://My Website using the configured
DNS server and communicate with it.
Experiment - 11
AIM: Introduction to Wireshark

THEORY:
Wireshark is a network protocol analyser created by Gerald Combs in 1998. It is used for:

1. Network troubleshooting,

2. Analyse and examine security problems,


3. Software and communications protocol development,

4. Education and hacking.

Wireshark captures network information from the Application Layer to the Link Layer.

This is the Wireshark landing page.

Starting from the top:

1. The 'Capture' button begins the network capture.

2. 'All Interfaces shown' drop-down menu allows you to select between Wired, Wireless
and External interfaces. In our case, we have all three showing. A wired interface would
be the built-in Thunderbolt ports I have. 'awdl0' is for my Bluetooth chip and
'Loopback: lo0' is for my local server.
3. To capture more than one interface, simply hold the 'command' key (for Mac) and then
select. Once selected, press Capture.
After you click capture, the following display shows up confirming your selection and offers a
few more configurations.

Promiscious Mode enabled means if a packet is not meant for your system, Wireshark will
still keep a record of it. Sometimes, packets bounce of various hosts asking for a final
destination -- at this point, Wireshark keeps the packet or discards based on this option.

When you begin capturing network packets, the following window will show up.
Here's a look at what the buttons on the toolbar do.

Right below the toolbar, there are seven columns:

Column Headers
1. No – Each packet is assigned a number.

1. Straight forward, it's just a counter.


2. Time – The timestamp of the packet.
1. a.k.a how much time passed since you began capturing.
2. You can change this to various other time formats by going to "View > Time
Display Format > ...".

3. Source – Source address of the packet, could be an IP or MAC address.

1. As humans, we find it easier when the IP or MAC address is an actual name,


such as 'www.google.com' or 'www.yahoo.ca'. You can enable Wireshark's
option to convert these addresses by going to "View > Name Resolution >
Resolve Network Addresses".
4. Destination – Destination address of the packet, could be an IP or MAC address.

5. Protocol – Protocol name used in the packet.

1. Protocol means "a set of rules governing the format of data sent over the Internet
or other network."

6. Length – Total length of the packet.


7. Info – Provides additional details about the packet.

1. This Info view is just meant to be a quick view of what the packet is about. For
more details, go down to the In-depth panel and the bytes panel for more details
on the packet flags, source and destination ports, HTTP form data, and more!

Here's a view of the in-depth and the bytes panel:


Flow Graph
Sometimes it's difficult to grasp a picture of how the packets are flying. Wireshark offers a
Flow Graph (under Statistics tab) where you're able to see how the communication works
between a server and client.

Colour Coding Packets


Each of the packets in the main view are colour-coded so we can easily understand what they
mean. This can be changed by going to View > Colouring Rules. You can also add your own
colouring rules in case if you wanted all packets with incoming IP address matching x.x.x.x
to be blue.
Filtering Packets in Wireshark
A lot of network traffic is caught by Wireshark and most will be useless for us right now.
With the help of filtering, we can get to the good stuff quickly.

1. To try some of the filters below, paste them into the 'Filter Bar' at the top of the
Wireshark Capture page.
2. Click 'Expressions' to view all possible filter options. It's a laaarrrggee list. o_o
3. As regular users of Wireshark, there may be some commands that you use often. Save
your own custom filters for quick access by clicking the '+' button. Give it a label and
it will show up beside the '+' button so next time, you can easily apply the filter in one
click.
4. Another easy way to apply filters is by right-clicking on a packet > "Apply as filter >
..." and selecting from one of the many options.
Experiment - 12
AIM: To implement Dynamic Routing (RIP) using Cisco Packet Tracer.

MATERIAL REQUIRED:
 Cisco Packet Tracer software

 2 Routers (e.g., ISR4331)

 2 Switches (e.g., 2960-24TT)


 6 PCs

 Ethernet cables

THEORY:
Dynamic routing protocols enable routers to automatically discover and learn about networks
and dynamically update their routing tables as the network topology changes. This eliminates
the need for manual route configuration, making the network more scalable and resilient to link
failures.
RIP (Routing Information Protocol) is a distance-vector routing protocol. Routers using RIP
broadcast their routing tables to directly connected neighbours at regular intervals.
Neighbouring routers then update their own routing tables based on the information received.
RIP uses hop count as its metric to determine the best path to a destination network.

NETWORK TOPOLOGY:
Refer to the image (similar to the Static Routing experiment, but with an additional network
segment for the link between the routers):

IP ADDRESSING TABLE:
Device Interface IP Address Subnet Mask Default Gateway

Router G0/0/0 (to Switch1) 192.168.0.1 255.255.255.0 -

Router G0/0/1 (to Switch2) 192.168.1.1 255.255.255.0 -

PC0 FastEthernet0 192.168.0.2 255.255.255.0 192.168.0.1

PC1 FastEthernet0 192.168.0.3 255.255.255.0 192.168.0.1

PC2 FastEthernet0 192.168.0.4 255.255.255.0 192.168.0.1

PC3 FastEthernet0 192.168.1.2 255.255.255.0 192.168.1.1

PC4 FastEthernet0 192.168.1.3 255.255.255.0 192.168.1.1

PC5 FastEthernet0 192.168.1.4 255.255.255.0 192.168.1.1

PROCEDURE:

1. Assign IP Addresses:
 Configure IP addresses and subnet masks on the router interfaces and PCs according
to the IP Addressing Table.

 Ensure the PCs have the correct Default Gateway set to the IP address of their
connected router's LAN interface.

2. Configure RIP on Router0:

Router> enable

Router# configure terminal

Router(config)# router rip


Router(config-router)# version 2

Router(config-router)# network 192.168.0.0

Router(config-router)# network 10.0.0.0

Router(config-router)# no auto-summary

Router(config-router)# end

Router# write memory

3. Configure RIP on Router1:


Router> enable

Router# configure terminal


Router(config)# router rip

Router(config-router)# version 2

Router(config-router)# network 192.168.1.0

Router(config-router)# network 10.0.0.0


Router(config-router)# no auto-summary

Router(config-router)# end

Router# write memory

4. Verify Connectivity:
 Allow some time for the RIP updates to propagate and the routing tables to converge.
You can observe the routing tables using the show ip route command on both routers.
You should see entries for the remote networks learned via RIP.
 Use the ping command from PC0 to PC3 (and vice versa) to test connectivity across
the routers.

ping 192.168.1.2

OUTPUT:
All PCs should be able to successfully ping each other across different LANs through the
router.
Experiment – 13
AIM: To implement VLSM (Variable Length Subnet Masking) in Cisco Packet Tracer.

MATERIAL REQUIRED:
 2 Routers (e.g., ISR4331)

 2 Switches (e.g., 2960-24TT)

 6 PCs
 Ethernet cables

THEORY:
VLSM (Variable Length Subnet Masking) allows subnetting a network into subnets of different
sizes, optimizing the usage of IP addresses. Unlike fixed-length subnetting where all subnets
are of equal size, VLSM allows assigning different subnet masks based on the number of hosts
required in each subnet. This makes the network design more efficient and conserves IP
addresses, which is very important for larger and more complex networks.

VLSM is widely used in real-world networks to better utilize IP address space, especially when
dealing with hierarchical designs.

NETWORK TOPOLOGY:
 Two LANs are connected via two routers.Each LAN has PCs connected to switches.

IP ADDRESSING TABLE:

Device Interface IP Address Subnet Mask Default Gateway

Router0 G0/0 (to Switch0) 192.168.1.1 255.255.255.224 -

Router0 G0/1 (to Router1) 192.168.1.33 255.255.255.252 -

Router1 G0/0 (to Switch1) 192.168.1.65 255.255.255.224 -

Router1 G0/1 (to Router0) 192.168.1.34 255.255.255.252 -


Device Interface IP Address Subnet Mask Default Gateway

PC0 FastEthernet0 192.168.1.2 255.255.255.224 192.168.1.1

PC1 FastEthernet0 192.168.1.3 255.255.255.224 192.168.1.1

PC2 FastEthernet0 192.168.1.4 255.255.255.224 192.168.1.1

PC3 FastEthernet0 192.168.1.66 255.255.255.224 192.168.1.65

PC4 FastEthernet0 192.168.1.67 255.255.255.224 192.168.1.65

PC5 FastEthernet0 192.168.1.68 255.255.255.224 192.168.1.65

PROCEDURE:
1. Assign IP Addresses:
 Assign IP addresses to PCs, Routers, and Switches according to the IP Addressing
Table. Make sure PCs have the correct Default Gateway set.

2. Configure Interfaces on Router0: Router> enable

Router# configure terminal

Router(config)# interface g0/0

Router(config-if)# ip address 192.168.1.1 255.255.255.224

Router(config-if)# no shutdown

Router(config)# interface g0/1

Router(config-if)# ip address 192.168.1.33 255.255.255.252


Router(config-if)# no shutdown

Router(config)# exit

Router#

3. Configure Interfaces on Router1: Router> enable

Router# configure terminal

Router(config)# interface g0/0

Router(config-if)# ip address 192.168.1.65 255.255.255.224


Router(config-if)# no shutdown

Router(config)# interface g0/1


Router(config-if)# ip address 192.168.1.34 255.255.255.252
Router(config-if)# no shutdown

Router(config)# exit

Router#

4. Configure Static Routes:


 On Router0: Router# configure terminal

Router(config)# ip route 192.168.1.64 255.255.255.224 192.168.1.34

Router(config)# exit

Router#
 On Router1: Router# configure terminal

Router(config)# ip route 192.168.1.0 255.255.255.224 192.168.1.33

Router(config)# exit
Router#
VERIFY CONNECTIVITY:
 Use show ip route on routers to verify routing entries.

 Use the ping command from PC0 to PC3, and vice versa, to ensure connectivity
across routers. ping 192.168.1.66

OUTPUT:
All PCs should be able to successfully ping each other across different LANs through the
routers using different subnet sizes created with VLSM.

You might also like