0% found this document useful (0 votes)
8 views44 pages

Router Functions and Routing Basics

The document provides an overview of routers, detailing their functions such as forwarding, routing, NAT, security, QoS, and VPN connectivity. It explains routing processes, metrics, and types of routing including static, default, and dynamic routing, along with their advantages and disadvantages. Additionally, it covers routing tables, protocols, and the concept of Network Address Translation (NAT) for managing IP addresses in network communications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views44 pages

Router Functions and Routing Basics

The document provides an overview of routers, detailing their functions such as forwarding, routing, NAT, security, QoS, and VPN connectivity. It explains routing processes, metrics, and types of routing including static, default, and dynamic routing, along with their advantages and disadvantages. Additionally, it covers routing tables, protocols, and the concept of Network Address Translation (NAT) for managing IP addresses in network communications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 2

Fundamental Concept of Routing


What is a router?
A router is a device that connects two or more packet-switched networks or
subnetworks. It serves two primary functions: managing traffic between these
networks by forwarding data packets to their intended IP addresses, and allowing
multiple devices to use the same Internet connection.

Role of Router
The router performs below major functions:
1. Forwarding: The router receives the packets from its input ports, checks its
header, performs some basic functions like checking checksum, and then
looks up to the routing table to find the appropriate output port to dump the
packets onto, and forwards the packets onto that output port.
2. Routing: Routing is the process by which the router ascertains what is the best
path for the packet to reach the destination, It maintains a routing table that is
made using different algorithms by the router only.
3. Network Address Translation (NAT): Routers use NAT to translate between
different IP address ranges. This allows devices on a private network to access
the internet using a single public IP address.
4. Security: Routers can be configured with firewalls and other security features
to protect the network from unauthorized access, malware, and other threats.
5. Quality of Service (QoS): Routers can prioritize network traffic based on the
type of data being transmitted. This ensures that critical applications and

Computer Networking and Trouble Shooting Page 1


Module 2

services receive adequate bandwidth and are not affected by lower-priority


traffic.
6. Virtual Private Network (VPN) connectivity: Routers can be configured to
allow remote users to connect securely to the network using a VPN.
7. Bandwidth management: Routers can be used to manage
network bandwidth by controlling the amount of data that is allowed to flow
through the network. This can prevent network congestion and ensure that
critical applications and services receive adequate bandwidth.
8. Monitoring and diagnostics: Routers can be configured to monitor network
traffic and provide diagnostics information in the event of network failures or
other issues. This allows network administrators to quickly identify and
resolve problems.

Routing

Routing is a process of selecting path along which the data can be


transferred from source to the destination. Routing is performed by a special
device known as a router.

• A Router works at the network layer in the OSI model and internet layer in
TCP/IP model
• A router is a networking device that forwards the packet based on the
information available in the packet header and forwarding table.

Computer Networking and Trouble Shooting Page 2


Module 2

• The routing algorithms are used for routing the packets. The routing
algorithm is nothing but a software responsible for deciding the optimal path
through which packet can be transmitted.
• The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count,
bandwidth, delay, current load on the path, etc. used by the routing
algorithm to determine the optimal path to the destination.
• The routing algorithm initializes and maintains the routing table for the
process of path determination.

Routing Metrics and Costs


Routing metrics and costs are used for determining the best route to the
destination. The factors used by the protocols to determine the shortest path, these
factors are known as a metric.

Metrics are the network variables used to determine the best route to the
destination. For some protocols use the static metrics means that their value cannot
be changed and for some other routing protocols use the dynamic metrics means
that their value can be assigned by the system administrator.

• The most common metric values are given below:


• Hop count: Hop count is defined as a metric that specifies the number of
passes through internetworking devices such as a router, a packet must travel
Computer Networking and Trouble Shooting Page 3
Module 2

in a route to move from source to the destination. If the routing protocol


considers the hop as a primary metric value, then the path with the least hop
count will be considered as the best path to move from source to the
destination.

• Delay: It is a time taken by the router to process, queue and transmit a


datagram to an interface. The protocols use this metric to determine the
delay values for all the links along the path end-to-end. The path having the
lowest delay value will be considered as the best path.

• Bandwidth: The capacity of the link is known as a bandwidth of the link.


The bandwidth is measured in terms of bits per second. The link that has a
higher transfer rate like gigabit is preferred over the link that has the lower
capacity like 56 kb. The protocol will determine the bandwidth capacity for
all the links along the path, and the overall higher bandwidth will be
considered as the best route.

• Load: Load refers to the degree to which the network resource such as a
router or network link is busy. A Load can be calculated in a variety of ways
such as CPU utilization, packets processed per second. If the traffic
increases, then the load value will also be increased. The load value changes
with respect to the change in the traffic.

• Reliability: Reliability is a metric factor may be composed of a fixed value.


It depends on the network links, and its value is measured dynamically.
Some networks go down more often than others. After network failure, some
network links repaired more easily than other network links. Any reliability

Computer Networking and Trouble Shooting Page 4


Module 2

factor can be considered for the assignment of reliability ratings, which are
generally numeric values assigned by the system administrator.

Types of Routing
Routing can be classified into three categories:

Static Routing

o Static Routing is also known as Non adaptive Routing.


o It is a technique in which the administrator manually adds the routes in a
routing table.
o A Router can send the packets for the destination along the route defined by
the administrator.
o In this technique, routing decisions are not made based on the condition or
topology of the networks

Computer Networking and Trouble Shooting Page 5


Module 2

Advantages Of Static Routing

Following are the advantages of Static Routing:

o No Overhead: It has ho overhead on the CPU usage of the router.


Therefore, the cheaper router can be used to obtain static routing.
o Bandwidth: It has no bandwidth usage between the routers.
o Security: It provides security as the system administrator is allowed only to
have control over the routing to a particular network.

Disadvantages of Static Routing:

Following are the disadvantages of Static Routing:

o For a large network, it becomes a very difficult task to add each route
manually to the routing table.
o The system administrator should have a good knowledge of a topology as he
has to add each route manually.

Default Routing

o Default Routing is a technique in which a router is configured to send all the


packets to the same hop device, and it doesn't matter whether it belongs to a
particular network or not. A Packet is transmitted to the device for which it
is configured in default routing.
o Default Routing is used when networks deal with the single exit point.
o It is also useful when the bulk of transmission networks have to transmit the
data to the same hop device.
o When a specific route is mentioned in the routing table, the router will
choose the specific route rather than the default route. The default route is
chosen only when a specific route is not mentioned in the routing table.
Computer Networking and Trouble Shooting Page 6
Module 2

Dynamic Routing

o It is also known as Adaptive Routing.


o It is a technique in which a router adds a new route in the routing table for
each packet in response to the changes in the condition or topology of the
network.
o Dynamic protocols are used to discover the new routes to reach the
destination.
o In Dynamic Routing, RIP and OSPF are the protocols used to discover the
new routes.
o If any route goes down, then the automatic adjustment will be made to reach
the destination.

The Dynamic protocol should have the following features:

o All the routers must have the same dynamic routing protocol in order to
exchange the routes.
o If the router discovers any change in the condition or topology, then router
broadcast this information to all other routers.

Advantages of Dynamic Routing:


o It is easier to configure.
o It is more effective in selecting the best route in response to the changes in
the condition or topology.

Disadvantages of Dynamic Routing:


o It is more expensive in terms of CPU and bandwidth usage.
o It is less secure as compared to default and static routing.
Computer Networking and Trouble Shooting Page 7
Module 2

Routing table

A routing table is a set of rules, often viewed in table format, that's used to
determine where data packets traveling over an Internet Protocol (IP) network will
be directed. This table is usually stored inside the Random Access Memory of
forwarding devices, such as routers and network switches.

Routing table entries

Each routing table might contain different entries and information, such
as IPv4 or IPv6 address classes. But the primary fields of all routing tables stay the
same.

The following are the main entries of a routing table:

• Destination. This is the IP address of the packet's final destination.


• Subnet mask. Also known as the netmask, this is a 32-bit network address that
identifies whether a host belongs to the local or remote network. To enhance
routing efficiency and reduce the size of the broadcast domain, administrators
can apply a custom subnet mask through the process of subnetting, which can
divide a network into two or smaller connected networks.
• Gateway. This is the next hop, or the neighboring device's IP address to which
the packet is forwarded.
• Interface. Routers typically use Ethernet interfaces to connect to other devices
on the same network, such as eth0 or eth1, and serial interfaces to connect to
outside wide area networks (WANs). The routing table lists the inbound

Computer Networking and Trouble Shooting Page 8


Module 2

network interface, also known as the outgoing interface, that the device should
use when forwarding the packet to the next hop.
• Metric. This entry assigns a value to each available route to a specific network.
The value ensures that the router can choose the most effective path. In some
cases, the metric is the number of routers that a data packet must cross before it
gets to the destination address. If multiple routes exist to the same destination
network, the path with the lowest metric is given precedence.
• Routes. This includes directly attached subnets, indirect subnets that aren't
attached to the device but can be accessed through one or more hops, and
default routes to use for certain types of traffic or when information is lacking.

Routing Protocols
Routing protocols are mechanisms for exchanging routing information between
routers to make routing decisions. Routing protocols can facilitate effective and
efficient communication between computer networks. Regardless of the scale of
the network, these protocols facilitate the secure delivery of data to its destination.

1. Distance Vector Routing Protocol :


These protocols select the best path on the basis of hop counts to reach a
destination network in a particular direction. Dynamic protocol like RIP is an
example of a distance vector routing protocol. Hop count is each router that
occurs in between the source and the destination network. The path with the least
hop count will be chosen as the best path.

Features –

Computer Networking and Trouble Shooting Page 9


Module 2

• Updates of the network are exchanged periodically.


• Updates (routing information) is not broadcasted but shared to neighbouring
nodes only.
• Full routing tables are not sent in updates but only distance vector is shared.
• Routers always trust routing information received from neighbor routers. This
is also known as routing on rumors.

Disadvantages –
• As the routing information is exchanged periodically, unnecessary traffic is
generated which consumes available bandwidth.
• As full routing tables are exchanged, therefore it has security issues. If an un-
authorized person enters the network, then the whole topology will be very
easy to understand.
• Also, the broadcasting of the network periodically creates unnecessary traffic.

2. Link State Routing Protocol :


These protocols know more about Internetwork than any other distance vector
routing protocol. These are also known as SPF (Shortest Path First) protocol.
OSPF is an example of link-state routing protocol.
Features –
• Hello, messages, also known as keep-alive messages are used for neighbor
discovery and recovery.
• Concept of triggered updates is used i.e updates are triggered only when there
is a topology change.

Computer Networking and Trouble Shooting Page 10


Module 2

• Only that many updates are exchanged which is requested by the neighbor
router.

Link state routing protocol maintains three tables namely:

1. Neighbor table- the table which contains information about the neighbors of
the router only, i.e, to which adjacency has been formed.
2. Topology table- This table contains information about the whole topology i.e
contains both best and backup routes to a particular advertised networks.
3. Routing table- This table contains all the best routes to the advertised
network.

Advantages –
• As it maintains separate tables for both the best route and the backup routes
• ( whole topology) therefore it has more knowledge of the internetwork than
any other distance vector routing protocol.
• Concept of triggered updates is used therefore no more unnecessary
bandwidth consumption is seen like in distance vector routing protocol.
• Partial updates are triggered when there is a topology change, not a full update
like distance vector routing protocol where the whole routing table is
exchanged.

3. Advanced Distance vector routing protocol:


It is also known as hybrid routing protocol which uses the concept of
both distance vector and link-state routing protocol. Enhanced
Computer Networking and Trouble Shooting Page 11
Module 2

Interior Gateway Routing Module [Link] (EIGRP) is an


example of this class of routing protocol. EIGRP acts as a link-state
routing protocol as it uses the concept of Hello protocol for neighbor
discovery and forming an adjacency. Also, partial updates are
triggered when a change occurs. EIGRP acts as a distance-vector
routing protocol as it learned routes from directly connected
neighbors.
Network Address Translation (NAT)

• To access the Internet, one public IP address is needed, but we can use a
private IP address in our private network.
• The idea of NAT is to allow multiple devices to access the Internet through
a single public address.
• To achieve this, the translation of a private IP address to a public IP
address is required.
• Network Address Translation (NAT) is a process in which one or more
local IP address is translated into one or more Global IP address and vice
versa in order to provide Internet access to the local hosts.
• Also, it does the translation of port numbers i.e. masks the port number of
the host with another port number, in the packet that will be routed to the
destination.
• It then makes the corresponding entries of IP address and port number in
the NAT table. NAT generally operates on a router or firewall.

Computer Networking and Trouble Shooting Page 12


Module 2

Network Address Translation (NAT) working –

Generally, the border router is configured for NAT i.e the router
which has one interface in the local (inside) network and one
interface in the global (outside) network.

• When a packet traverse outside the local (inside) network, then NAT
converts that local (private) IP address to a global (public) IP
address.

• When a packet enters the local network, the global (public) IP


address is converted to a local (private) IP address.

• If NAT runs out of addresses, i.e., no address is left in the pool


configured then the packets will be dropped and an Internet Control
Message Protocol (ICMP) host unreachable packet to the destination
is sent.

Computer Networking and Trouble Shooting Page 13


Module 2

• Inside local address – An IP address that is assigned to a host on the Inside


(local) network. The address is probably not an IP address assigned by the
service provider i.e., these are private IP addresses. This is the inside host seen
from the inside network.

• Inside global address – IP address that represents one or more inside local IP
addresses to the outside world. This is the inside host as seen from the outside
network.

Computer Networking and Trouble Shooting Page 14


Module 2

• Outside local address – This is the actual IP address of the destination host in
the local network after translation.

• Outside global address – This is the outside host as seen from the outside
network. It is the IP address of the outside destination host before translation.

Types of NAT

1. Static NAT – In this, a single unregistered (Private) IP address is mapped


with a legally registered (Public) IP address i.e one-to-one mapping between
local and global addresses. This is generally used for Web hosting. These are
not used in organizations as there are many devices that will need Internet
access and to provide Internet access, a public IP address is needed.
Suppose, if there are 3000 devices that need access to the Internet, the
organization has to buy 3000 public addresses that will be very costly.

2. Dynamic NAT – In this type of NAT, an unregistered IP address is translated


into a registered (Public) IP address from a pool of public IP addresses. If the
IP address of the pool is not free, then the packet will be dropped as only a
fixed number of private IP addresses can be translated to public addresses.
Suppose, if there is a pool of 2 public IP addresses then only 2 private IP
addresses can be translated at a given time. If 3rd private IP address wants to
access the Internet then the packet will be dropped therefore many private IP
addresses are mapped to a pool of public IP addresses. NAT is used when the

Computer Networking and Trouble Shooting Page 15


Module 2

number of users who want to access the Internet is fixed. This is also very
costly as the organization has to buy many global IP addresses to make a
pool.

3. Port Address Translation (PAT) – This is also known as NAT overload. In


this, many local (private) IP addresses can be translated to a single registered
IP address. Port numbers are used to distinguish the traffic i.e., which traffic
belongs to which IP address. This is most frequently used as it is cost-effective
as thousands of users can be connected to the Internet by using only one real
global (public) IP address.

Advantages of NAT

The following are the advantages of NAT:

o NAT protects the public addresses that have been registered and slow down
the IP address space exhaustion.
o Removes the address renumbering process that occurs when switching
networks
o The occurrence of address overlap was significantly reduced.
o Increases flexibility of the connection establishment.

Disadvantages of NAT

The following are the disadvantages of NAT:

o Lack of end-to-end traceability


Computer Networking and Trouble Shooting Page 16
Module 2

o Certain applications are not compatible with NAT


o Switching path delays are the outcome of the translation

Subnetting
When a bigger network is divided into smaller networks, to maintain security,
then that is known as Subnetting. So, maintenance is easier for smaller networks.
For example, if we consider a class A address, the possible number of hosts is
224 for each network, it is obvious that it is difficult to maintain such a huge
number of hosts, but it would be quite easier to maintain if we divide the network
into small parts.
Uses of Subnetting
1. Subnetting helps in organizing the network in an efficient way which helps in
expanding the technology for large firms and companies.
2. Subnetting is used for specific staffing structures to reduce traffic and
maintain order and efficiency.
3. Subnetting divides domains of the broadcast so that traffic is routed
efficiently, which helps in improving network performance.
4. Subnetting is used in increasing network security.

Computer Networking and Trouble Shooting Page 17


Module 2

Purpose of Subnetting in Computer Networks


o Efficiency of the Network

By removing the need for extra routers, subnetting makes network traffic simpler.
This makes sure the data being transmitted can get to its destination as fast as
possible, eliminating or avoiding any potential diversions that may slow it down.

Provides Network Security

By isolating or removing vulnerable network regions and making it harder for


intruders to move through a company's network, subnetting helps the network
managers in reducing network-wide risks.

Internet Protocol (IP) Addressing Relocation

Each class has a finite amount of possible host allocations; for instance, networks
with more than 254 devices require a Class B allocation. Assume that you are a
network administrator. Now, you have a task of allocating 150 hosts among three
physical networks in three distinct cities for a Class B or C network. If so, we must
either ask for additional address blocks for each network or split the single big
network into small parts named subnets so that we could utilize a single address
block across a number of physical networks.

Reduction of Network Traffic

Placing all of the computers on the same subnet can assist minimize network traffic
if a significant amount of an organization's traffic is intended to be shared routinely

Computer Networking and Trouble Shooting Page 18


Module 2

among a number of devices. Without a subnet, all computers and servers on the
network would be able to see data packets from every other machine.

Network Speed Improvement

The main network is divided into smaller subnets through the process of
subnetting, and the goal of these smaller, linked networks is to split the large
network into a collection of smaller, less-busy networks. Subnets reduce the need
for traffic to use unnecessary routes, which speeds up the network.

Division of IP Addresses

An IP address is split into its network address and host address via subnetting.

The split address may then be further divided into units using the subnet mask
approach, and those units can be assigned to different network devices.

Computer Networking and Trouble Shooting Page 19


Module 2

Routing algorithms

• In order to transfer the packets from source to the destination, the network
layer must determine the best route through which packets can be
transmitted.
• Whether the network layer provides datagram service or virtual circuit
service, the main job of the network layer is to provide the best route. The
routing protocol provides this job.
• The routing protocol is a routing algorithm that provides the best path from
the source to the destination. The best path is the path that has the "least-cost
path" from source to the destination.
• Routing is the process of forwarding the packets from source to the
destination but the best route to send the packets is determined by the
routing algorithm.

Classification of a Routing algorithm

The Routing algorithm is divided into two categories:

o Adaptive Routing algorithm


o Non-adaptive Routing algorithm

Computer Networking and Trouble Shooting Page 20


Module 2

Adaptive Routing algorithm

o An adaptive routing algorithm is also known as dynamic routing algorithm.


o This algorithm makes the routing decisions based on the topology and
network traffic.
o The main parameters related to this algorithm are hop count, distance and
estimated transit time.

An adaptive routing algorithm can be classified into three parts:

o Centralized algorithm: It is also known as global routing algorithm as it


computes the least-cost path between source and destination by using
complete and global knowledge about the network. This algorithm takes the
connectivity between the nodes and link cost as input, and this information is
obtained before actually performing any calculation. Link state
algorithm is referred to as a centralized algorithm since it is aware of the
cost of each link in the network.
o Isolation algorithm: It is an algorithm that obtains the routing information
by using local information rather than gathering information from other
nodes.
o Distributed algorithm: It is also known as decentralized algorithm as it
computes the least-cost path between source and destination in an iterative
and distributed manner. In the decentralized algorithm, no node has the
knowledge about the cost of all the network links. In the beginning, a node
contains the information only about its own directly attached links and
through an iterative process of calculation computes the least-cost path to the
destination. A Distance vector algorithm is a decentralized algorithm as it
never knows the complete path from source to the destination, instead it
knows the direction through which the packet is to be forwarded along with
the least cost path.

Computer Networking and Trouble Shooting Page 21


Module 2

Non-Adaptive Routing algorithm

o Non Adaptive routing algorithm is also known as a static routing algorithm.


o When booting up the network, the routing information stores to the routers.
o Non Adaptive routing algorithms do not take the routing decision based on
the network topology or network traffic.

The Non-Adaptive Routing algorithm is of two types:

Flooding: In case of flooding, every incoming packet is sent to all the outgoing
links except the one from it has been reached. The disadvantage of flooding is that
node may contain several copies of a particular packet.

Random walks: In case of random walks, a packet sent by the node to one of its
neighbors randomly. An advantage of using random walks is that it uses the
alternative routes very efficiently.

Dynamic Routing Protocols


Link State Routing
Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router in the internetwork.

The three keys to understand the Link State Routing algorithm:

o Knowledge about the neighborhood: Instead of sending its routing table, a


router sends the information about its neighborhood only. A router broadcast
its identities and cost of the directly attached links to other routers.

Computer Networking and Trouble Shooting Page 22


Module 2

o Flooding: Each router sends the information to every other router on the
internetwork except its neighbors. This process is known as Flooding. Every
router that receives the packet sends the copies to all its neighbors. Finally,
each and every router receives a copy of the same information.
o Information sharing: A router sends the information to every other router
only when the change occurs in the information.

Link State Routing has two phases:


Reliable Flooding
o Initial state: Each node knows the cost of its neighbors.
o Final state: Each node knows the entire graph.

Let's describe some notations:

o c( i , j): Link cost from node i to node j. If i and j nodes are not directly
linked, then c(i , j) = ∞.
o D(v): It defines the cost of the path from source code to destination v that
has the least cost currently.
o P(v): It defines the previous node (neighbor of v) along with current least
cost path from source to v.
o N: It is the total number of nodes available in the network.

Distance Vector Routing Algorithm


o The Distance vector algorithm is iterative, asynchronous and
distributed.
o Distributed: It is distributed in that each node receives information
from one or more of its directly attached neighbors, performs
calculation and then distributes the result back to its neighbors.
o Iterative: It is iterative in that its process continues until no more
information is available to be exchanged between neighbors.
Computer Networking and Trouble Shooting Page 23
Module 2

o Asynchronous: It does not require that all of its nodes operate in the
lock step with each other.
o The Distance vector algorithm is a dynamic algorithm.
o It is mainly used in ARPANET, and RIP.
o Each router maintains a distance table known as Vector.

Three Keys to understand the working of Distance Vector Routing


Algorithm:
o Knowledge about the whole network: Each router shares its knowledge
through the entire network. The Router sends its collected knowledge about
the network to its neighbors.
o Routing only to neighbors: The router sends its knowledge about the
network to only those routers which have direct links. The router sends
whatever it has about the network through the ports. The information is
received by the router and uses the information to update its own routing
table.
o Information sharing at regular intervals: Within 30 seconds, the router
sends the information to the neighboring routers.

Hierarchical Routing
• Hierarchical routing protocols consist of a hierarchical topology to
organize the network and routing information.
• Multiple layers and levels are introduced in a network. Each layer may be
assigned a different responsibility like forwarding packets, maintaining
routing tables, etc.
• HRPs are valuable for large networks, as they provide the capability of
organizing network information and reducing the amount of routing
information that should be exchanged between nodes. Hence, HRPs
demonstrate significant scalability and fault tolerance.

Computer Networking and Trouble Shooting Page 24


Module 2

• This is attributed to their hierarchical structure, which provides redundancy


and facilitates the efficient distribution of routing data throughout the
network.

Advantages of HRP

• Scalability: Hierarchical routing protocols exhibit excellent scalability by


partitioning the network into smaller segments or areas. This division reduces the
demand for routing tables and updates on each router, enhancing network
efficiency and decreasing overall network traffic.
• Better Traffic Control: Hierarchical routing protocols demonstrate superior
traffic management compared to flat routing protocols. The hierarchical
framework enables more efficient traffic control, mitigating the need for
unnecessary routing updates and preventing loops in the network.
• Easy to Manage: The organisational framework in these protocols facilitates
simplified management and maintenance. Segmentation of the network into
manageable sections enhances the ease of troubleshooting and diagnosing issues.

Disadvantages of HRP
• Complexity: Hierarchical routing protocols tend to be more intricate compared
to flat routing protocols. The presence of additional layers and segments
necessitates more extensive configuration, posing potential challenges in
implementation.
• Latency: Latency may be introduced into the network due to the presence of
additional layers and segments. Such delays in data transmission can pose
challenges, particularly for real-time applications.
Computer Networking and Trouble Shooting Page 25
Module 2

Inter-AS Routing

Figure Inter-AS routing

A routing policy defines how routing information is exchanged between the ASes.
For example, suppose two ASes, ASx and ASy, are connected to each other via a
link between two gateway routers.

Suppose that ASx knows how to reach some network, NET–1, that is defined by an
IP prefix. This network may be within ASx or may be external to it.

Suppose that ASy knows how to reach some other network, NET–2.

For systems on NET–1 to be able to send messages to systems on NET–2, and vice
versa, traffic will need to flow between ASx and ASy.

This means that ASx needs to announce to ASy that it has a route to NET–1 and
ASy needs to announce to ASx that it has a route to NET–2.

The exterior gateway protocol is used to do this. ASx and ASy can then decide
whether to accept this information or discard it (if, for example, they have better
routes to those networks).

Computer Networking and Trouble Shooting Page 26


Module 2

AS assignment

• An AS has a globally unique 32-bit number associated with it, called an


ASN (Autonomous System Number). If an Autonomous System exchanges
routing information with other Autonomous Systems on the public Internet,
it needs to have a unique ASN.
• This number is used in exchanging exterior routing information, particularly
in identifying paths through multiple ASes via BGP, the Border Gateway
Protocol.
• AS numbers are assigned to organizations by the Regional Internet Registry
(RIR) for their country (e.g., ARIN for the U.S. and Canada, for example,
for a $500 fee). Each RIR gets blocks of available AS numbers from the
IANA (Internet Assigned Numbers Authority).
• The process is similar to that of assigning IP addresses. There are currently
over 42,000 autonomous systems. The top-level list of IANA assignments of
AS numbers can be fond at [Link]
[Link]
• An ASN is not needed for a network that has a single connection to an ISP
and a single block of IP addresses (single prefix). The prefix of this network
should be managed by the AS of the provider since the external routing
policy of this network is the same as that of its provider.

Computer Networking and Trouble Shooting Page 27


Module 2

• Autonomous systems may be connected with multiple links and one


autonomous system will often be connected to several others for fault
tolerance, to access different parts of the network, and to route traffic
between these different parts. Each autonomous system can decide who they
will exchange traffic with (that is, whether they will allow another AS to
route traffic through it).

What is meant by the Routing Information Protocol (RIP)?

• The Routing Information Protocol (RIP) is an open-standard protocol. It is


not a Cisco proprietary protocol!
• It can be specified as a classful routing protocol.
• It is a distance-vector interior gateway protocol. Therefore it uses
‘routing-by-rumor’ logic to learn or share routes.
• This name is given so because the router does not know the network beyond
its neighbors. It is only aware of the information that its neighbors tell the
router about it.
• The distance vector protocols operate by sending the following to their
neighbors that are connected directly:
• Their known destination networks.
• Their metric (distance/cost) to reach their known destination networks.
• Distance vector routing protocols are older than Link-State routing
protocols.

Computer Networking and Trouble Shooting Page 28


Module 2

• In the link-state routing protocols, the router develops a complete picture of


the network.
• The RIP protocol is called a ‘distance vector’ because it is only aware of
the distance (metric) and the direction/next-hop router (vector) of each
route.
• One router = one hop. For example, a 10-gigabit connection is equal to one
hop. So is the 10-megabit connection.
• The maximum hop count is 15. This means that RIP cannot be used for
very large networks.
• The number of maximum routers is 16.
• The lower the metric, the better it is!
It exchanges the whole of the routing table after every 30 seconds.

How Does the RIP Work?

To understand how RIP works, we will consider two types of networks.

In the first example, there are eight routers connected to a network where router 1
wants to send data to router 3. If the network is configured with RIP, it will choose
the route with the least hop count. In other words, it will choose the shortest path.

Computer Networking and Trouble Shooting Page 29


Module 2

In this network, we have three possible routes to deliver the data from R1 to R4:

• Route 1:
It has 3 hop count. The data travels from R1 to R2 to R3 to R4.


• Route 2:
It has 2 hop count. The packet travels from R1 to R5 to R4.

• Route 3:
It has 4 hop count. The data travels from R1 to R6 to R7 to R8 to R4.

Therefore, the shortest path is router 2 as it has 2 hop counts only!

Let us consider another example!

Computer Networking and Trouble Shooting Page 30


Module 2

In this example, router R1 wants to send information to router R4. If the network is
configured with RIP, it will choose the route with the least hop count.

In this scenario, there are 2 possible pathways to send data from R1 to R4:

• Route 1:
It has a hop count of 3. The data travels from R1 to R2 to R3 to R4.

• Router 2:
It has a hop count of 3 as well. The data travels from R1 to R5 to R6 to R4.

In such a case when the hop count is the same for all of the routes, the router will
send the packets through both route 1 and route 2 at the same time. In such a way,
it manages the load balancing in the network. In such a way, the data will reach
the destination faster.

Computer Networking and Trouble Shooting Page 31


Module 2

What are the Advantages of the RIP Protocol in


Networking?

he following are the advantages of the RIP in Networking:

• RIP is easy to configure.


• There is no complexity in this protocol.
• It uses less storage or CPU.
• It uses load balancing.
• It does not have any loops.

What are the Disadvantages of the RIP Protocol in


Networking?

Here are a few disadvantages of the RIP in Networking:

• RIP only works on the basis of the hop count matrix. Therefore, if there is a
better route available with more bandwidth, RIP does not choose that
specific route.
• RIP always supports equal-cost load balancing.
• It broadcasts the updates to all of the network and therefore, it creates a lot
of traffic.
• Bandwidth usage is very heavy as it broadcasts its update every 30 seconds.
• RIP only supports a maximum hop count of 15.
• It can only configure 16 routers.
• If any link goes down, RIP takes a long time to choose an alternate route.
Therefore, it has slow convergence.
Computer Networking and Trouble Shooting Page 32
Module 2

• RIP has the highest Administrative Distance of 120 which is not as reliable
as other router protocols.

OSPF Protocol
• The OSPF stands for Open Shortest Path First. It is a widely used and
supported routing protocol.
• It is an intra domain protocol, which means that it is used within an area or a
network. It is an interior gateway protocol that has been designed within a
single autonomous system.
• It is based on a link-state routing algorithm in which each router contains the
information of every domain, and based on this information, it determines
the shortest path.
• The goal of routing is to learn routes. The OSPF achieves by learning about
every router and subnet within the entire network.
• Every router contains the same information about the network. The way the
router learns this information by sending LSA (Link State Advertisements).
• These LSAs contain information about every router, subnet, and other
networking information.
• Once the LSAs have been flooded, the OSPF stores the information in a
link-state database known as LSDB. The main goal is to have the same
information about every router in an LSDBs.

Computer Networking and Trouble Shooting Page 33


Module 2

OSPF States

The device running the OSPF protocol undergoes the following


states:

o Down: If the device is in a down state, it has not received the HELLO
packet. Here, down does not mean that the device is physically down; it
means that the OSPF process has not been started yet.
o Init: If the device comes in an init state, it means that the device has
received the HELLO packet from the other router.
o 2WAY: If the device is in a 2WAY state, which means that both the routers
have received the HELLO packet from the other router, and the connection
gets established between the routers.
o Exstart: Once the exchange between the routers get started, both the routers
move to the Exstart state. In this state, master and slave are selected based
on the router's id. The master controls the sequence of numbers, and starts
the exchange process.
o Exchange: In the exchange state, both the routers send a list of LSAs to
each other that contain a database description.
o Loading: On the loading state, the LSR, LSU, and LSA are exchanged.
o Full: Once the exchange of the LSAs is completed, the routers move to the
full state.

Computer Networking and Trouble Shooting Page 34


Module 2

How does OSPF work?


There are three steps that can explain the working of OSPF:

Step 1: The first step is to become OSPF neighbors. The two connecting routers
running OSPF on the same link creates a neighbor relationship.

Step 2: The second step is to exchange database information. After becoming the
neighbors, the two routers exchange the LSDB information with each other.

Step 3: The third step is to choose the best route. Once the LSDB information has
been exchanged with each other, the router chooses the best route to be added to a
routing table based on the calculation of SPF.

Broadcast Routing

Broadcast routing plays a role, in computer networking and


telecommunications. It involves transmitting data, messages, or signals from one
source to destinations within a network. Unlike routing (one-to-one
communication) or multicast routing (one-to-many communication) broadcast
routing ensures that information reaches all devices or nodes within the network.

Computer Networking and Trouble Shooting Page 35


Module 2

Mechanisms for Broadcast Routing


The mechanisms and protocols are employed to efficiently distribute data to
multiple recipients through broadcast routing. Here are some important methods:
• Flooding: Flooding is an approach to broadcast routing. In this method, the
sender broadcasts the message to all connected devices, which then forwards it
to their connected devices and so on. This continues until the message reaches
all intended recipients or a predefined maximum number of hops is reached.
However flooding can lead to network congestion and inefficiency.
• Spanning Tree Protocol (STP): STP is utilized in Ethernet networks to
prevent loops and ensure broadcast routing. It establishes a tree structure that
connects all devices, in the network while avoiding paths. Reducing network
congestion and avoiding broadcast messages are the benefits of implementing
this approach.

Computer Networking and Trouble Shooting Page 36


Module 2

• The Internet Group Management Protocol (IGMP): It is a communication


protocol utilized in IP networks to facilitate the management of group
memberships. Its purpose is to enable hosts to join or leave groups ensuring
that only interested recipients receive the multicast traffic. This not enhances
network efficiency. Also prevents unnecessary data transmission.
• Broadcast Domains: Segmenting a network into broadcast domains also
known as subnetting is a way to manage and control the scope of broadcast
messages. By dividing a network into segments we can contain the impact of
broadcast traffic within each segment minimizing its overall effect, on the
entire network.
Importance of Broadcast Routing
The significance of broadcast routing in communication systems cannot be
overstated for reasons;
• Efficient Data Distribution: Broadcast routing ensures that information
reaches all intended recipients simultaneously. This efficiency makes it ideal
for applications such as live event broadcasting, software updates distribution
or emergency alerts.
• Scalability: It allows networks to expand without requiring routing
configurations. Adding devices to a network doesn’t necessitate changes
making it practical for large scale networks.
• Reliability: Broadcast routing provides communication redundancy. If one
path fails data can still be delivered through routes enhancing the reliability of
the network.

Computer Networking and Trouble Shooting Page 37


Module 2

• Security: Although broadcast routing is commonly associated with broadcasts


it can also be employed in networks, for secure communications. In cases
encryption and access control mechanisms are utilized to ensure data privacy.
Challenges and Solutions
While broadcast routing has its benefits it also presents challenges that require
attention;
• Broadcast Storms: Flooding based broadcast routing can result in broadcast
storms, where an overwhelming amount of traffic floods the network leading
to congestion and decreased efficiency. Network administrators implement
measures, like storm control and rate limiting to tackle this issue.
• Security Concerns: Broadcasting information, over networks can pose
security risks. To address this encryption and authentication mechanisms are
commonly employed to safeguard data during transmission.
• Scalability: Managing broadcast traffic becomes more complex as networks
grow larger. To maintain scalability it is beneficial to implement broadcast
domains and utilize routing algorithms.
• Bandwidth Consumption: It is crucial to design and monitor the network to
prevent overload caused by broadcast traffic as it consumes network
bandwidth.

Computer Networking and Trouble Shooting Page 38


Module 2

Multicast Routing
Multicast routing begins by sending a select group of receivers the data, which
they filter out to other necessary receivers like tree branches. That’s why these
setups are often called multicast trees.

It’s another way multicasting reduces latency and bandwidth because it doesn’t
attempt to send more transmissions than it can handle. Diversifying the nodes
responsible for dispersing the information helps receivers access data promptly.

Multicasting requires a server capable of handling multiple protocols. Otherwise, it


won’t operate well on LANs or WANs. Protocol independent multicast (PIM) and
internet group management protocol (IGMP) allow routers to fashion the tree
branches and access data. IGMP informs multicast rendezvous points on how
many recipients there are and where they are located.

Multicasting tree classification


Two multicast routing classifications demonstrate the protocol’s versatility:
source-based tree (SBT) and group shared tree (GST). They also accentuate how
multicast routing must work with additional protocols for purpose optimization.

Computer Networking and Trouble Shooting Page 39


Module 2

Source-based tree (SBT)


In an SBT approach, the origin of the multicast routing creates a tree, and every
group is directly traceable back to the starting source. At the same time, each node
can continue to develop other branches because they each keep transmitting the
source.

SBTs are annotated as source, group (S, G). They attempt to find the quickest route
to as many receivers as possible, trimming the distance the data travels each time
it’s transferred. Thus it’s also known as a shortest-path tree (SPT).

Group shared tree (GST)


GSTs send packets from multiple sources to converge at a rendezvous point (RP).
The RP then forwards those packets down the shared tree.

GSTs are annotated as (*, G), using an asterisk (*) in place of the source, since the
source may be any number of different origins beyond the RP.

Transmission can occur bidirectionally in this setup. Therefore, not every member
has to be attached to the starting router or core.

How is multicast routing supported?


Multicast routing is not a default and may not be supported on every network.
Where supported, users can toggle it on and off through network settings. You can

Computer Networking and Trouble Shooting Page 40


Module 2

configure your router to support any multicast routing protocol. The host is then
assigned an IP address that receivers downstream can easily identify.

It uses a multicast forwarding information base (MFIB) and sends information to


the routing information base (MRIB). These keep communications open with other
protocols and track data transmission speed and bytes.

Top 3 multicast routing protocols

Several routing protocols enhance multicasting capabilities, but the most widely
used are dense mode, sparse mode, and reverse path forwarding.

Dense mode
In dense mode, the source will distribute the data to every subnet included in the
multicast network. This is also called flooding because it sends packets with less
discretion than other protocol variants.

Not every router has to accept the package, though. Prune messages can notify the
sending nodes to exclude them from receiving information, which helps trim
unnecessary data emissions.

PIM protocol can work in a dense mode multicast routing type because it creates as
many short pathways to recipients as possible.

Computer Networking and Trouble Shooting Page 41


Module 2

Sparse mode
Whereas dense mode mass-releases data to connected networks, sparse mode only
takes the time to do so if there’s a request.

Protocols like this reduce bandwidth usage and allow nodes joining the multicast
group to receive data over time when they initiate a specific request.

Like dense mode, there is also a PIM sparse model.

Reverse Path Forwarding


Reverse path forwarding implements a self-check so nodes can’t receive the same
information they sent, because the sender won’t look at that interface.

Though multicast routing optimizes for short paths, it can sometimes lead to loops
when packets continually find other connected nodes. In such cases it can
unintentionally waste resources by sending data back to the original sender.
Reverse path forwarding allows for more intentional sending and receiving of data.

4 examples of multicasting
There are many uses of multicast routing, but some of the most common are media
streaming on IPTV, videoconferencing, file distribution, and Internet of Things
(IoT) devices.

Computer Networking and Trouble Shooting Page 42


Module 2

It may be helpful to contextualize multicasting with these examples to understand


its most relevant uses, as well as what sets it apart from other routing protocols.
Even though unicasting or broadcasting could suffice to deliver media or mass
amounts of data, it may not always be the optimal solution.

• Streaming: This is one of the most widely used multicasting applications,


allowing video or other media to be delivered to users across a corporate
campus, school, or hotel property. Live streaming of events and concerts is also
sometimes done via multicast.

• Videoconferencing: From Zoom calls to mass video training sessions,


multicasting allows many entrants to participate in the same event without
overwhelming the server.

• File distribution: Over-the-air patch management, operating system imaging,


and even financial stock tickers can all be multicast over corporate networks.

• IoT devices: The sensors embedded into IoT devices translate and send
information to databases, AI, and countless other sources when it collects info.
These systems may rely on multicasting to keep tabs on cyber security and
ensure the correct recipients.
Multicasting could apply to large-scale professional training experiences or gaming
events through virtual reality. The possibilities are continuing to expand as new
technologies come into the fold, stretching the abilities of what and how multicasts
can transmit experiences across networks.

Computer Networking and Trouble Shooting Page 43


Module 2

It should be noted that content delivery networks (CDNs) such as Netflix, although
sharing many characteristics with multicasting, are typically done via unicast.
Although this may increase latency on the organization’s home network, it enables
greater flexibility in dispersing media on demand over the internet.

Computer Networking and Trouble Shooting Page 44

You might also like