6-3 Lab Manual - Computer Networks
6-3 Lab Manual - Computer Networks
COMPUTER NETWORKS
Course Code: CSCN-348
Preface
The lab manual has been designed to familiarize students with the layered approach in data communications,
switching technologies, and protocols. It would also help to have expertise in specific areas, such as the
design and maintenance of various types of networks.
Tools/ Technologies
• Packet Tracer
• GNS 3
2
BS (Computer Science) 2023
TABLE OF CONTENTS
Preface ............................................................................................................................................................... 2
Tools/ Technologies .......................................................................................................................................... 2
LAB 1: Preparing Ethernet Cables ................................................................................................................ 7
Objectives.......................................................................................................................................................... 7
1. Tools required: -.................................................................................................................................... 7
a. For Patch Cables (connect switches): .................................................................................................. 7
b. For Fixed Wiring: ................................................................................................................................. 7
2. Recommended: ...................................................................................................................................... 7
3. Introduction: About the Cable ............................................................................................................ 7
4. Introduction to RJ45 Plugs or Jacks:.................................................................................................. 8
5. Forms of Ethernet Cables - Crossed and Straight cables - When to use them ............................... 8
Notes: ............................................................................................................................................................. 9
6. Ethernet Cable Pin Outs and Connections ......................................................................................... 9
Theoretical Description ................................................................................................................................... 9
1. What Is Straight Through Cable? ....................................................................................................... 9
2. What Is Crossover Cable?.................................................................................................................. 10
3. Straight Through vs. Crossover Cable, which to choose? ............................................................... 10
4. Pin Out Tables for ethernet and fast ethernet connections............................................................. 11
5. How to wire Ethernet Patch Cables: ................................................................................................. 12
6. How to wire fixed Ethernet Cables: .................................................................................................. 12
Lab Tasks........................................................................................................................................................ 12
LAB 2: Understanding Network Commands .............................................................................................. 14
Objectives........................................................................................................................................................ 14
1. Equipment required: - ........................................................................................................................ 14
Recommendation........................................................................................................................................ 14
Theoretical Description ................................................................................................................................. 14
Lab Tasks........................................................................................................................................................ 19
LAB 3: IP Addressing and Subnetting......................................................................................................... 20
Objectives........................................................................................................................................................ 20
Theoretical Description ................................................................................................................................. 20
Lab Tasks........................................................................................................................................................ 26
LAB 4: Configuring basic Switch ................................................................................................................. 27
3
BS (Computer Science) 2023
Objectives........................................................................................................................................................ 27
1. Equipment required: - ........................................................................................................................ 27
Recommendation........................................................................................................................................ 27
Theoretical Description ................................................................................................................................. 27
Lab Tasks........................................................................................................................................................ 29
LAB 5: Securing the Switch .......................................................................................................................... 30
Objectives........................................................................................................................................................ 30
1. Equipment required: - ........................................................................................................................ 30
Recommendation........................................................................................................................................ 30
Theoretical Description ................................................................................................................................. 30
Lab Tasks........................................................................................................................................................ 33
LAB 6: Virtual LAN (VLANs)...................................................................................................................... 34
Objectives........................................................................................................................................................ 34
1. Equipment required: - ........................................................................................................................ 34
Recommendation........................................................................................................................................ 34
Connectivity with internet................................................................................................................................ 34
Theoretical Description ................................................................................................................................. 34
You will be able to see the mismatch message on CLIs of both of the switches. ........................................... 38
Lab Tasks........................................................................................................................................................ 39
LAB 7: Servers and CDP .............................................................................................................................. 40
Objectives........................................................................................................................................................ 40
1. Equipment required: - ........................................................................................................................ 40
Recommendation........................................................................................................................................ 40
Connectivity with internet................................................................................................................................ 40
Theoretical Description ................................................................................................................................. 40
DNS in Cisco packet tracer and how to configure DNS on Cisco router.................................................. 46
There are a couple of ways in which we can configure dns in packet tracer. We will configure dns on
the cisco router and endpoint server. ........................................................................................................... 46
Create a mapping for the Switch in the server so that PCs can ping the Switch with the name 'switch' ......... 48
Lab Tasks........................................................................................................................................................ 48
LAB 8: Switch Redundant connections and Loops (STP) ......................................................................... 49
Objectives........................................................................................................................................................ 49
1. Equipment required: - ........................................................................................................................ 49
Recommendation........................................................................................................................................ 49
Connectivity with internet................................................................................................................................ 49
Theoretical Description ................................................................................................................................. 49
4
BS (Computer Science) 2023
Objectives........................................................................................................................................................ 62
1. Equipment required: - ........................................................................................................................ 62
Recommendation........................................................................................................................................ 62
Theoretical Description WAN Connection Labs .................................................................................... 62
Lab Tasks........................................................................................................................................................ 63
LAB 13: Implementing Router Information Protocol (RIP) ver. 2........................................................... 64
Objectives........................................................................................................................................................ 64
1. Equipment required: - ........................................................................................................................ 64
Recommendation........................................................................................................................................ 64
Connectivity with internet................................................................................................................................ 64
Theoretical Description ................................................................................................................................. 64
RIP Configuration: .................................................................................................................................... 64
Lab Tasks........................................................................................................................................................ 65
6
BS (Computer Science) 2023
1. Tools required: -
• Cable - bulk Category 5, 5e, 6
• Wire Cutters - to cut the cable if necessary.
• Wire Stripper - to strip the cable if necessary.
a. For Patch Cables (connect switches):
• RJ45 Plugs
• RJ45 Crimper
b. For Fixed Wiring:
• RJ45 Jacks
2. Recommended:
• Wire Stripper
• Cable Tester
3. Introduction: About the Cable
You can find bulk supplies of the cable at many computer stores or most electrical or home centers. UTP
(Unshielded Twisted Pair) Category 5 cables are used for basic 10/100 Mbps functionality and CAT 5e and
6 for gigabit (1000BaseT) operation, and CAT 7 gives you a measure of future proofing.
Bulk cable comes in many types, and there are two basic
categories, solid and braided cable. Braided cable tends to work
better in patch applications for desktop use. It is more flexible
and resilient than solid cable and easier to work with but meant
for shorter lengths. Solid cable is meant for longer runs in a
fixed position.
The plenum-rated cable must be used whenever the cable travels
through an air circulation space, for example, above a false
ceiling or below a raised floor. It may be difficult or impossible to tell from the package what type of cable
it is, so peal out an end and investigate and look inside the cable. Usually, there are eight color-coded wires.
These wires are twisted into four pairs of wires, and each pair has a common color theme.
One wire in the pair is a solid or primarily solid-colored wire, and the other is a primarily white wire with a
colored stripe. Examples of the naming schemes used are Orange (alternatively Orange/White) for the solid-
colored wire and White/Orange for the striped cable. The twists are extremely important. Twisting is there
to counteract noise and interference.
It is important to wire according to a standard to get proper performance from the cable. The TIA/EIA-568-
A specifies two wiring standards for an 8-position modular connector such as RJ45. The two wiring
standards, T568A and T568B, vary only in the arrangement of the colored pairs.
7
BS (Computer Science) 2023
Your choice might be determined by the need to match existing wiring, jacks, or personal preference, but
you should maintain consistency. I've shown both below for straight-through cabling and just T568B for
crossover cabling.
RJ45 jacks come in a variety of styles intended for several different mounting options. The choice is one of
the requirements and preferences. RJ45 jacks are designed to work only with solid cable. Most jacks come
labeled with color codes for either T568A, T568B, or both.
5. Forms of Ethernet Cables - Crossed and Straight cables - When to use them
The following diagram shows the Normal use of Crossed and Straight cables (see figure 1.2).
Notes:
a. We show Straight cables as BLUE and Crossed as RED. That is our convention; the cable color can
be anything you choose or, more likely, the vendor decides.
b. To avoid the need for Crossed cables, many vendors provide UPLINK ports on Hubs or Switches -
these are specially designed to allow the use of a STRAIGHT cable when connecting back-to-back
Hubs or Switches. Read the manufacturer's documentation carefully.
Let's first learn how to find the PIN No. of the Connector. Make sure you identify and start with the correct
Pin.
Theoretical Description
9
BS (Computer Science) 2023
• Switch to switch
• Switch to Hub
• Hub to Hub
• Router to Router
• Router Ethernet port to PC NIC
• PC to PC
11
BS (Computer Science) 2023
Note: The crossover cable layout is suitable for 1000Base-T operation; all four pairs are crossed.
a. Run the full length (Max 100 meters) of cable in place, from endpoint to endpoint, making sure to leave
excess.
b. At one end, cut the wire to length, leaving enough length to work but not too much excess.
c. Strip off about 2 inches of the cable sheath.
d. Align each of the colored wires according to the layout of the jack.
e. Use the punch-down tool to insert each wire into the jack.
f. Repeat the above steps for the second RJ45 jack.
If a cable tester is available, use it to verify the proper connectivity of the cable. That should be it; if your
cable doesn't turn out, look closely at each end and see if you can find the problem. Often a wire ends up in
the wrong place, or one of the wires is making no contact or poor contact.
Also, double-check the color coding to verify it is correct. If you see a mistake or problem, cut the end off
and start again. A cable tester is invaluable at identifying and highlighting these issues.
When sizing cables, remember that an end-to-end connection should not extend more than 100m (~328ft). Try to
minimize the cable length; the longer the cable becomes, the more it may affect performance. This is usually
noticeable as a gradual decrease in speed and increase in latency.
Lab Tasks
Task A:
Prepare the ethernet cable during the lab. Explain the steps, and attach the pictures of the equipment and
steps performed with the Lab 1 report.
Task B
Perform the Lab task and attach it along with the lab report while submitting.
12
BS (Computer Science) 2023
1. Identifying the pins on the RJ45 male connector, which are used for transmission of 100 Mbps.
Identify The Color Pairs
PAIR NO 1 _____________________
PAIR NO 2 _____________________
PAIR NO 3 _____________________
PAIR NO 4 _____________________
2. Correctly number the pins of the jack
2. Label the
pins according
to the color
schemes
13
BS (Computer Science) 2023
Theoretical Description
This lab assumes the use of any version of Windows XP and above. This is a non-destructive lab and can be
done on any machine without concern about changing the system configuration. Ideally, this lab is
performed in a Computer Lab or other LAN environment that connects to the internet.
The commands help us to diagnose the LAN environment and troubleshoot the network.
The following command will be used to practice during the lab:
a. Ensuring the computer has an IP address
b. Ping
c. Trace Route
14
BS (Computer Science) 2023
Reflection
Based on observations, what can be deduced about the following results taken from three computers
connected to one Switch?
Computer 1
IP Address: 192.168.12.113
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.12.1
Computer 2
IP Address: 192.168.12.205
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.12.1
Computer 3
IP Address: 192.168.112.97
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.12.1
Should they be able to talk to each other? Are they all on the same network? Why or why not? If something
is wrong, what is most likely the problem
b. Using "ping" and "tracert "
Objective
• Learn to use the TCP/IP Packet Internet Groper (ping) command.
• Learn to use the Trace Route (tracert) command.
• Observe name resolution occurrences using WINS and/or DNS servers.
Background
This lab assumes the use of any version of Windows. This is a non-destructive lab and can be done on any
machine without concern about changing the system configuration.
Ideally, this lab is performed in a LAN environment that connects to the internet. It can be done from a
single remote connection via a modem or DSL-type connection. The student will need the IP addresses that
were recorded in the previous part of the lab.
Step 1 Establish and verify connectivity to the internet
This ensures the computer has an IP address.
Step 2 Access the command prompt
As accessed in the previous part of the lab.
Step 3 ping the IP address of another computer
In the window, type ping, a space, and the IP address of a computer recorded in the previous lab. The
following figure shows the successful results of ping to this IP address.
16
BS (Computer Science) 2023
17
BS (Computer Science) 2023
tracert uses the same echo requests and replies as the ping command but in a slightly different way. Observe
that tracert contacted each Router three times. Compare the results to determine the consistency of the route.
Notice in the above example that there were relatively long delays after routers 11 and 13, possibly due to
congestion. The main thing is that there seems to be a relatively consistent connection.
Lab Tasks
1. Ping 127.0.0.1
2. Ping the default gateway
3. Ping your hostname
4. Ping the DNS server(s)
Do you get a positive reachability result? ___________________
MAC Address:
IP Address:
Subnet Mask:
Default Gateway:
DHCP Servers:
19
BS (Computer Science) 2023
Theoretical Description
IP Addressing
The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on
the LAN or WAN. Each computer (known as a host) on the internet has at least one IP address that uniquely
identifies it from all other computers on the internet. Each Network Interface Card (NIC or Network card)
present in a PC is assigned one Network address called an IP address. This IP address is assigned by the
administrator of the network. There is a burned-in address on the NIC called a Physical Address [or MAC].
The MAC address of a network card indicates the vendor of that card and a unique serial number.
IPv4 IPv6
IPv4 addresses are 32-bit in length. IPv6 addresses are 128-bit in length.
Broadcast Uni-cast
Multicast Multicast
Uni-cast Any-cast
20
BS (Computer Science) 2023
IP address classes
IP addresses are divided into different classes. These classes determine the maximum number of hosts per
network ID. Only three classes are used for network connectivity.
The following table lists all the address classes.
IP address class Value of the leftmost byte (part 1st Octet
w)
Class A 1-126 [0 and 127 are not allowed] 0
Class B 128-191 10
21
BS (Computer Science) 2023
Private IP Addresses
Class Private Networks Subnet Mask Address Range
A 10.0.0.0 255.0.0.0 10.0.0.0 - 10.255.255.255
B 172.16.0.0 - 172.31.0.0 255.240.0.0 172.16.0.0 - 172.31.255.255
C 192.168.0.0 255.255.0.0 192.168.0.0 - 192.168.255.255
Invalid IP address:
a. If the network part is all 0s, the address belongs to the class, but this is an invalid IP address because,
for an IP address, all the network or host parts should not be all 1s or all 0s.
b. If the network part is all 1s, this address belongs to class E But due to the presence of all 1s, it is not
valid. This represents broadcast to all networks.
c. If the host part is all 0s, this represents the network address. This is not a valid IP address.
d. If the host part is all 1s, this represents the broadcast address. This is not a valid IP address.
e. 127.0.0.0 network address is used for loopback testing. This will help you to check the network card
of your own PC [localhost].
f. The validity of the IP address is also based on the subnet mask used provided.
Unicast: one device calls another.
Multicast: one device calls a group of the network.
Broadcast: one device calls the entire network.
Anycast: Mostly near
Subnetting
Subnetting is the practice of dividing a network into two or more networks.
Subnet mask
The subnet mask is a 32-bit value that allows the receptionist of the IP packet to distinguish the network
ID portion in the IP address from the host ID portion.
Class A, B, and C networks have default masks, also known as natural masks, as shown here:
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
Subnetting
Subnetting is the process of designating some high-order bits from the host part and grouping them with the
network mask to form the subnet mask. This divides a network into smaller subnets. The following diagram
modifies the example by moving 2 bits from the host part to the subnet mask to form four smaller subnets
one-quarter the previous size:
22
BS (Computer Science) 2023
The RFC 950 specification recommended reserving the subnet values consisting of all zeros (see above) and
all ones (broadcast), reducing the number of available subnets by two. However, due to the inefficiencies
introduced by this convention, it was abandoned for use on the public internet and is only relevant when
dealing with legacy equipment that does not implement CIDR. The only reason not to use the all-zeroes
subnet is that it is ambiguous when the prefix length is not available. RFC 950 itself did not make the use of
the zero-subnet illegal; it was, however, considered best practice by engineers.
CIDR-compliant routing protocols transmit both length and suffix. RFC 1878 provides a subnetting table
with examples.
The remaining bits after the subnet bits are used for addressing hosts within the subnet. In the above
example, the subnet mask consists of 26 bits, leaving 6 bits for the host identifier. This allows for 62 host
combinations (26-2).
The all-zeros value and all-ones values are reserved for the network address and broadcast address,
respectively. In systems that can handle CIDR, a count of two is therefore subtracted from the host
23
BS (Computer Science) 2023
availability rather than the subnet availability, making all 2n subnets available and removing a need to
subtract two subnets.
For example, under CIDR /28, all 16 subnets are usable. Each broadcast, i.e., .15 .31 - .255, comes off the
client count, not the network, thus making the last subnet also usable.
Only legacy technology not capable of using CIDR default in accordance with the RFC 1878 standard
required the subtraction of subnets, one at the beginning of the range and one at the end of the range. Cisco
added to this confusion by the use of subtracting from the subnetting formula in its publications for so-called
usable subnets up until 2007. Cisco routers, by default, did not allow an IP address belonging to subnet zero
to be configured on an interface.
In general, the number of available hosts on a subnet is 2h-2, where h is the number of bits used for the host
portion of the address. The number of available subnets is 2n, where is the number of bits used for the
network portion of the address. This is the RFC 1878 standard used by the IETF, the IEEE, and COMPTIA.
RFC 3021 specifies an exception to this rule for 31-bit subnet masks, which means the host identifier is only
one bit long for two permissible addresses. In such networks, usually point-to-point links, only two hosts
(the endpoints) may be connected, and a specification of network and broadcast addresses is not necessary.
A /24 network may be divided into the following subnets by increasing the subnet mask successively by one
bit. This affects the total number of hosts that can be addressed in the /24 network (last column).
24
BS (Computer Science) 2023
25
BS (Computer Science) 2023
Lab Tasks
1. What address Class does 172.16.33.1/24 belong to?
2. When calculating usable hosts per subnet, the following formula is used 2^bits - 2. For what reason is two
subtracted?
26
BS (Computer Science) 2023
1. Equipment required: -
• Windows PC
• Packet Tracer
Recommendation
Connectivity with internet
Theoretical Description
A good thing about the Cisco IOS is that it works quite similarly on both the routers as well as switches,
However, there is a difference in the commands that we use for each one of them. For example, some
specific commands are meant only for the switches while others for routers as per the device's functionality.
In this lab, we will assign an IP address to the Vlan1 interface and we will configure the default gateway on
the Switch. We will also perform some basic configurations which will prepare the Router for the functional
network.
seconds as it resolves IP addresses in the background. One minute is the maximum time taken by the device.
Now, we have to wait until the device allows us to type something again. This can be very annoying. It
happens because the domain name lookup is enabled by default in Cisco devices. Hence, to solve this
problem we can disable domain lookup by entering the command 'No IP Domain Lookup' in switch
command line.
Logging synchronous
Now, let us talk about the status messages received on Cisco devices. When we receive status messages on
Cisco devices the message kind of mixes with the text that we type on the CLI. This can also be very
confusing sometimes. So, to solve this problem we can type the command' logging synchronous'. This
command synchronizes the status messages. Hence, the message does not interfere with our typing.
28
BS (Computer Science) 2023
Lab Tasks
Task 1
Switch(config)#interface fastethernet 0/1
Switch(config)#duplex full
Task 2
Switch(config)#interface fastethernet 0/1
Switch(config)#speed 100
Task 3
Apply the above on all ports of Switch, How Use range command
Task 4
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.4.2 255.255.255.0
Task 5
Switch(config)#ip default-gateway 192.168.4.1
Task 6
Switch#write
Task 7
Router(config)#no ip domain lookup
Task 8
Switch(config)#line con 0
Switch(config-line)#logging synchronous
29
BS (Computer Science) 2023
Objectives
• Configuring MOTD banner and Telnet in Packet Tracer.
• Learn about telnet configuration in Cisco packet tracer
• We will encrypt various passwords configured on the Cisco device using one command.
• we will be configuring switch port security in packet tracer to secure the Switch from unauthorized
access. We will allow only one MAC address to connect on switch-port.
1. Equipment required: -
• Windows PC
• Packet Tracer
Recommendation
Connectivity with internet
Theoretical Description
MOTD banner and Telnet
This lab exercise entails the basic setup of the Switch or a router. In this lab, we will configure the IP
address on a fast Ethernet port of the Router. We will name the interface the 'Branch Office Interface.'
Naming the interface is an excellent and very essential practice because it will let us know, to which location
the port is connected. As a Network Admin, when we log into a router, the description of the interfaces is
very helpful. It makes management of the interfaces a wee bit easier especially in the big networks where
there are many different devices. The user has to go into the interface configuration mode to set up the IP
Address and description.
You will also learn to configure MOTD [Message of the Day in this lab. When the user is logged into the
device then a message appears on the screen. That message is known as the Message of the Day (MOTD).
Usually, the MOTD banner is set up as a warning against unauthorized access.
Some people show ASCII art and huge messages like terms and conditions as a message of the day however
best practice is to use short and precise MOTD banners as big messages put extra load on the device which
results in unnecessary processor cycles.
It's all up to the admin to choose whatever message of the day should show up when we log in to the Cisco
device.
Telnet connection and Testing
Configuring the Telnet Connection on the Router allows the user to manage the Router remotely with the
help of a Telnet Protocol. Setting up a Telnet Connection also requires a Telnet Password to be configured.
We will configure that password in this lab. Also, we will have to get into the Telnet lines to configure the
telnet. We can do this by typing the line VTY command.
Configuration of the telnet helps a lot when we have to manage the device from the remote location or we
are not available onsite. Configuration of the devices remotely has become common practice now a day and
especially due to the Coronavirus outbreak, most of the IT individuals are working from home using the
internet.
Using the internet is not to connect to an office network is not safe and secure so to overcome this issue we
should use a VPN connection or we should use the SSH instead of telnet as it encrypts the data which
prevents the network from attacks of the hackers.
30
BS (Computer Science) 2023
Description:
Telnet -Protocol developed in 1969, allow us to connect to the remote device using the command line
interface, telnet protocol is part of the TCP/IP suite.
To use the telnet, the device should have a telnet client installed and the remote device should be configured
to accept telnet connection so most of the devices like servers, routers, switches, firewalls, etc are
configured to allow telnet connection.
We can use any telnet client to establish the connection; one of the famous free telnet clients is putty. Putty
is used by many organizations as it is open source and it also works for the SSH connection.
In this packet tracer lab, we will set up a router for telnet access. And then use the command prompt on the
computer to test our telnet connection.
To telnet the Router from our PC we will have to assign an IP address to our PC. After that, we will assign
the IP address to the router interface which is connected with that PC.
For establishing a successful telnet connection, our PC and Router should be on the same network as the PC
and Router are connected directly.
After assigning the IP addresses to both our devices, we have to enable the Router for a telnet connection by
configuring the VTY lines.
We will configure telnet lines 0-15 on the Router, which will allow 16 simultaneous telnet connections to
the Router, this feature is helpful if more than one person wants to log in to the device at the same time, this
type of practice is common if we have many administrators to look after the device.
Once we have configured both devices properly, we can try pinging the Router from our PC to check the
connectivity. If the Router is responding to the ping command then we can establish a telnet connection
from our PC's command prompt.
Once the telnet connection is initiated successfully, we will be prompted with the password to access the
Router via a telnet connection.
An important thing, we have to configure the privileged mode password. That's because it is not possible to
access the privileged mode through a telnet connection if the password for our privileged mode is not
configured. if we will try to access privileged mode without the configuration of the password then we will
see an error message saying 'no password set'.
setting up a good password on the device. Organizations spend a large amount of money on expensive
hardware to secure the networks however that can be of no use if security is not implemented at every layer.
In this lab, we will encrypt all the passwords on the device with one command.
When we configure passwords like Privileged Mode password, VTY line password, Console line password,
etc. on our Cisco devices, these passwords are visible as a clear text in the running-config. This is a security
vulnerability since anyone can view them just by looking at the running-config or start-up config. Even
when you are checking the Cisco device configuration, someone could be watching over your shoulder. To
fix this problem, we could use a command known as the 'service password-encryption. This command
encrypts all passwords and converts them into alphanumeric numbers. Hence, we can use this command to
store and display the passwords in encrypted form for added security.
Service password-encryption command encrypts the password so just by looking at the password, no will be
able to figure out or steal it however it does not provide complete protection as someone can easily copy that
encrypted password from the running or startup-config and can find the used password by decrypting that,
there are some sites available online that easily decrypt the password with just one click so we must use
enable secret that use MD5 hash to encrypt the password which is a very powerful encryption and it is not
easy to reverse engineer the hash.
Although password encryption should be enabled by default but it is not so we have to manually encrypt the
passwords.
Lab Tasks
Task 1
Click on pc2 > click desktop tab > click on terminal > click ok
(you should be able to access Router now)
Task 2
Router>
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
Task 3
Router(config)#interface fastEthernet 0/0
Router(config-if)#description BRANCH OFFICE INTERFACE
Task 4
Router(config)#banner motd / —- UNAUTHORIZED ACCESS IS NOT ALLOWED —- /
Task 5
Router(config)#line vty 0 15
Router(config-line)#password cisco
Router(config-line)#login
Task 6
Click on pc0 > click on desktop tab > click on ip configuration > set ip address
Task 7
Router(config)#interface fastethernet 0/0 Router(config-if)alp address 192.168.1.1 255.255.255.0
Task 8
R1(config)#enable password cisco Task Router(config)#line vty 0 15 Router(config-line)#password cisco
Router(config-line)#login
Task 9
Click on pc0 > click on command prompt > type telnet 192.168.1.1 > type privileged mode password
Task 10
Router(config)#enable secret cisco
Task 11
Router(config)#service password encryption
Task 12
Switch(config)#interface fastethernet 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Task 13
Switch(config-if)#switchport port-security violation shutdown
33
BS (Computer Science) 2023
Theoretical Description
We will create VLAN 10 and VLAN 20 in this lab. It is always a good practice to give names to the VLANs
as this makes it easier for the admins to manage the configured VLANs. The best way to give a name is
according to their role in the network for e.g. if there is a VLAN that handles traffic for the voice of IP then
we can give the name 'voice' to the VLAN and another way of assigning a name is according to the
departments in the organization like Sales, marketing, etc.
In a case of a network outage or any issue with the VLANs, admins can easily identify the VLANs with
names, which makes their work easier
We can use the following command to create VLAN 10 and 20 and give it a name.
Switch(config)#vlan 10
Switch(config-vlan)#name Voice
Switch(config)#vlan 20
Switch(config-vlan)#name Sales
Once we are done creating the VLANs, we can check the created VLANs with the command 'show VLAN'
Router on A Stick:
'Router on a Stick' allows routing between VLANs with only one interface. Each VLAN represents a
different Subnet. In general, routers can take traffic from only one subnet and transfer it to another subnet.
And we can assign only one IP Address to a router interface. 'Router on a stick' allows us to create sub-
interfaces, and assign IP Addresses to those sub-interfaces. To make it work, we have to create a truck
connection between the Switch and a router so that traffic from multiple VLANs can be sent to the Router.
If we create a route between VLANs without the 'Router on a Stick' method, then we have to waste
interfaces on the switches and routers. And if we enable routing between multiple VLANs then it will
become practically inefficient as the switches and the routers will use those multiple interfaces.
The image below is an alternative method for allowing routing between VLANs. As you can see, we are
using two interfaces on both the Router and a switch to allow routing between VLANs. We have not created
a sub-interface in the below figure.
35
BS (Computer Science) 2023
You can see that we have to use extra interfaces for each VLAN. So, it becomes practically non-efficient if
we have multiple VLANs. Hence, 'Router on a Stick' is a perfect solution for routing between VLANs with
just one router interface.
The simpler way to do routing between VLANs is by using a Layer 3 Switch. We just have to create virtual
interfaces for each VLAN and assign them IP Addresses from the same network. A Layer 3 Switch will then
enable routing between VLANs as it has routing capabilities as well. However, Layer 3 Switch is quite
expensive so it might not be an affordable option for small office networks.
In the below lab, we will configure 'Router on a Stick' that would allow routing between the VLANs. Some
of the important concepts in this lab are – to create sub-interfaces, use encapsulation dot1Q command to
encapsulate the traffic, and mentioning the VLAN number to ascertain that for which VLAN the sub-
interface should respond.
Router on a stick configuration in packet tracer.
36
BS (Computer Science) 2023
In the above image, you can see that the Hub is connected with the Switch. VLAN and tagging are switching
technology and as Hub is unable to tag the traffic then what will happen if PC 4 and PC 5 which are
connected to the Hub send the traffic? In that case, we have to specify native VLAN on both of the switches
interfaces that are connected to Hub and that will help when the Switch will receive the untagged traffic on
those interfaces then it will be the part of the specified VLAN which we have configured as Native VLAN.
Although Hubs are not in use now a day's however in a small organization where the budget is low and
organizations cannot afford to spend money on new network equipment and they want to use the old
network devices then network admin may have to work with such topologies.
In small networks, speed is not the priority for the company so using the device as a hub does not harm the
network.
Another network scenario, in which native VLAN is used commonly, is shown below. IP phones are used
commonly in the companies these days, they allow daisy-chaining of end devices like PC which saves the
interfaces and saves the extra cost of the telecom.
Daisy-chaining the PC is an efficient solution as an organization does not have to buy extra switches to
implement IP phones.
PC 6 cannot tag the traffic so we have to configure Native VLAN to route the traffic generated by the PC on
the desired VLAN however, Cisco IP phone can tag the traffic so native VLAN will only be used by the PC.
By default, native VLAN is configured as 1 on all the interfaces however, in case we want to route traffic to
another VLAN then we have to change the native VLAN accordingly.
To check the native VLAN that is configured, we can use the command' show interfaces trunk'
37
BS (Computer Science) 2023
To configure the native VLAN or to change the default native VLAN, we have to use the following
command.
Switch(config)#interface FastEthernet 0/24
Switch(config-if)#switchport trunk native vlan 5
We have to enter into interface configuration mode and then use the command shown above; we have to
specify the VLAN number where we want to redirect untagged traffic. In the above example, traffic will be
routed to the VLAN 5.
Native VLAN mismatch
Native VLAN mismatch happens when interfaces of the Switch are configured with different native VLAN
and in that case traffic generated by PC will be routed to both VLAN which will cause issues in the network.
The good thing about the Switch is that it detects the native VLAN itself and the following message is
displayed on the Command-line interface of the device.
— %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/24 (5),
with Switch FastEthernet0/24 (1) —
To fix the Native VLAN mismatch, we have to configure the same native VLAN on all interfaces that are
connected to the Hub so the traffic generated will only be redirected to the one VLAN.
In this lab, we have intentionally created a native VLAN mismatch so you can download this lab and can
practice fixing the mismatch by assigning the same Native VLAN on both switches.
You will be able to see the mismatch message on CLIs of both of the switches.
38
BS (Computer Science) 2023
Lab Tasks
• Assign IP address and default gateway to the PC
• Create Vlans and assign ports to the Vlans
• Configure trunk connection between Router and a switch
• Create sub-interface and allow routing between the Vlans
Lab Configuration
Task 1
Click on pc0 > click on desktop tab > click on IP configuration > set IP address and default gateway
Task 2
Switch(config)#interface fa0/5
Switch(config-if)#switchport access vlan 5
Switch(config-if)#in fa0/10
Switch(config-if)#switchport access vlan 10
Task 3
Switch(config)#in fastethernet 0/1
Switch(config-if)#switchport mode trunk
Task 4
Router(config)#in fa 0/1
Router(config-if)#no shutdown
Router(config)#interface fastethernet 0/1.5
Router(config-subif)#encapsulation dot1Q 5
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
Router(config-subif)#in fastethernet 0/1.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip add 192.168.3.1 255.255.255.0
39
BS (Computer Science) 2023
Theoretical Description
CDP Protocol:
CDP is a handy protocol. It is a fantastic tool for searching the details about directly connected devices.
However, being Cisco propriety, it only works if the connected device is a Cisco device. It sends messages
to the directly connected devices, these messages contain details about the host, devices, network, IOS,
ports, etc. It is enabled by default on all Cisco devices.
CDP protocol generates messages every 60 seconds, these messages are received by the neighbor device and
then the information is stored in the database.
CDP provides us with information that is quite useful if we do not have a complete diagram or have
incomplete documentation about the network.
By using CDP we can find out the following information:
The hostname of the remote devices
Local and remote interfaces on which the devices are connected
Type of device and the platform
The IP address of the connected devices
The version of IOS running
Although CDP provides good information about the directly connected devices however it can also pose a
security threat to the network as hackers can identify and gather information very easily if any device in the
network is compromised so it is the best practice to use this protocol very carefully and disable this protocol
on highly secure devices. For e.g, we should not send CDP messages on the interface that is connecting
outside of our network.
If we do not have the cisco device on the other end then the CDP protocol will not work however we can use
the LLDP (Link Layer Discovery Protocol) as an alternative since it is a non-proprietary protocol so most of
the vendors support this protocol. It is an industry-standard protocol with the same functionality.
In this lab, you will be required to find information about directly connected devices. To find complete
information and details of all the devices, you have to use telnet because CDP can only provide information
about directly connected devices. In the below lab, 'device0' does not have a direct link to all Cisco devices.
And finally, we have to disable the CDP on the fast Ethernet 0/5 interface of router 5 – which is connected
with the ISP router – because we do not want to pass our internal network information to the internet service
provider (ISP).
CDP in packet tracer.
40
BS (Computer Science) 2023
DHCP Server:
Setting up a DHCP server and configuring the Router as DHCP server in Cisco packet tracer.
In the Cisco packet tracer, various endpoints are given that we can use to create networks and one of them is
the server. This single server provides lots of services like HTTP, FTP, email, DHCP, etc.
Before enabling the DHCP service on the server, we must assign the static IP address to the server to
establish connectivity.
41
BS (Computer Science) 2023
PC should be configured to accept IPs from the DHCP server so we will change IP configuration from static
to DHCP.
To configure the DHCP service, we have to click on the DHCP tab and turn on the DHCP service.
We can change the default name of the pool which is server pool.
We can set up the default gateway and DNS if required as per our network design.
Define the start IP address so the server will issue the IP address according to our scope mentioned.
We now have to define the maximum number of users so the server will not lease IP addresses to the
devices if the limit is reached. In this example, the defined limit is 10 in pool1, now the server will only
release 10 IP addresses even if the mentioned IP range scope has a high number of IP addresses.
Multiple pools can be added to the server and if any pool is not required then it can be removed easily.
42
BS (Computer Science) 2023
One extra pool name as pool1 has been added to the server with a different IP range so now the server has a
lot more IPs to assign.
We can see in the image above that PC has been assigned an IP address successfully by the DHCP server.
An assigned IP address is from the configured scope on the server.
Now, as we are done configuring the DHCP on the server. We will configure the Router as a DHCP server
in the following packet tracer lab.
We have to configure the same parameters on the Router as well however we have to use the Router's
command-line interface to set up the routers with DHCP capabilities.
We will configure DHCP on the Cisco router with 4 easy steps.
Creating a pool and naming the pool. In this lab, we have given the name 'dynamic' to the DHCP pool.
Command : Router(config)#ip dhcp pool Dynamic
Defining the ranges of the addresses that the Router will lease to the clients.
Command: Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Excluding the range of IP addresses that we do not want the Router to lease, this comes in handy when we
want to keep some IPs that can be assigned to the devices statically whenever required in our network. In
this example, we have assigned IP 192.168.1.1 to the Router so we should exclude this IP to prevent any IP
address conflict.
Command: Router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5
Finally, we will enable the DHCP service on the Router using the following command.
Command: Router(config)#service dhcp
Additionally, the time limit can be defined for the lease. For e.g, if we want the Router to lease IP for a
certain period then we can configure the same using the following command.
Command: Router(config)#lease 10 10 10
This would mean that Router will lease the IP for 10 days 10 hours and 10 mins. After the defined period,
the client will be given a new IP address.
43
BS (Computer Science) 2023
Or
Use the following command to lease the IP for an indefinite time.
Command: Router(config)#lease infinite.
In the image, we can see that the PC has received the IP address from the Router so now the Router is acting
as a DHCP server.
We have two hosts that will be able to access the internet via an ISP router. Our internal network is
connected to the ISP router. The interface of the internal Router which is connected to the ISP router has
been given public IP address. This is static IP that has been configured on the interface.
ISP router is further connected to the Google web server so after the successful configuration of our
network, we should be able to access the google.com
How to configure the web server.
We have to open services and click on HTTP service. This service is enabled by default and we can see that
server is hosting some files already. These files are present by default and when we point the web browser to
this server, this server will serve the web page to our browser.
44
BS (Computer Science) 2023
We have configured this server as a Google web server and it is serving a Google web page. To change the
content of the webpage, we have to edit the index file present in the web server.
For testing purposes, we can copy the source code of any side that you want the web server to show and
paste it into the index file. After saving the file, the web server will show sites according to the source code.
Now, we can test the web server by opening the browser on the PC and pointing it to the server.
We have to enter the IP address of the web server in the URL and press enter. If everything is configured
properly then we should see the browser loading the webpage successfully.
Before opening the browser, we must make sure that the connectivity of the server is fine.
Download the lab and test the Google web server and if you want the server to host any other site then
change the index file present on the server.
45
BS (Computer Science) 2023
This lab is the smaller presentation of the big network like the internet. This is the way how the internet
works however there are thousands of routers and servers connected forming a huge network.
You can try adding more servers with different sites and access those sites on the browser of the PC.
DNS in Cisco packet tracer and how to configure DNS on Cisco router
There are a couple of ways in which we can configure dns in packet tracer. We will configure dns on
the cisco router and endpoint server.
DNS means domain name server, and DNS contains a database of domain names and IP mapping. DNS
servers are very helpful as we don't have to remember the IP address and we can use the domain name
instead. Names are much easier to type and learn so DNS plays an important role in every network.
When we enter google.com in the web browser the DNS server finds out the mapped IP of that domain and
the HTTP request is forwarded to that IP address.
Now, we have to map the names with the IP address using the following command.
Finally, we need to configure the DNS server IP in the PC setting. In this case, as the Router is configured as
a DNS server, we will use the Router's IP.
Please note that Configuring the Cisco router as a DNS server is not possible in packet tracer as it does not
provide this functionality however If you want to try this lab then you can use GNS3 as it has all the
commands.
Configuring DNS in Cisco packet tracer with the available server endpoint
46
BS (Computer Science) 2023
To configure the DNS server, we have to enable the DNS service in the server which is disabled by default.
Now, we have to add an A record or create a name for IP mapping in the server.
Finally, PCs should be configured with the IP address of the server in the DNS settings.
That is all required to successfully enable the DNS server in packet tracer.
C:\>ping PC2
47
BS (Computer Science) 2023
Download this lab and ping the PC with names, and you will see the successful ping replies.
Create a mapping for the Switch in the server so that PCs can ping the Switch with the name 'switch'
Lab Tasks
a. Use CDP commands to find out Cisco devices 1 to 5
b. Find out their IPs and interfaces on which they are connected.
c. Disable CDP on interface FastEthernet 0/1 of device 5
(YOU ARE ONLY ALLOWED TO ACCESS SWITCH 0 THROUGH CONSOLE CONNECTION)
(USE TELNET TO ACCESS DEVICE 1)
(TELNET PASSWORD – cisco)
(Privileged mode password – cisco)
Lab Configuration
Task 1
Router#show cdp neighbors
Router#show cdp neighbors detail
Task 2
From Switch 0
local interface – Remote interface and IP address
1. FastEthernet 0/1 FastEthernet 0/1- 192.168.1.100
2. FastEthernet 0/2 FastEthernet 0/0- 192.168.1.3
3. FastEthernet 0/3 FastEthernet 0/0- 192.168.1.4
From Switch 1
4. FastEthernet 0/2 FastEthernet 0/0- 192.168.1.45/24
5. FastEthernet 0/3 FastEthernet 0/0- 192.168.1.43/24
Task 3
Router(config)#interface fastethernet 0/1
Router(config-if)#no cdp enable
48
BS (Computer Science) 2023
Theoretical Description
Spanning tree protocol
In a typical network topology, we have redundant connections between switches. Redundant connections
play a very crucial role as it eliminates the single point of failure in the network. However, redundant
connections create loop in the network. And to prevent those loops in networks the Spanning Tree Protocol
chooses the best link while blocking the redundant links.
Root Bridge is the most important Switch in a Spanning Tree Network. And all the other switches choose
the best way to reach a Root Bridge and block the redundant links. Therefore, it is very important to choose
the best Switch in the network as a Root Bridge.
Root is selected on the basis of a Bridge ID. So, whichever Switch will have the lowest Bridge ID, that very
Switch will be selected as a Root Bridge. Basically, Bridge ID is made up of a priority number and the MAC
address. And by default, all switches have the same priority number – 32768 to be precise – so the Spanning
Tree relies on a MAC address for the selection of Root Bridge. But the problem is that by default any switch
which has the lowest Bridge ID can be automatically selected as a Root Bridge. And if that Switch is slow
then it will slow down the entire network because its network traffic will pass through that Switch. Hence, it
is very important that every Spanning Tree Network has the best Switch as a root.
By default, the Spanning Tree is enabled on the switches so if we create a redundant connection on switches
then the Spanning Tree Protocol will automatically come into action to prevent a loop in the network.
Therefore, for maximum optimization it is very important to select the right Switch as a Root Bridge.
We cannot however, change the MAC address of a switch so we will have to change the priority number of
switches to influence the selection of a Root Bridge.
In this lab, we will try changing the priority of a switch to be able to select the Switch of our choice as a
Root Bridge. Root Bridge is selected as per the VLAN number so we have to mention that for which VLAN,
the Switch is a root. We will also enable a newer version of the Spanning Tree which is a Rapid Spanning
Tree.
49
BS (Computer Science) 2023
Lab Tasks
1. Select switch 1 as a root bridge
Lab Configuration
Task 1
or
Task 2
All Switches
50
BS (Computer Science) 2023
Theoretical Description
RIP protocol is still widely used due to its simplicity and it is favored in small company networks where
there is a fewer number of routers used and small networks do not even need advance routing protocols as
51
BS (Computer Science) 2023
they rarely use features that are provided by the advance routing protocols while big companies with
hundreds of Router and complex networks use advance routing protocols as they provide more features that
are required for the stability and the functioning of the big networks so at the end it comes up to the
requirement of the network.
To set up routers, we will assign an IP address to the router interfaces. It's the best practice to give a unique
name to the Router, as well as describing the interfaces of the routers.
To enable the routing between routers we will use a basic routing protocol called Rip. After implementing
the Rip protocol on all routers, we can look into the routing table of every Router to check if it has learned
the routes with the help of the Rip protocol. We can check the routing table using the command 'show IP
route'.
After successful configuration of the routing protocol, we must see the routes in the routing table learned
with the help of RIP and if we are unable to see the routes then we have to check the configuration and
troubleshoot the issue with the configuration.
In the below image, check out the routes that are learned using RIP protocol by the Router, you should also
make sure that Router should learn routes of all the networks in the diagram.
R is representing the RIP protocol so all the routes having R in the front are learned by the Router via RIP
protocol.
By default, the RIP protocol auto summarizes the routes so we have to disable the summarization on each
Router.
We will also disable auto summarization of the routes in the routing table by using the command 'no auto
summary'.
52
BS (Computer Science) 2023
Lab Tasks
a. Setting router name to R1
b. Set privileged mode password to cisco
c. Set privileged mode secret to cisco
d. Set console line password to lab
e. Set auxiliary line password to ciscolab
Lab Configuration:
Task 1
Router(config)#hostname R1
R1(config)#
Task 2
R1(config)#enable password cisco
Task 3
R1(config)#enable secret cisco
Task 4
R1(config)#line con 0
R1(config-line)#password lab
R1(config-line)#login
Task 5
R1(config)#line aux 0
R1(config-line)#password ciscolab
R1(config-line)#login
Lab Tasks:
f.
g. Set MOTD on all routers to —- UNAUTHORIZED ACCESS IS NOT ALLOWED —-
Lab Configuration:
Task 6
Router 0
53
BS (Computer Science) 2023
Router(config)#in fa 0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no sh
Router 1
Router(config)#in fa 0/0
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#in se 2/0
Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#clock rate 56000
Router 2
Router(config)#in se 2/0
Router(config-if)#ip add 192.168.2.2 255.255.255.0
Router(config-if)# no sh
Task 7
Router 0
Router(config)#router rip
Router(config-router)#ver 2
Router(config-router)#network 192.168.1.0
Router(config-router)#no auto-summary
Router 1
Router(config)#router rip
Router(config-router)#ver 2
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#no auto-summary
Router 2
Router(config)#router rip
Router(config-router)#ver 2
Router(config-router)#network 192.168.2.0
Router(config-router)#no auto-summary
Router(config-if)#no shutdown
Task 8
Router 0
Router(config)#hostname Arizona
54
BS (Computer Science) 2023
Router 1
Router(config)#hostname Virginia
Router 2
Router(config)#hostname NY
Task 9
Router 0
Router(config)#in fa 0/0
Router 1
Router(config)#in fa 0/0
Router(config)#in se 2/0
Router 2
Router(config)#in se 2/0
Task 10
On all routers
55
BS (Computer Science) 2023
Theoretical Description
Static Routing Labs
Static routes – Static routes are those routes that are configured manually on the Router. Static routes are
useful when we have a very small network with a small number of routers. We do not require routing
protocols in a small network where routes are not constantly changing and we do not have new routers
added often in the network.
A static route is easy to configure however it takes time to build manual routes so dynamic routing with
routing protocol is the only choice we have when working with big networks.
In big networks, we have thousands of routes are they are constantly changing so in that situation, we have
to use the advance routing protocol which helps us to easily handle all the routes, and routing protocol also
provide us with many features like load balancing, auto alternative route selection, etc
In this example, you will learn to perform the basic configuration of the static route. First of all, we have to
assign the IP Addresses to the router interfaces that are connecting different routers. After assigning the IP
Addresses, you should easily be able to ping the devices that are directly connected. However, to reach out
to the routers that are not directly connected, or to reach to the other networks, routers should have their
routes specified in the routing table.
Routers can learn their routes with the help of a routing protocol, or else we can specify the static route on
those routers so that they can reach other networks that they don't yet recognize.
And to create a static route, we have to make the Router aware of the other networks so that it can reach out
to them. And for that, it has to go out to its interface.
For example, in the following scenario we have to tell Router 0 that to reach the 192.168.1.0 network, it has
to go out to its interface using the IP Address 192.168.1.2
Now, we don't have to configure the static route on router 1 as it already knows about the networks
192.168.1.0 and 192.168.2.0 being directly connected to these networks. However, we have to configure the
static route on router 2 as it does not know about the 192.168.1.0 network.
56
BS (Computer Science) 2023
Once we have configured the static routes, you will be able to see those static routes in your routing table.
And finally, to confirm, you can try pinging router 2 from router 0 and check if they have been configured
correctly.
Lab Tasks
a. configure ip addresses on all routers and establish connectivity
b. create a static route on Router 0 to reach 192.168.2.0/24 network
c. create a static route on router 2 to reach 192.168.1.0/24 network
d. Test connectivity by pinging router 2 from router 0
Lab Configuration:
Task 1
Router 0
Router 1
Router 2
57
BS (Computer Science) 2023
Task 2
Router 0
Task 3
Router 2
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
58
BS (Computer Science) 2023
Theoretical Description
Default Route
A Default Static Route is configured on the routers so the traffic can be transferred to a default route if there
is no entry in the routing table for a specific network.
Before sending packets to the other networks, routers check their routing table. The Router drops the packets
if it is unable to find a specific route on which traffic should be sent. And when a router does not find the
route in its routing table it sends the traffic to a default route, if that default route is configured. So basically,
the traffic is sent out of the interface mentioned in the default route in the absence of an entry in the routing
table for the traffic.
The default route is most useful when sending traffic to a public network like the internet because it is not
possible to have the routing table for the entire internet. Hence, the default route helps the routers to send the
packets going out to the internet.
In the local area network, when the destination address is not available in the local network then the data is
sent out of the default gateway which is then routed to the other networks by routers; similarly, the default
route helps to find the destination which is not available in the routing table.
In the below lab, we will create a default route on the Router to enable routing between different subnets.
The below network scenario is not common in the real world, we have just created this lab to show how the
default route can route the traffic without the routing table however we can test the real default route in
action if we configure the default route on the Router which is connected to the internet. In the packet tracer
lab, we cannot emulate the internet so we are testing the default route in a simple network.
Note: we will only create a default route on the Router. After that, the Router should be able to route traffic.
You can ping router 4 from router 0 to check routing in action.
In the above command 0.0.0.0 means that any IP address with any subnet mark should be sent out of
interface 192.168.1.2 if a route is not present in the routing table.
59
BS (Computer Science) 2023
Once we configure the default route, we can see the default route in the routing table with the S* symbol
while static routes are shown with just the S symbol.
Before configuring the default route, you will see that gateway of last resort is not set however once the
default route is configured, the gateway of last resort is the Router's interface from which traffic will be sent
out.
60
BS (Computer Science) 2023
Lab Tasks
a. Create a default route on router 0 and 1 to reach network 192.168.3.0/24 and 192.168.4.0/24
b. Create a default route on router 2 to reach network 192.168.1.0/24
c. Create a default route on router 3 and 4 to reach network 192.168.1.0/24 and 192.168.2.0/24
d. Test Routing by pinging router 4 from router 0
Lab Configuration:
Task 1
Router 0
Router 1
Task 2
Router 2
Task 3
Router 3
Router 4
Task 4
Router 0
Router#ping 192.168.4.2
61
BS (Computer Science) 2023
Theoretical Description
WAN Connection Labs
Serial Connection
The Serial connection is used to create a WAN connection with the help of a service provider who offers a
dedicated leased line to its customers.
Business organizations buy leased lines to establish a WAN connection to connect with different offices and
business sites that could physically be thousands of miles apart. Businesses have to pay for these leased lines
according to the service availed. And accordingly, the service providers charge for this service i.e. based on
the bandwidth they offer to their client organizations.
One of the connections used for a leased line is the Serial Connection in Cisco-based networks. If we have
Cisco routers on both sides of the network then the default encapsulation known as HDLC will be used by
the Cisco routers. However, this will not work with other brands' routers (i.e. with the non-Cisco routers)
because this protocol is solely a Cisco proprietary.
If we want to establish a successful connection with a router of other vendors then we must configure the
same data link protocol on both routers. If there will be a mismatch then a connection cannot be established
and we will see the status of the interface as down under the data link.
If we are configuring a new cisco router then by default the data link protocol would be HDLC however if
we are configuring an old device then we should check the configuration and if there is a mismatch then we
have to configure the same protocol on both routers.
Although HDLC works out of the box on all cisco routers however it is not widely used because of its
proprietary nature and it does not provide much feature so PPP protocol is used by the most organization.
Even on cisco routers, organizations prefer PPP protocol over HDLC protocol due to its advanced features
and benefits.
In this lab, we will configure a Serial Connection between the routers. We will set up a clock rate at 56000,
which will provide a speed of 56 Kbps. In the real world, the DCE side of the cable is configured by the
service provider.
62
BS (Computer Science) 2023
Generally, the clock speed is configured according to the availability of the bandwidth speed that the service
provider is offering.
The following lab uses a serial cable that will simulate a service provider. We will configure the clock speed
on the Router that has the DCE side connected.
Lab Tasks
1. Assign IP address to both routers and turn them on
2. Set clocking on DCE side, which is router 0
Lab Configuration:
Task 1
Router 0
Router(config)#interface serial 0/1/0
Router(config-if)# no shut
Router 1
Router(config)#interface serial 0/1/0
Router(config-if)# no shut
Task 2
Router 0
Router(config-if)# clock rate 56000
63
BS (Computer Science) 2023
Theoretical Description
RIP Configuration:
Static routing is not feasible in a large network. Hence, to implement routing in an easier way we can use
dynamic routing protocols.
Routing information protocol (RIP) is one of the dynamic protocols that can be used for routing. The best
part is that Rip protocol is very easy to configure. We will configure Rip version 2 in this lab.
RIP version 1 was introduced in 1988 when networks were comparatively simple that did not require
complex routing.
An earlier version of RIP had some limitations hence RIP version 2 was introduced in 1993 which improved
some of the features of the RIP protocol.
RIP is a distance-vector routing protocol and hops count to determine the route in the network. Rip protocol
only works till 15 hops and it does not work if the network is more than 15 hops away so this prevents RIP
to work properly in a big network.
Major differences between version 1 and 2
▪ RIP V2 supports classless networks, which means we can use VLSM [Variable length subnet mask]
in our network while RIP V1 does not support subnetted networks.
▪ RIP V2 supports authentication while RIP V1 does not support authentication which makes RIP v1
prone to hacking attacks while Rip v2 provides added security while configuring the networks
▪ RIP V2 uses multicast packets for routing updates while RIP V1 uses broadcast packets which
increases unnecessary traffic in the network.
To configure RIP V2 on a router, we just have to type the "version 2" command after the "router rip"
command to enable version 2 on any router.
After configuring RIP version 2, we have to advertise the directly connected networks by using the
command' network network id' after enabling the RIP protocol on all the routers.
Once the Rip protocol is configured properly you will be able to see the routes in the routing table, learned
with the help of Rip protocol by the routers.
Below is an example of a route that is learned after configuring the RIP protocol:
R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:28, FastEthernet0/0
You can verify and check routes in the routing table by using the command 'show IP route'.
We will also disable auto summarization by the Rip protocol.
64
BS (Computer Science) 2023
Lab Tasks
Configure Rip ver 2 protocol on all routers and disable auto summarization.
Lab Configuration:
Task 1
Router 0
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.1.0
Router(config-router)#no auto-summary
Router 1
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#no auto-summary
Router 2
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.2.0
Router(config-router)#no auto-summary
65