Basics Of Computer Network Notes Unit 4
Basics Of Computer Network Notes Unit 4
Similarly, in a network routers use routing protocols to determine the best path for a packet to travel through
the inter-network more efficiently.
a routing table is created which contains information regarding routes that data packets follow.
Routing is the process of path selection in any network.
Routing is done by special network devices called routers or it can be done by means of software processes.
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.
1. 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 in a route to move from source to the destination.
the least hop count will be considered as the best path to move from source to the destination.
2. Delay:
It is a time taken by the router to process, queue and transmit a datagram to an interface.
The path having the lowest delay value will be considered as the best path.
3. Bandwidth:
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.
4. 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.
5. 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.
Static Routing
Default Routing
Dynamic Routing
Static Routing
unit 5 1
Static Routing is also known as Nonadaptive Routing.
It is a technique in which the administrator manually adds the routes in a routing table.
A Router can send the packets for the destination along the route defined by the administrator.
In this technique, routing decisions are not made based on the condition or topology of the networks
No Overhead: It has ho overhead on the CPU usage of the router. Therefore, the cheaper router can be
used to obtain static routing.
Security: It provides security as the system administrator is allowed only to have control over the routing
to a particular network.
For a large network, it becomes a very difficult task to add each route manually to the routing table.
The system administrator should have a good knowledge of a topology as he has to add each route
manually.
Default Routing
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.
Default Routing is used when networks deal with the single exit point.
It is also useful when the bulk of transmission networks have to transmit the data to the same hp device.
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.
Dynamic Routing
It is also known as Adaptive Routing.
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.
Dynamic protocols are used to discover the new routes to reach the destination.
In Dynamic Routing, RIP and OSPF are the protocols used to discover the new routes.
If any route goes down, then the automatic adjustment will be made to reach the destination.
unit 5 2
All the routers must have the same dynamic routing protocol in order to exchange the routes.
If the router discovers any change in the condition or topology, then router broadcast this information to all
other routers.
It is more effective in selecting the best route in response to the changes in the condition or topology.
3. Static routing provides high or more security. Dynamic routing provides less security.
In static routing, failure of the link disrupts the In dynamic routing, failure of the link does not interrupt
7.
rerouting. the rerouting.
8. Less Bandwidth is required in Static Routing. More Bandwidth is required in Dynamic Routing.
Optimality Principle
The purpose of a routing algorithm at a router is to decide which output line an incoming packet should go.
The optimal path from a particular router to another may be the least cost path, the least distance path, the
least time path, the least hops path or a combination of any of the above.
unit 5 3
The optimality principle can be logically proved as follows −
If a better route could be found between router J and router K, the path from router I to router K via J
would be updated via this route. Thus, the optimal path from J to K will again lie on the optimal path from I
to K.
Example
Consider a network of routers, {G, H, I, J, K, L, M, N} as shown in the figure. Let the optimal route from I to K
be as shown via the green path, i.e. via the route I-G-J-L-K. According to the optimality principle, the optimal
path from J to K with be along the same route, i.e. J-L-K.
Now, suppose we find a better route from J to K is found, say along J-M-N-K. Consequently, we will also need
to update the optimal route from I to K as I-GJ- M-N-K, since the previous route ceases to be optimal in this
situation. This new optimal path is shown line orange lines in the following figure −
For this reason, an internet is divided into autonomous systems .An autonomous system (AS) is a group of
networks and routers under the authority of a single administration.
Protocols For intradomain routing, the protocols For interdomain routing, the
used are known as interior-gateway protocols used are known as
unit 5 4
protocols as they route traffic within a exterior-gateway protocols as
domain. they route traffic outside as
well as inside a domain.
VLSM (Variable
8 Length Subnet doesnot support vlsm yes yes
Masking)
administrative
9 120 90 110
distance
BGP, or Border Gateway Protocol, is a standardized exterior gateway protocol that is used to exchange
routing and reachability information between different autonomous systems (ASes) on the internet. An
autonomous system is a collection of IP networks and routers under the control of a single organization that
presents a common routing policy to the internet.
unit 5 5
BGP is a path vector protocol, which means it maintains a path vector for each route. The path vector
includes the list of ASes that the route has traversed to reach its destination. This information is
crucial for loop prevention and enables BGP routers to make informed routing decisions.
2. Policy-Based Routing:
BGP allows network administrators to define routing policies based on various criteria. These policies
determine how BGP selects and advertises routes. Unlike interior gateway protocols (IGPs) that focus
on the shortest path, BGP is more flexible and allows administrators to consider factors such as AS
path length, route preference, and other policy-based attributes.
3. Inter-AS Routing:
BGP is designed for inter-domain routing, connecting different autonomous systems. It provides a
scalable solution for routing on the global internet, allowing ISPs and large organizations to exchange
routing information across their networks. BGP is commonly used at the edge of autonomous systems
to connect to other ASes.
BGP routers use a set of criteria to select the best path to reach a destination. These criteria include
the AS path length, origin code, multi-exit discriminator (MED), and other optional attributes. The
flexibility of BGP allows administrators to influence path selection based on their specific requirements
and policies.
5. TCP-Based Connection:
BGP uses TCP (Transmission Control Protocol) as its transport protocol. This ensures reliable and
connection-oriented communication between BGP routers. The use of TCP helps in error detection,
retransmission of lost data, and maintaining a reliable connection between BGP peers.
6. Slow Convergence:
BGP is designed with stability in mind, and as a result, it may exhibit slower convergence compared to
interior gateway protocols. BGP routers do not rapidly update routing information, which is suitable for
stable internet routing but may lead to longer convergence times in the event of network changes.
7. Route Aggregation:
BGP supports route aggregation, which allows routers to represent multiple IP prefixes as a single,
summarized route. This helps in reducing the size of the routing tables and contributes to the
scalability of the global internet.
8. Community Attribute:
BGP includes a "community" attribute that allows network administrators to tag routes with a
community string. This string can be used to group routes and apply policies based on community
membership. It provides a way to simplify the application of policies across a set of routes.
BGP is a critical protocol for the proper functioning of the internet, enabling the exchange of routing
information between different autonomous systems and supporting a diverse range of routing policies and
configurations.
unit 5 6