CSCE 515: Computer Network Programming - PowerPoint PPT Presentation

About This Presentation
Title:

CSCE 515: Computer Network Programming

Description:

... updates its routing table based on vector of distances received from neighbors. Example: RIP ... If there are multiple paths, router chooses the one with ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 21
Provided by: huan75
Learn more at: https://www.cse.sc.edu
Category:

less

Transcript and Presenter's Notes

Title: CSCE 515: Computer Network Programming


1
CSCE 515Computer Network Programming
  • Chin-Tser Huang
  • huangct_at_cse.sc.edu
  • University of South Carolina

2
IP Routing
  • Forward datagrams generated either on local host
    or on some other hosts toward their ultimate
    destination
  • Static routing when network is small, single
    connection point to other networks, no redundant
    route existent
  • Dynamic routing use routing daemon to run
    routing protocol in order to communicate with
    other routers

3
Routing Principles
  • IP performs three steps when searching its
    routing table
  • Search for a matching host address
  • Search for a matching network address
  • Search for a default entry

4
Initialize a Routing Table
  • Three ways to create routing table entries
  • Created by default when an interface is
    configured
  • Added by route command
  • Created by an ICMP redirect

5
route Command
  • Explicitly add or remove routing table entry from
    configuration files at bootstrap time

6
ICMP Redirect Error
  • Sent by a router to sender of an IP datagram when
    the datagram should have been sent to a different
    router
  • Used only when the host has a choice of routers
    to send its datagram to

7
ICMP Redirect
0
7
8
15
16
31
type(5)
code(0-3)
checksum
router IP address that should be used
IP header first 8 bytes of original datagram
data
8
ICMP Router Solicitation
0
7
8
15
16
31
type(10)
code(0)
checksum
unused (sent as 0)
9
ICMP Router Advertisement
0
7
8
15
16
31
type(9)
code(0)
checksum
number of addresses
address entry size(2)
lifetime
router address 1
preference level 1
router address 2
preference level 2

10
Routing Protocols
  • Executed by routing daemon to communicate routing
    information with other routers
  • Two types of routing protocols
  • Distance-vector protocols
  • Link-state protocols

11
Distance-vector Protocols
  • Maintain a vector of distances
  • Each router updates its routing table based on
    vector of distances received from neighbors
  • Example RIP

12
Link-state Protocols
  • Each router maintains a complete routing table of
    the network
  • Example OSPF

13
Routing Information Protocol (RIP)
  • Most widely used routing protocol
  • Carried in UDP datagrams

14
RIP Message Format
0
7
8
15
16
31
command(1-6)
version(1)
(must be 0)
(must be 0)
address family(2)
32-bit IP address
(must be 0)
20 bytes
(must be 0)
metric(1-16)
(up to 24 more routes)
15
RIP Metrics
  • RIP uses hop count as its metric
  • If there are multiple paths, router chooses the
    one with smallest hop count, and ignores other
    paths

16
RIP Operation
  • Initialization
  • Request received
  • Response received
  • Regular routing updates
  • Triggered updates

17
Problems with RIP
  • Has no knowledge about subnet addressing
  • Take long time to stabilize after a router or
    link failure
  • Maximum of metric limits network size
  • No security protection

18
RIP Version 2
  • Fix some deficiencies of RIP
  • Support multiple domain
  • Include subnet mask
  • Some simple authentication scheme added

19
RIP-2 Message Format
0
7
8
15
16
31
command(1-6)
version(2)
routing domain
route tag
address family(2)
32-bit IP address
32-bit subnet mask
20 bytes
32-bit next-hop IP address
metric(1-16)
(up to 24 more routes)
20
Next Class
  • Routing protocols OSPF, BGP
  • UDP
  • Read TI Ch. 10, 11
Write a Comment
User Comments (0)
About PowerShow.com