link state protocol
DESCRIPTION
Representation of routers and networks Assumptions Routing protocol packets Implementation requirements Protocol data structures Implementation issues Protocol headersTRANSCRIPT
![Page 1: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/1.jpg)
Link State Protocol
Design byJignesh PatelPalanivel RathinamVishwesh Tendolkar
![Page 2: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/2.jpg)
Overview
Representation of routers and networks Assumptions Routing protocol packets Implementation requirements Protocol data structures Implementation issues Protocol headers
![Page 3: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/3.jpg)
Representation of routers and networks Each router will be a process identified by a
unique id No configuration files - command line arguments Port numbers play the role of interfaces
2000 2001
3000
RA
RB RC
![Page 4: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/4.jpg)
Contd.
The command line arguments for the above network topology is
Router RA 2000 2001 Router RB 2000 3000 Router RC 2001 3000
Constraints: If a new node is to be added or an existing node is to be deleted, should restart the router process
![Page 5: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/5.jpg)
Assumptions
No hierarchical routing All route processes run on the same machine Routing computation is decoupled from the
protocol
![Page 6: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/6.jpg)
Routing protocol packets
There are five types of packets. Each packet is identified by the packet type in common header
Type 1 packet – Hello Type 2 packet – Database Description Type 3 packet – Link state request Type 4 packet – Link state update Type 5 packet – Link state acknowledgment
![Page 7: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/7.jpg)
Implementation requirements Thread Timers
Single-shot Interval – avoid synchronization by adding small
random values LSA type – Router LSA List manipulation primitives
![Page 8: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/8.jpg)
Protocol data structures
Router ID – 32 bit number Routing table Interface list Interface data structure
Type IP interface address IP interface mask Hello interval Router dead interval Delay Hello timer – fires hello packets every hello interval Neighbor router
![Page 9: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/9.jpg)
Contd.
Interface data structure Interface output cost – expressed in link state
metric Retransmit interval – number of seconds between
LSA retransmissions Interface state (DOWN/UP)
Interface state machine DOWN
UP
Interface up
![Page 10: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/10.jpg)
Contd.
Neighbor list Neighbor data structure
State Inactivity timer – single-shot timer whose length is router
dead interval Master/slave Database description sequence number Last DD packet received (DD header) Neighbor ID – router ID of neighboring router – this is
learned after receiving the hello packet Neighbor IP address
![Page 11: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/11.jpg)
Contd.
List of router LSA (this is the link state information/database. This is generated for each router in the network)
Link state retransmission list Link state request list
![Page 12: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/12.jpg)
Contd.
Neighbor state machineDOWN
INIT
EX-START2-WAY
EXCHANGE
LOADING FULL
HELLO RECEIVED
ONE-WAY RECEIVEDTWO -WAY RECEIVED
NEGOTIATION DONE
EXCHANGE DONE
LOADING DONE
![Page 13: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/13.jpg)
Contd.
Routing table structure Destination type Destination ID Address mask Cost Next hop – router ID
![Page 14: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/14.jpg)
Implementation issues
We are not using TCP based connection for information exchange, although some routing protocols use it (BGP)
Raw IP cannot be used to make processes communicate on the same machine. Since Raw IP is void of any transport layer protocol and hence the ports, processes should use the protocol number in IP to identify packets destined to them. This approach is not feasible
UDP although unreliable helps communication between multiple processes through ports. Also UDP has a built in checksum calculation
![Page 15: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/15.jpg)
Contd.
Our link state protocol uses UDP for its communication
Presentation layer is binary Java is used as the programming language
![Page 16: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/16.jpg)
Protocol headers
The link state protocol is layered. It has a common header which is given below
Version # = 1 Type = {1,…5}
Packet length (no. of words including header)
Router ID = R1
![Page 17: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/17.jpg)
Contd.
Packet format for the hello protocol
Hello Interval = 10msec Dead time Interval = 5sec
Neighbor list = {R2,R3,R1}
…
![Page 18: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/18.jpg)
Contd.
All link state messages share a common header which is depicted below
Age = 5 Sequence number = 3
Link state ID = 2000
Advertising Router = R1
![Page 19: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/19.jpg)
Contd.
The link state advertisement includes information about the link and cost metric. We have used the metric from EIGRP to include delay, bandwidth and reliability
# links = 1
Link ID = R1
Link Data = 2000
Metric = w1 * cost + w2* delay + w3* bandwidth
![Page 20: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/20.jpg)
Contd.
Link state updates. When a router receives a link state request packet during database synchronization or a multiple LSAs from neighbors, it sends a LSU. The packet format is shown below
# LSAs = 1
Link state advertisements
…
![Page 21: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/21.jpg)
Contd.
The database description packet is shown below
Interface MTU = 512 MI M/SUNUSED
DD SEQUENCE NUMBER = time of day
LSA HEADER
![Page 22: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/22.jpg)
Questions / Suggestions
?/ !
![Page 23: Link State Protocol](https://reader035.vdocument.in/reader035/viewer/2022062300/556259d0d8b42a6c368b5829/html5/thumbnails/23.jpg)
References
RFC 2328, OSPF v2 Routing in the Internet – by Christin Hieutema CS526 Manuscript – Dr. Deep Medhi &
Karthik Ramaswamy