Routing table and routing algorithms
Route Maintenance and lookup Routing table is divided into two groups Procedures used to determine the correct rout for a datagram Procedure used to add , change or delete routes The main data structure for storing the routes is an array Each entry in the array corresponds to a bucket Contains pointers to a linked list of records for a route to destination Each record on the list contains Destination IP address Subnet mask Next-hop address Network interface to use for sending the next-hop address To compute hash function  - IP uses only the network portion of the destination IP address To Search linked list  – entire destination address is used
Routing table data structure Structure  route  contains the contents of a node on the linked list and contains routing information for one possible destination rt-net  -  destination address rt-mask  -  32 bir mask rt-gw  -  next-hop gateway for the route rt-metric  -  distance of the gateway in hops rt-ifnum  -  internal number of the network interface Fields used by the IP software rt-key  -  sort key used when inserting a node on the linked list rt-refcnt  - reference count of processes that hold a pointer to the route rt-usecnt  -  counts  the number of times the route has been used rt-next  -  contains pointers to the next node on the list
Routing table data structure … rttable is defined in route.h  it is an array of pointers to route structures rtinfo – aglobal structure holds few other data items Default route – used for any destination not contained in the table ri-default – points to a route struc. that has the next-hop addr. for default route ri-valid  -  a boolean value TRUE if data structures are initialized
Origin of route and persistence Information in the routing table comes from several sources initial set of routes from secondary storage when system starts during execution network managers Field rt-ttl in each routing entries specify a time that the entry remains val id  routing ptorocols can use this rt-ttl Managers can use infinite rt-ttl
Routing a datagram Utility procedure netnum procedure  – extracts the network portion of a given IP address Address class is used to determine which octets contain the network part Returns the specified address with all host bytes set to zero
netmatch procedure  – used to compare a destination address to a routing entry Routing entry has subnet mask and IP address Subnet mask is used to mask off host bits and compare the result to the network entry If there is match TRUE else FALSE netmatch tests for a broadcast datagram explicitly
NOTE: Action taken on a broadcast message depends on the source of the datagram Broadcast message from n/w interface Deliver to the local machine via pseudo-network interface A mask of all 1’s is used to route the arriving broadcast datagram Locally generated broad cast  Send to the appropriate n/w interface n/w specific route is used to route outgoing datagram
netmask procedure  – to find the subnet mask for a destination address Two parameters are used Subnet mask variable Destination IP address First sets the subnet mask to all 0’s and then checks several cases If destination address is all 0’s  netmask returns mask of all 0’s for other destinations procedure calls netnum to extract the network portion of the destination address Check each locally-connected network for the subnet mask If dest. netmask and locally-connected n/w, extract the subnet mask and return it If no iformation is found, it set the subnet mask to cover the network part of the address
rthash procedure  – called to hash a destination n/w addres Sums the individual octets of the network address Divide by the hash table size  Return the remainder
Obtaining a route rtget procedure  - searches the routing table and returns a pointer to the entry for that route Route.ri_valid – specifies whether

More Related Content

PDF
Routing
PPTX
Computer networks network layer,routing
PPT
Routing, Different types of forwarding technique
PDF
Distance vector and link state routing protocol
PPT
Routing protocols
PPT
Routing
PPT
Network Layer
PPTX
Routing and routing algorithms
Routing
Computer networks network layer,routing
Routing, Different types of forwarding technique
Distance vector and link state routing protocol
Routing protocols
Routing
Network Layer
Routing and routing algorithms

What's hot (20)

PPT
11 routing
PPTX
BASICS OF ROUTING IN NETWORKS
PPT
Network layer
PPTX
Link state routing protocol
PPTX
Computer Network - Network Layer
PPTX
Lecture 3 network layer
PPT
Routing protocols-network-layer
PPTX
Routing Techniques
PPTX
Presentation Routing algorithm
PDF
PDF
Network layer ip address assignment and routing
PPTX
Routing Presentation
PPTX
Introduction to backwards learning algorithm
DOCX
Link state routing protocol
PPT
Routing
PPT
Dynamic routing under_sec
PPT
Day 8 2 distance vector routing
PPTX
Week14 lec2
PPTX
Routing algorithm
PPT
Chapter 06 - Routing
11 routing
BASICS OF ROUTING IN NETWORKS
Network layer
Link state routing protocol
Computer Network - Network Layer
Lecture 3 network layer
Routing protocols-network-layer
Routing Techniques
Presentation Routing algorithm
Network layer ip address assignment and routing
Routing Presentation
Introduction to backwards learning algorithm
Link state routing protocol
Routing
Dynamic routing under_sec
Day 8 2 distance vector routing
Week14 lec2
Routing algorithm
Chapter 06 - Routing

Similar to Routing table and routing algorithms (20)

PPTX
Part6-network-routing.pptx
PPTX
NETWORK LAYER PRESENTATION IP ADDRESSING UNIT-3.pptx
PPTX
Part 2 : reliable transmission and building a network
PPT
2 reliability-network
PPT
Network layer
PDF
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
PDF
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
PPT
module10-rip (1).ppt
PPTX
Computer Networks-Network layer Concepts
PPTX
Computer networks for cse Unit-3 (1).pptx
PPT
Network Layer_Routing_Forwarding-1.ppt engineering
PPTX
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
PDF
Computer Network Unit IV - Lecture Notes - Network Layer
PPT
4d routing
PPT
Routing.pptbbbbbbbbbbbbbbbbbbbbbnbbnbbbbnbb
PPTX
Unit 3_Network Layer_Part II.pptx
PPTX
Unit 4_Network Layer_Part II.pptx
PPT
Powerpoint one
PPT
Powerpoint one
Part6-network-routing.pptx
NETWORK LAYER PRESENTATION IP ADDRESSING UNIT-3.pptx
Part 2 : reliable transmission and building a network
2 reliability-network
Network layer
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
module10-rip (1).ppt
Computer Networks-Network layer Concepts
Computer networks for cse Unit-3 (1).pptx
Network Layer_Routing_Forwarding-1.ppt engineering
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
Computer Network Unit IV - Lecture Notes - Network Layer
4d routing
Routing.pptbbbbbbbbbbbbbbbbbbbbbnbbnbbbbnbb
Unit 3_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptx
Powerpoint one
Powerpoint one

Recently uploaded (20)

PPTX
Math 2 Quarter 2 Week 1 Matatag Curriculum
PDF
Diabetes Mellitus , types , clinical picture, investigation and managment
PPTX
GW4 BioMed Candidate Support Webinar 2025
PPT
hsl powerpoint resource goyloveh feb 07.ppt
PDF
Unleashing the Potential of the Cultural and creative industries
PPTX
ACFE CERTIFICATION TRAINING ON LAW.pptx
PDF
Review of Related Literature & Studies.pdf
PDF
African Communication Research: A review
PDF
FAMILY PLANNING (preventative and social medicine pdf)
PPSX
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
PDF
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
PDF
anganwadi services for the b.sc nursing and GNM
PPTX
Copy of ARAL Program Primer_071725(1).pptx
PPTX
PAIN PATHWAY & MANAGEMENT OF ACUTE AND CHRONIC PAIN SPEAKER: Dr. Rajasekhar ...
PDF
FYJC - Chemistry textbook - standard 11.
PPTX
Approach to a child with acute kidney injury
PDF
GSA-Past-Papers-2010-2024-2.pdf CSS examination
PPTX
Neurological complocations of systemic disease
PDF
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
PPTX
CHROMIUM & Glucose Tolerance Factor.pptx
Math 2 Quarter 2 Week 1 Matatag Curriculum
Diabetes Mellitus , types , clinical picture, investigation and managment
GW4 BioMed Candidate Support Webinar 2025
hsl powerpoint resource goyloveh feb 07.ppt
Unleashing the Potential of the Cultural and creative industries
ACFE CERTIFICATION TRAINING ON LAW.pptx
Review of Related Literature & Studies.pdf
African Communication Research: A review
FAMILY PLANNING (preventative and social medicine pdf)
namma_kalvi_12th_botany_chapter_9_ppt.ppsx
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
anganwadi services for the b.sc nursing and GNM
Copy of ARAL Program Primer_071725(1).pptx
PAIN PATHWAY & MANAGEMENT OF ACUTE AND CHRONIC PAIN SPEAKER: Dr. Rajasekhar ...
FYJC - Chemistry textbook - standard 11.
Approach to a child with acute kidney injury
GSA-Past-Papers-2010-2024-2.pdf CSS examination
Neurological complocations of systemic disease
Kalaari-SaaS-Founder-Playbook-2024-Edition-.pdf
CHROMIUM & Glucose Tolerance Factor.pptx

Routing table and routing algorithms

  • 1. Routing table and routing algorithms
  • 2. Route Maintenance and lookup Routing table is divided into two groups Procedures used to determine the correct rout for a datagram Procedure used to add , change or delete routes The main data structure for storing the routes is an array Each entry in the array corresponds to a bucket Contains pointers to a linked list of records for a route to destination Each record on the list contains Destination IP address Subnet mask Next-hop address Network interface to use for sending the next-hop address To compute hash function - IP uses only the network portion of the destination IP address To Search linked list – entire destination address is used
  • 3. Routing table data structure Structure route contains the contents of a node on the linked list and contains routing information for one possible destination rt-net - destination address rt-mask - 32 bir mask rt-gw - next-hop gateway for the route rt-metric - distance of the gateway in hops rt-ifnum - internal number of the network interface Fields used by the IP software rt-key - sort key used when inserting a node on the linked list rt-refcnt - reference count of processes that hold a pointer to the route rt-usecnt - counts the number of times the route has been used rt-next - contains pointers to the next node on the list
  • 4. Routing table data structure … rttable is defined in route.h it is an array of pointers to route structures rtinfo – aglobal structure holds few other data items Default route – used for any destination not contained in the table ri-default – points to a route struc. that has the next-hop addr. for default route ri-valid - a boolean value TRUE if data structures are initialized
  • 5. Origin of route and persistence Information in the routing table comes from several sources initial set of routes from secondary storage when system starts during execution network managers Field rt-ttl in each routing entries specify a time that the entry remains val id routing ptorocols can use this rt-ttl Managers can use infinite rt-ttl
  • 6. Routing a datagram Utility procedure netnum procedure – extracts the network portion of a given IP address Address class is used to determine which octets contain the network part Returns the specified address with all host bytes set to zero
  • 7. netmatch procedure – used to compare a destination address to a routing entry Routing entry has subnet mask and IP address Subnet mask is used to mask off host bits and compare the result to the network entry If there is match TRUE else FALSE netmatch tests for a broadcast datagram explicitly
  • 8. NOTE: Action taken on a broadcast message depends on the source of the datagram Broadcast message from n/w interface Deliver to the local machine via pseudo-network interface A mask of all 1’s is used to route the arriving broadcast datagram Locally generated broad cast Send to the appropriate n/w interface n/w specific route is used to route outgoing datagram
  • 9. netmask procedure – to find the subnet mask for a destination address Two parameters are used Subnet mask variable Destination IP address First sets the subnet mask to all 0’s and then checks several cases If destination address is all 0’s netmask returns mask of all 0’s for other destinations procedure calls netnum to extract the network portion of the destination address Check each locally-connected network for the subnet mask If dest. netmask and locally-connected n/w, extract the subnet mask and return it If no iformation is found, it set the subnet mask to cover the network part of the address
  • 10. rthash procedure – called to hash a destination n/w addres Sums the individual octets of the network address Divide by the hash table size Return the remainder
  • 11. Obtaining a route rtget procedure - searches the routing table and returns a pointer to the entry for that route Route.ri_valid – specifies whether