CCN Lab Manual
CCN Lab Manual
Laboratory Exercises
For
Lab Instructor
Course Instructor
Course code
Semester
Lab # 16 VLAN Truck Protocol (VTP) & Spanning Tree Protocol 105
Computer
The personal computer or a PC is typically the desktop computer or the individual notebook.
Whereas a server machine is a computer used for some special purpose in an organization
or setup like monitoring the network activity in a workplace.
Hub
Hub is a network connection device and its basic function is to forward the data on one port
to all the other ports regardless of the intended client end. Hubs can be connected to other
Hubs to build large networks.
What Hubs Do
Switches
Switch performs the same function as a Hub does but has more advanced features of sending
the packets only to intended clients.
A network switch also connects computers to each other, like a hub. Where the switch differs
from a hub is in the way it handles packets of data. When a switch receives a packet of
data, it determines what computer or device the packet is intended for and sends it to that
computer only. It does not broadcast the packet to all computers as a hub does which means
bandwidth is not shared and makes the network much more efficient. For this reason alone,
switches are usually preferred over a hub.
Routers
Routers are the network devices meant to route the data from sender to receivers based on
destination addresses using the Internet Protocol or simply IP addresses.
A network router is quite different from a switch or hub since its primary function is to route
data packets to other networks, instead of just the local computers. A router is quite common
to find in homes and businesses since it allows your network to communicate with other
networks including the Internet. Essentially, a router bridges the gap between other networks
and gives your network access to more features, e.g. a firewall, QoS, traffic monitoring, VPN,
and more.
Access point
Alternatively referred to as a base station and wireless router, an access point is a wireless
receiver which enables a user to connect wirelessly to a network or the Internet. This term can
refer to both Wi-Fi and Bluetooth devices. The image shows a Linksys wireless access point
router; it utilizes multiple antennas to improve the signal.
Modem
A modem is a device or program that enables a computer to transmit data over, for
example, telephone or cable lines. Computer information is stored digitally, whereas
Learning Objectives:
CISCO packet tracer installation
a. Go to Start.
b. Type Run.
c. Type cmd.
d. Type ipconfig.
The IP address shown in the above dialog box is the computer’s IP, whereas the
Default Gateway is the main existing router that provides your internet connection.
6. Furthermore, the network is extended to a wireless access point placed far away
from the main router to provide internet connectivity to the wireless devices.
7. Once the wireless point is configured to ensure the network connectivity,
wireless devices can be connect to the same main router.
To get a good technical knowledge and hands on experience on physical
networking, we will perform following exercises:
Exercise # 1
Connection and configuration of 2 computers with a router.
Questions:
Answer the following questions.
Q1. Differentiate between router, switch and hub.
Q2. Enlist all commands used in this lab and explain their functionality.
1. Learning Objectives:
• To become familiar with the construction of Ethernet Cables.
2. Equipment Required:
For each person
• 2m x CAT5 Network Cable
• 1 x Wire Crimper and Stripper
• 6 x RJ45 Heads
• Cable Tester
3. Introduction:
Category 5 cable (CAT5) is a twisted pair cable used for carrying signals. CAT 5 finds
its use mostly in structured cabling in computer networks such as Ethernet. It provides
up to 100MHz performance and is suitable for different Fast Ethernet (100Mbps)
Standards. CAT5 can also be used to carry other signals like telephone and video.
There are two methods set by the Telecommunication Industry Association (TIA),
568A and 568B depending upon the type of connection and interface of the devices.
Color Combinations for 568A and 568B are given below:
1. Straight-Through cables
2. Crossover cables.
4. Procedure:
Procedure for Straight-Through Cable Construction:
Straight-through cable construction is used whenever two different layer devices such as a hub and a
PC, are being connected using the 568B color codes.
Step 1: Determine the distance between devices and devices or plug. Standard lengths are 6ft
and 10ft.
Step 3: Strip 2 inches of jacket off from one end of the cable using the wire-stripping tool.
Step 4: Hold the 4 pairs of twisted cable tightly where jacket was cut away and reorganize the
cable pairs according to 568B standard as shown above. Take care to maintain as much twists
as possible since this provides noise cancellation.
Step 5: Flatten, straighten and line-up the wires and trim them slightly from the edge.
Step 6: Place an RJ-45 connector plug on the end of the cable with the prong on the bottom side
and color combination arranged from left to right.
Step 7: Gently push the plug onto wires until the copper ends of the wires can be seen through
the end of the plug. Make sure the end of the jacket is inside the plug. If everything is correct,
crimp the plug hard enough to force the contacts through the insulation on the wires, completing
the conducting path.
Step 8: Repeat the steps 3-7 using the same scheme at the other end of the cable.
Step 9: Finally after crimping, test the cable using the cable connection testers.
Exercise:
Each group of students has to make set of both straight through or cross over LAN cables and
get it checked using cable tester.
3. Introduction:
Packet Tracer is a protocol simulator developed at Cisco Systems. Packet Tracer (PT) is a
powerful and dynamic tool that displays the various protocols used in networking, in either
Real Time or Simulation mode. This includes layer 2 protocols such as Ethernet and PPP,
layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols such as TCP and UDP.
Routing protocols can also be traced. Packet Tracer is a supplement to and not a
replacement for experience with real equipment. Students are encouraged to compare the
results obtained from Packet Tracer network models with the behavior of real equipment.
TASK: Design a simple network using Packet Tracer by configuring router from config
tab
This exercise emphasizes on the need of getting knowledge of simulation environment of the
networking area. You are required to create a simple network topology connecting a router to 2
PCs through a switch and ensure the connectivity.
Step 1 From your Cisco Packet Tracer Window, go to Routers section and select a generic 2621XM
Router.
Step 3 Now, in order to connect the devices, select the copper straight-through cable from the
“Connections” section and connect the devices as shown below:
Step 4 Assign IP addresses along with their gateways to the 2 PCs by double clicking the PCs to
open their dialog boxes. In this case, we have assigned 192.168.1.2 and 192.168.1.3 respectively.
Finally, you can see that the packet transmission is successful as shown by the message
window:
If you want to take help you can type first few characters of command and then enter ?
This command will backup running-config file in RAM into NVRAM with the file name of startup-
config.
Following commands can also be used to create backup in NVRAM.
R1#write
R1#write memory
This command will copy backup file (startup-config) from NVRAM into RAM
Step 4
Assign IP addresses along with their gateways to the 2 PCs by double clicking the PCs to open
their dialog boxes. In this case, we have assigned 192.168.1.2 and 192.168.2.2 respectively.
Note: The ips’ assigned to both the PCs’ must belong to two different networks in this case.
Step 6
Assign the IPs to Fastethernet Interfaces Fa 0/0 and Fa 0/1. The IPs should be same as assigned to
default gateways of PCs respectively. Also activate the interfaces.
Step 7
Verify the interfaces through verification commands.
Step 8
After done with the configuration, you will see that all the lights are green now showing that
network is ready to be operated.
Step 9
5. Questions:
Before leaving the lab answer the questions below and show them to your instructor:
Q1. How to verify configuration of console and Privilige mode Passwords?
Q2. Enlist IPv4 classes with their network and host portions. What is the reason behind this
classification?
2. Equipment Required:
A working computer having Cisco packet tracer installed.
3. Introduction:
WAN:
A wide area network (WAN) is a telecommunications network or computer network that extends over
a large geographical distance. Wide area networks often are established with leased telecommunication
circuits.
Business, education and government entities use wide area networks to relay data among staff, students,
clients, buyers, and suppliers from various geographical locations. In essence, this mode of
telecommunication allows a business to effectively carry out its daily function regardless of location.
The Internet may be considered a WAN.
Imagine that you are the primary network engineer for an enterprise TCP/IP internetwork. Your
company is building a new building at a site 100 miles away from your corporate headquarters. You
will of course install a LAN throughout the new building, but you also need to connect that new remote
LAN to the rest of the existing enterprise TCP/IP network.
Telnet:
Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers,
routers or switches. Through Telnet, an administrator or another user can access someone else's
computer, router or switch remotely. On the Web, HTTP and FTP protocols allow you to request
specific files from remote computers, but not to actually be logged on as a user of that computer,
router or switch. With Telnet, you log on as a regular user with whatever privileges you may have
been granted to the specific application and data on that computer, router or switch. Telnet uses
VTY lines on Cisco IOS. Telnet is less secure and not encrypted.
SSH:
Secure Shell (SSH), is a protocol for securely getting access to a remote router. It is widely used by
network administrators to control routers remotely. SSH commands are encrypted and secure in several
ways. Both ends of the client/server connection are authenticated using a digital certificate, and
passwords are protected by being encrypted.
4. Procedure:
TASK: Enable Telnet and SSH on Cisco Router
To enable telnet on Cisco router, simply do it with “line vty” command. First of download the CISCO
packet racer Lab for slate. The Lab is configured with DHCP server (but you should check all IPs) and
all clients get IP address from DHCP Server on Router.
Command descriptions:
The “line vty” command enable the telnet and the “0″ is just let a single line or session to the router.
If you need more session simultaneously, you must type “line vty 0 10“.
The “password” command set the “Pass123” as password for telnet. You can set your own password.
The “login” command authenticate and ask you the password of telnet. If you type “no login”
command, the telnet never authenticate for password which is not a good practice in real network
environment.
The “logging synchronous” command stops any message output from splitting your typing.
The “exec-timeout” command just sets the time-out limit on the line from the default to
“40″ minutes.
The motd-banner forces a banner message to appear when logging in.
Now you are remotely connected to router R1 and you can execute all router commands through
telnet command line interface.
If you need more information about Telnet commands and options, from the config-linemode type
“?“, the question mark will display all telnet commands.
2. If you don, just follow and generate the encryption keys for securing the ssh session.
3. Now enable SSH version 2, set time out duration and login attempt time on the router.
Remember this message if you going to use ssh version 2 “Please create RSA keys (of at least
768 bits size) to enable SSH v2.”
Here, I have connected successfully and the connection is secured with Secure Shell.
Hope you understand the configuration of enable Telnet and SSH on Cisco router and
switches. Now you should be able to simply enable Telnet and SSH on your routers and
switches.
Step 2 Then pick up DCE Serial Cable and connect the two routers via serial interfaces.
Note: If Serial Interface not already installed in the routers, we have to manually place WIC-2T
module in the routers using Physical Mode.
Step 3 Configure Serial interfaces of both the routers, the same as we do Fast Ethernet Interfaces.
But IPs assigned to both the serials interfaces should belong to one network and the network
should be unique, different from all other LAN or WAN Networks.
Step 2 transport input telnet when configured in configure mode of a router activates telnet on
the virtual line.
2. Equipment Required:
A working computer having Cisco packet tracer installed.
3. Introduction:
Static routing is a form of routing that occurs when a router uses a manually-configured routing entry,
rather than information from a dynamic routing protocol to forward traffic. In many cases, static routes
are usually manually configured by a network administrator by adding in entries into a routing table,
though this may not always be the case. Unlike dynamic routing, static routes are fixed and do not
change if the network is changed or reconfigured. Static routing and dynamic routing are not mutually
exclusive. Both dynamic routing and static routing are usually used on a router to maximize routing
efficiency and to provide backups in the event that dynamic routing information fails to be exchanged.
Static routing can also be used in stub networks, or to provide a gateway of last resort.
Configure Static Routing is the routing that network administrator configure the network routers
manually, instead of using routing protocols, RIP or OSPF which used in the dynamic routing. The
benefits of static routing is minimum bandwidth usage, no overhead on router CPU and many more and
perfect for small network with a few routers. But it is not without cons. Difficult to configure all routers
manually in the large network and troubleshooting is always harder than configuration.
As network administrator or student of computer networks you must know the configuration of static
routing. It helps you to understand the process and functions of routing in the network clearly.
Uses:
Static routing may have the following uses:
Static routing can be used to define an exit point from a router when no other routes are
available or necessary. This is called a default route.
Static routing can be used for small networks that require only one or two routes. This is often
more efficient since a link is not being wasted by exchanging dynamic routing information.
Static routing is often used as a complement to dynamic routing to provide a failsafe backup
in the event that a dynamic route is unavailable.
Static routing is often used to help transfer routing information from one routing protocol to
another (routing redistribution).
Disadvantages:
Static routing can have some potential disadvantages:
IP route command is used to configure the static route. Static routes are the most secure way of
routing. They will also increase overall network performance. These features are extremely helpful in
small network.
IP route command and parameters:
ip route
This is the base command which adds new route in routing table.
destination_network_#[subnet_mask]
This is the first parameter. It specifies the destination network address. We need to provide subnet
mask if we are using sub-network. Sub-networks are the smaller networks created from one large
network in subnetting. If we are not using sub-network then we can omit the subnet mask value. It
will parse automatically.
IP_address_of_next_hop_neighbor / interface_to_exit
This parameter provides a way to reach the destination network. Both commands use separate way to
assign this value. First command provides the IP address of next hop neighbor. It tells router that if it
receives a packet for destination [that we set in previous parameter], forward that packet to this next
hop neighbor IP address.
Second command also do the same job but in different way. It specifies exit interface instead of next
hop IP address. It tells router that if it receives a packet for the destination specified by previous
parameter then exits that packet from this interface. Device attached on other end of this interface will
take care of the packet.
Administrative distance is the trustworthiness of route. Route with the lowest AD value will be chosen
while forwarding the packet. By default static route has two AD values depending on the previous
parameter. If you have used next hop neighbor IP address, then the default AD value will be 1. If you
have used exit interface, then the default AD value will be 0. This parameter allows us to create multiple
static routes for the same destination. For example we can create primary and backup path for the
destination network. To create backup path, we need to set AD value to higher than default, such as 2
or 3. With this configuration router will use primary path. Due to some reason if primary route fails, the
router will start using backup route automatically.
Permanent
When a route goes down router will remove that from routing table. Permanent parameter will keep
this route in routing table even if it goes down. Its optional parameter we can omit it. If we omit it,
router will remove this route from routing table if it goes down. You might use this parameter for
security reason if you never want packets to take another path.
By default when a packet arrives in interface, router checks destination filed in packet and compare it
with routing table. If it finds a match for destination network then it will forward that packet from
related interface. If it does not find a match in routing table then it will discard that packet. This is the
default behavior of router. Default route allows us to override this behavior. Default route is a way to
deal with all unmatched packets. If no match for destination network found in routing table then it
would be forwarded to the default route.
Following command will set default route:
Task 1:
Create a practice topology as shown in fowling figure.
Double click Router0 and click CLI and press Enter key to access command prompt of router.
Step 4:
Two interfaces FastEthernet0/0 and Serial0/0/0 of Router0 are used in this topology. By default
interfaces on router are remain administratively down during the start up. We need to configure IP
address and other parameters on interfaces before we could actually use them for routing. Interface
mode is used to assign IP address and other parameters. Interface mode can be accessed from global
configuration mode. Following commands are used to access global configuration mode.
Step 5:
From global configuration mode we can enter in interface mode. From there we can configure the
interface. Following commands will assign IP address on FastEthernet0/0.
Fourth line of output confirms that DCE end of serial cable is attached. If you see DTE here instead of
DCE skip these parameters.
Step 7:
Now we have necessary information let's assign IP address to serial interface.
Step 10:
That's all we need to switch packet from one network to another. To verify the result we can use ping
command. Access the command prompt of PC1 and use ping command to test the connectivity from
PC0.
Task 2:
Configure Static Routing for below topology.
Router2: Add three networks for router 2 and be sure that do not configure it with wrong IP
address.
Router3: Do the same as router 2 but with different destination and exit interface address.
2. Equipment Required:
A working computer having Cisco packet tracer installed.
3. Introduction:
What are IP Addresses?
IP (Internet Protocol) Addresses are used to identify hosts on a network. It is a numerical
Representation of the address assigned to each device participating in the network. An IP
address serves two important functions:
Host or network identification
Location addressing
An IP address is defined by a 32 bit long number. IP addresses are binary numbers usually
written as x.x.x.x format where each ‘x’ represents 8 bits or an octet. For example, 192.168.2.56
is a 32 bit valid IP address.
IP Addressing Space
The 32 bit length of the IP address limits the addressing space to 4294967296 unique IP addresses
(2^32 = 4294967296).
Static IP Addressing
Static IP addressing is more suitable whenever you need to work for Voice over IP (VOIP)
protocols or using some Virtual Private Network (VPN) for securing files and data. Static IPs can
become a source of security risk as they are easy to track.
Dynamic IP Routing
Subnetting Concept
As described above, Internet Protocol (IP) is a communication protocol used from smallest private
network to a massive global network. It is a unique identifier given to each single device on the IP
network. IP addresses are written as a combination of 4 octets as ‘X.X.X.X’ whereas an octet is
made up of numbers ranging from 0-255. The numbers below show how IP addresses increment:
0.0.0.0
0.0.0.1
...increment 252 hosts...
0.0.0.254
0.0.0.255
0.0.1.0
0.0.1.1
...increment 252 hosts...
0.0.1.254
0.0.1.255
0.0.2.0
0.0.2.1
...increment 4+ billion hosts...
255.255.255.255
IP CLASSES
For an arbitrary classification of IP subnets, the network was broken down into multiple classes.
The internet is laid out as Class A, B, C, D & E. Class A uses up half of the entire internet; Class
B uses up half of the remaining half, Class C uses up half of the remaining half and so on. Class D
is used for multi casting and Class E is reserved for future use.
SUBNET ADDRESSES
The concept of Subnetting was introduced to further divide a network into sub-networks or smaller
networks. Each IP address consists of two parts; network part and host part. To differentiate
between network part and host par, subnet masks are used.
SUBNET MASK
The subnet mask plays crucial role in defining the size of a subnet. A subnet mask defines how
many bits are used for the network and how many for the host address.
MASKING
The subnet mask not only determines the size of a subnet, but it can also help you pinpoint where
the end points on the subnet are if you're given any IP address within that subnet. The reason it's
called a subnet "mask" is that it literally masks out the host bits and leaves only the Network ID
that begins the subnet. Once you know the beginning of the subnet and how big it is, you can
determine the end of the subnet, which is the Broadcast ID. To calculate the Network ID, you
The binary version shows how the 0s act as a mask on the IP address on top. Inside the masking
box, the 0s convert all numbers on top into zeros, no matter what the number is. When you take the
resultant binary Network ID and convert it to decimal, you get 10.20.232.0 as the Network ID.
Since there are 11 zeros in the subnet mask, the subnet is 11 bits long. This means there are 2^11,
or 2,048, maximum hosts in the subnet and the last IP in this subnet is 10.20.239.255. You could
compute this quickly by seeing there are three zeros in the third octet, which means the third octet
of the IP address can have a variance of 2^3, or 8. So the next subnet starts at 10.20.232+8.0, which
is 10.20.240.0. If we decrease that by 1, we have 10.20.239.255, which is where this subnet ends.
IMPORTANCE OF SUBNETTING
Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or
C network. If you do not subnet, you are only able to use one network from your Class A, B, or C
network, which is unrealistic. Each data link on a network must have a unique network ID, with
every node on that link being a member of the same network. If you break a major network (Class
Notice that each of the routers in Figure above is attached to four subnetworks, one subnetwork is
common to both routers. Also, each router has an IP address for each subnetwork to which it is
attached. Each subnetwork could potentially support up to 30 host addresses.
This brings up an interesting point. The more host bits you use for a subnet mask, the more subnets
you have available. However, the more subnets available, the less host addresses available per
subnet. For example, a Class C network of 204.17.5.0 and a mask of 255.255.255.224 (/27) allows
you to have eight subnets, each with 32 host addresses (30 of which could be assigned to devices).
If you use a mask of 255.255.255.240 (/28), the break down is:
204.17.5.0 - 11001100.00010001.00000101.00000000
Example
http://www.computernetworkingnotes.com/ccna-study-guide/vlsm-tutorial-with-examples.html
Implementation
CIDR basically means that when routing you are not limited to networks based on /8, /16, or /24
subnet masks, and VLSM means that as long as the address spaces do not overlap, you can divide
a classful network like 192.168.1.0 /24 into networks of different sizes and subnet masks like this:
192.168.1.0 /24 (1 network with 256 hosts)
or in the example below, 7 networks of different sizes
192.168.1.0 ..to.. 192.168.1.127 /25 (1 network with 128 hosts),
192.168.1.128 ..to.. 192.168.1.191 /26 (1 network with 64 hosts),
192.168.1.192 ..to.. 192.168.1.223 /27 (1 network with 32 hosts),
192.168.1.224 ..to.. 192.168.1.239 /28 (1 network with 16 hosts),
192.168.1.240 ..to.. 192.168.1.247 /29 (1 network with 8 hosts),
192.168.1.248 ..to.. 192.168.1.251 /30 (1 network with 4 hosts),
192.168.1.252 ..to.. 192.168.1.255 /30 (1 network with 4 hosts)
LAB EXERCISES
Exercise 01:
Given the Class C network of 204.15.5.0/24, subnet the network in order to create the network in
Figure shown above, with the host requirements shown. Implement the scheme in Cisco Packet
Tracer.
Exercise 02:
Use VLSM techniques to implement the following network in Packet Tracer. Use static routes
between routers to make routing tables. Use 192.168.1.0/24 as the parent network.
Classful network is a term used to describe the network architecture of the Internet until around 1993. It divided
the address space for Internet Protocol Version 4 (IPv4) into five address classes.
Each class, coded by the first three bits of the address, defined a different size or type (unicast or multicast) of
the network.
All networks in practical use have different sizes.
For example, a company that will have 50 computers, will not need a network of 5000 computers, And on the
contrary, a company that needs 5000 computers does not need a network that can only hold 50 computers. This
is the main reason that engineers decided that IP address space should be divided in different classes in order
to meet different requirements.
This network is 8-bit network prefix. Its highest bit is set to 0, and contains a 7-bit network number
and a 24-bit host number.
A maximum of 126, which is (2 7 -2,) networks can be defined; two is subtracted because all an (0 and
1) subnet cannot be used in certain routers using RIP-1 Protocol. Each network supports a maximum
of 16,777,214 (2 24 -2) hosts per network. You must subtract two because the base network represents
host “0”, and the last host on the network is actually used for 1s ("broadcast") and may not be assigned
to any host.
The class A network address block contains 2 31 power (2,147,483,648) individual addresses. The
IPv4 address
space contains a maximum of 2 32 power (4,294,967,296) addresses, which mean that a class A
network address space is 50% of the total IPv4 unicast, address space.
This network is a 16-bit network prefix; its highest bit order is set to 1-0. It is a 14-bit network number
with a 16-bit host number.
This class defines 16,384 (2 14) /16 networks, and supports a maximum of 65,534 (2 16 -2) hosts per
network. Class B /16 block address is (1,073,741,824) = 2 30; therefore it represent 25% of the total
IPV4.
Introduction to Subnetting
Purpose:
The lab is intended to familiarize the students with a networking technique of SUBNETTING.
At the end of the lab the student must know:
1. The Purpose of SUBNETTING.
2. Steps of SUBNETTING.
3. How to perform SUBNETTING on different IP Classes.
4. Calculating the ranges of Hosts in the Subnet.
5. Finding the Broadcast address of the Subnet.
6. How to make a SUBNET on Linux machines.
7. How to Broadcast on that Subnet.
Subnetting:
In subnetting, a network is divided into smaller subnets with each subnet having its own subnet
address.
E.g. If the Given IP is: 172.16.0.0 and we are required to make 169 Subnets, then, by using the
following formula for subnets we can find the no. of bits required for the subnets:
n
2 – 2 >= No. of Subnets.
Where ‘n’ is No. of Bits further required as network address field in the given IP.
Therefore for 169 subnets we get n = 8. So the new mask becomes: 255.255.255.0
Masking
Task2:
Implement first two subnets created in Task (1-2) in Packet Tracer.
These questions were designed to test your knowledge of subnetting. Hopefully, by the end
of the worksheet, the exercise will make you feel more comfortable with your ability to
subnet ip addresses. Do not use a calculator for these problems, and please show your
handwritten work on these questions.
1. You work for a large communications corporation named GlobeComm which has been
assigned a Class A network address. Currently, the company has 1,000 subnets in offices
around the world. You want to add 100 new subnets over the next three years, and you
want to allow for the largest possible number of host addresses per subnet.
*Answer:255.255.224.0
Requirements: 1,000 subnets + 100 subnets = 1,100 subnets, and as many host addresses as
possible
2^10-2 = 1022 we Know from memory that 2^10= 1024, and will yield ONLY 1022 usable
subnets with 10 bits of subnetting
Because our requirements ask for over 1024 subnets, we must borrow one more host bit for
our subnetting:
2^11-2 = (1024 * 2) - 2 = 2046 unique usable subnets
2. Which of the following is a valid IP host address given the network ID of 191.254.0.0 while
using 11 bits for subnetting?
a. 191.254.0.32
b. 191.254.0.96
c. 191.254.1.29
d. 191.54.1.64
a. 255.255.192.0
b. 255.255.224.0
c. 255.255.240.0
d. 255.255.248.0
*Answer: 255.255.240.0
2^3-2 = 6 subnets
2^4-2 = 14 subnets
(2^16 - 2^4) -2 = 2^12 - 2 = 4094 hosts possible per subnet
Because 3 bits of subnetting will only yield 6 usable subnets (7 if ip subnet-zero is enabled),
you will need to borrow another bit. To meet your minimum requirement of 8 subnets, and
the maximum number of hosts per subnet, this Subnet mask will be correct: 255.255.240.0
Answer: 191.154 - If the default subnet mask is used, then the network ID portion of the IP
address 191.154.25.66 is 191.154. The first octet, 191, indicates that this is a class B address.
In a class B address, the first two octets of the address represent the network portion. The
default subnet mask for a Class B network address is 255.255.0.0. If a network administrator
had implemented a subet mask other than the default, then the network portion of the
address would be different. For example, an address of 191.154.25.66 with a subnet mask of
255.255.255.0 would have a network ID of 191.154.25.
A Class A address has a default subnet mask of 255.0.0.0; therfore, the first octet of a Class
A address represents the network portion of the address, if the default subnet mask is used.
A Class C address has a default subnet mask of 255.255.255.0; therefore the first three
octets of a Class C address represent the network portion of the network portion of the
address, if the default mask is used. The bits to the right of the network portion of an IP
address are the host portion of the address.
5.Your company has the network ID 165.121.0.0. You are responsible for creating subnets
on the network, and each subnet must provide at least 900 host IDs.
What subnet mask meets the requirement for the minimum number of host IDs and
provides the greatest number of subnets?
*Answer: A Class B address with a subnet mask of 255.255.252.0 creates 62 subnets with
1,022 hosts each. The next largest subnet creates 126 subnets, but each subnet contains
only 510 hosts. In binary format, the subnet mask reads as: 11111111 11111111 11111100
00000000. The third octet designates 1s for the first 6 digits. The 1s mask the subnet IDs.
The calculation of the number of host IDs available for each subnet is based on the number
of digits remaining in the network address after all of the subnets are created. To calculate
the number of host IDs, raise 2 to the tenth power and then subtract 2. Note that there are
two digits remaining in the third octet and eight digits in the fourth octet (00 00000000);
these ten digits can be used to create host IDs. The two host IDs that are subtracted are the
two host IDs that contain all 0s and all 1s; those IDs identify the subnet itself and the
broadcast address for all hosts on the subnet, respectively. The number of possible host IDs
*Answer: Choice d is correct. Given a prefix notation of 12.1.0.0/12, the broadcast address
on subnet 32 is 12.47.255.255. A prefix notation of /1 indicates a binary subnet mask of
11111111 11110000 00000000 00000000 or 255.240.0.0 in dotted-decimal notation. The
subnet mask 255.240.0.0 contains 12 masked bits. The address 12.1.0.0 belongs to a Class A
network address. When only one octet is used for subnetting, the interval between valid
subnets can be determined by subtracting the value of the octet from 256, such as 256 - 240
= 16 in this scenario. The number 16 is both the first valid address of the subnet ID and the
interval between valid subnets. Therefore, the first valid subnet ID is 12.16.0.0. Adding 16 to
the first subnet ID value yields the second valid subnet, which is subnet 32, and the
corresponding IP address for this subnet ID is 12.32.0.0. Continuing this process, the third
subnet ID is 12.48.0.0 and so on. The broadcast address for subnet 32 is represented by
00001100 00101111 11111111 11111111 in binary or 12.47.255.255 in dotted-decimal
notation. In the second octet of the broadcast address forsubnet 32, the first 4 bits are used
for the subnet ID (0010), and 00100000 represents subnet 32. The broadcast address on
subnet 32 is found by assigning 1s to each of the 20 rightmost bits that represent the host
portion of the address. Exhibit 1 in this explanation shows the addresses and masks involved
in this scenario.
The broadcast mask is formed by using 0s for the subnet bits and 1s for the host bits. In this
example, network 12.1.0.0/12 uses 12 network bits. Therefore, the first 12 bits of the
broadcast mask will be 0s. The remaining 20 bits from the total of 32 bits will be 1s. This
yields 00000000 00001111 11111111 11111111 in this example. The broadcast address is
calculated by performing a Boolean XOR operation on subnet 32 and the broadcast mask. A
Boolean XOR operation compares two bits.
A Boolean XOR operation evaluates to True(1) only when one bit is True and the other bit is
False (0). All other combinations result in False, such as when both bits are True or both bits
are False. To do the complete XOR operation in this item, first write down the sugnet
address in binary. On a second line, write down the broadcast mask. Finally, perform a
Boolean XOR operation on all corresponding bits.
Thus, the XOR operation yields the subnet 32 broadcast address of 12.47.255.255. Note that
the sum of the network subnet mask and the network broadcast mask is always 11111111
11111111 11111111 11111111 in binary, or 255.255.255.255 in dotted decimal notation.
7. Your ISP has provided you a T1 connection to their network. They have provided the
interface at your end of the Serial connection an IP address of 16.32.96.109/30. For this
particular situation, you must supply the IP address of the ISP's interface at the opposite end
of the serial connection as your Gateway of Last Resort. What IP address would you specify
as the Gateway of last resort?
Hints(Please answer)
a. How many hosts are allowed in each subnet? Answer: 2 usable hosts
32 possible bits in an IP version 4 IP address.
32 - 30 = 2 possible bits left for our host
2^2-2 = 2 usable hosts
b. What is the Broadcast address for this network? (Please show the "interesting" octet in
binary)
c. What is the Network address for this network? (Please show the "interesting" octet in
binary)
128 64 32 16 8 4 2 1
0 1 1 0 1 1 0 1 = 109 decimal
16.32.96.01101101 = 16.32.96.109 -IP address of one of your hosts in this small subnet
255.255.255.11111100 = 255.255.255.252 -Subnet Mask given in CIDR /30
16.32.96.01101100 = 16.32.96.108 -Network ID for this subnetwork
16.32.96.01101111 = 16.32.96.111 -Subnet broadcast address
16.32.96.01101110 = 16.32.96.110 -The only usable host address left range between the
8. You are a network administrator, seated at a workstation at the remote end of a campus
network. You are attempting to troubleshoot a communication problem between that client
workstation and the server at the other end of campus. This workstation has a static IP
address of 181.197.187.212, with a subnet mask of 255.255.224.0. Because a particularly
thorough security administrator, Frank, has removed most extraneous applications,
including the Calculator, you must use paper and pencil to verify that the workstation is on
the same subnet as your server at 181.197.143.236, with a subnet mask of 255.255.224.0.
The user reports that the computer "hasn't worked right since it was installed last week."
You cannot ping the server from the workstation. Are these two computers on the same
subnet?
Hint- Convert the "interesting octet" of the Subnet mask, of the workstation and then the
server to binary. What are the results with dotted-decimal from the boring octets, combined
with Binary for the interesting octet? Line them up, how do they compare?
What is the network ID for the Workstation's IP address? (Please show the interesting octet
in binary)
What is the broadcast ID for network? (Please show the interesting octet in binary)
How many usable host addresses are available for the network?
If you are at the Workstation, and attempt to ping the server, the workstation must
determine whether the server's IP address is on the same subnet as it's own. If the
workstation determines that the server is on it's subnet, then it will send an ARP request for
the server's IP address, otherwise, the workstation will need to Arp it's configured Default
Gateway, because it handles all requests for addresses outside the local subnet, and might
have a route to those other networks.
The Workstation must determine if the resource is on the local network or not, and must
perform an ANDing operation.
Workstation's question: Is this destination network address local to my subnet?
Answer: No, You know this would make the create more subnets, when you would need
fewer subnets with larger ranges.
181.197.10111011.212 = 181.197.187.212 -Workstation's configured IP Address
255.255.11111000.0 = 255.255.248.0 -Testing 248 Subnet Mask
181.197.10111000.0 = 181.197.184.0 -New Subnet ID
181.197.10111111.255 = 181.197.191.255 -Same Broadcast ID as configured, but subnets
are increments of 8
Answer: No, You would still be on different subnets, but changing the network's subnet
mask to 255.255.192.0 would allow these two IP addresses to be on the same subnetwork.
This might be a great deal of work, but you can see that creating fewer subnets will make
those usable subnets have a broader range.
Just for an Example, look what happens if you change the network's Subnet mask to
255.255.192.0:
There are 4 Unique Subnets created, only 2 are Usable.
Answer, this was a tricky question, and there were many ways to answer this one. If you
changed the IP Address and Subnet Mask for the server, then you would be able to place
the server on the same subnet as the Workstation. The question only mentioned two
computers on the network, so changing the server's IP address might not impact anyone
else. There is also the possibility that the Server is handling thousands of clients, and
changing the IP address might cause the server to become unreachable.
If you gave the server an IP address of 181.197.187.213/20, then the two devices would be
able to communicate.
Interestingly enough, these two machines should be able to communicate on the same
physical network, even with different subnet masks.
This is due to the fact that the workstation will first check to see if the server is on it's
subnet.
Workstation:
255.255.11100000.0 = 255.255.224.0 -Workstation's configured Subnet Mask
181.197.10111011.213 = 181.197.187.213 -DESTINATION IP Address
181.197.10100000.0 = 181.197.160.0 -Result of ANDing the Destination Address,
Workstation determines that this destination is on it's own network, and ARP's for the
Server's MAC address.
Workstation then initiates an ICMP Echo Request to the server.
Server:
255.255.11110000.0 = 255.255.240.0 -Server's configured Subnet Mask
181.197.10111011.212 = 181.197.187.212 -DESTINATION IP Address
255.255.10110000.0 = 181.197.176.0 -Result of ANDing the Destination Address,
Server Determines that the Workstation is on it's same network, and sends an Echo Reply.
Reference:
3. Introduction:
Basic Operation of RIP Protocol
RIP is a routing protocol which exchanges network information between routers dynamically. It uses
broadcast to share routing information.
Routers aware only about the networks those are directly connected with them. For example in
following network R1 only aware about the 10.0.0.0/8 and 192.168.1.252/30 network.
So if it receives a packet for 20.0.0.0/8 from 10.0.0.0/8 network on F0/1 port, it will drop that packet.
This is the default behavior of router. By default routers are configured to drop all unmatched packets.
Router can learn about the remote network in two ways; static and dynamic.
In dynamic method this process is done by a routing protocol. Several routing protocols are available
to choose from such RIP, OSPF, IGRP and EIGRP. In this lab we will explain RIP routing protocol.
In RIP protocol routers learn about the destination networks from neighboring routers through the
sharing process. Routers running RIP protocol periodically broadcast the configured networks from all
ports. Listing routers will update their routing table based on this information.
When we start this network, Routers are aware only about the directly connected network.
R1 knows that network 10.0.0.0/8 is connected on F0/1 port and network 192.168.1.252/30 is
connected on S0/0 port.
R2 knows that network 192.168.1.252/30 is connected on S0/0 port and network192.168.1.248/30 is
connected on S0/1 port.
R3 Knows that network 20.0.0.0/8 is connected on F0/1 and network 192.168.1.248/30 is
connected S0/0 port.
Unlike static routing where we have to configure all routes manually, in dynamic routing all we need
to do is just tell the routing protocol which route we want to advertise. And rest will be done
automatically by running dynamic protocol. In our network we are running RIP routing protocol so it
will be handled by RIP.
Sometime RIP is also known as routing by rumor. Because in this routing protocol routers learn routing
information from directly connected neighbors, and these neighbors learn from other neighboring
routers.
R1 will listen broadcast from R2. From R2 it will learn one new network 192.168.1.248.
R2 will listen two broadcasts from R1 and R3. From R1 it will learn about 10.0.0.0/8 and from R3 it
will learn about 20.0.0.0/8 network.
R3 will listen broadcast from R2. From R2 it will learn about the network 192.168.1.252.
Router takes several measurements while processing and putting new route information in routing table.
We will explain them later in this lab. If router discovers new route in update, it will put that in routing
table.
After 30 seconds (default time interval between two routing updates) all routers will again broadcast
their routing tables with updated information.
This time:-
After 30 seconds router will broadcast again with new routing information. This time routers have
nothing to update. This stage is known as convergence.
Convergence
Convergence is a term that refers to the time taken by all routers in understanding the current topology
of network.
RIP Routing protocol metric
We may have two or more paths for the destination network. In this situation RIP uses a measurement
called metric to determine the best path for destination network. RIP uses hops count as metric. Hops
are the number of routers it takes to reach the destination network.
This part of lab will explains RIP routing fundamentals difference between RIPv1 and RIPv2.
RIP is a distance vector routing protocol. It shares routing information through the local broadcast in
every 30 seconds.
Routers keep only one route information for one destination in routing table. Routers use AD
(Administrative Distance) value and metric to select the route.
It uses broadcast for routing update. It use multicast for routing update.
It only supports classful routing. It supports both classful and classless routing.
RIP is the simplest and one of the oldest Distance Vector routing protocol. It is very easy to setup and
troubleshoot. For demonstration we will use packet tracer network simulator software. You can use real
Cisco devices or any other network simulator software for following this guide.
Now routers have information about the networks that they have on their own interfaces. Routers will
not exchange this information between them on their own. We need to implement RIP routing
protocol that will insist them to share this information.
Configuration of RIP protocol is much easier than you think. It requires only two steps to configure the
RIP routing.
1. Enable RIP routing protocol from global configuration mode.
2. Tell RIP routing protocol which networks you want to advertise.
Let’s configure it in Router0
router rip command tell router to enable the RIP routing protocol.
network command allows us to specify the networks which we want to advertise. We only need to
specify the networks which are directly connected with the router.
That’s all we need to configure the RIP. Follow same steps on remaining routers.
By default RIP will use the route that has low hops counts between source and destination. In our
network route1 has low hops counts, so it will be selected. We can use tracert command to verify it.
Now suppose route1 is down. We can simulate this situation by removing the cable attached
betweenRouter0 [s0/0/1] and Router2 [s0/0/1].
Okay our primary route went down. What will be happen now?
ommand Description
Router(config-router)#passive- RIP will not broadcast routing update from this interface
interface s0/0/0
Router(config-router)#timers basic Allow us to set RIP timer in seconds. 30 (routing update), 90 (invalid
30 90 180 270 360 timer), 180 ( Hold timer), 270 (Flush timer), 360 (sleep timer)
Router#debug ip rip Used for troubleshooting. Allow us to view all RIP related activity in
real time.
Exercise:
Implement all the concepts related to this lab using CISCO packet tracer and make a comprehensive
lab report for submission.
3. Introduction:
EIGRP stands for Enhanced Interior Gateway Routing Protocol. It is a Cisco-proprietary routing
protocol for TCP/IP. It is based on IGRP routing protocol. It has several enhancements to scale the
enterprise size network.
EIGRP is ruling the world of routing protocols. The only negative about EIGRP was Cisco kept this
protocol as proprietary protocol. In order to run this protocol, we had to buy all routers from Cisco.
This thing was changed a little in 2013 when partial functionality of EIGRP was converted in open
standard. Now we can also buy routers from other vendors along with Cisco, still running EIGRP on all
routers.
Since EIGRP is hybrid protocol, it has advantages of both link state and distance vector protocol. It
uses composite metric calculation formula to select the best route for destination. It sends partial or
full update only when something is change in network. It maintains three tables for ultra-fast
convergence.
Metric
EIGRP uses metric to select the best route from all available routes for destination. Metric has five
components.
1. Bandwidth
2. Load
3. Delay
4. Reliability
5. MTU (maximum transmission unit)
RTP
EIGRP uses RTP (Reliable Transport Protocol) to communicate with other EIGRP speaking routers. RTP
uses multicast and unicast to exchange the data with neighbors. It uses class D address 224.0.0.10 for
multicast. It keeps track of each multicast it sends out. EIGRP maintains a list of the neighbors who
have replied. If it doesn’t receive a reply from any neighbor, RTP will resend the same data using
unicast. It will make 16 unicast attempts before declaring neighbor is dead.
0 or 1 Static route
90 EIGRP (Interior)
110 OSPF
Not all routing protocols understand the concept of AS. Luckily EIGRP not only understand the concept
of AS but also supports multiple ASes. We can easily configure multiple AS instance with EIGRP to
divide a large network in smaller segments. By default EIGRP routers will not share routing information
between different AS.
Redistribution
Redistribution is used to exchange the route information between different ASes. When a route is
learned through the redistribution, it has higher AD value than its original source. For example EIGRP
has two AD values 90 for interior EIGRP and 170 for exterior EIGRP. Exterior EIGRP means EIGRP
instance which has different AS number.
By default when we enable EIGRP routing, all interfaces (that meet network command criteria)
become participate of it. EIGRP allows us to exclude any interface from it.
AS Number
An AS is a group of networks running under a single administrative control. This could be our company
or a branch of company. Just like Subnetting AS is also used to break a large network in smaller
networks.
AS creates a boundary for routing protocol which allow us to control how far routing information
should be propagated. Beside this we can also filter the routing information before sharing it with
other AS systems. These features enhance security and scalability of overall network.
Basically AS concept was developed for large networks. Routing protocols which were developed for
small networks such as RIP do not understand the concept of AS systems.
K2 Load
K3 Delay
K4 Reliability
K5 MTU
Two routers must use same K Values in order to become the EIGPR neighbor. For example if one router
is using three K- Values (K1, K2 and K3) while second router is using default K values (K1 and K3) then
these two routers will never become neighbor.
In order to become EIGRP neighbor two routers must use same K values.
Step 2:- Receiving router R2 will compare these values with its own configuration values. If both
necessary values match (AS number and K-values), it will reply with a routing update. This update
includes all routes information from its routing table excluding one route. The route which it learned
from the same interface that bring hello packet to it. This mechanism is known as split horizon. It
states that if a router receives an update for route on any interface, it will not propagate same route
information back to the sender router on same port. Split horizon is used to avoid routing loops.
Step 4:- R1 will sync its EIGRP topology table with routing information that it received in routing
update. It will also send a routing update containing all route information from its routing topology to
R2.
At this point, the two routers have becomes neighbor. Now they will maintain this neighborship with
ongoing hello packets. If they see any change in network, they will update each other with partial
updates.
EIGRP uses the concept of AS and Wildcard mask which makes its configuration part a little bit more
complex.
This command will enable EIGRP routing protocol in router. We can use any ASN (Autonomous System
Number) from 1 to 65,535. In order to become EIGRP neighbors this number must be same on all
participates.
This command allows us to specify the local interfaces which we want to include in EIGRP. Basically
we define a range of addresses and router search for these addresses in local interfaces. If match
found EIGRP will be enabled on that interface. Once enabled, EIGRP will starts advertising about the
connected subnets with that interface.
We have two options while defining the range of addresses with network command
Without wildcard
Choosing this option allows us to configure the classful network. This option is very straightforward.
All we need to do is, type the network ID with network command. For example network 172.168.0.0
command will enable EIGRP on all interfaces which belong to network 172.168.0.0.
Well in this situation EIGRP will automatically convert it back to network ID in which this network
number is resides. For example 172.168.1.1 will be converted back in 172.168.0.0.
This creates another query. Why it will be converted in 172.168.0.0 instead of 172.168.1.0?
Answer of this question is hidden in classful configuration. In classful configuration EIGRP will match
network addresses with in default boundary. Consider following figure:
If we want excludes serial interfaces from EIGRP, we need to configure network command with
more specific information.
With wildcard
In this option we provide wildcard mask along with network ID. Wildcard mask allows us to match
exact networks. With wildcard we are no longer limited with default boundaries. We can match
Subnetted networks as well as default networks.
For example we were tasked to exclude serial interfaces in above configuration. We can use a
wildcard mask of 0.0.0.255 to match the subnet mask of /24.
Above commands will ask router to match /24 bits of address instead of default /16 bits. Now router
will look for 172.168.1.x and 172.168.2.x network. Our serial interfaces have 172.168.3.0/24 and
172.168.4.0/24 networks which do not fall in these search criteria.
Until you learn wildcard mask, use subnet mask in the place of wildcard mask. Following commands
are also valid and do the same job by matching /24 bits of address.
As I mentioned earlier, we can use both wildcard mask and subnet mask with network command. We
have used wildcard mask for above routers. In remaining routers we will use subnet mask.
Access the command prompt of PC1 and use ping command to test the connectivity from Server0.
After that use tracert command to print the taken path.
Command Description
Router(config)#router eigrp 20 Enable EIGRP with AS number 20. AS number must be same on
all routers to become EIGRP neighbor.
Router#show ip eigrp neighbors detail Display the neighbor table in detail. Used to verify whether a
neighbor is configured as stub router or not.
Router#show ip eigrp interfaces serial Display information about a particular EIGRP interface.
0/0
Router#show ip eigrp traffic Displays the number and type of packets sent and received.
Router#debug eigrp fsm Displays the events or actions related to feasible successor metrics
(FSM).
Router#debug eigrp packet Displays the events or actions related to EIGRP packets.
Router#no debug eigrp fsm Turn off debug message related to feasible successor metrics
(FSM).
Router#no debug eigrp packet Turn off debug message related to EIGRP packets.
Exercise:
Implement all the configuration and implementation commands of EIGRP using CISCO packet Tracer
and make a lab report for your submission.
5. Equipment Required:
A working computer having Cisco packet tracer installed.
6. Introduction:
OSPF is a link state open standard based routing protocol. It was created in mid-1980. Since it is based
on open standard, we can use it with any vendor’s router.
Disadvantage of OSPF
It requires extra CPU process to run SPF algorithm.
It requires more RAM to store adjacency topology.
It is more complex to setup and hard to troubleshoot.
Basically OPSF was created to fulfill the requirement of enterprise size network. To scale a large size
network it uses area concept. Area concept is similar to Subnetting. It allows us to separate the large
internetwork into smaller networks known as areas.
Along with Area concept OSPF also supports Autonomous System (AS). Just like area, AS also divide
a large network into smaller networks.
OSPF routers share routing information only with neighbors. OSPF uses hello packets to discover
neighbors in segments. A hello packet contains some essential configuration values that must be same
on both routers who want to build an OSPF neighborship.
In order to become OSPF neighbor following values must be match on both routers.
1. Area ID
2. Authentication
3. Hello and Dead Intervals
4. Stub Flag
5. MTU Size
Area ID
OSPF uses area concept to scale an enterprise size network. OSPF areas create a logical boundary for
routing information. By default routers do not share routing information beyond the area. So in order to
become neighbor, two routers must belong to same area. Here one confusing fact needs to clear. Area
is associated with specific interface, not with entire router. This allows us to configure the router in
multiple areas. For example a router that has two interfaces; Serial interface and FastEthernet
interface, can run Serial interface in one area and FastEthernet in another area. It means link which
connects two routers need be in same area including its both ends interface. Beside this interfaces should
have same network ID and subnet mask.
Following figure illustrate a simple OSPF network. In this network R1 is eligible to form
neighborship with R4 and R2 respectively on S0/0 and F0/0.
Dead Intervals
As we already know once neighborship is built, hello packets are used to maintain the neighborship.
Hello and dead interval must be same between two neighbors. If any of these intervals are different,
neighborship will not form.
This value indicates that whether sending router belong to stub area or not. Routers who want to build
OPSF neighborship must have same stub area flag.
MTU
Technically MTU (Maximum Transmission Unit) is not a part of compulsory matching conditions.
Still we should match this value. If this value does not match routers may stuck in Exstart/Exchange
exchange stage.
This command will enable OSPF routing protocol in router. Process ID is a positive integer. We can
use any number from 1 to 65,535. Process ID is locally significant. We can run multiple OSPF process
on same router. Process ID is used to differentiate between them. Process ID need not to match on all
routers.
Network command allows us to specify the interfaces which we want to include in OSPF process. This
command accepts three arguments network number, wildcard mask and area number.
1. Network number
Network number is network ID. We can use any particular host IP address or network IP
address. For example we can use 192.168.1.1 (host IP address) or we can use 192.168.1.0
(Network IP address). While targeting a specific interface usually we use host IP address
(configured on that interface).
While targeting multiple interfaces, we use network IP address. So any interface that belongs
to specified network ID will be selected.
2. Wildcard mask
Wildcard mask are used with network ID to filter the interfaces. Wildcard mask is different
from subnet mask. Subnet mask is used to separate the network portion and host portion in IP
address. While wildcard mask is used to match corresponding octet in network portion.
Wildcard mask tells OSPF the part of network address that must be matched.
3. Key points
0 (Decimal – octet format) Wildcard mask indicates that corresponding octet in network address
must be matched exactly.
255 (Decimal – octet format) Wildcard mask indicates that we don’t care about corresponding
octet in network address.
0 (Binary – bit format) Wildcard mask indicates that corresponding bit in network address must be
matched exactly.
255 (Binary – bit format) Wildcard mask indicates that we don’t care about corresponding bit in
network address.
For example we want to exclude serial interfaces in above configuration. We can use a wildcard mask
of 0.0.0.255 to match the subnet mask of /24.
In this case valid host IP addresses are 192.168.0.1 and 192.168.0.2. So any interface that has these IP
address would be selected. /30 network is usually used for serial link connection which need only two
valid host IP addresses; one for each end.
Third argument which network command accept is area number. This parameter say router to put
matched interface in specified area.
Now we know the essential commands for configuration. Let’s implement them in our network.
Router(config-if)#ip ospf priority Used to influence DR/BDR selection process. Valid range is 0 to
100 255. 0 makes router ineligible for DR/BDR while 255 makes router
guaranteed DR/BDR. Higher priority value means higher chance of
becoming DR/BDR.
Router(config-if)#bandwidth 256 Used to influence route metric cost. Cost is the inverse of bandwidth.
Higher bandwidth has lower cost. Bandwidth is defined in Kbps. 256
means 256 Kbps.
Router(config-if)#ip ospf hello- Set hello interval timer to 15 seconds. Hello timer must be match on
interval timer 15 both routers in order become neighbors.
Router(config-if)#ip ospf dead- Set dead interval timer to 60 seconds. Dead interval timer must be
interval 60 match on both routers in order to become neighbor
Router#show ip route ospf Display all routers learned through OSPF from routing table
Router#show ip ospf interface Display information about all OSPF active interfaces
Router#show ip ospf interface Display OSPF information about serial 0/0/0 interface
serial 0/0/0
Exercise:
Implement all the configuration and implementation commands of OSPF using CISCO packet Tracer
and make a lab report for your submission.
3. Introduction:
What is VLAN
VLAN is a logical grouping of networking devices. When we create VLAN, we actually break large
broadcast domain in smaller broadcast domains. Consider VLAN as a subnet. Same as two different
subnets cannot communicate with each other without router, different VLANs also requires router to
communicate.
Advantage of VLAN
VLAN provides following advantages:-
VLAN Examples
To understand VLAN more clearly let's take an example.
With default configuration, all computers share same broadcast domain. Development department
can access the administration or production department resources.
With VLAN we could create logical boundaries over the physical network. Assume that we created
three VLANs for our network and assigned them to the related computers.
Physically we changed nothing but logically we grouped devices according to their function. These
groups [VLANs] need router to communicate with each other. Logically our network look likes
following diagram.
With the help of VLAN, we have separated our single network in three small networks. These networks
do not share broadcast with each other improving network performance. VLAN also enhances the
security. Now Development department cannot access the Administration and Production
department directly. Different VLAN can communicate only via Router where we can configure wild
range of security options.
VLAN Membership
VLAN membership can be assigned to a device by one of two methods
1. Static
2. Dynamic
Static
Assigning VLANs statically is the most common and secure method. It is pretty easy to set up and
supervise. In this method we manually assign VLAN to switch port. VLANs configured in this way are
usually known as port-based VLANs.
Static method is the most secure method also. As any switch port that we have assigned a VLAN will
keep this association always unless we manually change it. It works really well in a networking
environment where any user movement within the network needs to be controlled.
Dynamic
In dynamic method, VLANs are assigned to port automatically depending on the connected device. In
this method we have configure one switch from network as a server. Server contains device specific
information like MAC address, IP address etc. This information is mapped with VLAN. Switch acting as
server is known as VMPS (VLAN Membership Policy Server). Only high end switch can configured as
VMPS. Low end switch works as client and retrieve VLAN information from VMPS.
Dynamic VLANs supports plug and play movability. For example if we move a PC from one port to
another port, new switch port will automatically be configured to the VLAN which the user belongs.
In static method we have to do this process manually.
VLAN Connections
During the configuration of VLAN on port, we need to know what type of connection it has.
1. Access link
2. Trunk link
Access link
Access link connection is the connection where switch port is connected with a device that has a
standardized Ethernet NIC (Network Interface Card). Standard NIC only understand IEEE 802.3 or
Ethernet II frames. Access link connection can only be assigned with single VLAN. That means all
devices connected to this port will be in same broadcast domain.
For example twenty users are connected to a hub, and we connect that hub with an access link port
on switch, then all of these users belong to same VLAN. If we want to keep ten users in another VLAN,
then we have to purchase another hub. We need to plug in those ten users in that hub and then
connect it with another access link port on switch.
Trunk link
Trunk link connection is the connection where switch port is connected with a device that is capable
to understand multiple VLANs. Usually trunk link connection is used to connect two switches or switch
to router. Trunking allows us to send or receive VLAN information across the network.
To replicate given scenario create a topology in packet tracer, as shown in following image.
PCs Configuration
Device IP Address Subnet Mask Gateway VLAN Connected With
Router Configuration
VLAN Configuration
In our network Office1 Switch is configured as VTP (VLAN Trunking Protocol) Server. Office2 and
Office3 switches are configured as VTP clients. We only need to create VLANs in VTP Server. VTP Server
will propagate this information to all VTP clients.
switchport access vlan [vlan number ] command is used to assign VLAN to the interface. Following
commands will assign VLANs to the interfaces.
We have successfully assigned VLAN membership. It's time to test our configuration. To test this
configuration, we will use ping command. ping command is used to test connectivity between two
devices. As per our configuration, devices from same VLAN can communicate. Devices from different
VLANs must not be able to communicate with each other without router.
Same as VLAN 10, PCs from VLAN 20 must be able to communicate with other PCs of same VLAN while
they should not be able to access VLAN 10.
Exercise:
Implement all the configuration and implementation commands of VLAN using CISCO packet Tracer
and make a lab report for your submission.
3. Introduction:
VLAN Trunk Protocol (VTP) is a Cisco proprietary protocol used to share VLAN configuration across the
network. Cisco created this protocol to share and synchronize their VLAN information throughout the
network. Main goal of VTP is to manage all configured VLANs across the network.
In our network we only have three switches. We can easily add or remove VLAN manually on all three
switches. However this process could be more tedious and difficult if we have 50 switches. In a large
network, we might make a mistake in VLAN configuration. We might forget to add VLAN on one of the
switch, or we may assign wrong VLAN number. Vice versa we may forget to remove VLAN on one of
the switch, while removing VLANs.
VTP is a life saver protocol in this situation. With VTP we can add or remove VLANs on one switch and
this switch will propagate VLAN information to all other switches in network.
We will configure Office 1 Switch as VTP Server. Double click on Office 1 Switch and Click CLI menu
item and press Enter key to start CLI session.
By default all switches work as VTP server so we only need few commands to configure it. In following
commands we will
Set hostname to S1
Set domain name to example
Set password to vinita. (Password is case sensitive)
Now access CLI prompts of Office 3 Switch and enter following commands.
Multiple layer 2 connections between LAN segment and server create following problems
1. Broadcast Storms
2. Duplicate Frame copies
3. Unstable MAC Table
BPDU
BPDU (Bridge Protocol Data Unit) is a multicast frame that is used to share information about switch
and its interface connections. Switches use BPDU to learn the network topology; other switches
connections and any existing loops. BPDU frames are sent out as multicast in every two seconds.
1. Root Bridge
All decisions in STP are made from the perspective of Root Bridge. Switch with the lowest switch ID
is selected as Root Bridge. BPDU contains Switch ID. Switch ID is made from priority of the switch and
MAC address of switch itself. Default priority is set to 32768. Switch with the lowest MAC address will
be selected as the root switch, if you don’t change the default priority value. You can override root
selection process by changing the priority value. If you want one switch to be Root Bridge, change its
priority value to less than 32768.
Selection process of Root Bridge runs each time a network change occurs like as adding new switch in
topology, removing existing switch or Root Bridge failure. If other switches in network do not receive
BPDUs from Root Bridge within 20 seconds, they assume that Root Bridge has failed and will begin a
new election process to choose a new Root Bridge.
2. Non-Root Bridge
All other switches in network except Root Bridge are the Non-Root Bridges. Non-Root Bridge receives
updates from Root Bridge and updates its STP database.
10 Gbps 1 2
1 Gbps 1 4
100 Mbps 10 19
Some old series switches like Catalyst 1900 uses old cost value. Cisco already discontinued these old
series switches. New series switches like 2960 uses new cost value. Lower cost value is always
preferred over higher cost value while selecting link.
Path Costs
Path cost is an accumulated value of port costs from Root Bridge to other switches in network. It is
always calculated from Root Bridge. Default path cost at Root Bridge is 0. BPDU contains path cost
information. When Root Bridge advertises BPDU out from its interface, it set path costs to 0. When
connected switch receives this BPDU, it increments path cost by adding the port cost value of its
incoming port.
For example if switch receive this BPDU on Gigabit interface then path cost would be 0 (Value it receive
from Root Bridge) + 4 (port cost value, see above table) equal to 4. Now this switch will set path cost
value to 4 in BPDU frame and forward it. Assume that next switch is connected with this switch and
receives updated BPDU on fast Ethernet port. Path cost for new switch would be 23. Path costs value
received in BPDU + Port cost ( 4+ 19 = 23).
Root Port
Root port is a port that is directly connected with the Root Bridge, or has the shortest path to the Root
Bridge. Shortest path is path that has lowest path cost value. Remember that switch can go through
many other switches to get the root. So it’s not always the shortest path but it is the fastest path that
will be used.
Designated Port
Designated port is the port that is selected as having the lowest port cost. Designated port would be
marked as forwarding port.
Non-designated port is the port that is selected as having the higher port cost than the designated
port. Non-designated port would be marked as blocking port.
Forwarding Port
Forwarding port is used to forward the frames.
Blocking Port
Blocking port remains disable to remove loops.
STP port states
Ports on switch running STP go through the five different states. During STP convergence, switches
will move their root and designated ports through the various states:
1. Blocking
2. Listening
3. Learning
4. Forwarding,
1. Blocking
In blocking state, switch only listen and process BPDUs on its ports. Any other frames except BPDUs
are dropped. In this state, switch try to find out which port would be root port, which ports would be
designated ports and which ports would remain in blocking state to remove loops. A port will remain
in this state for twenty seconds. By default all ports are in blocking state, when we powered on the
switch. Only root port and designated ports will move into next state. All remaining ports will remain
in this state.
2. Listening
After twenty seconds, root port and designated ports will move into listening state. In this state ports
still listen and process only BPDUs. All other frames except BPDUs are dropped. In this state switch
will double check the layer 2 topology to make sure that no loops occur on the network before
processing data frames. Ports remain in this state for fifteen seconds.
3. Learning
Root port and designated ports enter in learning state from listening state. In this state ports still listen
and process BPDUs. However, in this state ports start processing user frames. Switch examines source
address in the frames and updates its MAC Address Table. Switch will not forward user frames to
destination ports in this state. Ports stay in this state for fifteen seconds.
In forwarding state, ports will listen and process BPDUs. In this state ports will also process
user frames, update MAC Address Table and forward user traffic through the ports.
Disable
Disable ports are manually shut down or removed from STP by an administrator. All
unplugged ports also remain in disable state. Disable ports do not participate in STP.
Convergence
Convergence is a state where all ports on switch have transitioned to either forwarding or blocking
modes. During the STP converging, all user data frames would be dropped. No user data frame will be
forwarded until convergence is complete. Usually convergence takes place in fifty seconds (20 seconds
of blocking state + 15 seconds of listing state + 15 seconds of learning state).
STP Operations
First thing a STP enable network do, is the election of Root Bridge. Switches share BPDUs with each
other to select the Root Bridge. Switch that has lowest priority will become root. Default priority is set
to 32768. If priority value is same then switch with lowest MAC address would be selected as root. In
our network switch S3 has lowest MAC address. Since we did not change priority value, switch S3
would be chosen as Root Bridge.
Every switch selects single port (that has shortest path cost) from all its ports and marked it
as root port.
If two switches have multiple connections, only single connection that has shortest path cost
would be marked as designated port.
Any port that is not either a root port or designated port would be blocked.
Below figure show, how STP changes a physically looped topology in virtually looped free topology.