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

Computer Networking Network Layer Notes

NAT (Network Address Translation) allows internal networks to use private IP addresses while having a small set of public IP addresses assigned externally. IPv6 addresses are 128-bit addresses written in hexadecimal notation and divided into groups to improve readability. IPv6 provides a vastly larger address space of 2128 addresses and supports real-time audio/video. The Internet Protocol uses connectionless and unreliable datagram delivery over packet switching networks. IP packet headers contain fields for version, header length, services, total length, identification, flags, fragmentation, time to live, protocol, checksum, source address, and destination address.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Computer Networking Network Layer Notes

NAT (Network Address Translation) allows internal networks to use private IP addresses while having a small set of public IP addresses assigned externally. IPv6 addresses are 128-bit addresses written in hexadecimal notation and divided into groups to improve readability. IPv6 provides a vastly larger address space of 2128 addresses and supports real-time audio/video. The Internet Protocol uses connectionless and unreliable datagram delivery over packet switching networks. IP packet headers contain fields for version, header length, services, total length, identification, flags, fragmentation, time to live, protocol, checksum, source address, and destination address.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 37

NETWORK LAYER

NAT (Network Address Translation)


 Enables us to have large set of addresses internally and one address or a small set of addresses
externally. The traffic inside can use the large set and the traffic outside can use the small set.
 Internet authorities have reserved 3 set of addresses as private addresses. Any organization can
use this set of addresses without the permission from internet authorities. These IP s are unique
locally but not globally.

 The site must have only one single connection to the global internet.
 ADDRESS TRANSLATION
 The source address of all the outgoing packets is replaced by the global NAT address
by the NAT router
 All incoming packets also pass through the NAT router which replaces the
destination address in the packet with the appropriate private address.
 NAT Translation Table
 Has 2 columns the private address and the external address (destination address of
the packet).
 When the router translates the source address of the outgoing packet, it also makes
note of the destination address-where the packet is going. When the response comes
back from the destination, the router uses the source address of the packet (as the
external address) to find the private address of the packet.
 In this strategy communication must always be initiated by the private network.
 NAT router has multiple global address so that multiple internal private hosts can
communicate at the same time.
 There are some drawbacks to this system
 No more than the maximum number of external(global) addresses in the NAT can
make connections to the same destination.
 Also no private network host can access 2 external server programs at once.

IPv6 ADDRESSES
 Address depletion is still a problem despite many of the measures taken to solve it such as
classless addressing, Dynamic Host configuration (DHCP),NAT etc.
 IPv4 had other problems such as lack of accommodation of real time audio and video transmission
encryption and authentication of data for some applications.

 Consists of 16 bytes. It is 128 bits long.

 To make it more readable IPv6 specifies hexadecimal colon notation. 128 bits are divided into 8
sections each 2 bytes in length. 2 bytes in hex requires 4 hex digits

 Address consists of 32 hex digits with every 4 digits separated by a colon.

 They can be further abbreviated.

 Re-expansion of the abbreviated address is simple just replace the empty places with 0s.
 ADDRESS SPACE
o much larger address space. 2128 addresses are available.

o Designers divided address into several categories.


 Few left-most bits called the type pre-fix defines its category.
 Unicast addresses
o Defines a single computer.

o Packet sent to a unicast address must be sent to the specific computer itself.

o Unicast addresses are of 2 types

 Geographically based
 Provider-based
 Multicast addresses
o Defines a group of host instead of just one

o Packet sent to multicast address must be sent to each member of that group.

o Multicast addresses can be either permanent or transient (defined by the flag field)

 Permanent group address is defined by the internet authorities


 Transient group addresses are temporary group addresses.
 Anycast Addresses
o Also defines a group of nodes however packet destined for an anycast address is delivered to any
one of the members of that group the NEAREST ONE.
 Reserved Address
o These addresses start with 8 0s. (type prefix is 00000000).

o Few subcategories are

 Unspecified – when host does not know its own address an send an enquiry to find it.
 Loopback – used by a host to test itself without going into the network
 Compatible – used during transition from IPv4 to IPv6
 Mapped – also used during transition but from IPv6 to IPv4
 Local address
o These addresses are used when an organization wants to use IPv6 without being connected to the
global internet.
o They provide addressing for private networks.
INTERNET PROTOCOL
 Switching at the network layer in the internet uses the datagram approach to packet switching.
packet switching :
a mode of data transmission in which a message is broken into a number of parts which are sent
over whatever route is optimum, and reassembled at the destination.
 Connection at the network layer in the internet is CONNECTIONLESS.

IPv4
delivery mechanism used by the TCP/IP protocol
o Unreliable and connectionless datagram protocol.

o A best-effort delivery system. (like the post office)

o It provides no error control or flow control (except error detection on the header).

 DATAGRAM
o A datagram is a variable length packet consisting of 2 parts : header and data.

o HEADER

 20 – 60 bytes in length
 Contains information essential to routing and delivery
 Customary in TCP/IP to show the header in 4-byte sections

o VERSION (VER)

 This 4 bit field defines the version of this IP protocol ( 4 in case of IPv4).
 If processing machine is using some other version of IP then the datagram is
discarded rather than interpreting it incorrectly.
o HEADER LENGTH (HLEN)

 This 4 bit field defines the total length of the datagram header in 4 byte words
 Needed because the length of the header is variable
 When there is no options the header length is 20
 When the option field is at its max header length is 60.
o SERVICES
 IETF changed the interpretation and name of this 8 bit field
 Previously called service type
 Now it’s called differentiated services.
 SERVICE TYPE

 First 3 bits are called precedence bits. (never used)


 Next 4 bits are called Type of Service (TOS).
o 4 bit subfield with each bit having a special meaning.

o One and only one bit can have a value of 1 in each datagram.

o Therefore there are 5 different types of services.

o Application program can request a specific type of services.


 DIFFERENTIATED SERVICES

 First 6 bits make up the codepoint subfield and the last 2 bits are not used
 Codepoint subfield can be used in 2 different ways
o when 3 right most bits are 0 the 3 leftmost are interpreted as
precedence bits in the service type interpretation(compatible with the
old interpretation).
o When they are not 0s all 6 bits define 64 services based on the priority
assignment by the internet.
o The first category contains 32 service types

o The second and thirst contain 16

o TOTAL LENGTH

 N-bit field that defines the total length (IPv4 header plus data) of the IPv4 datagram
in bytes.
 To find length of data coming from the upper layer subtract the header length from
the total length.
 Header length can be found by multiplying the value in HLEN field by 4

Length of data = total length – header length or


Length of data = total length – (4 x HLEN)
o IDENTIFICATION
used in fragmentation
o FLAGS
used in fragmentation
o FRAGMENTATION OFFSET
used in fragmentation
o TIME TO LIVE

 Datagram has limited lifetime in its travel through the internet.


 Today mostly used to control the max number of hops visited by the datagram.
the source stores a number in this field ( approx. 2 x total number of routes between
2 hosts) and with every hop the number decrements. If value after being
decremented is 0 the router discards the datagram.
 Needed because routing tables can be corrupted resulting in a datagram traveling
for a long time between routers. This limits the datagrams lifetime.
 Also helps to intentionally limit the journey of the packet.
o PROTOCOL

 8 bit field
 Helps define higher level protocols that uses services of the IPv4 layer.
 Since IPv4 carries data from several other protocols the value of this field helps the
receiving network layer know which protocol the data belongs to.
o CHECKSUM
discussed later in the document.
o SOURCE ADDRESS

 32 bit field
 Defines IPv4 address of the source
 Remains unchanged throughout the travel of the packet.
o DESTINATION ADDRESS

 32 bit field.
 Defines IPv4 address of the destination.
 Remains unchanged throughout the travel of the packet.
 FRAGMENTATION
o Max length of IPv4 datagram is 65,535 bytes but this amount of data cannot be transmitted
through the physical layers this they need to be fragmented.
o The transport later will segment the data into a size that can be accommodated by IPv4 and
the data link layer in use.
o Fragmented datagrams has their own headers with most of the fields repeated but with
some changed.
o A fragmented datagram can be further fragmented based on the needs of the MTU
(maximum transfer unit).
o The host router that fragments the datagram must change 3 fields
Flags , Fragmentation Offset , and total Length.
o Rest of the fields must be copied.

o Value of the checksum must be recalculated regardless


o FIELDS RELATED TO FRAGMENTATION

 Identification
 16 bit field that identifies the datagram
 When a datagram is fragmented the value of this field is copied in all the
fragments
 This later helps in reassembling the datagram.
 Flags
 3 bit field
 First bit is reserved, second bit is called DoNotFragment bit. If its value is 1
the machine must not fragment the datagram. If 0 datagram can be
fragmented if necessary.
 3rd bit is called the more fragment bit
if its value is 1 then its not the last fragment there are more after this one.
if its 0 then it’s the last fragment of the datagram.
 Fragmentation Offset
 13 bit field
 Shows relative position of the fragment with respect to the whole datagram.
 CHECKSUM
o Checksum in IPv4 covers only the header

o The data encapsulated already has a checksum from the previous layers

o Header of the packet changes with each visited router but data does not so checksum
includes only the part that changed. Which decreases the checksum calculation time.
 OPTIONS
o The variable part of the IPv4 header.

o Can be max of 40 bytes.

o Not required for the datagram but can be used for network testing and debugging.

o Taxonomy of
options
 No options
one byte option used a filler between options.
 End of Options
1 byte option used for padding at the end of the option field. However can only be
used as the last option.
 Record route
used to record the internet routers that handle the datagram
can list up to 9 router addresses. Used for debugging and management purposes.
 Strict Source route
used by the source to pre-determine a route for the datagram as it travels through
the internet
 Loose Source route
same as a strict source route but less rigid. Each router in the list must be visited but
datagram can visit other routers as well.
 Timestamp
used to record the time of the datagram processing by the router.
expressed in ms from midnight.
 IPv6
o IPv6 or IPng (internet protocol new generation) was developed to address the issues and
drawbacks of IPv4.
o Advantages of IPv6 over IPv4

 Larger address space 2128


 Better header format where options are separate from the base header and are
added when needed.
 New options to allow additional functionalities.
 Allowance for extension
 Support for resource allocation . TOS has been removed and a mechanism called
low-label has been added to enable source to request special handling of the packet.
 Support for more security
encryption and authentication options in IPv6 provide confidentiality.
o PACKET FORMAT

 BASE HEADER / FIXED HEADER


 Version
4 bit field. defines the version of the IP for IPv6 its 6
 Priority
4 bit field .defines the priority of the packet with respect to traffic congestion.
more indepth below
 Flow label
3 byte field that is designed to provide special handling for a particular flow
of data. more indepth below
 Payload length
2 byte. Defines the length of the IP datagram except the base header.
 Next header
8 bit. Defines the header that follows the base header in the datagram.
this field in IPv4 is called the protocol.
 Hop limit
8 bit. Serves the same purpose as TIL in IPv4.
 Source address
16 byte. Internet address of the source.
 Destination address
16 byte. Usually defines the destination address but if routing is involved
contains the address of the next router.
 Priority
 Defines the priority of each packet
 IPv6 divides traffic into 2 broad categories.
o Congestion controlled traffic
if source adapts itself to a traffic slow down when congestion its called

Congestion controlled traffic.


assigned
priorities from
0 to 7. 7 being
the highest.
o NonCongestion controlled traffic

 Type of traffic that expects minimum delay


 Discarding of packets is not desirable
 Retransmission in most cases is impossible
 Example : real time audio and video.
 Priority numbers from 8 – 15 are assigned to non-congestion-
controlled traffic. Where data with the least redundancy is
given the highest priority (15).
 Flow label
 Sequence of packets that needs special handling by routers is called flow of
packets.
 Combination of source address and flow label uniquely identify a flow of
packets.
 In its simplest form Can speed up processing by a router by refering the next
hop in the flow table of the router.

COMPARISON BETWEEN IPv4 and IPv6


 EXTENSION
HEADERS
o Can be up to 6 extension
headers.
o Hop by Hop option
used when the source needs to pass information all the routers visited by the datagram. So far has 3
options
pad I, pad N, Jumbo payload
o Source routing
combines the concepts of strict source routing and loose source routing from IPv4
o Fragmentation
concept is same as IPv4 but fragmentation takes place only at the original source.
Source must use a path MTU discovery technique to find the smallest MTU in the network on the path.
Then its fragmented using this knowledge.
o Authentication
has a dual purpose.
validates message sender.
ensures integrity of data.
o Encrypted security payload (ESP)
extension that provides confidentiality and guards against eavesdropping.
o Destination option
used when source needs to pass information to the destination only.
Intermediate routers are not allowed to access this info.
TRANSITION FROM IPv4 to IPv6
 3 strategies have been devised to help in transition from IPv4 to IPv6

 DUAL STACK
o Before migrating completely to v6, have a dual stack of protocols. Run both versions
simultaneously.
o To determine which to use source queries the DNS if DNS returns v4 address source sends a v4
packet and v6 if so.
 TUNNELING
o When 2 hosts using v6 has to communicate through a region that uses v4.

o So the packet is encapsulated in an IPv4 packet when it enters this region.

 HEADER TRANSLATION
o For communication between a host running a v6 and a host running v4

o The header must be completely changed for communication to occur.


ADDRES MAPPING ERROR REPORTING &
MULTICASTING
ADRESS MAPPING
 Logical addresses needs to be mapped to the corresponding hosts physical addresses and vice
versa.
 There are 2 types of address mapping
o Static mapping
involves creation of a table that contains logical addresses along with their corresponding
physical addresses.
limitations : physical addresses might change, host can change networks etc.
o Dynamic mapping
machine knows only one of the two addresses and it retrieves the other using protocols.
 MAPPING LOGICAL TO PHYSICAL : ARP (Address Resolution Protocol)
o Host or router sends an ARP query request

o Because the sender does not know the physical address of the receiver the query is
broadcasted on the network.
o Intended recipient recognizes its IP and sends back a ARP response packet. The packet is
unicast directly to the inquirer using the physical address received in the query packet.
o Cache Memory

 ARP is useful if ARP reply is cached because system normally sends many packets to
the same destination.
 System that receives an ARP reply keeps the info for 20-30 mins.
 Before sending an ARP the system checks this cache to see if it can find a mapping.
o Packet format

 Hardware type
16 bit. Defines the type of network the ARP is running on. Each LAN is assigned an
integer given on its type eg ethernet is 1
 Protocol type
16 bit. Defining the protocol. Eg for IPv4 its ( 0800 )16.
 Hardware length
8 bit. Defining the length of the physical address in bytes.
 Protocol length
8 bit. Defining the length of the logical address in the bytes.
 Operation
16 bit field defining the type of packet
ARP request (1)
ARP reply (2)
 Sender hardware address
variable length field defining the physical address of the sender.
 Sender protocol address
variable length field defining the logical address of the sender.
 Target hardware address
variable length field defining the physical address of the target.
 Target protocol address
variable length field defining the physical address of the Target
o Encapsulation

 ARP packet is encapsulated directly in the data link frame.


o Proxy ARP

 Used to create a subnetting effect.


 Acts on behalf of all the hosts.
 Router running a proxy ARP sends its own hardware address as a reply to any
incoming ARP request.
 Router then sends the packets to the appropriate hosts in the network.
 MAPPING PHYSICAL TO LOGICAL ADDRESS : RARP, BOOTP, and DHCP
o Maybe required in 2 cases :

 A diskless station is booted station can find its physical address by checking the
interface but it does not know the IP address.
 Org doesn’t hv enough IP addresses so it has to assign them on lease. The station can
send its physical address and ask for an IP.

o RARP (Reverse Address Resolution Protocol)

 RARP request it created and broadcasted on the local network


 Another machine on the local network that knows all the IP addresses will respond
with a RARP reply.
 Problem
 Broadcasting is done at the data link layer.
 The physical broadcast address does not pass the boundary of a network
if an administrator has several network or several subnets it needs to assign
RARP sever to each network or subnet.
 This is the reason RARP became obsolete.
 It was replaced by BOOTP, DHCP.
o BOOTP (Bootstrap Protocol)

 Client/sever protocol designed to provide physical addresses to logical mapping


 Its an application layer protocol.
 Advantage over RARP
 Application layer process
 Therefore client can be in one network and the server in another.
 Problem
 BOOTP request is broadcast because client does not know the IP address of
the server.
 One of the hosts needs to be used as a relay called the relay agent.
 BOOTP is a static config protocol not dynamic thus cannot dynamically assign
IPs.
o DHCP (Dynamic Host Configuration Protocol)

 can provide both dynamic and static address allocation that can be manual or
automatic.
 Static address allocation
 In this capacity DHCP acts as BOOTP.
 Its backward compatible with BOOTP therefore a BOOTP client can request a
static address from a DHCP server.
 Has a database that statically binds physical addresses to IP address.

 Dynamic address allocation


 Has a second database with a pool of IP addresses
 When a DHCP client sends a request the server first checks its static database
if no static address is found for that client then it returns an IP from the
available IP pool for a fixed amount of time.
 After the time is over the client must stop using the IP or renew the lease.
 DHCP allows both Manual and Automatic Configuration.
static addresses are created manually and dynamic addresses are created
dynamically.

ICMP ( Internet Control Message Protocol )


 IP protocol has not error-reporting or error-correcting mechanism.
 The internet Control Message Protocol is designed to compensate for the above 2 deficienceies.
 It is companion to IP
 Types of Messages
o Error-reporting Messages
reports problems that a router or a host amy encounter when it processes an IP packet.
o Query messages
helps a host or a network manager get specific information from a router or another host
 Message format
o 8 byte header and a variable size data section.

o First 4 bytes are ICMP type


defines the type of the message
o The Code field defines the reason for the particular message type.

o Rest of the header is specific for each message

 Error Reporting
o One of the main responsibilities of ICMP

o Error messages are always sent to the original source because the only information
available is source and destination address
o Important points about ICMP error messages

 No ICMP error msg will be generated in response to a datagram carrying an ICMP


error msg
 No error will be generated for a fragmented datagram that is not first fragment.
 No error will be generated for a datagram having a multicast address
 No error will be generated for a datagram having a special address
such as 127.0.0.0 or 0.0.0.0
o There are 5 types of Error msgs

o Destination Unreachable

 When a router cannot route a datagram or a host cannot deliver a datagram,


datagram is discarded and the router or the host sends a destination-unreachable
message back to the source.
o Source Quench

 Designed to add a kind of flow control


 When a router or a host discards a datagram due to congestion it sends a source
quench message to the sender of the datagram.
 It has 2 purposes
to inform the sender of the discarded datagram
to warn the sender of congestion somewhere In the path and slow down.
o Time Exceeded
 When the time to live value of the datagram reaches 0 it is discarded.
 When it is discarded a time exceeded msg is sent to the sender
 Second a time exceeded msg is also generated when not all fragments that make up a
message arrive at the destination.
o Parameter problem

 If router or host discovers an ambiguity or missing value in any field of the datagram
it discards the datagram and sends a parameter-problem message back to the
source
o Redirection

 To update routing table of the host redirection msg is sent to the host.
 Query Messages
o ICMP can diagnose some network problems.

o This is accomplished through the query messages, a group of four different pairs of
messages.

o Echo request and reply

 Designed for diagnostic purposes.


 Network managers use these pair of mgs to identify network problems.
 Ping command can create a series of echo-request and echo-reply msgs.
o Timestamp request and reply

 Use to determine round trip time needed for an IP datagram to travel between them.
 Can also be used to sync clocks in 2 machines.
o Address mask request and reply

 Used to obtain a mask.


o Router Solicitation and Advertisement

 A host can broadcast a router solicitation msg


 The router or routers that receive this msg can broadcast their routing information
using the router advertisement message.

o Checksum

 In ICMP checksum is calculated over the entire message.


 DEBUGGING TOOLS
o Ping

 To find out if host is alive and responding.


o Traceroute

 Program in UNIX or Tracert in windows.


 Can be used to trace the route of a packet from source to destination.

IGMP ( Internet Group Message Protocol )


 IP protocol can be involved in 2 types of communication : Unicasting and Multicasting.
 IGMP is a necessary protocol involved in multicasting.
 It is a companion to the IP protocol
 Group Management
o We need routers that are able to route multicast packets

o They must be updated using one of the multicasting protocols.

o IGMP is a protocol that manages a group

o IGMP protocols gives the multicast routers information about the membership status of
hosts connected to the network.
 IGMP Message types
 Message format

o Maximum response time: 8 bit defines the amount of time in which a query must be
answered value is in 10th s of a second
o Group address : value is 0 for general query message
defines the group id in the special query, the membership report and the leave report
messages.
 IGMP Operation
o Joining a group
o Leaving a group

o Monitoring membership

o Delayed response

o Query Router

 Encapsulation
o IGMP message is encapsulated in the IP datagram which is itself encapsulated in a frame

 Netstat Utility
o Can be used to find the multicast addresses supported by and interface.

 ICMPv6
o The ARP and IGMP protocols are combined in ICMPv6. The RARP protocol is dropped from
the suite as it was rarely used. And BOOTP has the same functionality.
o Messages are also divided into 2 categories however each category has more types now.

o Error reporting

 Destination unreachable
 Packet too big
if router receives a datagram that is larger than MTU first the router discards the
message and then sends a packet-to-big message.
 Time exceeded
 Parameter problem
 Redirection
o Query

 Echo request and replay


 Router solicitation and advertisement
 Neighbor solicitation and advertisement
does the job of ARP
 Group membership
does the job of IGMP
DELIVERY FORWARDING AND ROUTING

DELIVERY
 Network layer supervises the handling of the packets by the underlying physical networks.
this is defined as delivery of a packet.
 It is of 2 types
o Direct Delivery
Occurs when the source and the destination are in the same physical network or when the
delivery is between the router and the host.
o Indirect Delivery
Destination host is not on the same physical network the packet is delivered indirectly
here packet goes from router to router before reaching the destination host.
Last delivery of an Indirect delivery is always Direct delivery.

FORWARDING
 Means to place the packet in its route to its destination.
 Requires a host or a router to have a routing table
 Forwarding techniques
o Next hop method vs route method

 The routing table holds the address of only the next hop instead of information
about the complete route.
o Network-specific method vs host-specific method

 Instead of having an entry for every destination host connected to the same physical
network, we have only one entry that defines the address of the destination network
itself.
 All hosts connected to the same network are treated as one entity.
o Default method

 Instead of listing all the networks of the entire Internet a host cant just have one
entry called the default ( normally defined as the network address 0.0.0.0 ).

 Forwarding process
in classless routing we need at least 4 columns in a routing table ( one for mask).
o Address aggregation

o Longest mask matching

o Hierarchical routing

o Geographical routing

ROUTING TABLE
 Routing tables has an entry for each destination or combination of destinations to route IP
packets.
 2 types of routing tables :
o Static routing table
contains info entered manually by the administrator,
tables cannot update on their own
can be used in a small network that does not change very often
o Dynamic routing table

 Updated periodically using routing protocols such as RIP, OSPF or BGP


 Format

o Mask defines the mask applied fir the entry

o Network address defines the network address to which the packet is finally delivered.
in the case of host-specific routing it defines the address of the destination host.
o Next hop defines the address of the next hop router to which the packet is delivered.

o Interface name of the interface

o Flags defines up to 5 flags : U (up), G (gateway), H (host-specific),D (added by redirection),


and M (modified by redirection).
o Reference count This field gives the number of users of this route at the moment.

o Use this field shows the number of packets transmitted through this router for the
corresponding destination.

UNICAST ROUTING PROTOCOLS


 Autonomous systems (AS)
Group of network under a single administrator is called an Autonomous system.
 Routing inside an AS is called intradomain routing and
 Routing between AS is known as interdomain routing.

DISTANCE VECTOR ROUTING


 Every router maintains a vector table that has 3 columns :
TO COST and NEXT
 The values of these tables are dynamically changed
 Initialization
o At first every node knows the distance between itself and its immediate neighbours that
are directly connected to it.
o This is how the vector tables are initialized

o The distance of the nodes that are not immediate neighbours are assigned ∞

 Sharing
o Main idea of DVR is sharing of information between neighbours

o Only the distance vector of the vector table is shared with the neighbours

o It shares this periodically whenever there is a change.

 Updating
o When a node revives the distance vector from the neighbours table the distances are
recalculated based on the received distance vector.
o If there are 2 routes to a node then both the routes are calculated and the route with the
least distance is added to the vector table.
 When to share
o Periodically and when there is a change in the table

o Periodic update
sends its vector table every 30s ( generally )
depends on the protocol.
o Triggered update
whenever there is a change in the vector table change can occur from
1 . Node receives a table from the neighbour resulting in changes
2. Node detects a failure in the neighbour links which results to distance change to ∞.
o Two-Node Loop instability
also called the Count to infinity problem
lets assume 3 nodes

1 1 1 1 INTERNET
node 3 node 2 node 1

 Let the distance between each node be 1


 When initialized the distance between node 1 and the internet is 1
node2 à internet is ∞
node 3 à internet is also ∞
 After sufficient passes the distance vectors are as follows
node 1 – 1
node 2 – 2
node 3 – 3
 Now lets assume the link between node 1 and internet gets destroyed
then the distance between node 1 and internet becomes infinity
 When that happens the subsequent changes in the vector tables of the nodes
results in the distance vector to be a count to infinity thus the name.

CLICK HERE to clear concept


o Some solutions to the count to infinity problem

 Defining infinity
redefine infinity to a smaller number such as 100 but this means the distance
vector routing cannot be used in large systems.
 Split Horizon
instead of flooding the table through each interface, each node sends only part of
its table through each interface.
if node 2 thinks that the optimum route to reach internet is through node 3 it
doesn’t need to advertise this info. Thus avoiding the problem
 Split horizon and poison reverse
normally the DV protocol uses a timer and if there is no news about a route the
node deletes the route from its table.
 RIP ( Routing Information Protocol)
o Intradomain routing protocol

o Implements DVR directly

o Specifics

 Distance in RIP is defined as the number of links to reach destination. For this
reason metric in RIP is called hop count.
 Infinity is defines as 16 which means the AS using RIP cannot have more that 15
hops

LINK STATE ROUTING


 Each node in the domain has the entire topology of the domain whereas in DVR each node had the
information of only their neighbour.
 The node can use dijakstra’s algorithm to build a routing a table.
 The tables in Link state routing have additional information such as how nodes are connected ,
cost (metric) and condition of links (up or down).
 Building routing tables
in Link state routing 4 sets of actions are required.
o Creation of the state of the links by each node, called the link state packet (LSP).

o Dissemination of LSPs to every router called flooding.

o Formation of the shortest path tree for each node.

o Calculation of routing table based on the shortest path.

 OSPF (Open shortest path first)


o Intradomain protocol based on link state routing.

o Areas

 To handle routing efficiently ASs are divided into smaller parts called areas.
 Routers inside an area flood the area with routing information. At the border of area
special routers called AREA BORDER ROUTERS summarize the info and send it to
other areas
 There is a special area called backbone. It’s the primary area all other are secondary
area. All areas must be connected to the backbone. Routers inside the backbone are
called backbone routers.
 If connection between an area and backbone router is broken then a virtual link is
made by the administrator to allow continuity.
 Each area has an identification the identification of the backbone is zero.
o Metric
An administrator assigned cost . can be based on service ( minimum delay, max throughput
etc.) routers can have multiple routing tables based on different services.
o Types of links
a connection is called a link there are 4 types of links defined
point -to-point, transient , stub and virtual.

 Point to point
connects 2 routers without any other host or router in between.
no need to assign network address to this types of link.
 Transient link
network with several routers attached to it.
all WANs and LANs with more that 2 routers are of this type
 Stub link
network that is connected to only one router.
data packets are received and transmitted through this single router.
special case of transient network
 Virtual link
when the link between 2 routers is broken a virtual link is created by the
administrator.
a longer path that goes through other several routers.
PATH VECTOR ROUTING
 It is an exterior routing protocol used for interdomain routing.
 We assume that there is only one node (speaker node)
 Speaker node in AS creates the routing tables and addresses the speaker nodes in neighbouring
Ass idea is same as DVR except that only speaker nodes in each AS can communicate.
 Loop prevention
when a router receives a message it checks to see if its autonomous system is in the path list to the
destination. If looping is involved the message is ignored.
 Policy routing
if one of the autonomous systems listed in the path is against its policy it can ignore that path and
that destination.
 Optimum path

 BGP (Border Gateway Protocol)


o Interdomain routing protocol using path vector routing. It first appeared in 1989.

o Autonomous systems can be divided into 3 categories

 Stub AS
a stub has only one connection to another AS.
it is either a source or sink.
 Multihomed AS
has more connection to other AS.
still only a sink or source for data traffic.
does not allow transient traffic.
 Transit AS
is a multihomed AS that also allow transient traffic.
examples are International and national ISPs.
o Path attributes
every path is actually a list of attributes that help the receiving router make more well
informed decisions.
attributes are divided into 2 categories well known and optional
 Well known attribute must be recognised by every BGP router.
 Well-known mandatory attribute must appear in the description of a route
 Well-known discretionary attribute must be recognised by each router.
but not required to be included in the description.
 Optional attribute need not be recognised by every router.

o BGP sessions
exchange of information between 2 routers takes place in a session
 To create a reliable environment BGP uses the services of TCP.
 BGP sessions are sometimes reffered to as Semi-permanent connections.
because TCP connection for BGP can last for a long time until something unusual
happens.

You might also like