You are on page 1of 33

CSC 318: NETWORK DESIGN IMPLEMENTATION AND

MANAGEMENT

01: Interconnecting Networks using LAN devices 2


Terminology and Concepts 2
Introduction 3
Repeaters 3
Hubs 4
Bridges 6
Layer 2 Switches 9

02: Breaking networks into sub-networks 12


VLANs 12
IP Addressing 14
Subnetting 18
Routers 24
Subnetting with VLANs 32

★ 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

Terminology and Concepts

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.

Note: Segmentation always:


● Reduces medium access contention per segment because there are fewer users sharing the segment
● Increases the average available bandwidth per user because there are fewer users sharing the segment
● Reduces the traffic seen by all segments because of filtering and forwarding

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.

Note: Limit on number of


repeaters:
• The total number of
repeaters and network
segments that can be
connected is limited due
to timing and other issues.
• For example - Ethernet Figure 2: Frames, Packets and Headers
10Base5 is designed to
allow four repeaters in
order to extend the
maximum cable length Figure 1: Which device is in which layer
from 500 meters to 2500
meters (5-4-3 rule)

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).

Figure 3: Repeater in a network


● Advantages of Repeaters:
○ Repeaters are simple to install and can easily extend the length or the
coverage area of networks.
○ They are cost effective.
○ Repeaters don’t require any processing overhead. The only time they
need to be investigated is in case of degradation of performance.
○ They can connect signals using different types of cables
● Disadvantages of Repeaters:
○ Repeaters cannot connect dissimilar networks.
○ They cannot differentiate between actual signal and noise.
○ They cannot reduce network traffic or congestion.
○ Most networks have limitations upon the number of repeaters that can
Note: Why do we do
CSMA/CD in a bus be deployed.
network? - to control Hubs
access to the bus (it
controls which
computer gets to send
● A hub is a physical layer networking device which is used to connect multiple
since in a bus network devices in a network. They are generally used to connect computers in a LAN.
only one computer gets ● How it works : A hub has many ports in it. A computer which intends to be
to send). A network connected to the network is plugged into one of these ports. When a data
connected by hubs is a
single collision domain,

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.

Figure 4: A hub network

● Differences between Hubs and Switches:

Hubs Switches

They operate in the physical layer of the They operate in the data link layer of the
OSI model OSI model.

It is a non-intelligent network device that It is an intelligent network device that sends


sends messages to all ports. messages to selected destination ports.

It primarily broadcasts messages. It is supports unicast, multicast and


broadcast

Transmission mode is half duplex. Transmission mode is full duplex.

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.

Figure 5: Bridge network

○ Forwarding: To forward a frame means to copy from one LAN and


repeat with exactly the same bit pattern on to the other LAN, using the
appropriate MAC protocol for that LAN.
Note: A switch does not
require CSMA since ● Advantages of Bridges:
collisions do not occur
○ Reliability - Bridges partition the network into self contained units.
because a switch
operates in full duplex Hence avoiding faults on the network that may disable communication
mode thus each for all devices belonging to an organization.
computer can transmit ○ Performance - Reduced traffic and improved response times. Smaller
and receive at the same
collision domains created by bridges improves performance with the
time.
increase in the number of devices or the length of wire.

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.

Types of Switching Hubs


commercially available Layer 2 Switches
-> Store and forward
switch: Accept input, ● There are two types of switches based on the layer of operation:
buffer it briefly, then ○ Layer 2 switch- physical and data link layer
output
○ Layer 3 switch- physical, data link layer and Network layer.
-> Cut through switch:
● These switches are data link layer devices that, like bridges, enable multiple
Take advantage of the
destination address being physical LAN segments to be interconnected into a single larger network.
at the start of the frame. ● How it Works :
Begin repeating incoming
frame onto output line as
Once a device is connected to a switch, the switch notes its media access control
soon as address
(MAC) address, a code that’s baked into the device’s network-interface card (NIC) that
recognized
attaches to an ethernet cable that attaches to the switch. The switch uses the MAC
address to identify which attached device outgoing packets are being sent from and
where to deliver incoming packets.So the MAC address identifies the physical device
as opposed to the network layer (Layer 3) IP address, which can be assigned
dynamically to a device and change over time. Layer two enter these addresses into a
MAC database table (using backward learning). When a device sends a packet to
another device, it enters the switch and the switch reads its header to determine what
to do with it. It matches the destination address or addresses and sends the packet out
through the appropriate ports that lead to the destination devices. To reduce the
The Spanning Tree
chance for collisions between network traffic going to and from a switch and a
Protocol (STP) is a
network protocol that connected device at the same time, most switches offer full-duplex functionality in
builds a loop-free logical
topology for Ethernet

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.

Figure 6: Switch network

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:

VLAN using one switch VLAN using multiple switches

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.

● Recognizing the class of an IP address :


○ If the address is given in binary, the first few bits can immediately tell us the
class of the address : Class A: 0, Class B: 10, Class C: 110, Class D: 1110, Class
Q1: E: 1111.
a) Change
○ When the address is given in dotted notation, we need to look at the first byte to
the following
IP addresses
determine the class of the address. Each class has a specific range of numbers :
from binary Class A: 0 to 127(inclusive), Class B: 128 to 191, Class C: 192 to 223, Class D:
notation to 224 to 239 and Class E: 240 to 255
dotted ● NetIDs and Host IDs :
decimal
○ Class A: (28-1) 128 networks each with (224) 16 million hosts
notation:
○ Class B: (216-2) 16384 networks each with (216) (65,536)64K hosts
00110010 ○ Class C: (224-3) 2 million networks each with (28) 256 hosts
00011010 ● Example NetIDs : Class A network: 12.0.0.0 , Class B networks: 129.205.0.0 and Class
11101101 C networks: 192.0.2.0.
01101100
● Example HostIDs : Class A network: 12.0.0.1 to 12.255.255.255 , Class B networks:

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.

Class A Class B Class C

Network addresses 128 16,384 2,097,152

Reserved NetIDs 0, 10, 127 16 Blocks - 172.16 to 256 Blocks -(192.168.0


(Private or otherwise) 172.31 to 192.168.255)

No. Host IDs per 16 million 65,534 256


network

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

Designed for Large Organizations Mid Size Organizations Small organizations

Classless Addressing

● Limitations of classful addressing: Address space wastage and near depletion of


available addresses.
○ In classful addressing, a large part of the available addresses were wasted.
○ We have run out of class A and B addresses and class C is too small for most
midsize organizations.
● One solution is classless addressing.
● In classless addressing the whole address space (that does not belong to any class) is
divided into variable length blocks.We can have blocks of size 2, 4, 16, 32, 64,128
addresses etc.
● Block allocation restrictions in classless addressing :
○ The addresses in a block must be contiguous
○ The size of a block must be a power of 2: 1 2 8 16 etc
○ The beginning address must be divisible by the block size.
○ The beginning address can be calculated as X * 2n-32 in which X is the decimal
value of the prefix i.e. the beginning address = X * N where N= number of
addresses in the block.
● Example of a block of 16 addresses adhering to the above restrictions:
○ First 205.16.37.32
○ Second 205.16.37.33 …….
○ Sixteenth 205.16.37.47
● Two level addressing : Classless address is divided into two parts.
○ The prefix: defines the network: netid
○ The suffix: defines the host: host id
● The prefix plays the same role as netid and the suffix plays the same role as host id.
● The length of the prefix n depends on the size of the block and is referred to as the
prefix length. The suffix length is 32-n
● The first address in a block is always treated as a special address- the network address.
● Slash notation : Unlike classful addressing, in classless addressing, the prefix length
cannot be found if we are given only an address in the block.

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.

● Subnetting with Classful addressing :


● Some bits are taken away from the upper part of the hostID to create a subnet number.
● Bits taken away should be enough to create the number of subnets required e.g.To
create 4 subnets two bits are taken away 22 = 4
● Example:
○ A class B network has a 16 bit host number.
○ A class B network subnetted into 64 subnets.
○ Uses a 6 bit subnet number and a 10 bit host number allowing for 64 Ethernets
each with a maximum 1022 (210 -2)hosts.
● Subnetting creates an intermediate level of hierarchy in the IP addressing. Now we have
three levels: network, subnet and host.

melanie_fayne@students.uonbi.ac.ke 19
Example :

Net address: 141.14.0.0


Subnet address: 141.14.192.0
Host address: 141.14.192.192

Example1: Break the network 141.14.0.0 into four subnets.


Host addresses in subnet 141.14.0.0
Network address = 141.14.0.0 141.14.0.1…….141.14.0.255
Network is a class B network = 16 bits Net ID and 16 bits host id 141.14.1.0 ---- 141.14.1.255
141.14.2.0……..141.14.2.255
We can break the hosts into four groups (subnets)To name four ……
subnets we require two bits: 22 = 4; 141.14.62.0…….141.14.62.254
141.14.63.0…….141.14.63.254
Take two bits away from the upper part of the hostID and we
are left with 14 bits for host ID Host addresses in subnet 141.14.64.0
141.14.64.1…….141.14.64.255
Each subnet will therefore have (214 -2) hosts = 16384 - 2 hosts 141.14.65.0 ---- 141.14.65.255
= 16382 hosts. 141.14.66.0……..141.14.66.255
……
The first and the last IDs are used for subnetID and 141.14.126.0…….141.14.126.255
broadcasting respectively. 141.14.127.0…….141.14.127.254

Similar pattern for the other subnets


NetID (16 SubnetID(2 HostID(14bits)
bits) bits)

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.

Example 3: An organization is granted the block The four subnets are:


130.34.12.64/26. The organization needs to have four
subnets each with an equal number of hosts. Design the
NetID (26 bits) SubnetID HostID( Subnets
subnetworks and find the range of addresses for each
(2bits) 4 bits)
subnet?
130.34.12.01 00 0000 130.34.12.64/28.
Two bits in each block will be used to name the subnets.
We are left with 4 bits for host ID. The subnet prefix is then 130.34.12.01 01 0000 130.34.12.80/28
/28.
This means the suffix length is 4. The entire block is a 130.34.12.01 10 0000 130.34.12.96/28.
block of 26 = 64 addresses and since the subnets are to
have an equal number of hosts , each subnet should be 130.34.12.01 11 0000 130.34.12.112/28
allocated a block of (24 = 16) addresses. Total = 4 x 16 = 64

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

The network (network 130.34.12.64/26) subdivided into 4


subnets each of 16 hosts.

Example 4: An organization is granted a block of


addresses with the beginning address 14.24.74.0/24. the
NetID (25 SubnetID(1 HostID(6
organization needs to have 3 sub blocks of addresses to
bits) bit) bits)
use in three subnets as shown below.
One subblock of 120 addresses 14.24.74.1 0 000000 allocated
One subblock of 60 addresses
One subblock of 10 addresses 14.24.74.1 1 000000 unallocated
Design the subnetworks and find the range of addresses
for each subnet?
We allocate one of these blocks (the one with ID zero) to
The number of addresses for each subblock is not a the sub block of 60 addresses.
power of 2. We need to allocate a block of addresses The second subnet therefore is: 14.24.74.128/26.The first
which is a power of 2. address is 14.24.74.128/26 and the last address is
For a subblock of 120 addresses we should allocate 128 14.24.74.191/26

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.

NetID (26 SubnetID HostID(4


Network address = 14.24.74.0/24. Therefore suffix length is
bits) (2 bits) bits)
8 and prefix length is 24.
This block of 256 addresses can be split into two sub 14.24.74.11 00 0000 allocated
blocks each of 128 addresses. One bit of the suffix is used
for identifying the subblocks. This means that each 14.24.74.11 01 0000 Unallocated
subblock has a suffix length of 7 and prefix length of 25.
14.24.74.11 10 0000 Unallocated

14.24.74.11 11 0000 Unallocated


NetID (24 SubnetID(1 bit) HostID(7
bits) bits)
We allocate one of these blocks (the one with ID zero) to
14.24.74. 0 0000000 allocated the sub block of 10 addresses.
The third subnet therefore is: 14.24.74.192/28.The first address
14.24.74 1 0000000 Left is 14.24.74.192/28 and the last address is 14.24.74.207/28
unallocated The second subnet/unallocated block therefore is:
14.24.74.208/28.

We allocate one of these subblocks (the one with ID zero)


The subnet addresses are:
to the sub block of 120 addresses.
Subnet 1: 14.24.74.0/25. to 14.24.74.127/25.
The first subnet therefore is: 14.24.74.0/25. The first address
Subnet 2 : 14.24.74.128/26 to 14.24.74.191/26.
is 14.24.74.0/25 and the last address is 14.24.74.127/25
Subnet 3: 14.24.74.192/28 to 14.24.74.207/28.
The second subnet/unallocated block therefore is:
14.24.74.128/25.
If we add all the addresses allocated we find that we have
allocated 128 + 64 + 16 addresses = 208 addresses. Out of a
Subnet address = 14.24.74.128/25. Therefore suffix length is
total of 256 addresses we have left a block of 256 – 208 =
7 and prefix length is 25.
48 addresses. The first address in this block is 14.24.74.208
This block (14.24.74.128/25) can be split into two sub blocks
and the last address is 14.24.74.255
each of 64 addresses. One bit of the suffix is used for
identifying the subblocks. This means that each block has
This is referred to as variable length subnetting, with
a suffix length of 6 and prefix length of 26.
variable length subnet masks(VLSM).

melanie_fayne@students.uonbi.ac.ke 23
Sidenotes Routers

● Role of routers : Routers connect networks, determine the route between


networks and forward packets between networks based on layer 3/network layer
information (e.g. IP address).

● Routing and Forwarding :


● Routing : Deciding on the route to use from a given source to a given destination.
The most important This decision is made using a routing algorithm. The routing algorithm then records
function of a router each leg of the route in the different routing tables along the route. Each routing
is to route or table captures - for each possible destination, the output line/interface which is to
forward packets. In
be used to forward a packet heading to that destination.
this respect a router
has two functions: ● Forwarding : Identifying the destination address which is specified in the header of
an incoming packet. Using the destination information to look up information
• To be responsible recorded in the routing (forwarding) table in order to find the outgoing line to be
for filling in and
used in the next leg of the route. Transmitting/sending the packet to the next node
updating the routing
tables. This role is through the specified outgoing line.
played by the ● How routing and forwarding complement each other : Forwarding relies on
routing algorithms. information provided by routing (i.e. routing table) to perform the task of
The routing
forwarding. In the virtual circuit approach, during circuit establishment, a routing
algorithm is that part
of the network layer table is required to make decisions on the outgoing port to use to forward a call
responsible for request packet.
deciding which
output line an
● Advantages of Routers :
incoming packet
should be ● Break up broadcast domains (and collision domains)
transmitted on. ● Increased reliability: With a router network can use multiple paths between source
• To handle each and destination
packet as it arrives
● Additional security by isolating users with bridge technologies : A router discards a
looking up the
outgoing line for it in broadcast without forwarding it to other networks. Security rules can be
the routing tables. implemented on a router or firewall to block traffic from one subnet to another
This is known as subnet.
switching or
● Internetworking is possible.
forwarding.

melanie_fayne@students.uonbi.ac.ke 24
There are 7
networks in this
diagram all
connected by
routers.

● Format of IPv4 datagrams :


● The checksum : for checking for errors only in the header unlike the frame
checksum that checks for errors not just in the header but also in the data being
sent.
● The time to live : is the time a packet can spend within a network.
● Version: The first header field is a 4-bit version indicator. In the case of IPv4, the
value of its four bits is set to 0100, which indicates 4 in binary.
● Internet Header Length: is 4 bits and used to show how many 32-bit words are
present in the header. As we know, IPv4 headers have a variable size, so this is
used to specify the size of the header to avoid any errors. This size can be between
20 bytes to 60 bytes.
● Type of Service: ToS is also called Differentiated Services Code Point or DSCP. This
field is used to provide features related to service quality, such as for data

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.

● Explicit Congestion Notification: ECN is used to send notifications to the sender or


receive in situations where network congestion happens. This is an optional feature
of IPv4 can; if one of the endpoints doesn't support it, it is not used.
● Total Length: This field’s size is 16 bit, and it is used to denote the size of the entire
datagram. The minimum size of an IP datagram is 20 bytes, and at the maximum, it
can be 65,535 bytes. Practically, all hosts are required to be able to read 576-byte
datagrams. If a datagram is too large for the hosts in the network, fragmentation is
used, which is handled in the host or packet switch.
● Identification: The identification or ID field in a packet can identify an IP datagram’s
fragments uniquely. Some have suggested using this field for other things such as
adding information for packet tracing etc.
● Flags: flag in an IPv4 header is a three-bit field that is used to control and identify
fragments. The following can be their possible configuration:
● Bit 0: this is reserved and has to be set to zero
The Fragment Offset ● Bit 1: DF or do not fragment
Field is 13 bit long in ● Bit 2: MF or more fragments.
length, and it is
measured by blocks
● Fragment Offset: Used when you have a large message that was broken up into
that are units of smaller packets. Fragmentation is done by routers. It’s important because different
8-byte blocks. These networks have different maximum length of packets. Time to live: Time to live (or
are used to specify TTL in short) is an 8-bit field to indicate the maximum time the datagram will be
the offset of a

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.

Destination NetID Next Hop Interface Number

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

● Intradomain Routing vs Interdomain Routing:

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.

Interdomain routing protocol assumes that the internet


Intradomain routing protocols ignore the internet
contains the collection of interconnected
outside the AS(autonomous system).
AS(autonomous systems).

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).

● Subnetting with VLANs

● Advantages & Limitations of using VLANs


○ Unicast traffic - sent where they need to be sent out of.
○ Unicast traffic within the same subnet - forwarded properly.
○ Unicast traffic between different subnets - sent via the router.
○ Broadcast Traffic : Bypasses any router or firewall layer 3 security policies- this affects security
and affects performance. Switches flood broadcast traffic everywhere including between different
IP subnets
● To solve this broadcast issue, we map subnets to VLANs. A VLAN is associated with an IP subnet by
assigning each VLAN a different network number. The advantages would then be:
○ All unicast traffic always sent out the exact destination ports
○ Broadcast traffic - flooded only within the same IP subnet and VLAN
● There are 3 types of Inter VLAN Routing configurations:

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

You might also like