0% found this document useful (0 votes)
26 views

Networking With Tcp/ip

Each router maintains a routing table that specifies the best path to reach different networks. Routing tables are initialized at startup and dynamically updated as network changes occur. Routers share information about reachable networks and costs with neighboring routers using distance-vector routing protocols. This allows each router to construct accurate routing tables and efficiently route packets through the network.

Uploaded by

gopika1official
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Networking With Tcp/ip

Each router maintains a routing table that specifies the best path to reach different networks. Routing tables are initialized at startup and dynamically updated as network changes occur. Routers share information about reachable networks and costs with neighboring routers using distance-vector routing protocols. This allows each router to construct accurate routing tables and efficiently route packets through the network.

Uploaded by

gopika1official
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

14-10-2023

The Origin Of Routing Tables


• Each router attaches to two or more physical networks and forwards
IP' datagrams among them, accepting datagrams that arrive over one
network interface, and routing them out over another interface.
Module 5 • Except for destinations on directly attached networks, hosts pass all
NW TCP IP IP traffic to routers which forward datagrams on toward their final
destinations.
• A datagram travels from router to router until it reaches a router that
attaches directly to the same network as the final destination.

DR LINO, MIIT NW TCP/IP MODULE 5 1 DR LINO, MIIT NW TCP/IP MODULE 5 2

• Each entry in the routing table specifies the network portion of a • Establishing routes involves initialization and update.
destination address and gives the address of the next machine along • Each router must establish an initial set of routes when it starts, and it
a path used to reach that network. must update the table as routes change (e.g., when a network
• How hosts or routers obtain the information for their routing tables? interface fails).
• The issue has two aspects: what values should be placed in the • Initialization depends on the operating system. In some systems, the
tables, and how routers obtain those values. router reads an initial routing table from secondary storage at startup,
keeping it resident in main memory.

DR LINO, MIIT NW TCP/IP MODULE 5 3 DR LINO, MIIT NW TCP/IP MODULE 5 4

Routing With Partial Information Automatic Route Propagation


• Hosts do not have complete knowledge of all possible destination • A distance-vector routing (DVR) protocol requires that a router
addresses, or even of all possible destination networks inform its neighbors as topology changes periodically.
• In fact, many hosts have only two routes in their routing table: a route • Historically known as the old ARPANET routing algorithm (or known
for the local network and a default route for a nearby router. as Bellman-Ford algorithm).
• Bellman Ford Basics – Each router maintains a Distance Vector table
containing the distance between itself and ALL possible destination
nodes.
• Distances,based on a chosen metric, are computed using information
from the neighbors’ distance vectors.

DR LINO, MIIT NW TCP/IP MODULE 5 5 DR LINO, MIIT NW TCP/IP MODULE 5 6

1
14-10-2023

DR LINO, MIIT NW TCP/IP MODULE 5 7 DR LINO, MIIT NW TCP/IP MODULE 5 8

Automatic Routing Propagation in Distance-Vector


Broadcasting Updates
Routing
• Definition: Process of routers sharing routing information • Periodic Updates: Routers periodically send routing updates
automatically • Content: Includes routing table info, routes, costs, and next-hop
• Purpose: Enables routers to learn network topology and make routers
informed routing decisions • Audience: Neighboring routers receive these broadcasts
• Initial Routing Table Setup • Receiving Updates
• Router startup or network topology changes • Neighboring Routers: Receive and analyze updates
• Initial Routing Table: Contains info on connected networks and costs • Determine if new info provides better paths to destinations
(hops/metrics)
• Update routing tables if shorter paths or lower costs are indicated
• Significance: Starting point for routing decisions

DR LINO, MIIT NW TCP/IP MODULE 5 9 DR LINO, MIIT NW TCP/IP MODULE 5 10

Distance-Vector Algorithm Split Horizon and Poison Reverse

• Distance-vector algorithms (e.g., Bellman-Ford for RIP) • Used to prevent routing loops
• Calculation: Determines best paths based on costs to reach each • Split Horizon: Restricts advertising routes back to their source
network • Poison Reverse: Advertises unreachable routes with infinite metrics
• Selection: Choose paths with the lowest cost through neighboring
routers
• Route Aging and Garbage Collection
• Routing updates continue periodically
• Stale Routes: To prevent, implement aging mechanisms
• Ensures routers can quickly adapt to network changes
• Routes not updated are aged out and removed
• Detect and respond to topology changes efficiently
• Keeps routing tables accurate and up-to-date

DR LINO, MIIT NW TCP/IP MODULE 5 11 DR LINO, MIIT NW TCP/IP MODULE 5 12

2
14-10-2023

Distance Vector Algorithm –


Distance Vector Routing
1.A router transmits its distance vector to each of its neighbors in a • It is a dynamic routing algorithm in which each router computes a
routing packet. distance between itself and each possible destination i.e. its
2.Each router receives and saves the most recently received distance immediate neighbors.
vector from each of its neighbors. • The router shares its knowledge about the whole network to its
3.A router recalculates its distance vector when: neighbors and accordingly updates the table based on its neighbors.
1. It receives a distance vector from a neighbor containing different information • The sharing of information with the neighbors takes place at regular
than before. intervals.
2. It discovers that a link to a neighbor has gone down. • It makes use of Bellman-Ford Algorithm for making routing tables.
• The DV calculation is based on minimizing the cost to each
destination
DR LINO, MIIT NW TCP/IP MODULE 5 14 DR LINO, MIIT NW TCP/IP MODULE 5 15

• Example – Consider 3-routers X, Y • As we can see that distance will be less going from X to Z when Y is
and Z as shown in figure. Each intermediate node(hop) so it will be update in routing table X.
router have their routing table.
Every routing table will contain
distance to the destination nodes.
• Consider router X , X will share it
routing table to neighbors and
neighbors will share it routing table
to it to X and distance from node X
to destination will be calculated
using bellmen- ford equation.

DR LINO, MIIT NW TCP/IP MODULE 5 16 DR LINO, MIIT NW TCP/IP MODULE 5 17

Finally the routing table for all –


• Similarly for Z also

DR LINO, MIIT NW TCP/IP MODULE 5 18 DR LINO, MIIT NW TCP/IP MODULE 5 19

3
14-10-2023

Challenges Routing Protocols


• When routes change rapidly, however, the computations may not stabilize.
• When a route changes (i.e, a new connection appears or an old one fails),
the information propagates slowly from one router to another.
• Meanwhile, some routers may have incorrect routing information.

DR LINO, MIIT NW TCP/IP MODULE 5 20 DR LINO, MIIT NW TCP/IP MODULE 5 21

DR LINO, MIIT NW TCP/IP MODULE 5 22 DR LINO, MIIT NW TCP/IP MODULE 5 23

DR LINO, MIIT NW TCP/IP MODULE 5 24 DR LINO, MIIT NW TCP/IP MODULE 5 25

4
14-10-2023

DR LINO, MIIT NW TCP/IP MODULE 5 26 DR LINO, MIIT NW TCP/IP MODULE 5 27

DR LINO, MIIT NW TCP/IP MODULE 5 28 DR LINO, MIIT NW TCP/IP MODULE 5 29

DR LINO, MIIT NW TCP/IP MODULE 5 30 DR LINO, MIIT NW TCP/IP MODULE 5 31

5
14-10-2023

IGP, EGP, and Autonomous Systems


• There are two categories of IP routing protocols: interior
gateway protocol (IGP) and exterior gateway protocol (EGP).
• If a routing protocol is designed and intended for use in a single
autonomous system, it falls under IGP.
• If a routing protocol is designed and intended for use between
different autonomous systems, it falls under EGP.
• An Autonomous System is a group of networks that is governed
and controlled by a single administrative entity.
• For example, a network created by a single company,
organization, corporation, or ISP is a single AS.

DR LINO, MIIT NW TCP/IP MODULE 5 32 DR LINO, MIIT NW TCP/IP MODULE 5 33

What are AS numbers?


• An AS number is a unique identity of the AS on the Internet. If
you want to connect your AS to the Internet, you must obtain an
AS number.
• Internet Assigned Numbers Authority (IANA) has the worldwide
right to assign AS numbers.

DR LINO, MIIT NW TCP/IP MODULE 5 34 DR LINO, MIIT NW TCP/IP MODULE 5 35

What is an IGP protocol? EGP protocol?


• An AS can contain multiple networks. • An EGP protocol provides connectivity between different
• To connect these networks, the administrator can use a routing autonomous systems.
protocol.
• Since different autonomous systems belong to different
• The routing protocol the administrator uses to connect the networks administrative entities, administrators cannot use routing
within the autonomous system is known as an interior gateway
routing protocol. protocols of their choices to connect them.
• Since all networks in an autonomous system belong to the same • They have to use a uniform routing protocol. A uniform routing
administrative entity, the administrator can configure any IGP protocol that connects different autonomous systems is known
protocol to connect them. as an exterior gateway routing protocol.
• RIPv1, IGRP, OSPF, EIGRP, RIPv2, and IS-IS are some examples of • Nowadays, BGP is the only used exterior routing protocol. BGP
interior gateway routing protocols.
connects all public autonomous systems on the Internet.
DR LINO, MIIT NW TCP/IP MODULE 5 36 DR LINO, MIIT NW TCP/IP MODULE 5 37

6
14-10-2023

DR LINO, MIIT NW TCP/IP MODULE 5 38 DR LINO, MIIT NW TCP/IP MODULE 5 39

RIP Routing Information Protocol (RIP)


• It is a dynamic routing protocol that uses hop count as a routing metric to
find the best path between the source and the destination network.
• RIP is one of the earliest introduced routing protocols.
• It is a distance-vector routing protocol works on the Network layer of the
• It is a distance vector routing protocol. It uses the number of OSI model.
hops (routers) in the path as the metric.
• RIP uses port number 520.
• It sends out a copy of its routing table to neighbors every 30
Hop Count
seconds and the triggered updates whenever the metric of the
route changes. • Hop count is the number of routers occurring in between the source and
destination network. The path with the lowest hop count is considered as
• It has two versions: RIPv1 and RIPv2. RIPv2 was developed as the best route to reach a network and therefore placed in the routing
the update of RIPv1. table.

DR LINO, MIIT NW TCP/IP MODULE 5 40 DR LINO, MIIT NW TCP/IP MODULE 5 41

RIP Message Format


RIP timers:
• Command: is used for request or reply. The
• Update timer: The default timing for routing information being exchanged value of the request is 1, and the value of the
by the routers operating RIP is 30 seconds. Using an Update timer, the reply is 2.
routers exchange their routing table periodically. • Version: Here, version means that which
• Invalid timer: If no update comes until 180 seconds, then the destination version of the protocol we are using. Suppose
router considers it invalid. In this scenario, the destination router mark hop we are using the protocol of version1, then we
counts as 16 for that router. put the 1 in this field.
• Hold down timer: This is the time for which the router waits for a neighbor • Reserved: This is a reserved field, so it is filled
router to respond. If the router isn’t able to respond within a given time with zeroes.
then it is declared dead. It is 180 seconds by default. • Family: It is a 16-bit field. As we are using the
• Flush time: It is the time after which the entry of the route will be flushed TCP/IP family HTTP, IP, SMTP etc
if it doesn’t respond within the flush time. It is 60 seconds by default. This • Network Address: IP version.
timer starts after the route has been declared invalid and after 60 seconds
i.e time will be 180 + 60 = 240 seconds. • Distance: The distance field specifies the hop
count, i.e., the number of hops used to reach
the destination.
DR LINO, MIIT NW TCP/IP MODULE 5 42 DR LINO, MIIT NW TCP/IP MODULE 5 43

7
14-10-2023

OSPF-Open Shortest Path First protocol


• OSPF was developed as an improvement to RIP.
• RIP will load-balance traffic if there are several paths with • It is a link-state routing protocol.
the same metric (equal-cost load balancing) to a • It is an interior gateway protocol that has been designed within a single
destination. autonomous system.
• It uses the cost of the path as the metric.
• It uses hierarchical design, trigger updates, link-state advertisement,
and many other features to provide fast convergence and reliability.
• It has three versions: OSPFv1, OSPFv2, and OSPFv3. OSPFv2 was
developed as the update of OSPFv1.
• OSPFv3 was developed to support IPv6.
• The main advantage of a link state routing protocol like OSPF is that
the complete knowledge of topology allows routers to calculate
routes that satisfy particular criteria.
DR LINO, MIIT NW TCP/IP MODULE 5 44 DR LINO, MIIT NW TCP/IP MODULE 5 45

The working of OSPF:


Link State Database
• Step 1: The first step is to become OSPF neighbors. The two • The LSDB (Link State Database) is the database that OSPF
connecting routers running OSPF on the same link creates a neighbor builds and is based on the information that it has found in LSAs
relationship. (Link State Advertisements).
• Step 2: The second step is to exchange database information. After • The LSDB is synchronized between routers within the same
becoming the neighbors, the two routers exchange the Link State area.
LSDB information with each other. • Each router stores the received LSA packets in the link-state
• Step 3: The third step is to choose the best route. Once the LSDB database (LSDB).
information has been exchanged with each other, the router chooses • After LSDBs are synced between the routers, OSPF uses the
the best route to be added to a routing table based on the calculation shortest path first (SPF) algorithm to calculate the best routes.
of SPF.

DR LINO, MIIT NW TCP/IP MODULE 5 46 DR LINO, MIIT NW TCP/IP MODULE 5 47

Size
Types of links in OSPF Field Name

Version #
(bytes)
1
Description

Version Number: Set to 2 for OSPF version 2.


Type 1
• A link is basically a connection, so the connection between two Packet Length 2
Packet Length: The length of the message, in
bytes, including the 24 bytes of this header.
routers is known as a link.
1.Point-to-point link: The point-to-point link directly connects the two Router ID 4
Router ID: The ID of the router that generated this
message (generally its IP address on the interface
routers without any host or router in between. over which the message was sent).

2.Transient link: When several routers are attached in a network, they Area ID: An identification of the OSPF area to
Area ID 4 which this message belongs, when areas are
are known as a transient link. used.

3.Stub link: It is a network that is connected to the single router. Data Checksum: A 16-bit checksum computed in a
enters to the network through the single router and leaves the Checksum 2
manner similar to a standard IP checksum. The
entire message is included in the calculation
network through the same router. except the Authentication field.

AuthType 2
Authentication: A 64-bit field used for
DR LINO, MIIT NW TCP/IP MODULE 5 48 Authentication 8
authentication ofDRthe
LINO, MIIT NW TCP/IP
message, MODULE 5
as needed. 49

8
14-10-2023

Why area is used in OSPF?


• In OSPF, a single autonomous system (AS)
can be divided into smaller groups called
areas.
• There are five types of OSPF
areas: Backbone area (area 0), Standard
area, Stub area, Totally stubby area
• The backbone area (also known as area 0 or
area 0.0. 0.0) forms the core of OSPF
networks.
• All other areas should be connected to the
backbone area by a direct link.

DR LINO, MIIT NW TCP/IP MODULE 5 50 DR LINO, MIIT NW TCP/IP MODULE 5 51

OSPF BGP
BGP OSPF stands for Open Shortest Path First. BGP stands for Border Gateway Protocol.

While the implementation of BGP is


• Border Gateway Protocol (BGP) is used to Exchange routing The implementation of OSPF is easy. difficult.

information for the internet and is the protocol used between ISP
which are different ASes. OSPF is type of hierarchical network topology or While it is the type of mesh topology or
• The protocol can connect together any internetwork of autonomous design. design.
system using an arbitrary topology. While it is called as external gateway
It is also called as internal gateway protocol. protocol.
• Coordination among multiple BGP speakers within the AS
(Autonomous System). While in this, Transmission control protocol
In OSPF internet protocol is used. is used.

It works in 89 port number. While it works in 179 port number.

OSPF is a Link State type. While it is a Vector State type.

OSPF DR LINO, MIIT


BGP
NW TCP/IP MODULE 5 52
In OSPF Dijkstra algorithm is used.
DR LINO, MIIT
While in this Best path algorithm is used.
NW TCP/IP MODULE 5 53

OSPF stands for Open Shortest Path First. BGP stands for Border Gateway Protocol. OSPF prefers fastest path rather than shortest
path. While It prefers best path.
While the implementation of BGP is
The implementation of OSPF is easy. difficult. It relies for the device resources type on the
size of routing table, although it scales
It requires device resources- CPU and memory. better.
OSPF is type of hierarchical network topology or While it is the type of mesh topology or
design. design.
Its metric is determined using AS path, IGP-
While it is called as external gateway
Its metric is determined by bandwidth. Metric, Next Hop, Weight, etc.
It is also called as internal gateway protocol. protocol.

While in this, Transmission control protocol


It is used mainly for small networks that can be
In OSPF internet protocol is used. is used. managed centrally. It is for large networks such as Internet.

It works in 89 port number. While it works in 179 port number. It prefers fastest path over shortest path. It prefers best path.

OSPF is a Link State type. While it is a Vector State type. The training cost is comparatively more
The training cost involved is less. than OSPF.
In OSPF Dijkstra algorithm is used. While in this Best path algorithm is used.

OSPF prefers fastest path rather than shortest


path. While It prefers best path.

It relies for the device resources type on the


size of routing table, although it scales
It requires device resources- CPU and memory. better.

Its metric is determined using AS path, IGP-


Its metric is determined by bandwidth. Metric, Next Hop, Weight, etc.

It is used mainly for small networks that can be


managed centrally. It is for large networks such as Internet.

It prefers fastest path over shortest path. It prefers best path.

The training cost is comparatively more


The training cost involved is less. than OSPF.

DR LINO, MIIT NW TCP/IP MODULE 5 54 DR LINO, MIIT NW TCP/IP MODULE 5 55

9
14-10-2023

Gateway-to-Gateway Protocol --A DVR


RIP VS OSPF
protocol
• GGP is no longer part of the TCP/IP standards, it does provide a
concrete example of distance-vector routing
• Because only core routers participated in GGP, and because core
routers were controlled by a central authority, other routers could not
interfere with the exchange.
• A core router is a router designed to operate in the Internet
backbone, or core.

DR LINO, MIIT NW TCP/IP MODULE 5 56 DR LINO, MIIT NW TCP/IP MODULE 5 57

Distance Factoring
• When a new router was added to the core system, it was assigned • Known as distance factoring, the technique avoids sending copies of
one or more core neighbors with which it communicated. the same distance number
• The neighbors, members of the core, already propagated routing • Consequently, most distance values in an update are small numbers,
information among themselves. and the same values tend to be repeated frequently.
• Thus, the new router only needed to inform its neighbors about • Before two routers can exchange routing information, they must
networks it could reach; they updated their routing tables and establish communication, and some message types are used for that
propagated this new information further. purpose.
• GGP is a true distance-vector protocol. The information routers • A routing update contains a list of pairs, where each entry contains an
exchange with GGP consists of a set of pairs, (N, D), where N is an IP IP network address and the distance to that network.
network address, and D is a distance measured in hops.
DR LINO, MIIT NW TCP/IP MODULE 5 58 DR LINO, MIIT NW TCP/IP MODULE 5 59

Link State Routing –


• It is a dynamic routing algorithm in which each router shares • Features of link state routing protocols –
knowledge of its neighbors with every other router in the network. • Link state packet – A small packet that contains routing information.
• Information sharing takes place only whenever there is a change.
• It makes use of Dijkstra’s Algorithm for making routing tables. • Link state database – A collection of information gathered from the
link-state packet.

• Shortest path first algorithm (Dijkstra algorithm) – A calculation


performed on the database results in the shortest path

• Routing table – A list of known paths and interfaces.

DR LINO, MIIT NW TCP/IP MODULE 5 60 DR LINO, MIIT NW TCP/IP MODULE 5 61

10
14-10-2023

Link State protocols in comparison to Distance Vector protocols have


Border Gateway Protocol (BGP)

1.It requires a large amount of memory. • Exterior Gate way Protocols And Autonomous Systems (BGP)
2.Shortest path computations require many CPU circles. • If an internet consists of only a single backbone plus a set of attached
local area networks, the core approach propagates all necessary
routing information correctly.
3.All items in the database must be sent to neighbors to form link-state
packets. • Because all routers attach to the wide area backbone network, they
can exchange all necessary routing information directly.
4.All neighbors must be trusted in the topology. • Unfortunately, the scheme does not scale
5.Authentication mechanisms can be used to avoid undesired adjacency and
problems.

DR LINO, MIIT NW TCP/IP MODULE 5 63 DR LINO, MIIT NW TCP/IP MODULE 5 64

Issues
• If a large set of routers attempt to communicate, the total bandwidth • There are two issues: delay and overhead
becomes overwhelming. • For example, consider the maximum delay until all routers are informed
• The scheme cannot accommodate multiple routers and networks at a about a change when they use a distance-vector protocol.
given site because only those routers that connect directly to the • Each router must receive the new information, update its routing table,
backbone network can communicate directly and then forward the information to its neighbors
• Third, in a large internet, the networks and routers are not all • The issue of overhead is also easy to understand. Because each router that
managed by a single entity, nor are shortest paths always used. participates in a routing protocol must send messages, a larger set of
Instead, because networks are owned and managed by independent participating routers means more routing traffic.
groups, the groups may choose policies that differ. • Furthermore, if routing messages contain a list of possible destinations,
• A routing architecture must provide a way for each group to the size of each message grows as the number of routers and networks
independently control routing and access. increases

DR LINO, MIIT NW TCP/IP MODULE 5 65 DR LINO, MIIT NW TCP/IP MODULE 5 66

Autonomous System Concept


• Because an internet is not static, it can be difficult to estimate how much • the networks and routers fall under a single administrative authority, that
traffic routing protocols will generate or what percentage of the underlying authority can guarantee that internal routes remain consistent and viable.
bandwidth the routing traffic will consume.
• Furthermore, the administrative authority can choose one of its routers to
• For example, as the number of hosts on a network grows over time, serve as the machine that will apprise the outside world of networks within
increases in the traffic generated consume more of the network capacity
the organization.
• They usually implement a traffic monitoring scheme. In essence, a traffic
monitor listens passively to a network and records statistics about the • For purposes of routing, a group of networks and routers controlled by a
traffic. single administrative authority is called an autonomous system (AS).
• In particular, a monitor can compute both the network utilization (i.e., • Routers within an autonomous system are free to choose their own
percentage of the underlying bandwidth being used) and the percentage of mechanisms for discovering, propagating, validating, and checking the
packets carrying routing protocol messages. consistency of routes.

DR LINO, MIIT NW TCP/IP MODULE 5 67 DR LINO, MIIT NW TCP/IP MODULE 5 68

11
14-10-2023

• To make networks that are hidden inside autonomous systems


reachable throughout the Internet, each autonomous system must
advertise its networks to other autonomous systems.
• An advertisement can be sent to any autonomous system.

DR LINO, MIIT NW TCP/IP MODULE 5 69 DR LINO, MIIT NW TCP/IP MODULE 5 70

An Exterior Gateway Protocol


• Computer scientists use the term Exterior Gateway Protocol (EGP)?
to denote any protocol used to pass routing information between two
autonomous systems.
• Currently a single exterior protocol is used in most TCP/IP internets.
Known as the Border Gateway Protocol (BGP), it has evolved through
four (quite different) versions.
• Each version is numbered, which gives rise to the formal name of the
current version: BGP-4

DR LINO, MIIT NW TCP/IP MODULE 5 71 DR LINO, MIIT NW TCP/IP MODULE 5 72

BGP characteristics Routing Information Protocol (RIP)


• Inter-Autonomous System Communication • Routers that run BGP to advertise reachability usually also need to
• Coordination Among Multiple BGP Speakers run an IGP to obtain information from within their autonomous
• Propagation Of Reachability Information. system.
• BGP allows an autonomous system to advertise destinations that are reachable either in or
through it, • One of the most widely used IGPs is the Routing Information Protocol
• Next-Hop Paradigm. (RIP)
• Like distance-vector routing protocols, BGP supplies next hop information for each
destination.
• Designed at the University of California
• Route Aggregation.
• BGP conserves network bandwidth by allowing a sender to aggregate route information and • It was not designed to be used on large, wide area networks
send a single entry to represent multiple, related destinations.
• Authentication.
• BGP allows a receiver to authenticate messages (i.e., verify the identity of a sender).

DR LINO, MIIT NW TCP/IP MODULE 5 73 DR LINO, MIIT NW TCP/IP MODULE 5 74

12
14-10-2023

RIP Operation
• It partitions participants into active and passive (i.e., silent) machines. • Each update contains a set of pairs, where each pair contains an IP
network address and an integer distance to that network.
• Active participants advertise their routes to others; passive
participants listen to RIP messages and use them to update their • RIP uses a hop count metric to measure distances.
routing table, but do not advertise. • Hop Count
• A router can run RIP in active mode; a host must use passive mode. • Hop count is the number of routers occurring in between the source
and destination network.
• A router running RIP in active mode broadcasts a routing update
message every 30 seconds. • The path with the lowest hop count is considered as the best route to
reach a network and therefore placed in the routing table.
• The maximum hop count allowed for RIP is 15 and a hop count of 16
is considered as network unreachable.

DR LINO, MIIT NW TCP/IP MODULE 5 75 DR LINO, MIIT NW TCP/IP MODULE 5 76

How does OSPF work?


The Open SPF Protocol (OSPF)
• The OSPF stands for Open Shortest Path First. It is a widely used and • There are three steps that can explain the working of OSPF:
supported routing protocol.
• It is an intradomain protocol, which means that it is used within an area or • Step 1: The first step is to become OSPF neighbors. The two
a network. connecting routers running OSPF on the same link creates a neighbor
• It is an interior gateway protocol that has been designed within a single relationship.
autonomous system. • Step 2: The second step is to exchange database information. After
• It is based on a link-state routing algorithm becoming the neighbors, the two routers exchange the Link State DB
• OSPF divides the autonomous systems into areas where the area is a information with each other.
collection of networks, hosts, and routers • Step 3: The third step is to choose the best route. Once the LSDB
• Like internet service providers divide the internet into a different information has been exchanged with each other, the router chooses
autonomous system for easy management and OSPF further divides the the best route to be added to a routing table based on the
autonomous systems into Areas. calculation of SPF.
DR LINO, MIIT NW TCP/IP MODULE 5 77 DR LINO, MIIT NW TCP/IP MODULE 5 78

Features of RIP
RIP versions
• Updates of the network are exchanged periodically. • There are three versions of routing information protocol – RIP
• Updates (routing information) are always broadcast. Version1, RIP Version2, and RIPng.
• Full routing tables are sent in updates
• Routers always trust routing information received from neighbor
routers. This is also known as Routing on rumors.

DR LINO, MIIT NW TCP/IP MODULE 5 79 DR LINO, MIIT NW TCP/IP MODULE 5 80

13
14-10-2023

Disadvantages of RIP The Hello Protocol


• In RIP, the route is chosen based on the hop count metric. • The HELLO protocol is an interior protocol that uses a routing metric
• If another route of better bandwidth is available, then that route based on the length of time it takes a packet to make the trip between
would not be chosen. the source and the destination.
• HELLO packets carry timestamp information which allows receivers
to compute the shortest delay paths to destinations.
• The "best" route is the route with the shortest time delay.
• The unit of time used in HELLO is milliseconds.

DR LINO, MIIT NW TCP/IP MODULE 5 81 DR LINO, MIIT NW TCP/IP MODULE 5 82

Area of Routers
• The basic idea behind HELLO is simple: each machine participating in
the HELLO exchange maintains a table of its best estimate of the
clocks in neighboring machines.
• Before transmitting a packet, a machine adds its timestamp by
copying the current clock value into the packet.
• When a packet arrives, the receiver computes an estimate of the
current delay on the link by subtracting the timestamp on the
incoming packet from the local estimate for the current clock in the
neighbor.

DR LINO, MIIT NW TCP/IP MODULE 5 83 DR LINO, MIIT NW TCP/IP MODULE 5 84

1.Backbone router – The area 0 is known as backbone area


and the routers in area 0 are known as backbone routers.
If the routers exists partially in the area 0then also it is a
backbone router.
2.Internal router – An internal router is a router which have
all of its interfaces in a single area.
3.Area Boundary Router (ABR) – The router which connects
backbone area with another area is called Area Boundary
Router. It belongs to more than one area. The ABRs,
therefore, maintain multiple link-state databases that
describe both the backbone topology and the topology of
the other areas.
4.Autonomous System Boundary Router: ASBR is a
router that is connected to the network with more
than one routing protocol. ASBR exchanges routing
info with routers autonomous systems.

DR LINO, MIIT NW TCP/IP MODULE 5 85 DR LINO, MIIT NW TCP/IP MODULE 5 86

14
14-10-2023

Private And Hybrid Networks


• Single-level internet architecture is the lack of privacy.
• A two-level architecture distinguishes between internal and external
datagrams
• The goal is to keep internal datagrams private, while still allowing external
communication
• An organization builds its own TCP/IP internet separate from the global
Internet.
• All data remains private because no outsiders have access to any part of a
private network
• because the private network is isolated from the global Internet, it can use
arbitrary IP addresses.

DR LINO, MIIT NW TCP/IP MODULE 5 87 DR LINO, MIIT NW TCP/IP MODULE 5 88

Hybrid network Leased Line


• A hybrid network architecture that combines the advantages of • In the figure, a leased
private networking with the advantages of global Internet circuit between routers
connectivity R2, and R4, provides
• That is, the organization uses globally valid IP' addresses and connects privacy for inter site
each site to the Internet. traffic.
• The advantage is that hosts in the organization can access the global • Thus, routing at each site
Internet when needed, but can be assured of privacy when is arranged to send traffic
communicating internally. across the leased circuit
rather than across the
global Internet.

DR LINO, MIIT NW TCP/IP MODULE 5 89 DR LINO, MIIT NW TCP/IP MODULE 5 90

Leased Line VS
Tunneling and encryption
A Virtual Private Network (VPN)
• The chief disadvantage of either a completely private network or a • Two basic techniques make a VPN possible: tunneling and encryption
hybrid scheme arises from the high cost: each leased circuit is • When data is tunnelled, it is split into smaller parts called packets, as
expensive. it travels through the tunnel.
• A VPN is private in the same way as a private network - the • The packets are encrypted via the tunnel, and another process
known as encapsulation takes place.
technology guarantees that communication between any pair of
computers in the VPN remains concealed from outsiders. • For transmission, private network data and protocol details are
encased in public network transmission units.
• A VPN is virtual because it does not use leased circuits to interconnect • The units have the appearance of public data, allowing them to be
sites. Instead, a VPN uses the global Internet to pass traffic from one sent via the Internet.
site to another • Encapsulation enables packets to reach their intended destination.
De-capsulation and decryption take place at the final destination.

DR LINO, MIIT NW TCP/IP MODULE 5 91 DR LINO, MIIT NW TCP/IP MODULE 5 92

15
14-10-2023

• A technique of • Although the outer datagram traverses arbitrary networks as it passes


internetworking across the tunnel, outsiders cannot decode the contents because they do
called Tunneling is used when not have the encryption key.
source and destination • Furthermore, even the identity of the original source and destination are
networks of same type are to hidden because the header of the inner datagram is encrypted as well.
be connected through a • Thus, only addresses in the outer datagram header are visible: the source
network of different type. address is the IP address of the router at one end of a tunnel, and the
• to guarantee privacy, a VPN destination address is the IP address of the router at the other end of the
encrypts each outgoing tunnel.
datagram before • A Virtual Private Network sends data across the Internet, but encrypts
encapsulating it in another intersite transmissions to guarantee privacy.
datagram for transmission
DR LINO, MIIT NW TCP/IP MODULE 5 93 DR LINO, MIIT NW TCP/IP MODULE 5 94

VPN Addressing And Routing VPN Addressing And Routing


• Using a virtual private network (VPN), you create a public • The easiest way to understand VPN addressing and routing is to think
connection from which you cloak yourself online as an of each VPN tunnel as a replacement for a leased circuit in a private
anonymous user. network.
• You are virtually invisible online while using a VPN because • As in the private network case, a router contains explicit routes for
their IP addresses mask your internet protocol address (IP). destinations within the organization.
• However, instead of routing data across a leased lined, a VPN routes
the data through a tunnel.

DR LINO, MIIT NW TCP/IP MODULE 5 95 DR LINO, MIIT NW TCP/IP MODULE 5 96

Advantages Network Address Translation (NAT)


• Helps you to stay secure when using public Wi-Fi hotspots. • The idea of NAT is to allow multiple devices to access the Internet through
a single public address.
• Masks your IP (Internet Protocol) address. • To achieve this, the translation of a private IP address to a public IP address
• Encrypts your internet traffic, making your browsing more secure and is required.
private. • 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
• Allows you to access more internet content and bypass restrictions order to provide Internet access to the local hosts.
such as government censorship. • NAT is introduced and widely deployed everywhere which
permits a network device like a router to behave as an agent
• Ensures that your internet traffic isn’t tracked and recorded, later to between the Internet and the private network.
be sold by your internet service provider (ISP), ad brokers, or snoops. • It signifies that a unique IP address can be used to
symbolize the overall class of network devices like PCs.

DR LINO, MIIT NW TCP/IP MODULE 5 97 DR LINO, MIIT NW TCP/IP MODULE 5 99

16
14-10-2023

NAT types –
• Port Address Translation (PAT) –
There are 3 types of NAT: This is also known as NAT overload. In
• 1. Static NAT – this, many local (private) IP addresses
In this, a single private IP address is mapped with a can be translated to a single public IP
single Public IP address, i.e., a private IP address is address
translated to a public IP address. It is used in Web
hosting. • Port numbers are used to distinguish the
• 2. Dynamic NAT – traffic, i.e., which traffic belongs to which
In this type of NAT, multiple private IP addresses are IP address.
mapped to a pool of public IP addresses. It is used • This is most frequently used as it is cost-
when we know the number of fixed users who want effective as thousands of users can be
to access the Internet at a given point in time. connected to the Internet by using only
one real global (public) IP address.

DR LINO, MIIT NW TCP/IP MODULE 5 100 DR LINO, MIIT NW TCP/IP MODULE 5 101

Advantage What is DNS?


• The Domain Name System (DNS) is the phonebook of the Internet.
Humans access information online through domain names, like
• NAT provides the following benefits: IP address spaces can be nytimes.com or espn.com.
saved because many hosts connect to the global Internet by
• Web browsers interact through Internet Protocol (IP) addresses. DNS
using a single dynamic external IP address. translates domain names to IP addresses so browsers can load
• Private IP addresses can be reused. Internet resources.
• The security of private networks can be enhanced by hiding the • Each device connected to the Internet has a unique IP address which
internal addresses from external networks. other machines use to find the device.
• DNS servers eliminate the need for humans to memorize IP addresses such as
192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such
as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

DR LINO, MIIT NW TCP/IP MODULE 5 102 DR LINO, MIIT NW TCP/IP MODULE 5 104

DNS work Generic Domains


• The process of DNS resolution involves converting a hostname (such • It defines the registered hosts according to their generic behavior.
as www.example.com) into a computer-friendly IP address (such as • Each node in a tree defines the domain name, which is an index to
192.168.1.1). the DNS database.
• DNS is a TCP/IP protocol used on different platforms. • It uses three-character labels, and these labels describe the
• The domain name space is divided into three different sections: organization type. Label Description
generic domains, country domains, and inverse domain. aero Airlines and aerospace
companies
biz Businesses or firms
com Commercial Organizations

coop Cooperative business


Organizations
DR LINO, MIIT NW TCP/IP MODULE 5 105 edu DR LINO, MIIT NW TCP/IP Educational
MODULE 5 institutions 106

17
14-10-2023

Country Domain and Inverse Domain Working of DNS


• The format of country domain is same as a generic domain, but it • DNS is a client/server network communication protocol. DNS clients send
uses two-character country abbreviations (e.g., us for the United requests to the. server while DNS servers send responses to the client.
States) in place of three character organizational abbreviations. • Client requests contain a name which is converted into an IP address
known as a forward DNS lookups while requests containing an IP address
• The inverse domain is used for mapping an address to a name. which is converted into a name known as reverse DNS lookups.
• When the server has received a request from the client, and the • DNS implements a distributed database to store the name of all the hosts
server contains the files of only authorized clients. available on the internet.
• To determine whether the client is on the authorized list or not, it • If a client like a web browser sends a request containing a hostname, then
sends a query to the DNS server and ask for mapping an address to a piece of software such as DNS resolver sends a request to the DNS server
the name for cross verification to obtain the IP address of a hostname.

DR LINO, MIIT NW TCP/IP MODULE 5 107 DR LINO, MIIT NW TCP/IP MODULE 5 108

There are 4 DNS servers involved in loading


a webpage:
• DNS recursor - The recursor can be thought of as a librarian who is
asked to go find a particular book somewhere in a library. The DNS
recursor is a server designed to receive queries from client machines
through applications such as web browsers.
• Root nameserver - The root server is the first step in translating
(resolving) human readable host names into IP addresses. It can be
thought of like an index in a library that points to different racks of
books - typically it serves as a reference to other more specific
locations.

DR LINO, MIIT NW TCP/IP MODULE 5 109 DR LINO, MIIT NW TCP/IP MODULE 5 110

• TLD nameserver - The top level domain server (TLD) can be thought of as a
specific rack of books in a library. This nameserver is the next step in the
search for a specific IP address, and it hosts the last portion of a hostname
(In example.com, the TLD server is “com”).

• Authoritative nameserver - This final nameserver can be thought of as a


dictionary on a rack of books, in which a specific name can be translated
into its definition. The authoritative nameserver is the last stop in the
nameserver query.
• If the authoritative name server has access to the requested record, it will
return the IP address for the requested hostname back to the DNS
Recursor (the librarian) that made the initial request.
DR LINO, MIIT NW TCP/IP MODULE 5 111 DR LINO, MIIT NW TCP/IP MODULE 5 112

18
14-10-2023

What are the steps in a DNS lookup?


1. A user types ‘example.com’ into a web browser and the query travels into the
Internet and is received by a DNS recursive resolver.
2. The resolver then queries a DNS root nameserver (.).
3. The root server then responds to the resolver with the address of a Top Level
Domain (TLD) DNS server (such as .com or .net), which stores the information for its
domains. When searching for example.com, our request is pointed toward the .com
TLD.
4. The resolver then makes a request to the .com TLD.
5. The TLD server then responds with the IP address of the domain’s nameserver,
example.com.
6. Lastly, the recursive resolver sends a query to the domain’s nameserver.
7. The IP address for example.com is then returned to the resolver from the
nameserver.
8. The DNS resolver then responds to the web browser with the IP address of the
domain requested initially.
9. The browser makes a HTTP request to the IP address.
10.The server at that IP returns the webpage to be rendered in the browser (step 10).

DR LINO, MIIT NW TCP/IP MODULE 5 113 DR LINO, MIIT NW TCP/IP MODULE 5 114

DR LINO, MIIT NW TCP/IP MODULE 5 115 DR LINO, MIIT NW TCP/IP MODULE 5 116

DR LINO, MIIT NW TCP/IP MODULE 5 117

19

You might also like