Networking With Tcp/ip
Networking With Tcp/ip
• 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.
1
14-10-2023
• 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
2
14-10-2023
• 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.
3
14-10-2023
4
14-10-2023
5
14-10-2023
6
14-10-2023
7
14-10-2023
Size
Types of links in OSPF Field Name
Version #
(bytes)
1
Description
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
OSPF BGP
BGP OSPF stands for Open Shortest Path First. BGP stands for Border Gateway Protocol.
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 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.
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.
9
14-10-2023
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
10
14-10-2023
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.
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
11
14-10-2023
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.
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.
13
14-10-2023
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.
14
14-10-2023
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.
15
14-10-2023
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
DR LINO, MIIT NW TCP/IP MODULE 5 102 DR LINO, MIIT NW TCP/IP MODULE 5 104
17
14-10-2023
DR LINO, MIIT NW TCP/IP MODULE 5 107 DR LINO, MIIT NW TCP/IP MODULE 5 108
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”).
18
14-10-2023
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
19