Professional Documents
Culture Documents
MANAGEMENT
★ Course Assessment:
○ Continuous Assessment- 50%
○ Examinations- 50%
★ Core Reading Materials:
○ Oppenheimer, P., 2010. Top-Down Network Design. 3rd ed. Cisco Press.
○ Subramanian, M., 2010. Network Management: Principles and Practice. 2nd ed
melanie_fayne@students.uonbi.ac.ke 1
01: Interconnecting Networks using LAN devices
1. Network segmentation: The act of splitting a network into subnetworks, each being a network segment.
Micro segmentation: The trend towards having fewer users per segment. It allows the creation of private
or dedicated segments—that is, one user per segment.
2. Collision Domain: a network segment with two or more devices sharing the same bandwidth. Breaking up
a collision domain: The act of splitting a large collision domain into smaller ones. This reduces the number
of devices per network segment that must contend for the media/share the same bandwidth hence
increasing the performance of a network significantly. Bridges and switches are used to break up collision
domains.
3. Broadcast domain: describes the extent that a network propagates a broadcast frame generated by a
station. Each sub-network constitutes a separate broadcast domain. All computers on the same network
are on one broadcast domain.; Breaking up a broadcast domain: The act of segmenting/splitting a large
broadcast domain into smaller ones. This limits the extent to which broadcast frames propagate and
creates more bandwidth. Routers by default break up broadcast domains.
4. Half duplex operation: Devices in half duplex mode cannot receive and send information at the same time.
Normally CSMA/CD networks are half-duplex. Full-duplex operations: Devices in full duplex mode can
send and receive information at the same time. Full-duplex operation is possible with switches.
5. Collision-free communication: Communication between network devices that share the same medium but
where collisions do not occur.
6. Mixed configurations: where devices with different modes (e.g. half duplex, full duplex) of operation or
data rates are connected to the same network. Media-rate adaptation/Autonegotiation: it allows two
devices to negotiate the mode or data rate of operation during link initialization. Each device at the end of a
point to point link advertises its capabilities (e.g. 10Base-T, half duplex) to the other device (e.g.
100Base-T, full duplex). Decision on the mode and data rate to use is based on common capabilities. (e.g.
10Base-T, half duplex).
melanie_fayne@students.uonbi.ac.ke 2
Note: Autonegotiation was designed for the following purposes:
● To allow incompatible devices to connect to one another.
● To allow one device to have multiple capabilities
● To allow a station to check a hub’s capabilities.
Sidenotes Introduction
● In virtually all cases there’s a need to expand beyond the confines of a single
LAN, to provide interconnection to other LANs and to the Internet.
● The devices used include repeaters, hubs, bridges, switches and routers.
● These interconnection devices operate in different layers. The layers matter
because different devices use different information to decide how to switch
data from one segment to another.
Repeaters
Note: The 5-4-3 rule
represents the creation
of a single collision ● Repeaters are network devices operating at the physical layer of the OSI model
domain, and the (which means that it does not understand frames, packets or headers).It
numbers are amplifies or regenerates an incoming signal before retransmitting it.
maximums: (5-) no
● They are incorporated in networks to expand its coverage area. They are also
more than five
segments between any known as signal boosters. It enables a series of cable segments to be treated as
two nodes that a single cable (Bus).
melanie_fayne@students.uonbi.ac.ke 3
communicate with each ● Frame transmissions originating from each station propagate the whole
other, (-4-) no more network.
than four repeaters in
those five segments,
and (-3) no more than
three of the five
segments can have
active devices (clients
or servers).
melanie_fayne@students.uonbi.ac.ke 4
thus only one computer frame arrives at a port, it is broadcast to every other port, without considering
can send at any one whether it is destined for a particular destination or not.
time. However the hub ● It has 1 broadcast domain and 1 collision domain. A hub has just a single
does not do a CSMA
broadcast domain. Packet collisions occur mostly inside a hub.
since it simulates a bus
in that it’s work is to
propagate the frame bit
by bit through the
network. The computers
in the hub network are
the ones that carry out
CSMA before
transmitting frames.
Hubs Switches
They operate in the physical layer of the They operate in the data link layer of the
OSI model OSI model.
Collisions may occur during setup of Collisions do not occur since the
transmission when more than one communication is full duplex.
computer places data simultaneously in the
melanie_fayne@students.uonbi.ac.ke 5
Note: A bridge has two corresponding ports.
collision domains and
each is a bus-like They are passive devices, they don’t have They are active devices, equipped with
network, thus each any software associated with it. network software
collision domain needs
CSMA. The bridge also They generally have fewer ports of 4/12 The number of ports is higher – 24/48.
needs to use CSMA
before sending frames
Bridges
across networks.
● A bridge is a data link layer device that interconnects two (or more) segments.
● It appears to all stations on the two (or more) segments interconnected by a
bridge that there is a single LAN on which each station has a unique address.
● A bridge relays frames from one segment to another segment and has the
intelligence to relay/forward frames only to the segment containing the
Note: Advantages of intended recipient.
filtering and forwarding: ● Each interface on a bridge is a separate collision domain. A bridge (a switch is a
high-density bridge) reduces the size of a collision domain (this is what is
Filtering reduces the
important) by increasing the number of collision domains. Overall, this reduces
traffic seen by all
segments and improves the number of collisions, which helps increase throughput.
performance ● Types of Bridges:
• Reduction in traffic is ○ Simple Bridge: Links two segments. It is manually configured –
because only a certain
addresses of stations are entered manually. Installation and
percentage of all traffic
on a given segment is maintenance is time consuming. Simple logic is used in the bridge i.e.
forwarded to another pass/not pass frame
segment. ○ Multi-port Bridge: Connects more than two segments. It is manually
• Filtering usually
configured – addresses of stations are entered manually.
improves network
response times, as seen ○ Transparent Bridge:
by the user . Improved
performance (response • It is a multiport bridge. It learns station addresses on its own. It operates in
times) is because a
promiscuous mode, i.e. its presence and operation is transparent to network hosts.
bridge (or switch)
• When a transparent bridge is powered on, the mapping table is initially empty
reduces the traffic
experienced by devices because the bridge does not know the destination LAN of any frame. A frame with an
on all connected unknown destination LAN is flooded on the LAN.
segments.
• A Transparent Bridge learns of workstations locations(destination LAN/output port )
by analyzing the source address of incoming frames from all attached networks
Note: The extent to
which traffic is reduced
and response times are
melanie_fayne@students.uonbi.ac.ke 6
improved depends on: • By looking at the source address and input port of each and every frame it can tell
• The volume of which machine is accessible/located on which LAN(port). This is referred to as
inter-segment traffic backward learning.
relative to the total
• The Bridge employs backward learning to build its own mapping table. A
traffic,
• The volume of
transparent bridge continually updates the mapping table with every frame arrival
broadcast and multicast and purges “old” entries from the table.
traffic. • With this combination of continual update of the mapping table and purging of “old”
If more than two LANs entries it can handle dynamic topologies. This means that if a computer is unplugged
are interconnected by a
and moved around the building and plugged in again, within a few minutes the bridge
number of Bridges, a
frame may be routed will re-learn its new location.
through several Bridges.
● Bridge Intelligence:
○ A Bridge has the intelligence to analyze all incoming frames and to
make a forwarding decision based on information contained in the
frames and its mapping table.
○ A Bridge has a mapping table that maps destination addresses to ports.
Note: How a bridge
It consists of each and every station’s address and the output port of the
filters multicast
destination LAN on which the station resides. With this table it is able to
messages: The normal
action for multicast know which destination addresses (stations) are accessible through
frames is to treat them which port (LAN)
as broadcast frames. ○ The Bridge intelligence is based on its ability to filter and forward
This is clearly
frames.
suboptimal, since a
○ Filtering: The bridge acts as a filter - allowing/disallowing frames to
bridge may send
multicast frames to pass through. How filtering decision is made:
parts of the network for ■ If destination and source LANs are the same i.e. dest and src
which there are no address are accessible through the same port, a decision is made
interested receivers.
to discard the frame. If destination and source LANs are different
i.e. not accessible through the same port, a decision is made to
forward the frame.
■ If a frame has a destination address with an unknown output
port, (address/port pair not present in the table) then output on
all LANs (outgoing ports) except the one it arrived on(i.e flood
the LAN).
○ Filtering example (How it Works) :For a bridge interconnecting two
LANs A and B, the bridge reads all frames transmitted on either LAN
and makes a forwarding decision as follows. If destination and source
melanie_fayne@students.uonbi.ac.ke 7
LANs are the same (e.g. A-to-A, or B-to-B), discard the frame. This kind
of traffic is referred to as intra-segment traffic. If destination and source
LANs are different (e.g. A-to-B or B-to-A), forward the frame. This kind
of traffic is referred to as inter-segment traffic. If a decision is made to
forward the frame towards its destination, the forwarding decision must
also specify the outgoing/forwarding port.
melanie_fayne@students.uonbi.ac.ke 8
○ Security- May improve security of information. Different types of traffic
that have different security needs on physically separate media or
different types of users with different levels of security
○ Geography-to link two separate LANs in two geographically distant
locations
● Disadvantages of Bridges:
○ It is unable to read specific IP addresses because they are more troubled
with the MAC addresses.
○ They cannot help while building the network between the different
architectures of networks.
○ It transfers all kinds of broadcast messages, so they are incapable of
stopping the scope of messages.
melanie_fayne@students.uonbi.ac.ke 9
networks. The basic which packets coming from and going to a device have access to the full bandwidth of
function of STP is to the switch connection.
prevent bridge loops and
the broadcast radiation
that results from them. ● LAN switching provides the following unique features:
Spanning tree also allows ○ Dedicated, collision-free communication between network devices
a network design to through full-duplex operations: When a network device is attached
include backup links directly to the port of a network switch: It receives instant access to the
providing fault tolerance if
full bandwidth and does not have to contend for available bandwidth
an active link fails. As the
name suggests, STP with other users (dedicated bandwidth). It is also in a separate collision
creates a spanning tree domain.
that characterizes the ○ Multiple simultaneous conversations: With layer 2 switch, an incoming
relationship of nodes frame from a particular station is switched to the appropriate output line
within a network of
to be delivered to the intended destination. At the same time other
connected layer-2 bridges,
and disables those links unused lines can be used for switching other traffic. As a result switches
that are not part of the can achieve improved throughput because of parallel transmission.
spanning tree, leaving a ○ Media-rate adaptation: Switches can be used to connect LANs with
single active path different media. For example, a 10-Mbps Ethernet LAN and a 100-Mbps
between any two network
Ethernet LAN can be connected using a switch.
nodes.
melanie_fayne@students.uonbi.ac.ke 10
● Advantages of Layer 2 Switches:
○ Improved performance: Switches reduce collisions on network segments because they provide
dedicated bandwidth to each network segment. Each device has a dedicated capacity equal to that
of the entire original LAN for either input or output.
○ Improved performance: Switches provide collision-free communication if full duplex operation is
used.
○ Improved performance : Because only a certain percentage of traffic is forwarded, a switch
diminishes the traffic experienced by devices on all connected segments.
○ Improved performance : A switch will accommodate communication between a larger number of
devices than would be supported on any single LAN connected by bridges. (multiple simultaneous
conversations)
○ Improved performance: Some switches support cut-through switching, which reduces latency and
delays in the network, while bridges support only store-and-forward traffic switching.
○ Switches (and bridges) extend the effective length of a LAN, permitting the attachment of distant
stations.
○ Switches can also be used to connect LANs with different media
○ No change is required to software or hardware of attached device
● A switch can have a large number of computers connected to it. The disadvantages of creating a large
network using layer 2 switches only:
○ No internetworking : The only way to access other networks is through a router since layer 2
switches do not operate at layer 3. Thus the network would not be able to access other networks or
the internet; There would be no way to subnet when using switches as it is one broadcast domain,
thus there can be no connection between stand alone networks within the one large network.
○ Security : Because each computer can access every other computer in the network. Example of
wanting to separate communication between different departments or different groups of people in
the organisation.
○ Poor Scalability and Performance : Scalability is the ability to grow the network and yet maintain
the same performance. As you scale the switch network you reduce the performance since it takes
longer for a transmission to occur between computers on one end of the network to the other end.
○ Limited Reliability : Due to loops caused by broadcast storms. A loop is created when you have
switches connected to other switches. Such networks are not reliable since they do not have
multiple paths that work in the event that links fail since the options that allow multiple paths lead
to loops. The advisable paths are the tree hierarchy or in series. Loops make the MAC table
unstable as it keeps correcting itself, that’s why multiple paths are unacceptable in switches.
Spanning Tree Protocol is used to stop network loops /select one route while still permitting
redundancy. However switches have a much higher capacity (better performance)
melanie_fayne@students.uonbi.ac.ke 11
02: Breaking networks into sub-networks
Sidenotes VLANs
● VLANs are a method of subnetting that aims to solve the issues of layer two switches.
● VLAN technology allows multiple networks or subnetworks to exist on the same
switched network. Each network functions as a separate broadcast domain - created at
layer 2.
● Frame transmission between different VLANs (networks) is impossible no matter what
kind of address is specified since each VLAN is a broadcast domain. Thus
internetworking is not possible in VLANS.
● VLANs are created by administrators. The default VLAN is VLAN1. VLANs can be
created either using one switch or multiple switches.
● Computers in a VLAN are unaware of the vlan membership since we only configure
vlans on the switch.
● An access link - connects computers to the switch. It can only pass frames of the same
vlan, while a trunk link can carry frames that belong to multiple vlans. The ports
connected by trunk links are configured to carry frames of multiple vlans and are used to
connect switches.
● How it works:
When the frame arrives at the switch, the switch When the frame arrives at the switch, the switch
tags the frame with the vlan id of the source tags the frame with the vlan id of the source
computer. The switch then checks the table for computer. The switch then checks the table for
the destination address. If the MAC table has not the destination address. If the MAC table has not
melanie_fayne@students.uonbi.ac.ke 12
yet been populated and the switch does not yet been populated and the switch does not
know the destination address, it looks through know the destination address, it looks through
the vlan column, removes the tag with the vlan the vlan column, and finds that no other
Note: id and then it broadcasts to all ports configured computer connected to it is on vlan 10. The
Autonegotiati to vlan 10 if the incoming message was from switch thus forwards the frame to the other
on was vlan 10. If it already knows the MAC destination switch via the trunk link which will then forward it
designed for address, the switch removes the tag with the to all other computers on the same vlan if the
the following vlan id and then it sends directly to that MAC MAC table has not been populated or directly to
purposes: address if the destination is of the same vlan. If the known destination address if it’s of the same
the switch finds the destination is on a different vlan. If the switch finds the destination is on a
vlan, then the frame is discarded. different vlan, then the frame is discarded.
● Frame Tagging : The vlan id tag that the switch adds to the frame when sending out to
a trunk port follows the Dot1Q format. The checksum is recalculated due to the added
VLAN ID tag.
Note:
Although note
that if you
scatter your
vlans across
several
switches,
performance
will be
affected ● Setting up VLANs:
since it would
○ Command for creating VLAN :
have to cross
access-switch1(config)#vlan 40
through all access-switch1(config)#name supplies
the switches
○ Command for assigning VLAN membership – port grouping :
and stop for
access-switch1(config)#int range fao/7 - 15
many checks access-switch1(config)#switchport mode access
before access-switch1(config)#switchport access vlan 40
getting to the ○ Command for configuring access ports :
destination. access-switch1(config)#int range fao/7 - 15
For effective access-switch1(config)#switchport mode access
implementati ○ Command for configuring trunk ports :
on, design access-switch1(config)#int go/1
your vlan PCs access-switch1(config)#switchport mode trunk
close to each ● Advantages of VLANs:
other.
melanie_fayne@students.uonbi.ac.ke 13
○ Improves Scalability and performance : One can keep adding switches to the
network and since subnetting is possible, broadcasts are only sent to the
associated vlans in the whole network.
Major
differences ○ Enhances security : since it allows for departmentalization.
between IPV4 ○ Control over all ports and resources that each port can access : due to vlan
and IPv6 configuration
○ Migration cost and Time Reduction - since networks are configured virtually
• IPv4 is a 32-Bit
hence preventing having to physically migrate a user from one network to
IP address
whereas IPv6 is another.
a 128-Bit IP ○ Device management is easier with VLANs.
address. ○ Creating Virtual Work Groups
• IPv4 is a ○ They allow for differentiation between traffic types, such as voice and data -
numeric
because you can create vlans for different individual traffic types since they have
addressing
method different requirements.
whereas • IPv6 ● Disadvantages of VLANs:
is an ○ Inter VLAN communication not possible
alphanumeric
addressing
IP Addressing
method.
• IPv4 binary
bits are ● Importance of IP Addressing : There is a need to uniquely identify each device
separated by a connected to the internet so as to allow global communication. IP defines not only a
dot(.) whereas packet format, but it also defines an addressing scheme used on the internet.
IPv6 binary bits
● Every Host and router on the internet has an IP address which encodes its network
are separated
number and host number.
by a colon(:).
• IPv4 offers 12 ● IPv4 vs IPv6 :
header fields ○ IPv4 example : 12.244.233.165
whereas IPv6
○ IPv6 example : 2001:0db8:0000:0000:0000:ff00:0042:7879
offers 8 header
fields. ● Notations for an IP address : There are two common notations for an IP address:
• IPv4 supports ○ Binary notation : 10110001110011010011100011010101
broadcast ○ Dotted decimal notation : 169.34.200.239
whereas IPv6 ● Types of IP addressing : Classful addressing and Classless addressing
doesn’t support
broadcast.
• IPv4 has Classful Addressing
checksum fields
while IPv6 ● In Classful addressing the IP address space is divided into five classes: A,B,C,D and E.
doesn’t have
checksum fields
melanie_fayne@students.uonbi.ac.ke 14
• IPv4 supports ● Below is a summary of the ratio of bytes for netid and hostid : Class A(1:3), Class B(2:2)
VLSM (Variable and Class C(3:1)
Length Subnet
● Each class occupies part of the whole address space
Mask) whereas
IPv6 doesn’t ○ Addresses in class A,B, and C are for unicast communication
support VLSM. ○ Addresses in Class D are for multicast communication
• IPv4 uses ARP ○ Addresses in Class E are reserved for future use
(Address
Resolution
Protocol) to
map to MAC
address
whereas IPv6
uses NDP
(Neighbour
Discovery
Protocol) to
map to MAC
address.
b) Find the
129.205.0.1 to 129.205.255.255 and Class C network: 192.0.2.1 to 192.0.2.255
class of the ● Example of Address space(Host part) for ip address 12.0.0.0:
melanie_fayne@students.uonbi.ac.ke 15
following IP ○ 12.0.0.1, 12.0.0.2, 12.0.0.3…….. 12.0.0.255
addresses ○ 12.0.1.0, 12.0.1.1, 12.0.1.2…….. 12.0.1.255
○ 12.0.2.0, 12.0.2.1, 12.0.2.2…….. 12.0.2.255 ……….
11010010 ○ 12.0.255.0, 12.0.255.1, 12.0.255.2…….. 12.0.255.255
11011010
○ 12.1.0.0, 12.1.0.1, 12.1.0.2…….. 12.1.0.255
10101101
01101101 ○ 12.1.1.0, 12.1.1.1, 12.1.1.2…….. 12.1.1.255
○ 12.1.2.0, 12.1.2.1, 12.1.2.2…….. 12.1.2.255 ……..
10010001 ○ 12.1.255.0, 12.1.255.1, 12.1.255.2…….. 12.1.255.255
01010010 ○ 12.255.0.0, 12.255.0.1, 12.255.0.2…….. 12.255.0.255
11111001
○ 12.255.1.0, 12.255.1.1, 12.255.1.2…….. 12.255.1.255
10101100
○ 12.255.2.0, 12.255.2.1, 12.255.2.2…….. 12.255.2.255 ……..
○ 12.255.255.0, 12.255.255.1, 12.255.255.2…….. 12.255.255.254
○ = ( 256x256x256) -2
● Private IP addresses :
○ Network numbers are managed by Internet Corporation for Assigned Names and
Addresses (ICANN) to avoid conflicts.
○ ICANN does not normally allocate addresses to individual internet users. Instead
it assigns a large block of addresses to an ISP which then allocates them to
individual internet users.
○ Three ranges of addresses can be used internally:
■ 10.0.0.0 to 10.255.255.255 - 16,777,216 hosts
■ 172.16.0.0 to 172.31.255.255- 1,048,576 hosts
■ 192.168.0.0 to 192.168.255.255– 65,536 hosts
○ Any organization can use addresses out of this set without permission from the
Internet authorities - for private networks. They are unique within the
organization but they are not unique globally.
Reserved Host IDs 2- First and Last 2- First and Last 2- First and Last
address address address
melanie_fayne@students.uonbi.ac.ke 16
NetID Bytes 1 2 3
HostID Bytes 3 2 1
Classless Addressing
melanie_fayne@students.uonbi.ac.ke 17
● In classless addressing the prefix length is given with every address separated by a
slash. Slash notation formally referred to as classless interdomain routing or CIDR
notation.
● The first n bits of the classless address is called prefix, while the last 32-n bits is called
suffix.
● The address and slash notation completely defines a block. It helps to find the number
of addresses in the block and the last address in the block.
○ The first address in the block: set the 32-n rightmost bits in the binary notation to
0s.
○ The last address in the block: set the 32-n rightmost bits in the binary notation to
1s.
○ The number of addresses in the block: 232-n
Example: A small organization is given the address 205.16.37.24/29. What is the address range of the
block?
The beginning address is 205.16.37.24.
To find the last address we keep the first 29 bits and change the last 3 bits to1s.
Beginning:11001111 00010000 00100101 00011000
Q2:
Ending : 11001111 00010000 00100101 00011111
Find the
There are only 8 addresses in this block.
range of
addresses in
Finding the subnet mask of a classless address : E.g. for 192.168.1.1/28, the subnet mask is found by
the following
putting the given number of bits out of 32 as 1, like, in the given address, we need to put 28 out of 32
blocks :
bits as 1 and the rest as 0, and so, the subnet mask would be 255.255.255.240.
123.56.77.32/2
9 Subnetting
200.17.21.128/2
● Often organizations need to split a network into several parts (subnetworks) for internal
7
use. For example the organization may want to group networks according to
departments.
● The parts of the network are called subnets. Every subnetwork however small would
require one network address e.g 76.0.0.0 , 143.13.0.0 and 196.32.15.0.
● Assigning one network number per physical network uses the IP addresses too quickly.
However there is a finite number of IP addresses. Subnetting provides a way to reduce
the total number of network numbers assigned to each organization.
● Subnetting takes a single IP network number and allocates IP addresses with that
number to several physical networks now referred to as subnets.
Note: A class
melanie_fayne@students.uonbi.ac.ke 18
A,B,C address ● When a network is subnetted, the organization still acts as a single network to the
refers to one outside world. All hosts in a network must have the same network number. Inside the
network not a
collection of
organization, each subnetwork is recognized by its own subnetwork address.
LANs. ● A router segments a network into smaller broadcast domains (subnets). A subnet may
have its own router which is connected to another router or the main router. The main
router is connected to an ISP or regional network.
● From outside the organization, to reach any of the subnets in the organization it is
important to know where the organization connects to the internet. This is often at a
single point. So outside the organization one entry in the forwarding table is enough to
forward a packet to any of the organization’s subnets.
melanie_fayne@students.uonbi.ac.ke 19
Example :
141.14. 00 00000000000000
141.14. 01 00000000000000
141.14. 10 00000000000000
141.14. 11 00000000000000
melanie_fayne@students.uonbi.ac.ke 20
● Subnetting with Classless addressing :
● The concept of subnetting is the same as in classful addressing.
● The number of addresses in each subnetwork should be a power of 2.
● The prefix length for each subnetwork is : 32- y where 2y = number of addresses in the
subnet.
● The first address in each subnetwork should be divisible by the number of addresses in
that subnetwork. This can be achieved by first assigning addresses in the larger
network.
melanie_fayne@students.uonbi.ac.ke 21
Block of addresses given to each subnet
Network address = 130.34.12.64/26. ● 0: 130.34.12.64 ….. 130.34.12.79
Prefix length (NetID)= 26 bits ● 1: 130.34.12.80 …… 130.34.12.95
Suffix length (HostID) = 32-26 = 6 bits ● 2: 130.34.12.96 …… 130.34.12.111
● 3: 130.34.12.112 …. 130.34.12.127
64 = 01000000 (8 bits) two of these bits (01) belong to the
prefix Total = 4 x 16 = 64
melanie_fayne@students.uonbi.ac.ke 22
addresses = 27 addresses.
Therefore suffix length is 7 and prefix length is 25 The second subnet/unallocated block therefore is:
14.24.74.192/26.
For a subblock of 60 addresses we should allocate 64 Subnet address = 14.24.74.192/26. Therefore suffix length is 6
addresses = 26 addresses. and prefix length is 26.
Therefore suffix length is 6 and prefix length is 26
This block (14.24.74.192/26) can be split into four sub blocks
For a subblock of 10 addresses we should allocate 16 each of 16 addresses. Two bits of the suffix are used for
addresses = 24 addresses. identifying the subblocks. This means that each block has a
Therefore suffix length is 4 and prefix length is 28 suffix length of 4 and prefix length of 28.
melanie_fayne@students.uonbi.ac.ke 23
Sidenotes Routers
melanie_fayne@students.uonbi.ac.ke 24
There are 7
networks in this
diagram all
connected by
routers.
melanie_fayne@students.uonbi.ac.ke 25
streaming or Voice over IP (VoIP) calls. It is used to specify how a datagram will be
handled.
melanie_fayne@students.uonbi.ac.ke 26
fragment relative to live in the internet system. The time here is measured in seconds, and in case the
the start of the IP value of TTL is zero, the datagram is erased. Every time a datagram is processed,
datagram, which
when it was not
it’s Time to live is decreased by one second. These are used so that datagrams that
fragmented. As you are not delivered are discarded automatically. TTL can be between 0 – 255.
can expect, the first ● Protocol: This is a field in the IPv4 header reserved to denote which protocol is
offset of a fragment used in the later (data) portion of the datagram. For Example, number 6 is used to
is always set to zero.
The maximum
denote TCP and 17 is used to denote UDP protocol.
possible offset is ( ● The header’s checksum: The checksum field is of 16-bit length, and it is used to
213-1 ) * 8 = 65528, check the header for any errors. The header is compared to the value of its
but it is more than checksum at each hop, and in case the header checksum is not matching, the
the maximum
possible IP Packet
packet is discarded. Keep in mind that this is only for the header, and its protocol
length, which is handles the data field. UDP and TCP, for example, have their own checksum fields.
65,535 bytes long ● Source Address: It is a 32-bit address of the source of the IPv4 packet.
with the length of a ● Destination Address: the destination address is also 32 bit in size, and it contains
header added in.
the receiver’s address.
● Options: This is an optional field of the IPv4 header. It is used only when the value
of IHL is set to more than 5. These options contain values and settings for things
related to security. Record route and time stamp etc. You will find that the list of
options components ends with an End of Options or EOL in many cases.
● Format and Place of Routing Table :
● A Routing Table is interpreted as such : The routing algorithms tell the router
which port to use to forward the packet. They tell it that if you receive a packet
with this net id forward it to the next router (hop) through the associated port.
172.20.0.0 111.15.31.18 e0
170.14.0.0 -- e1
● How a router deals with packets: It first checks to which network the received
packet is going to. It then checks its routing table, which tells it how to forward to
either another router or the direct destination and through which interface. The
router uses the subnet mask to find out what the destination network is. The
router takes each subnet mask in its table and ANDs it with the destination IP
address until a match is found and it gets the destination network address. (The
subnet mask is found in the routing table.) The routing algorithms are the ones
that place the information in the routing table. If there’s no next hop then the
next hop in the table will be blank since it will have reached the destination. But
melanie_fayne@students.uonbi.ac.ke 27
there will be an interface through which the router will forward the packet. The
routing table just has one route to each hop, though the route keeps changing
depending on the conditions in the network to maintain reliability.
● Place of default gateway/ ARP :
● Address Resolution Protocol (ARP) is a procedure for mapping a dynamic IP
address to a permanent physical machine address in a LAN. When physical devices
want to resolve the mac address of an ip address, they send an arp packet to the
other computers in the network and the computer in question sends back its mac
address.
● A gateway is the interface through which packets leave and enter a network.
● A default gateway/router is the node in a computer network using the Internet
protocol suite that serves as the forwarding host to other networks when no other
route specification matches the destination IP address of a packet.
● The DNS resolves names of computers to their IP addresses while the ARP
Note : resolves the IP addresses to MAC addresses.
• A host is configured
● Write out the scenario of one computer sending a frame to another computer in a
with the subnet
mask, MAC address,
different network.
IP address and the Once the packet from the source computer in network A (sent to the destination
default gateway. computer in network B) gets to the router, the router takes the destination IP address of
• IP address never the packet and ANDs it with the subnet masks available in its routing table to get the
changes during this destination network address. The router then checks if the destination network is the
transmission, but the same as network A and realises it’s not. The router then sends an ARP broadcast
MAC address keeps packet to all the computers in the network using the default gateway IP address. The
changing.
default gateway router gets the ARP packet and sends back its MAC address. The
• The arp packet is
source computer gets the MAC address of the default gateway and keeps the MAC
created at layer 3.
address in the ARP cache. It then forwards the message to the default router. Once the
The PC takes that
packet and puts the message gets to the default router, the header and trailer are removed and it's left with
destination IP the packet. The default router ANDs the destination IP address with the subnet masks
address in the arp available in its routing table until it finds the destination network address. Once it does,
and sends it as a it checks the routing table and finds that there is no next hop, thus it forwards the
broadcast packet. It message to the stated interface in the table. The default gateway router creates a
would be put in a frame for the message and prepares to forward it through the interface. It creates an
frame with a ARP query with the destination IP address and then broadcasts it to get the MAC
broadcast mac address of the destination host. Once it gets the MAC address it puts it in the frame and
address
then forwards it through the interface and directly to the host.
(FF.FF.FF.FF.FF.FF).
• It creates the first
arp packet that is ● Static vs Dynamic Routing :
used to find the mac ● Static Routing doesn't change routing tables unless the network administrator
address of the changes or modifies them manually unlike dynamic routing that changes the
melanie_fayne@students.uonbi.ac.ke 28
default router. Once routing table according to the change in topology. Sends out topology updates
it gets the MAC whenever the network changes’ topological structure.
address of the
default router. The
second frame is for Static Routing Dynamic Routing
sending the initial
message to the In static routing, user defined routes are used In dynamic routing, routes are updated as
default router. in the routing table - fills out its routing table per the changes in the network.
using information about the network
topology that is known by the network
admin.
BGP, RIP and EIGRP No complex algorithm used to figure out the Dynamic routing employs complex
are gateway shortest path. algorithms to find the shortest routes.
protocols that
enable the internet
to exchange routing Static routing provides higher security. Dynamic routing is less secure.
information between
autonomous Static routing is a manual process Dynamic routing is an automatic process.
systems.
Static routing is used in smaller networks Dynamic routing is implemented in large
networks
Static routing may not follow any specific Dynamic routing follows protocols like BGP,
protocol RIP and EIGRP.
Static routing does not require any additional Dynamic routing requires additional
resources. resources. The more the information that is
exchanged and the more frequently the
exchange the better the routing decisions.
On the other hand this information is an extra
overhead on the network causing
performance degradation
Desirable properties In static routing, failure of link disrupts the In dynamic routing, failure of link does not
of routing algorithms rerouting interrupt the rerouting
• Correctness
• Simplicity
• Robustness-coping
with changes in ● Adaptive Algorithms in Dynamic Routing
topology and traffic ● Distance Vector Routing :
• Stability-converge
○ Each router maintains a routing table. The routing table is indexed by and
to equilibrium and
stay there contains one entry for each destination (router) in the subnet. Each entry
Fairness gives the best known distance to a given destination and which line to use
•Optimality-minimize
melanie_fayne@students.uonbi.ac.ke 29
packet delay, to get there. The router is assumed to know the “distance” to each of its
maximize network neighbors.
throughput, Minimize
number of hops etc
○ Each routing table entry contains two parts.
■ The preferred outgoing line to use for that destination
■ “Distance” to that destination. The metric used might be
● Number of hops
● Time delay in milliseconds
● Total number of packets queued along the path etc
○ Routing tables are updated by exchanging information with neighbors,
Distance vector protocol allows each router to exchange information with
Example
each of its neighbors periodically (e.g every 30 sec). This enables each
implementations of router to know the delay to each of its neighbors
Distance vector ○ The assumptions made by the algorithm:
routing: ■ distance to destination is measured using time delay
RIPv1, RIPv2
IGRP
■ router knows the delay to each of its neighbors
E-IGRP ○ A router performs the following calculation for each destination router Dj
EGP ■ Estimated delay to Dj (destination J) via Ni (neighbour I) = Ti (delay to
BGP neighbour I) + Ej(neighbour I’s estimate to router Dj)
○ Drawbacks of Distance Vector Algorithm:
○ Converges to the correct answer slowly.News spreads at the rate of one
hop per exchange. If the longest path is of length N, with N exchanges,
every one will reach convergence. This causes different network status at
different locations.
○ The time for messages to propagate through the network increases as the
network grows.
○ Information exchanged grows larger with network
Example
○ Count to infinity problem. The core of the problem is that: When X tells its
implementations of neighbour Y it has a path to a destination, Y has no way of knowing that it
Link state routing : may be on this path. Hence for all routers, the distance to the failed router
OSPF gradually works its way up to infinity.
NLSP
● Link state routing :
○ Link state routing was developed to address the scalability problems of the
vector routing algorithm. How it works:
○ Learning about neighbours : When booted, a router’s first task is to learn
about its neighbours. It sends a special HELLO packet on each
point-to-point line. The corresponding router replies by telling who it is
melanie_fayne@students.uonbi.ac.ke 30
○ Measuring line cost : Each router is to have a reasonable estimate of the delay to each of its
neighbors. Router may take load into account when measuring delay: Start timer when ECHO
packet is queued or may not take load into account when measuring delay: Start timer when
ECHO packet reaches the front of the queue. Send over a line a special ECHO packet that the
other side is required to send back immediately.
■ Measure round trip and divide by two
■ Conduct test several times and measure average
○ Measuring line cost : Pros and cons of taking load into account : Taking load into account: When a
router has a choice between a heavily loaded line and a not heavily loaded line, it will regard the
route over the unloaded line as a shorter path. This choice will result in better performance. Not
taking load into account: To ignore load in the choice of best path avoids wild oscillation of routing
tables (erratic routing) and potential problems.
○ Build a packet containing all the data : The data includes: Identity of sender, Sequence number,
Age, A list of neighbors and for each neighbor the delay to that neighbor. They are sent
periodically at regular intervals or when some significant event occurs such as : Line/neighbor
going down, Line/ neighbor coming back up and Line/neighbor changing its properties
appreciably.
○ Distributing Link state packets : Uses flooding to distribute the link state packets. When a link
state packet comes into a router for flooding:
■ It is put in a holding area to wait for a short while. If another link state packet from the
same source comes in before the first packet is transmitted their sequence numbers are
compared. If equal- duplicate is discarded and if different- the older one is thrown out.All
link state packets are acknowledged to guard against errors on the router-router lines.
■ When a line goes idle, the holding area is scanned round robin in order to select a packet
or ACK to send
○ Computing new routes : Once a router has accumulated a full set of link state packets, it can
construct the entire subnet graph because every link is represented. Every link is represented
twice, once for each direction. The two values can be averaged or used separately.
○ Drawbacks:
○ Memory intensive: For a subnet with n routers, each of which has k neighbors, the memory
required to store the input data is proportional to kn. For large subnets storage requirements can
be a problem.
○ Computation intensive: Computation time can be an issue
○ Hardware or software problems can wreak havoc to this algorithm
melanie_fayne@students.uonbi.ac.ke 31
Intradomain Routing Interdomain Routing
Routing algorithm works only within domains. Routing algorithm works within and between domains.
It needs to know only about other routers within their It needs to know only about other routers within and
domain. between their domain.
Protocols used in intradomain routing are known as Protocols used in interdomain routing are known as
Interior-gateway protocols. Exterior-gateway protocols.
In this Routing, routing takes place within an In this Routing, routing takes place between the
autonomous network. autonomous networks.
Some Popular Protocols of this routing are RIP(resource Popular Protocols of this routing is BGP(Border
information protocol) and OSPF(open shortest path Gateway Protocol) used to connect two or more
first). AS(autonomous systems).
melanie_fayne@students.uonbi.ac.ke 32
○ Router with interfaces for each VLAN.
■ Best when you have few VLANs.
■ Requires multiple physical interfaces on both the router and the switch and is no longer
implemented in switched networks
○ Router on a stick.
■ Router interface configured with trunking and sub interfaces.
■ Best when you have more VLANs than available interfaces.
■ Only one physical interface is required on the router and the switch to route packets
between multiple VLANs.
How it works : Router accepts VLAN-tagged traffic from the switch on the trunk interface.Router internally
routes between the VLANs using sub -interfaces based on the destination VLAN. Routed traffic is VLAN-tagged
for the destination VLAN and is forwarded to the switch out the trunk interface on which it was received.
Advantages and Disadvantages :
● Simplifies the cabling of the router
● Reduces cost and configuration complexity
● The router-on-a-stick method of inter-VLAN routing does not scale well.
○ Using a layer 3 switch
■ A Switch virtual interface (SVI) is a virtual interface that is configured within a multilayer
switch.
■ An SVI is considered to be virtual because there is no physical port dedicated to the
interface. It can perform the same functions for the VLAN as a router interface would. It is
a virtual VLAN interface for inter-VLAN routing.
■ SVIs must be explicitly created for each VLAN that exists on the switch. Switch can have
an IP address assigned to each SVI.
■ The SVI for the VLAN provides Layer 3 processing for packets to or from all switch ports
associated with that VLAN.
■ To enable a multilayer switch to perform routing functions, the multilayer switch must
have IP routing enabled.
■ Traffic is routed internally to the switch device.
Advantages:
● Faster than router-on-a-stick,
● No need for external links from the switch to the router for routing.
● Latency/delay is much lower, because it does not need to leave the switch.
melanie_fayne@students.uonbi.ac.ke 33