Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.

Similar presentations


Presentation on theme: "CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina."— Presentation transcript:

1 CSCE 515: Computer Network Programming Chin-Tser Huang huangct@cse.sc.edu University of South Carolina

2 2/10/20052 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 2/10/20053 Kernel Processing at IP Layer IP output: calculate next hop router (if necessary) our packet (one of our IP address or broadcast addresses)? process IP options IP input queue ICMP UDPTCP routing daemon route command netstat command routing table network interfaces IP layer source routing forward datagram (if forwarding enabled) ICMP redirects routing table updates from adjacent routers

4 2/10/20054 Routing Principles IP performs three steps when searching its routing table 1. Search for a matching host address 2. Search for a matching network address 3. Search for a default entry

5 2/10/20055 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

6 2/10/20056 route Command Explicitly add or remove routing table entry from configuration files at bootstrap time

7 2/10/20057 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

8 2/10/20058 Example of ICMP Redirect host R1R2 (1) IP datagram (3) ICMP redirect (2) IP datagram Final destination

9 2/10/20059 ICMP Redirect type(5)code(0-3) checksum 078151631 router IP address that should be used IP header + first 8 bytes of original datagram data

10 2/10/200510 ICMP Router Solicitation type(10)code(0) checksum 078151631 unused (sent as 0)

11 2/10/200511 ICMP Router Advertisement type(9)code(0) checksum 078151631 router address [1] preference level [1] router address [2] preference level [2] … number of addresses address entry size(2) lifetime

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

13 2/10/200513 Distance-vector Protocols Maintain a vector of distances Each router updates its routing table based on vector of distances received from neighbors Example: RIP

14 2/10/200514 Link-state Protocols Each router maintains a complete routing table of the network Example: OSPF

15 2/10/200515 Routing Information Protocol (RIP) Most widely used routing protocol Carried in UDP datagrams

16 2/10/200516 RIP Message Format command(1-6)version(1) (must be 0) 078151631 32-bit IP address (must be 0)address family(2) (must be 0) metric(1-16) (up to 24 more routes) 20 bytes

17 2/10/200517 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

18 2/10/200518 RIP Operation Initialization Request received Response received Regular routing updates Triggered updates

19 2/10/200519 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

20 2/10/200520 RIP Version 2 Fix some deficiencies of RIP Support multiple domain Include subnet mask Some simple authentication scheme added

21 2/10/200521 RIP-2 Message Format command(1-6)version(2) routing domain 078151631 32-bit IP address route tagaddress family(2) 32-bit subnet mask 32-bit next-hop IP address metric(1-16) (up to 24 more routes) 20 bytes

22 2/10/200522 Next Class Routing protocols: OSPF, BGP UDP Read TI Ch. 10, 11


Download ppt "CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina."

Similar presentations


Ads by Google