link state protocol
DESCRIPTION
Representation of routers and networks Assumptions Routing protocol packets Implementation requirements Protocol data structures Implementation issues Protocol headersTRANSCRIPT
Link State Protocol
Design byJignesh PatelPalanivel RathinamVishwesh Tendolkar
Overview
Representation of routers and networks Assumptions Routing protocol packets Implementation requirements Protocol data structures Implementation issues Protocol headers
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
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
Assumptions
No hierarchical routing All route processes run on the same machine Routing computation is decoupled from the
protocol
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
Implementation requirements Thread Timers
Single-shot Interval – avoid synchronization by adding small
random values LSA type – Router LSA List manipulation primitives
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
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
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
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
Contd.
Neighbor state machineDOWN
INIT
EX-START2-WAY
EXCHANGE
LOADING FULL
HELLO RECEIVED
ONE-WAY RECEIVEDTWO -WAY RECEIVED
NEGOTIATION DONE
EXCHANGE DONE
LOADING DONE
Contd.
Routing table structure Destination type Destination ID Address mask Cost Next hop – router ID
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
Contd.
Our link state protocol uses UDP for its communication
Presentation layer is binary Java is used as the programming language
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
Contd.
Packet format for the hello protocol
Hello Interval = 10msec Dead time Interval = 5sec
Neighbor list = {R2,R3,R1}
…
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
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
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
…
Contd.
The database description packet is shown below
Interface MTU = 512 MI M/SUNUSED
DD SEQUENCE NUMBER = time of day
LSA HEADER
Questions / Suggestions
?/ !
References
RFC 2328, OSPF v2 Routing in the Internet – by Christin Hieutema CS526 Manuscript – Dr. Deep Medhi &
Karthik Ramaswamy