TC-316 TN
TC-316 TN
TELECOMMUNICATION NETWORKS
(TC-316)
For
TE (TC)
Name:
Roll Number:
Batch:
Department:
Year/Semester:
Prepared By:
Saba Ahmed (Assistant Professor)
Sundus Ali (Lecturer)
Syed Muneeb Ahmed (Lecturer)
Approved By:
Board of Studies of Department of Electronic Engineering
INTRODUCTION
This Laboratory Manual will help the students learn about the design and implementation
of telecommunication and data communication networks. The manual also contains
some laboratory sessions on how to manage communication networks through
network discovery, monitoring and management. The topics covered in this Lab
Workbook include VLSM, Router and switch configuration, configuring Routing
Protocols, VLANs, network discovery, packet capture and monitoring, and SNMP
MIB Browsing. These practicals solidify both the theoretical and practical concepts
that are very essential for the engineering students.
CONTENTS
LAB SESSION 01
OBJECT
THEORY
There are several classifications of twisted pair cable. Let’s skip right
over them and state that we’ll use Category 5 (or CAT 5) cable for all
new installations. Likewise, there are several fire code classifications for
the outer insulation of CAT 5 cable. We’ll use CMR cable, or “riser
cable,” for most of the wiring we do. You should also be aware of CMP
or plenum cable (a plenum is used to distribute air in a building) you
may be required by local or national codes to use the more expensive
plenum-jacketed cable if it runs through suspended ceilings, ducts, or
other areas, if they are used to circulate air or act as an air passage from
one room to another. If in doubt, use plenum. CMR cable is generally
acceptable for all applications not requiring plenum cable.
Most of the wiring we do simply connects computers directly to other computers or hubs.
Solid core cable is quite suitable for this purpose and for many home and small business
network. It is also quite acceptable for use as patch cables. You might consider a stranded
wire patch cable if you have a notebook computer you is constantly moving around.
CAT 5 cable has four twisted pairs of wire for a total of eight individually insulated wires.
Each pair is color coded with one wire having solid color (blue, orange, green, or brown)
twisted around a second wire with a white background and a stripe of the same color. The
solid color may have white stripe in some cables. Cable colors are commonly described using
the background color followed by the color of the stripe; e.g; white-orange is a wire with a
white background and an orange stripe.
1
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Connectors
The straight through and cross-over patch cables are discussed in this
article which is terminated with CAT 5 RJ-45 modular plugs. RJ-45
plugs are similar to those you’ll see on the end of your telephone cable
except they have eight as opposed to four or six contacts on the end of
the plug and they are about twice as big. Make sure they are rated for
Figure 1.2: RJ-45
CAT 5 wiring. (RJ stands for “Registered Jack”). Also, there are RJ-45
plugs designed for both solid core wire and stranded wire. Others are
Connector
designed specifically for one kind of wire or the other. Be sure you buy
plugs appropriate for the wire you are going to use. We normally use plugs designed to
accommodate both kinds of wire.
2
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
UTP basics
The 10BASE-T and 100BASE-TX Ethernet consist of two transmission lines. Each
transmission line is a pair of twisted wires. One pair receives data signals and the other pair
transmits data signals. A balanced line driver or transmitter is at one end of one of these lines
and a line receiver is at the other end. A (much) simplified schematic for one of these lines
and its transmitter and receiver follows:
Pulses of energy travel down the transmission line at about the speed of light (186,000
miles/second). The principal components of these pulses of energy are the potential
difference between the wires and the current flowing near the surface of the wires. This
energy can also be considered as residing in the magnetic field which surrounds the wires and
the electric field between the wires. In other words, an electromagnetic wave which is
guided by, and travels down the wires.
The main concern are the transient magnetic fields which surround the wires and the
magnetic fields generated externally by the other transmission lines in the cable, other
network cables, electric motors, fluorescent lights, telephone and electric lines, lightning,
which may literally bury the Ethernet pulses, the conveyor of the information being sent
down the line.
The twisted-pair Ethernet employs two principal means for combating noise. The first is the
use of balanced transmitters and receivers. A signal pulse actually consists of two
simultaneous pulses relative to ground: a negative pulse on one line and a positive pulse on
the other. The receiver detects the total difference between these two pules. Since a pulse of
noise usually produces pulses of the same polarity on both lines, it is essentially canceled out
at the receiver. Also, the magnetic field surrounding one wire from a signal pulse is a mirror
of the one on the other wire. At a very short distance from the two wires the magnetic fields
are opposite and have a tendency to cancel the effect of each other out. This reduces the
line’s impact on the other pairs of wires and the rest of the world.
The second and the primary means of reducing cross-talk (the term cross-talk came from the
ability to overhear conversations on other lines on your phone) between the pairs in the cable,
is the double helix configuration produced by twisting the wires together. This configuration
produces symmetrical (dentinal) noise signals in each wire. Ideally, their difference as
detected at the receiver, is zero. In actuality it is much reduced.
3
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Again, the wire with colored backgrounds may have white stripes and may be denoted that
way in diagrams found elsewhere. For example, the green wire may be labeled Green-White.
The background color is always specified first.
A Straight-through cable has identical ends, whereas a Crossover cable has different ends.
4
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
PROCEDURE
To Make Cable
1. Pull the cable off the reel to the desired length and cut the total length of wire segments
between a PC and a hub or between two PC’s cannot exceed 100 Meters (328 feet or
about the length of a football field) for 100BASE-TX and 300 Meters for 100BASE-T.
2. Strip one end of the cable with the stripper or a knife and diags. If you are using the
stripper, place the cable in the groove on the blade (left) side of the stripper and align the
end of the cable with the right side of the stripper. This will strip about ½” of the jacket
off the cable. Turn the stripper about 1 ¼ turn and pull. If you turn it more, you will
probably nick the wires. If you are using knife and diags, carefully slit the cable for about
an inch or so and neatly trim around the circumference of the cable with diags to remove
the jacket.
3. Inspect the wires for nicks. Cut off the end and start over if you see any. You may have to
adjust the blade with the screw at the front stripper. Cable diameters and jacket
thicknesses vary.
4. Spread and arrange the pairs roughly in the order of the desired cable end.
5. Untwist the pairs and arrange the wires in the order of the desired cable end. Flatten the
end between your thumb and forefinger. Trim the ends of the wires so they are even with
one another.
It is very important that the unstripped (untwisted) end be slightly less than
½” long. If it is longer than ½” it will be out-of-spec and susceptible to
crosstalk. If it is less than ½” it will not be properly clinched when RJ-45
plug is crimped on. Flatten again. There should be little or no space
between the wires.
6. Hold the RJ-45 plug with the clip facing down or away from you. Push the
wire firmly into the plug. Now, inspect before crimping and wasting the
plug! Looking through the bottom of the plug, the wire on the far-left side
will have a white background. The wires should alternative light and dark
from left to right. The furthest right wire is brown. The wires should all end
evenly at the front of the plug. The jacket should end just about where you
see it in the diagram-right on the line.
Figure 1.10:
ALL ABOUT CRIMPING
7. Hold the wire near the RJ-45 plug with the clip down and firmly push it into the left side
of the front of the Crimper (it will only go in one way). Hold the wire in place and
squeeze the crimper handles quite firmly. This is what will happen:
5
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
8. Test the crimp… if done properly an average person will not be able to pull the plug off
the cable with his or her bare hands. And that quite simply, besides lower cost, is the
primary advantage of twisted-pair cables over the older thin wire, coaxial cables. In fact,
the ease of installation and the modular RJ-45 plug is the main reason coaxial cable is no
longer widely used for small Ethernet. But, don’t pull that hard on the plug. It could
stretch the cable and change its characteristics. Look at the side of the plug and see if it
looks like the diagram and give it a fairly firm tug to make sure it is crimped well.
9. Prepare the other end of the cable so it has the desired end and crimp.
10. If both ends of the cable are within reach, hold them next to each other and with RJ-45
clips facing away. Look through the bottom of the plugs. If the plugs are wired correctly,
and they are identical, it is a straight-through cable. If they are wired correctly and they
are different, it is a crossover cable.
PRECAUTIONS
1. Try to avoid running cables parallel to power cables.
2. If you bundle a group of cables together with cable ties (zip ties), do not over-clinch
them. It’s okay to snug them together firmly; but don’t tighten them so much that you
deform the cables.
3. Keep cables away from devices which can introduce noise into them. Here’s a short list:
electric heaters, loud speakers, printers, TV sets, fluorescent light, copiers, welding
machines, microwave ovens, telephones, fans, elevator motors, electric ovens, dryers,
washing machines, and shop equipment.
4. Avoid stretching UTP cables (the force should not exceed 24 LBS).
5. Do not use a stapler to secure UTP cables. Use telephone wire hangers, which are
available at most hardware stores.
6
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
EXERCISES
1. Give the reason why it is not advisable to bend UTP cables more than four times the
diameter of the cable.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
__________________________________________________________________________
7
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 02
OBJECT:
THEORY:
IP ADDRESS & SUBNET MASK
An IP address consists of two parts, one identifying the network and one identifying the
node. The class of the address determines which part belongs to the network address which
part belongs to the node address.
A Subnet mask is a 32-bit number that masks an IP address, and divides the IP address into
network address and host address. Subnet Mask is made by setting network bits to all "1"s
and setting host bits to all "0"
An IP address has two components, the network address and host address (<network><host>)
A Subnet mask is a 32-bit number that masks an IP address, and divides the IP address into
network address and host address. Subnet Mask is made by setting network bits to all "1"s
and setting host bits to all "0"s.
CLASSFUL ADDRESSING
IPv4 addressing used the concept of classes. This architecture is called classful addressing.
The address space is divided into five classes: A, B, C, D, and E. Each class occupies some
8
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
We can find the class of an address when given the address in binary notation or dotted-
decimal notation. If the address is given in binary notation, the first few bits can immediately
tell us the class of the address. If the address is given in decimal-dotted notation, the first byte
defines the class.
• An IP address such as 176.10.0.0 that has all binary 0s in the host bit positions is
reserved for the network address.
• An IP address such as 176.10.255.255 that has all binary 1s in the host bit positions is
reserved for the broadcast address.
SUB-NETTING
To create a subnet address, a network administrator borrows bits from the original host
portion and designates them as the subnet field.
9
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
What are the valid subnets? 256 – Subnet mask = block size, or increment number. An
example would be 256 – 192 = 64. The block size of a 192 mask is always 64. Start
counting at zero in blocks of 64 until you reach the subnet mask value and these are your
subnets. 0, 64, 128, 192.
What’s the broadcast address for each subnet? Since we counted our subnets in the last
section as 0, 64, 128, and 192, the broadcast address is always the number right before the
next subnet. For example, the 0 subnet has a broadcast address of 63 because the next
subnet is 64. The 64 subnet has a broadcast address of 127 because the next subnet is 128,
etc. The broadcast of the last subnet is always 255 for Class C.
What are the valid hosts? Valid hosts are the numbers between the subnets, omitting all the
0s and all 1s. For example, if 64 is the subnet number and 127 is the broadcast address, then
65– 126 is the valid host range—it’s always the numbers between the subnet address and the
broadcast address.
EXERCISE:
10
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
2. Subnets the following addresses and verify your results using any online IPv4
Addressing & Sub-netting Calculator and attach their screen shots.
a. 192.168.10.0 (/26)
b. 192.168.10.0 (/27)
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
_________________________________________________________________________
11
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 03
OBJECT:
THEORY
Sub-netting Class B Addresses
rd th
Binary (3 and 4 Octet) Decimal (All Octets) CIDR (Classless Inter-Domain
Routing) or slash notation
10000000 00000000 255.255.128.0 /17
Then determine all the parameters discussed in Lab 02 in Sub-netting Class C Address
section.
Note that the Class A addresses can be sub-netted in the same way as for Class C & B.
However, in that case we have sub-netting possible in 3 octets as opposed to 1 or 2
subnets as in Class C or B respectively.
12
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Variable Length Subnet Masking (VLSM) is a way of further sub-netting a subnet. Using
Variable Length Subnet Masking (VLSM) we can allocate IP addresses to the subnets by the
exact need (in the power f 2).
Variable Length Subnet Masking (VLSM) allows us to use more than one subnet mask
within the same network address space.
If we recollect from the previous lessons, we can divide a network only into subnets with
equal number of IP addresses. Variable Length Subnet Masking (VLSM) allows creating
subnets from a single network with unequal number of IP addresses.
Example: We want to divide 192.168.10.0, which is a Class C network, into four networks,
each with unequal number of IP address requirements as shown below.
Subnet A : 126 IP Addresses
Subnet B : 62 IP Addresses
Subnet C : 30 IP Addresses
Subnet D : 30 IP Addresses
Divide the two networks equally with 128 IPv4 addresses (126 usable IPv4 addresses) in each network
using 255.255.255.128 subnet mask (192.168.10.0/25).
We will get two subnets each with 128 IPv4 addresses (126 usable IPv4 addresses).
11000000.10101000.00001010.00000000
11111111.11111111.11111111.10000000
11000000.10101000.00001010.10000000
11111111.11111111.11111111.10000000
Divide second subnet (192.168.10.128/25) we got from the first division again into two Networks, each
with 64 IP Addresses (62 usable IPv4 addresses) using 255.255.255.192 subnet mask.
We will get two subnets each with 64 IPv4 addresses (62 usable IPv4 addresses).
13
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
2) 192.168.10.192/26
11000000.10101000.00001010.11000000
11111111.11111111.11111111.11000000
Divide 192.168.10.192/26 Network again into two Networks, each with 32 IPv4 addresses (30 usable IPv4
addresses) using 255.255.255.224 subnet mask
We will get two subnets each with 32 IPv4 addresses (30 usable IPv4 addresses).
11000000.10101000.00001010.11000000
11111111.11111111.11111111.11100000
11000000.10101000.00001010.11100000
11111111.11111111.11111111.11100000
Now we have split the 192.168.10.0/24 network into four subnets using Variable Length Subnet Masking
(VLSM), with unequal number of IPv4 addresses as shown below. Also note that when you divide a
network using Variable Length Subnet Masking (VLSM), the subnet masks are also different.
1) 192.168.10.0 255.255.255.128 (126 (128-2) IP v4 Addresses)
2) 192.168.10.128 255.255.255.192 (62 (64-2) IP v4 Addresses)
3) 192.168.10.192 255.255.255.224 (30 (32-2) IP v4 Addresses)
4) 192.168.10.224 255.255.255.224 (30 (32-2) IP v4 Addresses)
EXERCISES
1. Subnets the following addresses and verify your results using any onlineIPv4
Addressing & Sub-netting Calculator and attach their screen shots.
a. 172.16.0.0 (/19)
b. 10.0.0.0 (/10)
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
14
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
2. Given a Class C network address 192.168.10.0 (/24). Divide it into three sub-
networks each with unequal number of hosts’ requirement as shown below:
Subnet A: 90 Hosts, Subnet B: 23 Hosts, Subnet C: 7 Hosts.
Summarize the results in a table. (For each subnet, list required hosts, possible hosts
and N/W Address)
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
15
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
16
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 04
OBJECT:
Practicing some basic Network Commands and Network Configuration Commands using
command prompt and packet tracer
THEORY:
ipconfig:
ping:
traceroute:
traceroute is a command-line tool included with Windows and other operating systems.
Along with the ping command, it’s an important tool for understanding Internet connection
problems, including packet loss and high latency.
If you’re having trouble connecting to a website, traceroute can tell you where the problem
is. It can also help visualize the path traffic takes between your computer and a web server.
nslookup:
Cisco routers support different modes of operation. When you access a router, it will
typically be in the “user mode”. User mode gives a user access to simple “show
commands.” From user mode the next step is “Privileged mode.” In the “Privileged
mode” a user can have full access to all the databases maintained by the router.
Configuration Mode in which we can configure the router Cisco routers use many other
modes, but let us keep it simple for now.
User mode is identified by prompt ending with “>” to switch to privileged mode type “
“enable” the prompt should end with # e.g. Router#
17
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
You will be able to learn the basic commands for configuring a router.
sh running-config - details the running configuration file (RAM)
sh startup-config - displays the configuration stored in NVRAM
setup - Will start the automatic setup; the same as when you first boot the router
config t - use to execute configuration commands from the terminal
config mem - executes configuration commands stored in NVRAM; copies startup-config
to running-config
config net - used to retrieve configuration info from a TFTP server
copy running-config startup-config - copies saved config in running config (RAM) to
NVRAM or "write memory" for IOS under ver.11
copy startup-config running-config - copies from non-volatile (NVRAM) to current
running config (RAM)
boot system flash <put file filename here> - tells router which IOS file in flash to boot
from
boot system tftp - tells router which IOS file on the tftp server to boot from
boot system rom - tell router to boot from ROM at next boot
copy flash tftp - Copies flash to tftp server
copy tftp flash - Restores flash from tftp server
copy run tftp - Copies the current running-config to tftp server
copy tftp run - Restores the running-config from tftp server
General Commands
Here is a list of the general commands. These are the basic level commands and most
commonly used
no shutdown - (enables the interface)
reload - restarts the router
sh ver - Cisco IOS version, uptime of router, how the router started, where system was
loaded from, the interfaces the POST found, and the configuration register
sh clock - shows date and time on router
sh history - shows the history of your commands
sh debug - shows all debugging that is currently enabled
no debug all - turns off all debugging
sh users - shows users connected to router
sh protocols - shows which protocols are configured
banner motd # Your customized message here # - Set/change banner
hostname <give router name> - use to configure the hostname of the router
clear counters - clear interface counters
By these command you can see the statistics and different processes of the router.
sh processes - shows active processes running on router
sh process cpu - shows cpu statistics
sh mem - shows memory statistics
sh flash - describes the flash memory and displays the size of files and the amount of free
flash memory
sh buffers - displays statistics for router buffer pools; shows the size of the Small, Middle,
Big, Very Big, Large and Huge Buffers
sh stacks - shows reason for last reboot, monitors the stack use of processes and interrupts
routines
IP Commands
Other IP Commands:
19
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
CDP Commands (Cisco Discovery Protocol uses layer 2 multicast over a SNAP-capable
link to send data):
IPX Commands
Other Commands:
Routing Protocols:
RIP, IGPR and OSPF are the routing protocols and here is a list of the commands for the
working on the routing protocols.
Configure RIP:
router rip
network 157.89.0.0
network 208.1.1.0
Other RIP Commands:
debug ip rip - view RIP debugging info
Configure IGRP:
router IGRP 200
network 157.89.0.0
network 208.1.1.0
Other IGRP Commands:
debug ip igrp events - view IGRP debugging info
debug ip igrp transactions - view IGRP debugging info
Access Lists
Here is a list of the Access list command of a router.
sh ip int ser 0 - use to view which IP access lists are applies to which int
sh ipx int ser 0 - use to view which IPX access lists are applies to which int
20
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
sh appletalk int ser 0 - use to view which AppleTalk access lists are applies to which int
View access lists:
sh access-lists
sh ip access-lists
sh ipx access-lists
sh appletalk access-lists
Apply standard IP access list to int eth 0:
access-list 1 deny 200.1.1.0 0.0.0.255
access-list 1 permit any
int eth 0
ip access-group 1 in
Apply Extended IP access list to int eth 0:
access-list 100 deny tcp host 1.1.1.1 host 2.2.2.2 eq 23
access-list 100 deny tcp 3.3.3.0 0.0.0.255 any eq 80
int eth 0
ip access-group 100 out
Apply Standard IPX access list to int eth 0:
access-list 800 deny 7a 8000
access-list 800 permit -1
int eth 0
ipx access-group 800 out
Apply Standard IPX access list to int eth 0:
access-list 900 deny sap any 3378 -1
access-list 900 permit sap any all -1
int eth 0
ipx access-group 900 out
EXERCISES
1. Using traceroute command find the engineering universities of Pakistan that are
on same network
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
____________________________________
2. Using ipconfig command find the ip of your system and its gateway
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
21
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
22
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 05
OBJECT
THEORY
Routed & Routing Protocols
• A Routed Protocol is a protocol by which data can be routed. Routed protocols are
IP, AppleTalk, and IPX. In this kind of protocols we require an addressing scheme
and sub netting. Addressing scheme will be used to determine the network to which a
host belongs and to identifying that host on that particular network. All hosts on an
internetwork use the services of a routed protocol.
• A Routing Protocol is different and is only used between routers. It makes possible
for routers to build and maintain routing tables. There are three classes of routing
protocols-
1) Distance Vector,
2) Link State,
3) Hybrid
The simplest method to route packets on a network is static routes. Although dynamic
routing protocols are flexible and adjust to network changes, they do have associated
network traffic which competes for network bandwidth with the user data traffic.
Static routes specify a fixed route for a certain destination network. They need to be
configured on any router that needs to reach a network that it is not directly connected to.
23
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
The IOS command used to configure static routes is ip route. The syntax is:
• destination-address is the destination address prefix for the network that we would
like the router to reach
• subnet-mask is the subnet mask to be used on the address prefix to match for
destination addresses. Multiple networks may be combined such that the destination-
address and subnet-mask combination matches all hosts on those networks.
• ip-address specifies what ip address to forward a packet to if an IP packet arrives
with a destination address that matches the destination-address subnet-mask pair
specified in this command.
• Alternatively outgoing-interface specifies which interface the packet should be sent
out of. Adding a static route to an Ethernet or other broadcast interface (for example,
ip route 0.0.0.0 0.0.0.0 Ethernet 1/2) will cause the route to be
inserted into the routing table only when the interface is up. This configuration is not
generally recommended. When the next hop of a static route points to an interface,
the router considers each of the hosts within the range of the route to be directly
connected through that interface, and therefore it will send ARP requests to any
destination addresses that route through the static route.
• distance is the optional administrative distance value for the route. If unspecified the
default value is 1.
• tag value can be used as a "match" value for controlling redistribution via route maps.
• permanenet specifies that the route will not be removed even if the interface shuts
down.
DTE/DCE
DCE and DTE are the interfaces. The DCE-DTE connection between routers is referred to as
a null serial cable DCE(data communication equipment) and DTE (Data terminal
equipment). DCE is located at the service provider end while the DTE is attached device.
The services that are given to the DTE is often accessed via modems or channel service
unit/data service unit(CSU/DSU). DCE provides clocking and DTE receives the clock
PROCEDURE
1. Connect the network as shown in the network diagram.
2. Configure appropriate ip addresses and clock rates(if needed) on the router interfaces
as specified in the network diagram.
24
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
4. On R2 enter:
ip route 172.16.10.0 255.255.255.0 192.168.10.1
ip route 172.16.20.0 255.255.255.0 192.168.20.2
5. On R3 enter:
ip route 172.16.10.0 255.255.255.0 192.168.20.1
ip route 192.168.10.0 255.255.255.0 192.168.20.1
6. After that verify the static routes by entering the following commands in the privilege
mode:
router# sh ip route
EXERCISES
1. Run the command show IP route and write its output.
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
2. What is the default administrative distance of static route? Write the IP route
command to modify the same.
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
25
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
3. Create a loop back interface on R3 and assign an IP address 10.1.0.1 /16 to it. Now
add static routes to each of the other routers to reach this interface. Verify your
work by pinging the newly created interface from routers R1 and R2 respectively.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
26
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 06
OBJECT:
• Broadcast their entire routing table to each neighbor router at predetermined intervals
• The actual interval depends on the distance-vector routing protocol in use
• Varies between 30 and 90 seconds
• Sometimes referred to as routing by rumor
• Suffer from slow time to convergence
• Convergence is an state where all routers on the internetwork share a common view
of the internetwork routes
A distance-vector protocol, RIP was designed to work with small to medium-sized networks.
RIP is an Interior Gateway Protocol (IGP), meaning it is used within an autonomous system.
An autonomous system is a collection of networks under a single administration, sharing a
common routing strategy.
RIP is easy to implement, compared to newer IGPs, and has been implemented in networks
around the world. Advantage of using RIP, especially in small networks, is that there is very
little overhead, in terms of bandwidth used and configuration and management time.
RIP Timers
RIP uses timers both to regulate its performance and to help prevent routing loops. All
routers that use RIP send an update message to all of their neighbors approximately every 30
seconds; this process is termed advertising. The Cisco implementation sends updates every
30 seconds minus up to 15 percent, or 4.5 seconds.
If a neighbor has not responded in 180 seconds, it is assumed that the neighboring router is
27
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
unavailable or the network connecting it to the router has become unusable. When the
neighbor has not responded for 180 seconds, the route is marked invalid; 180 seconds is long
enough that a route won't be invalidated by a single missed update message. The neighbor is
shown to be unreachable by sending a normal update message with a metric of "infinity;" in
the case of RIP, this number is 16. If an advertisement is received from a neighbor with a
metric of infinity, then the route is placed into hold-down state, advertised with a distance of
16, and kept in the routing table. No updates from other neighbors for the same route are
accepted while the route is in hold-down state. If other neighbors are still advertising the
same route when the hold-down timer expires, then their updates will then be accepted. The
route will be advertised with infinity metric for a period of time after the hold-down state if
no alternate paths are found.
The actual timers used to accomplish the above tasks are a routing-update timer, a route-
invalid timer, a route-hold-down timer, and a route-flush timer. The RIP routing-update timer
is generally set to 30 seconds, ensuring that each router will send a complete copy of its
routing table to all neighbors every 30 seconds. The route-invalid timer determines how
much time must expire without a router having heard about a particular route before that
route is considered invalid. When a route is marked invalid or put in hold-down state,
neighbors are notified of this fact. This notification must occur prior to expiration of the
route-flush timer. When the route flush-timer expires, the route is removed from the routing
table. Typical initial values for these timers are 180 seconds for the route-invalid and route-
holddown timers and 240 seconds for the route-flush timer. The values for each of these
timers can be adjusted with the timers basic router configuration command.
To adjust for rapid network-topology changes, RIP specifies numerous stability features that
are common to many routing protocols. RIP implements split horizon with poison-reverse
and hold-down mechanisms to prevent incorrect routing information from being propagated.
Split horizon prevents incorrect messages from being propagated by not advertising routes
over an interface that the router is using to reach the route. Implementing split horizon helps
avoid routing loops. Poison reverse operates by advertising routes that are unreachable with a
metric of infinity back to the original source of the route. Hold-down is a method of marking
routes invalid (expired). As discussed above, no updates from other neighbors for the same
route are accepted while the route is in hold-down state.
Triggered updates are also an included convergence and stability feature. Updates are
triggered whenever a metric for a route changes. Triggered updates may also contain only
information regarding routes that have changed, unlike scheduled updates.
RIP version 2
RIPv2 is almost the same as the RIP version 1. RIPv2 also sends its complete routing table to
its active interfaces at periodic time intervals. The timers, loop avoidance schemes and
administrative distance are the same as Rip version 1.But RIPv2 is considered classless
routing protocol because it also sends subnet information’s with each router. It also allows
authentication using MD5 encryption scheme. And it also supports dis-contiguous networks.
Configuring RIP version 2 on a router is very simple; it just requires one additional
command
28
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
PROCEDURE
Configuring RIP
2. Assign the IP address as shown in the diagram to the appropriate interfaces. For the
serial links, has been used to indicate a DCE port.
3. Issue RIP routing commands on all the routers starting from the global config mode.
4. On R1:
router rip
network 172.16.10.0
network 192.168.10.0
On R2
router rip
network 192.168.10.0
network 192.168.20.0
On R 3
router rip
network 10.0.0.0
network 192.168.20.0
5. To verify the working of RIP ping one host, say H2, on LAN connected to R3 from
the host, say H1, on LAN connected to R1. Also run some other debugging command
to explore more.
EXERCISES
1. Configure RIP on all three routers, note down routing table of router R1, and run
command Debug ip rip to note the address on which updates are sent.
___________________________________________________________________________
___________________________________________________________________________
29
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
3. Repeat exercise #1 for RIPv2 and note down the multicast address on which RIPv2
forwards the updates.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
30
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
4. Write down the source IP address for the ping packets when you ping H1 from R1.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
5. While working on R1, how could you check if H1 can reach the loopback interface?
In other words, how can you verify if a ping from H1 to loopback of R1 is
successful?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
31
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
32
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 07
OBJECT:
THEORY
Open Shortest Path First (OSPF) was developed by the Internet Engineering Task Force
(IETF) as a replacement for the problematic RIP and is now the IETF-recommended Interior
Gateway Protocol (IGP). OSPF is a link state protocol that, as the name implies, uses
Dijkstra's Shortest Path First (SPF) algorithm. It is an open standards protocol—that is, it isn't
proprietary to any vendor or organization. Link-state routing protocols perform the following
functions:
Like all link state protocols, OSPF's major advantages over distance vector protocols are fast
convergence, support for much larger internetworks, and less susceptibility to bad routing
information. Other features of OSPF are:
• The use of areas, which reduces the protocol's impact on CPU and memory, contains
the flow of routing protocol traffic, and makes possible the construction of
hierarchical internetwork topologies
• Fully classless behavior, eliminating such class-full problems as dis-contiguous
subnets. Support of classless route table lookups, VLSM, and super-netting for
efficient address management
• A dimensionless, arbitrary metric
.
• Equal-cost load balancing for more efficient use of multiple paths
• Support of authentication for more secure routing
• The use of route tagging for the tracking of external routes
33
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Characteristics of OSPF
Characteristic OSPF
Convergence Fast
DR and BDR
DR (Designated Routers)
• To represent the multi-access network and its attached routers to the rest of the
internetwork
• To manage the flooding process on the multi-access network.
• The concept behind the DR is that the network itself is considered a "pseudo node,"
or a virtual router. Each router on the network forms an adjacency with the DR which
represents the pseudo-node. Only the DR will send LSAs to the rest of the
internetwork.
Note: router might be a DR on one of its attached multi-access networks, and it might not be
the DR on another of its attached multi-access networks. In other words, the DR is a property
of a router's interface, not the entire router.
34
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
A Backup Designated Router (BDR) is a hot standby for the DR on multi-access links. The
BDR receives all routing updates from OSPF adjacent routers but doesn’t flood LSA updates.
Note: if the router interface priority value is set to zero then that router won’t participate in
the DR or BDR elections on that interface.
After assigning ip addresses to interfaces of the routers the following IP Routing commands
of OSPF on each other will be given as below.
Router A:
Router_A#config t
Router_A(config)#router ospf 1
Router_A(config-router)#network 192.168.10.64 0.0.0.7 area 0
Router_A(config-router)#network 10.255.255.80 0.0.0.3 area 0
The Router_A is using a /29 or 255.255.255.248 mask on the fa0/0 interface. This
is a block size of 8, which is a wildcard of 7. The s0/0 interface is a mask of 255.255.255.252
block size of 4, with a wildcard of 3. Similarly the other subnet ,mask, and wildcard can be
determined by looking
at the IP address of an interface.
Router B:
Router_B#config t
Router_B(config)#router ospf 1
Router_B(config-router)#network 10.255.255.80 0.0.0.3 area 0
Router_B(config-router)#network 10.255.255.8 0.0.0.3 area 0
Router C:
Router_C#config t
Router_C(config)#router ospf 1
Router_C(config-router)#network 192.168.10.16 0.0.0.7 area 0
Router_C(config-router)#network 10.255.255.8 0.0.0.3 area 0
35
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
EXERCISES
1. Router 1:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
2. Router 2
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
3. Router 3
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
36
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 08
OBJECT
THEORY
Configuring EIGRP
Lets view the topology
Router1 Router2
PC2
PC1
172.16.32.2/24 172.16.16.2/24
37
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
To start EIGRP process on both routers the following configurations will be done.
Router1(config)#router eigrp 1
Router1(config-router)#network 172.16.64.0 0.0.0.255
Router1(config-router)#network 172.16.32.0 0.0.0.255
Router1(config-router)#exit
Router2(config)#router eigrp 1
Router2(config-router)#network 172.16.64.0 0.0.0.255
Router2(config-router)#network 172.16.64.0 0.0.0.255
Router2(config-router)#network 172.16.16.0 0.0.0.255
Router2(config-router)#exit
Router1#sh ip route
PC1>ping 172.16.16.2
39
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
P 172.16.64.0/24, 1 successors, FD is
20512000 via Connected, Serial2/0
P 172.16.16.0/24, 1 successors, FD is 28160
EXERCISES
1. What four routed protocols are supported by EIGRP?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
40
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 9
OBJECT:
THEORY:
LAN switch performs 3 operations
- Address learning
- Forward filter decision
- Loop avoidance
In this session, we will explore how an Ethernet switch learns addresses of the attached hosts.
Address learning
A new switch has empty MAC address table. As each frame transits switch, it learns source
MAC address against the source port. As the switch does not know to which port the
destination is attached, it initially transmits the frame to all ports. This process is called
flooding. As the responses are received, the MAC address table is further populated.
PROCEDURE:
Consider the following scenario
Switch#sh mac-address-table
Switch#
Switch#sh mac-address-table
Now as any of the computers generates ping for any of the remaining computers, the
MAC address table will grow
Switch#sh mac-address-table
switch#sh mac-address-table
42
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
EXERCISE:
1. If a destination MAC address is not in the forward/filter table, what will the switch
do with the frame?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
2. If a frame is received on a switch port and the source MAC address is not in the
forward/filter table, what will the switch do?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
43
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 10
OBJECT:
THEORY:
An access list is essentially a list of conditions that categorize packets. One of the most
common and easiest to understand uses of access lists is filtering unwanted packets when
implementing security policies. Access lists can even be used in situations that don’t
necessarily involve blocking packets.
There are a few important rules that a packet follows when it’s being compared with an
access list:
Rule#1: It’s always compared with each line of the access list in sequential order—that is,
it’ll always start with the first line of the access list, then go to line 2, then line 3, and so on.
Rule#2: It’s compared with lines of the access list only until a match is made. Once the
packet matches the condition on a line of the access list, the packet is acted upon and no
further comparisons take place.
Rule#3: There is an implicit “deny” at the end of each access list—this means that if a packet
doesn’t match the condition on any of the lines in the access list, the packet will be discarded.
Each of these rules has some powerful implications when filtering IP packets with access
lists, so keep in mind that creating effective access lists truly takes some practice.
The above commands will permit the network 172.16.0.0 only and will block other network
through the router on its ethernet interfaces in its out side directions
Extended access lists can evaluate many of the other fields in the layer 3 and layer 4 headers
of an IP packet. They can evaluate source and destination IP addresses, the protocol field in
the Network layer header, and the port number at the Transport layer header. This gives
extended access lists the ability to make much more granular decisions when controlling
traffic.
45
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
EXERCISE:
Give commands to enable logging for the given access list and to show the entries that
have been blocked
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
46
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 11
OBJECT:
Introduction to Network Management Tools. Learn how Networks can be managed using
these tools.
THEORY:
Network management refers to the activities, methods, procedures, and tools that can be used
for maintaining following three operations on a network.
(i) Operation deals with keeping the network (and the services that the network provides) up
and running smoothly. It includes monitoring the network to spot problems as soon as
possible, ideally before a user is affected.
(ii) Administration involves keeping track of resources in the network and how they are
assigned. It deals with all the “housekeeping” that is necessary to keep things under
control.
(iii) Maintenance is concerned with performing repairs and upgrades—for example, when a
line card must be replaced, when a router needs a new operating system image with a
patch, when a new switch is added to the network. Maintenance also involves corrective
and preventive proactive measures such as adjusting device parameters as needed to make
the managed network run “better.”
(iv) Provisioning is concerned with configuring resources in the network to support a given
service. For example, this might include setting up the network so that a new customer can
receive voice service.
Network Management Tools: There are plenty of Tools that can be used for Network
Management. A few of them are described below;
PROCEDURE:
We will use LANSTATE tool to demonstrate how a network manager discovers a network
and creates/maintains a graphical view of its network in a single window. Open LANSTATE
software. Run “Map Creation Wizard” from File menue. A window will appear as shown
below,
48
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Enter the IP Address range of you target network to be discovered and click next to get
following window
Now clicking Next button will result in start of network discovery process as shown below,
50
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Now open the PowerSnmp from start menu. You should get a window like below,
Go to Discover →SNMP Agents to obtain the following window, In the address bar you can
specify the target network to be discovered or use the default broadcast address and press
find. Based on the SNMP community (public and NED) set in the properties clients with
SNMP agent enabled will be discovered. Add these discovered clients to obtain the below
window,
Now select the parameter of sysDescr from the SNMP MIT shown in the rightest window
and select any discovered agent from left most window, right click on it and select query, a
windows will pop up in which press query button again to obtain the below window .You can
see that it has returned the complete description of the selected client. You can similarly any
of the supported parameter in the SNMP MIT.
Now select any of the SNMP agent and select the sysUptime parameter from MIT and select
the add watch option from the right click options on the selected agent.
EXERCISE:
1) Design a network in packet tracer 5.3. Add a server to the network and configure HTTP
service on it. Use this service from any client in the network.
2) Using LANSTATE discover a network (preferably your home network if applicable) and
export the discovered network to Microsoft Visio.
52
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 12
OBJECT:
Introduction to WireShark (Network Protocol Analyzer /Packet Sniffer) and Live network
monitoring
THEORY
A better way to understand network protocols is to observe how they actually work. A basic
tool for observing the messages exchanged between executing protocol entities is the packet
sniffer, which is an essential part of network protocol analyzer. WireShark is a free and open-
source network protocol analyzer that runs on various operating systems including Linux,
Unix, Mac, and Windows.
WireShark:
WireShark (previously called Ethereal) is one of the most widely used network protocol
analyzer. It passively sniffs packets that are sent from or received by a designated network
interface, but never sends packets itself. It receives a copy of packets that are sent from or
received by the applications and protocols executing on the end-system (e.g., your computer).
WireShark also has a graphical front-end to display the packets that it sniffs.
Figure 12.1. shows the structure of a network protocol analyzer. At the right of the figure
shows the protocol stack and applications (such as a web browser or an FTP client) that
normally run on your computer. The network protocol analyzer, shown within the dashed
rectangle, has two parts, the packet capture and the packet analyzer. The packet capture
library receives a copy of every link-layer frame that is sent from or received by a designated
network interface. The messages exchanged by higher layer protocols such as HTTP, FTP,
TCP, UDP, DNS, or IP all are eventually encapsulated in link-layer frames that are
53
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
transmitted over physical media such as an Ethernet cable. In Figure 12.1 the assumed
physical media is an Ethernet, and so all upper layer protocols’ headers are eventually
encapsulated within an Ethernet frame. Capturing all link-layer frames thus gives you all
messages sent from or received by all protocols and applications executing in your computer.
The second component is the packet analyzer, which displays the contents of all fields within
a link-layer frame. In order to do so, the packet analyzer must understand the structure of
messages exchanged by the protocols. For example, we are interested in displaying the
various fields in messages exchanged by the HTTP protocol in Figure 12.1. The packet
analyzer understands the format of Ethernet frames, and so it can identify the IP datagram
within an Ethernet frame. It also understands the IP datagram format, so it can extract the
TCP segment within the IP datagram. It understands the TCP segment structure, so it can
extract the HTTP message contained in the TCP segment. Finally, it understands the HTTP
protocol and so, for example, knows that an HTTP message may contain the string of “GET”,
“POST” or “HEAD”.
Layered Protocol:
Two reference models are used to describe the network architecture, the OSI/ISO reference
model and the TCP/IP reference model. The OSI/ISO model divides the network into seven
layers and the TCP/IP model divides the network into four layers. No matter which model is
used, the basic principle of the layered architecture is that each layer performs some services
for the layer above it.
PROCEDURE
Installation
WireShark is free to download at http://www.wireshark.org/. How to build and install
WireShark onto machines first consult the WireShark User's Guide, the WireShark
Developers Guide and the various README files provided with WireShark.
Starting WireShark
When you run WireShark, you will see the graphical user interface (GUI) as shown in Figure
12.2. There are four main fields:
a. Filter field: Used to filter out uninteresting packets with the entered specifications, so
you can choose which packets should (not) be shown on the screen;
b. Captured packets: Lists the packets captured by the selected interface;
c. Details of selected packet: Lists information about the packet that is selected in the
captured packets window;
d. Content of packet in hex/ASCII: Displays the content of the captured packet, in hex
and ASCII.
54
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Capture Trace
Use the following procedure to capture the trace:
a. Pick a URL and fetch it through web browser. For example, open a new window of
your browser and type https://www.google.com.pk.
b. Close web browser. By minimizing browser activity you will stop your computer
from fetching unnecessary web content, and avoid incidental traffic in the trace.
c. Now launch Wireshark. Choose the network interface that we would like to capture
the packets on. To do this, select “Capture options” from the command menu. Select
the interface you are using. Uncheck “Capture packets in promiscuous mode”. This
mode is useful to overhear packets sent to/from other computers on broadcast
networks. We only want to record packets sent to/from your computer. See figure
12.3
d. Use capture filter “tcp port 80”. This filter will record only standard web traffic and
not other kinds of packets that your computer may send. Click “Start” to start the
packet capture process.
e. When the capture is started, repeat the web fetch using web browser. This time, the
packets will be recorded by Wireshark as the content is transferred.
f. After the fetch is successful, return to Wireshark and use the menus or buttons to stop
the trace (“Capture Stop”). If you have succeeded, the upper Wireshark window will
show multiple packets. How many packets being captured will depend on the size of
the web page. An example is shown in Figure 12.4
55
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Layered Protocol
By inspecting the captured trace, we can understand the layered protocol.
a. Select an HTTP GET packet. This packet carries the HTTP request sent from your
computer to the server.
b. HTTP is the application layer web protocol used to fetch URLs. It runs on top of the
TCP/IP transport and network layer protocols. The link layer protocol shown in the
figure is Ethernet. It may be other protocol, depends on your network.
c. Click on one HTTP packet, and turn to the middle panel with details of the packet. The
first block is “Frame”. This is a record that describes overall information about the
packet, including when it was captured and how many bits long it is.
d. The second block is “Ethernet” (You may have taken trace in a computer with 802.11,
but still you will see an Ethernet block. This is because Wireshark capture traffic in
Ethernet format determined on the capture options. See Link-layer header type.).
e. Then we can see IP, TCP, and HTTP. This is a bottom-up order, because as packets are
passed down the protocol stack, the header of the lower layer protocol is added to the
front of the information from the higher layer protocol. That is, the lower layer
protocols come first in the packet.
56
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
When an Ethernet frame arrives at a computer, the Ethernet layer must hand the packet that it
contains to the next higher layer to be processed. In order to do this, the protocol use
information in its header to determine the higher layer data unit encapsulated.
EXERCISE:
Capture a SNMP packet using Wireshark and record your observation.
57
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 13
OBJECT:
THEORY
Short for Network Management System, NMS is a computer that has been setup to monitor
and/or manage a Data/voice network and the devices contained in that network. Network
management refers to the activities, methods, procedures, and tools that pertain to the
operation, administration, maintenance, and provisioning of networked systems.
SNMP exposes management data in the form of variables on the managed systems, which
describe the system configuration. These variables can then be queried (and sometimes set)
by managing applications.
In typical SNMP use, one or more administrative computers have the task of monitoring or
managing a group of hosts or devices on a computer network. Each managed system (also
called Slave) executes, at all times, a software component called an agent (see below) which
reports information via SNMP to the managing systems (also called Masters).
Essentially, SNMP agents expose management data on the managed systems as variables
(such as "free memory", "system name", "number of running processes", "default route").
But the protocol also permits active management tasks, such as modifying and applying a
new configuration. The managing system can retrieve the information through the GET,
GETNEXT and GETBULK protocol operations or the agent will send data without being
asked using TRAP or INFORM protocol operations. Management systems can also send
configuration updates or controlling requests through the SET protocol operation to actively
manage a system. Configuration and control operations are used only when changes are
needed to the network infrastructure. The monitoring operations are usually performed on a
regular basis.
The variables accessible via SNMP are organized in hierarchies. These hierarchies such as
type and description of the variable are described by Management Information Bases (MIBs).
Typically, SNMP uses UDP ports 161 for the agent and 162 for the manager. The manager
may send requests from any available source port to port 161 in the agent. The agent
response will be sent back to the source port. The manager typically receives notifications on
58
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
port 162. The agent may generate notifications from any available port.
PROCEDURE
We have simple Ethernet connectivity between the two elements with following IPs
assigned:
192.168.10.1 assigned to PC
192.168.10.2 assigned on VLAN1 in Cisco 2950 Switch.
Open the IReasoning MIB Browser on the PC. It should load as shown below;
Ensure that RFC-1213 MIB file is loaded in the left pane. Also go to ‘Advanced ‘Option and
ensure that the SNMP v1 is selected, the Port No is 161 and the community name is ‘public’.
Now go to the CISCO Switch 2950 prompt using Hyper Terminal and type following
commands to configure SNMP on the Switch:
59
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
Switch#conf t
Switch(config)#snmp-server enable
EXERCISE: Observe the different parameters of the managed element being shown
in this Table and write your comments in the result section
60
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 14
OBJECT:
To study the MIB File structure based on RFC-1155 SMI and RFC 1212.
THEORY
Introduction
The MIB are files describing the objects used by the SNMP protocol. The MIB term stands
for Management Information Base because the structure of it is quite similar to a database
description. This is a text file following the ASN1 standard. The RFC 1155 defines writing
rules of the MIB file in SMI V1 and the RFC 1213 contains the object definition that should
be implemented in an agent. MIB are organized in hierarchy that looks like a tree. The
structure of this tree follows standard defined by RFC (Request For Comments). Currently
there are two versions, the SMI V1 and the V2. The MIB tree representation in any MIB
Compiler like LoriotPro with snmp object name and mib file name.
61
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
rfc1155 : Structure and Identification of Management Information for TCP/IP based internets
rfc1156 : Management Information Base Network
rfc1157 : A Simple Network Management Protocol
rfc1441 : Introduction to SNMP v2
rfc2579 : Textual Conventions for SNMP v2
rfc2580 : Conformance Statements for SNMP v2
rfc2578 : Structure of Management Information for SNMP v2
rfc3416 : Protocol Operations for SNMP v2
rfc3417 : Transport Mappings for SNMP v2
rfc3418 : Management Information Base for SNMP v2
rfc3410 : Introduction and Applicability Statements for Internet Standard Management
Framework
rfc3411 : Architecture for Describing SNMP Frameworks
rfc3412 : Message Processing and Dispatching for the SNMP
rfc3413 : SNMP Applications
rfc3414 : User-based Security Model (USM) for SNMP v3
rfc3415 : View-based Access Control Model for the SNMP
rfc3584 : Coexistence between SNMP v1, v2 and v3
Proprietary MIB
The proprietary MIB are attached to the private branch in the MIB tree and are defined and
registered by each constructor. Each constructor should ask for an enterprise number
allowing him to insert his MIB entries in the global tree.
LoriotPro owns the 7291 number and then has its proper MIB file.
iso(1).org(3).dod(6).internet(1).private(4).enterprises.xxx
The assigned number to Cisco MIB is 9 and fit in the tree like shown hereafter:
62
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
The SMI V2 norm defines in the RFC 1902 modifies the syntax of the object definition field.
sysName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-write
STATUS mandatory
DESCRIPTION
"An administratively-assigned name for this managed node. By convention,
this is the node's
fully-qualified domain name."
::= { system 5 }
The Sysname object is attached to the upper tree object System with index number 5. By
taking each consecutive object definition, it is possible to walk the tree up to the root. The
definitions of SNMP objects that are nodes in the tree representation use the keyword
OBJECT IDENTIFIER and not OBJECT-TYPE like leaf objects.
EXERCISE:
You are required to design your own MIB file for a customized information model and
place it as a group in at suitable location in the MIT. Your MIB file should be
successfully loaded with MIB Browser. Attach the screen shot of the loaded MIB file in
IReasoning Mib Browser.
64
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
LAB SESSION 15
OBJECT:
To design a SNMP based managed network in Packet Tracer 5.3 using SNMPv2c and RW
and Read only communities.
PROCEDURE:
Design the following network in the packet Tracer and assign names as shown below.
a. Start the MIB browser from the desktop on MIB_Browser PC. Click the Advanced button
and use the following details:
Address: 192.168.10.2
Port: 161
Read Community: medway-public
Write Community: medway-private
SNMP Version: v3
Select OK
b. Suppose we wanted to view the IOS version on the medway-ME router, we need to select
this parameter from the MIB options.
Expand the MIB tree on the left side of the application to select the node with the name:
65
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
c. Ensure that Get is selected in the Operations field of the MIB browser. Press the GO button
to retrieve the value from the device.
Which version of IOS is running? Verify this directly on the router via the CLI - type show
version at the priv exec prompt.
e. Ensure that Get is selected in the Operations field of the MIB browser. Press the GO button
to retrieve the value from the device.
Setting Variables
Some variables can be set from the management station. These have an Access value of read-
write.
When a piece of managed hardware is installed onto a network, it may be necessary to add
some information peculiar to your organization.
Press GO.
h. Change the operation back to Get and press GO again to verify that the data was set
correctly.
i. Set the .sysLocation node value to ME4 4TB and verify that it has been set correctly.
The Get Bulk command can be used to request several parameters at once instead of
requesting them singly.
66
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
j. Expand the MIB tree on the left side of the application to select the node with the name:
Ensure that Get Bulk is selected in the Operations field of the MIB browser. Press the GO
button to retrieve the values from the device.
Note that now you have received all of the data held under the interfaces branch of the MIB
tree.
How many interfaces are there? Which of the three interfaces is administratively down?
Now click the Advanced button and use the following details:
Address: 192.168.11.2
Port: 161
Read Community: medway-public
Write Community: medway-private
SNMP Version: v3
Select OK
k. Access the .sysLocation node and give this an appropriate value. Remember to use the
OctetString for the Type.
l. Access the .sysContact node and give this an appropriate value. Remember to use the
OctetString for the Type.
m. How many interfaces does this router have in its MIB table under Tree.router_std
MIBs.iso.org.dod.internet.mgmt.mib-2.interfaces
Check the exchange of PDUs via the Simulation tab on Packet Tracer. View the contents of a
request PDU and a Response PDU.
EXERCISE:
Design your own network like above in packet tracer and repeat the above steps.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
67
TC-316 Telecommunication Networks
NED University of Engineering And Technology-Department of Electronic Engineering
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
68