Presentation is loading. Please wait.

Presentation is loading. Please wait.

RIP ( Routing Information Protocol) RFC 1058 and 1723 Included in BSD UNIX in 1982 Distance vector algorithm Distance metric: number of hops (max = 15.

Similar presentations


Presentation on theme: "RIP ( Routing Information Protocol) RFC 1058 and 1723 Included in BSD UNIX in 1982 Distance vector algorithm Distance metric: number of hops (max = 15."— Presentation transcript:

1

2 RIP ( Routing Information Protocol) RFC 1058 and 1723 Included in BSD UNIX in 1982 Distance vector algorithm Distance metric: number of hops (max = 15 hops) Distance vectors: exchanged every 30 sec via RIP Response Message (also called RIP advertisement ) UDP, 520

3 Routing Information Protocol (RIP v1) metric Command (1-6)Version0 Address Family 0 32-bit IP address more routes

4 RIP: Routing Information Protocol Uses hop count as metric (max: 16 is infinity) Tables (vectors) advertised to neighbors every 30 s. Each advertisement: up to 25 entries No advertisement for 180 sec: neighbor/link declared dead routes via neighbor invalidated new advertisements sent to neighbors (Triggered updates) neighbors in turn send out new advertisements (if tables changed) link failure info quickly propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)

5 RIPv1 Problems Split horizon/poison reverse does not guarantee to solve count-to-infinity problem –16 = infinity => RIP for small networks only! –Slow convergence Broadcasts consume non-router resources RIPv1 does not support subnet masks (VLSMs) –No authentication

6 RIPv2 Provides: –VLSM support –Authentication –Multicasting ) –Tags to support EGP/BGP routes. Uses reserved fields in RIPv1 header. First route entry replaced by authentication info.

7 Routing Information Protocol (RIP v2) metric Command (1-6)Version Address Family 32-bit IP address Next hop (32bit) 24 more routes 32-bit Subnet Mask Address Family FFFF, authentication) AS RIP EGP/BGP routes.

8 RIP problems Counting-to-infinity problem: –Simple configuration A->B->C. If C fails, B needs to update and thinks there is a route through A. A needs to update and thinks there is a route thru B. –No clear solution, except to set infinity to be small (eg 16 in RIP) Slow convergence after topology change: –Due to count to infinity problem –Also information cannot propagate thru node until it recalculates routing info.

9 Properties of Distance Vector Algorithm Bad news propagate slowly: the count-to- infinity problem

10 Properties of Distance Vector Algorithm Good news propagate fast

11 RIP problems (contd) Black-holes: –If one node goes broke and advertises route of zero to several key networks, all nodes immediately point to it. Not the optimal routing tables the simplistic metric resulting in packets being sent over slow links when better paths are available Broadcasts consume non-router resources

12 The Bouncing Effect A B C B C2 1 destcost A C1 1 destcost A B1 2 destcost X

13 C Sends Routes to B A 2 1 B C B C2 1 destcost A C1 ~ destcost A B1 2 destcost

14 B Updates Distance to A A 2 1 B C B C2 1 destcost A C1 3 destcost A B1 2 destcost

15 B Sends Routes to C A 2 1 B C B C2 1 destcost A C1 3 destcost A B1 4 destcost

16 C Sends Routes to B A 2 1 B C B C2 1 destcost A C1 5 destcost A B1 4 destcost

17 How are These Loops Caused? Observation 1: –B s metric increases Observation 2: –C picks B as next hop to A –But, the implicit path from C to A includes itself!

18 Solution 1: Holddowns If metric increases, delay propagating information –In our example, B delays advertising route –C eventually thinks B s route is gone, picks its own route –B then selects C as next hop Adversely affects convergence

19 Other Solutions Split horizon –C does not advertise route to B – Rule: It is never useful to send information about a route back in the direction from which it came Poisoned reverse –C advertises route to B with infinite distance –Rule: If two routers have routes pointing at each other advertising reverse routes with a metric of 16 breaks the loop immediately

20 An Example Where Reverse-Poison Fails r When the link between C and D fails, C will set its distance to D as r However, A will then use B to go to D, and B will use A to go to D because there is no reverse-poison between them r After such updates, A (and B) will then report new path to C for D, and C will use the path; we thus have the count-to- infinity problem again

21 Link State Protocols Key: Create a network map at each node. 1. Node collects the state of its connected links and forms a Link State Packet (LSP) 2. Flood LSP => reaches every other node in the network and everyone now has a network map. 3. Given map, run Dijkstra s shortest path algorithm (SPF) => get paths to all destinations 4. Routing table = next-hops of these paths.

22 Dijkstra s algorithm Net topology, link costs known to all nodes accomplished via link state broadcast all nodes have same info computes least-cost paths from one node ( source or root ) to all other nodes gives routing table for that node iterative: after k iterations, know least cost path to k dest. s Notation: c(i,j): link cost from node i to j. cost infinite if not direct neighbors D(v): current value of path cost from source to dest. V p(v): predecessor node along path from source to v, that is next v N: set of nodes whose least cost path definitively known

23 Dijkstra s Algorithm 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

24 Dijkstra s algorithm: example Step start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F

25 Dijkstra s algorithm, discussion Algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible: O(nlogn)

26 OSPF (Open Shortest Path First) RFC 2178 A Link State algorithm –Link costs are configured by network administrator –Link state packet disseminated to entire AS (via flooding) periodically –Each router maintains an identical database describing the AS's topology –Use Dijkstra s algorithm to compute shortest path routes to all the routers

27 OSPF Advanced Features Security: all OSPF messages authenticated (to prevent malicious intrusion), TCP connections used Multiple same-cost paths allowed (only one path in RIP) Allow each link to have different costs for different TOS (Type of Service) IP Packets –E.g, high-bandwidth satellite link configured to have a low cost for non-time-critical traffic and have a high cost for delay-sensitive traffic –Can compute different routes for each type of traffic Integrated unicast and multicast support: –Multicast OSPF (MOSPF, RFC 1584) provides simple extensions to OSPF to provide for multicast routing Support for hierarchy within a single AS

28 Hierarchical OSPF Two-level hierarchy: local area, backbone –An AS is configured into areas, each area runs its own OSPF link-state routing algorithm –One area in AS is configured to be the backbone area, job is to route traffic between other areas in the AS Four types of OSPF routers: Internal routers: in non-backbone areas and only perform intra-AS routing Area border routers: belong to both an area and the backbone, route packets to outside the area Backbone routers: perform routing within the backbone but are not area border routers Boundary routers: connect to other ASs, exchange routing information with routers in other ASs

29 Hierarchical OSPF

30 OSPF in IP Packets OSPF is a link-state routing protocol –Relies on IP packets for delivery of routing information –Uses protocol number 89 IP Header Protocol Number Frame Header CRCCRC Packet Payload Frame Payload 89 - OSPF 6 - TCP 17 - UDP 89 - OSPF 6 - TCP 17 - UDP

31 OSPF Terminology Interfaces

32 OSPF Terminology Neighbors Interfaces

33 Neighbors Interfaces OSPF Terminology Cost = 10 Cost = 6 Cost = 1785

34 OSPF Terminology Neighbors Interfaces Area 1 Area 0 Cost = 10 Cost = 6 Cost = 1785

35 OSPF Terminology Autonomous System Neighbors Interfaces Area 1 Area 0 Cost = 1785 Cost = 10 Cost = 6

36 Autonomous System OSPF Terminology Neighborship Database Lists Neighbors Neighbors Interfaces Area 1 Area 0 Cost = 10 Cost = 6 Cost = 1785

37 Autonomous System OSPF Terminology Topology Database Lists All Routes Neighborship Database Lists Neighbors Neighbors Interfaces Area 1 Area 0 Cost = 1785 Cost = 10 Cost = 6

38 Autonomous System OSPF Terminology Routing Table Lists Best Routes Topology Database Lists All Routes Neighborship Database Lists Neighbors Cost = 10 Cost = 1785 Cost = 6 Neighbors Interfaces Area 1 Area 0

39 OSPF Topologies Point-to-Point NBMA Broadcast Multiaccess X.25 Frame Relay

40 OSPF Type1,Hello 2 Database Description, 3 Link State Request 4 Link State Update Flooding 5 Link State Acknowledgement

41 Neighborship Hello afadjfjorqpoeru Router ID Hello/dead intervals Neighbors Area-ID Router priority DR IP address BDR IP address Authentication password Stub area flag * * * * * Entry must match on neighboring routers Hello A A D D E E C C B B 10 Hello 40 Hello Router

42 Neighborship (cont.) Hello afadjfjorqpoeru Router ID Hello/dead intervals Neighbors Area-ID Router priority DR IP address BDR IP address Authentication password Stub area flag * * * * * Entry must match on neighboring routers Hello A A D D E E C C B B

43 DR and BDR DR BDR –Hellos elect DR and BDR to represent segment –Each router then forms adjacency with DR and BDR

44 –Hello packets exchanged via IP multicast –Router with highest OSPF priority elected P=1P=0P=1 Electing the DR and BDR P=3P=2 DR BDR Hello

45 Exchange Process /24 E /24 E1 A B Down State

46 Exchange Process /24 E /24 E1 Router B Neighbors List /24, int E1 I am router ID and I see no one. Down State Init State A B

47 Exchange Process /24 E0 I am router ID , and I see /24 E1 Router B Neighbors List /24, int E1 I am router ID and I see no one. Down State Init State A B

48 Exchange Process /24 E0 I am router ID , and I see Router A Neighbors List /24, int E /24 E1 Router B Neighbors List /24, int E1 I am router ID and I see no one. Down State Init State Two-Way State A B

49 Discovering Routes E DR E No, I will start exchange because I have a higher router ID. I will start exchange because I have router ID Hello afadjfjorqpoeru Hello afadjfjorqpoeru Exstart State

50 Discovering Routes Here is a summary of my link-state database. DBD afadjfjorqpoeru Exchange State Here is a summary of my link-state database. DBD afadjfjorqpoeru E DR E No, I will start exchange because I have a higher router ID. I will start exchange because I have router ID Hello afadjfjorqpoeru Hello afadjfjorqpoeru Exstart State

51 Discovering Routes (cont.) E E Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR

52 Discovering Routes (cont.) I need the complete entry for network /24. Here is the entry for network /24. Thanks for the information! LSR afadjfjorqpoeru LSAck afadjfjorqpoeru LSU afadjfjorqpoeru Loading State E E Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR

53 Discovering Routes (cont.) Full State I need the complete entry for network /24. Here is the entry for network /24. Thanks for the information! LSR afadjfjorqpoeru LSAck afadjfjorqpoeru LSU afadjfjorqpoeru Loading State E E Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR

54 Choosing Routes Topology Table Net Cost Out Interface To To E0 Cost=10 Cost=6 Cost=1 A B C This is the best route to / / / /24

55 Maintaining Routing Information Router A tells all OSPF DRs on xx Link-State Change LSU 1 DR A A B B

56 Maintaining Routing Information LSU 2 Router A tells all OSPF DRs on DR tells others on xx Link-State Change LSU 1 DR A A B B

57 LSU 3 Maintaining Routing Information LSU 2 xx Link-State Change LSU 1 DR A A B B Router A tells all OSPF DRs on DR tells others on

58 Maintaining Routing Information I need to update my routing table. 4 LSU 3 2 xx Link-State Change LSU 1 DR A A B B Router A tells all OSPF DRs on DR tells others on

59 Maintaining Routing Information (cont.) Is entry in link-state database? LSA LSU No Run SPF to calculate new routing table Add to database Flood LSA End Send LSAck to DR

60 Maintaining Routing Information (cont.) Yes Is seq. # the same? Yes Ignore LSA Is entry in link-state database? LSA LSU No Run SPF to calculate new routing table Add to database Flood LSA Send LSAck to DR End 32bit OSPF 5 600

61 Maintaining Routing Information (cont.) No Send LSU with newer information to source Is seq. # higher? No Yes Is seq. # the same? Yes Ignore LSA Is entry in link-state database? LSA LSU No Run SPF to calculate new routing table Add to database Flood LSA Send LSAck to DR End

62 Maintaining Routing Information (cont.) Yes Go to A A No Send LSU with newer information to source Is seq. # higher? No Yes Is seq. # the same? Yes Ignore LSA Is entry in link-state database? LSA LSU No Run SPF to calculate new routing table Add to database Flood LSA Send LSAck to DR End

63 Point-to-Point Neighborship –Router dynamically detects its neighboring router using the Hello protocol –No election: Adjacency is automatic as soon as the two routers can communicate –OSPF packets are always sent as multicast

64 AS IGP, Internet Inter-AS AS Inter-AS

65 AS AS AS, AS

66 BGP BGP BGP IP BGP IP a. AS b. AS IP BGP IP

67 BGP AS AS BGP AS AS BGP

68 BGP Operations (Simplified) Establish session on TCP port 179 Exchange all active routes Exchange incremental updates AS1 AS2 While connection is ALIVE exchange route UPDATE messages BGP session

69 Internet Inter-AS Routing: BGP BGP (Border Gateway Protocol, FRC 1771): the de facto standard inter-AS routing protocol Path vector protocol: –Similar to distance vector protocol –Each BGP router broadcasts to neighbors (peers) entire path (i.e, sequence of ASs) to a destination AS, but not the cost to destination E.g., Gateway X may send its neighbors the path to destination Z: Path (X,Z) = X,Y1,Y2,Y3,Z BGP distributes path info among ASs, but leaves the policy for making the route selections up to the network admin

70 BGP (cont d) Suppose: gateway X sends its path to peer W W may or may not select path offered by X –Cost, policy (don t route via competitors AS), loop prevention reasons. If W selects path advertised by X, then Path (W,Z) = W, Path (X,Z) = W,X,Y1,Y2,Y3,Z Note: X can control incoming traffic by controlling its route advertisements to peers: –E.g., don t want to route traffic to Z don t advertise any routes to Z

71 BGP (cont d) BGP messages exchanged using TCP, port 179 BGP messages: –OPEN: opens TCP connection to peer, identifies and authenticates itself, sent when a BGP gateway wants to first establish contact with a BGP peer –UPDATE: advertises new path (or withdraws old path) –KEEPALIVE: keeps connection alive in absence of UPDATES; also ACKs OPEN message –NOTIFICATION: reports errors in previous message; also used to close connection

72 Autonomous Systems (AS) AS = set of routers and networks under the same administration No theoretical limit to the size of the AS All parts within an AS remain connected. If two networks rely on core-AS to connect, they don t belong to a single AS AS is identified by a 16-bit AS number At least one border router per AS. This router also collects reachability information ( external routes ) and diffuses it internally and vice versa

73 Autonomous Systems (Continued) AS types: –Stub AS => only single connection to one other AS => it carries only local traffic. –Multihomed AS: Connected to multiple AS, but does not allow transit traffic –Transit AS: carries transit traffic under policy restrictions Traffic types: –Local = traffic originating or terminating at AS. –Transit = non-local traffic

74 Many Routing Processes Can Run on a Single Router Forwarding Table OSPF Domain RIP Domain BGP OS kernel OSPF Process RIP Process RIP Routing tables OSPF Routing tables BGP Process BGP Routing tables Forwarding Table Manager

75 IPv6 The New Internet Protocol

76 Outline The Protocol (new ICMP) Addressing and Routing (provider addressing) Autoconfiguration Security Support of Real-time Communication Deployment Strategy

77 The Design of IPv6 IPv4 design was very good IPv6 should keep most of it It could only increase the size of addresses and keep every thing the same Experience brought lessons for improvement

78 IPv6 Header (40 bytes) VersionPrioFlow Label Payload LengthNext HeaderHop Limit Source Address Destination Address bytes 128 bits

79 IPv4 Header (20 bytes) Version identificationDF MFFragment offset Source Address Destination Address bytes 32 bits Hd len ToS Tot len Hd chksum protocol TTL Options (if any)

80 Note that while the IPV6 address are four times as large as the IPV4 address, the header length is only twice as big.

81 Notations of IPv6 Addresses 128 bit is represented as: –8 integers (16-bit) separated by colons each integer is represented by 4 hex digits Example: FEDC:BA98:7654:3210:FEDC:BA98:7664:3210

82 Simplifications Skip leading zeros –Example:1080:0000:0000:0000:0008:0800:200C:417A –is reduced to: 1080:0:0:0:8:800:200C:417A A set of consecutive nulls is replaced by :: (at most one :: inside an address) –the above address is reduced to: 1080::8:800:200C:417A

83 Comparison of Headers V6: 6 fields + 2 addr V4: 10 fields + 2 addr + options Deleted: –Header length –type of service –identification, flags, fragment offset –Header Checksum Added: –Priority –Flow label Renamed: –length -> Payload length –Protocol -> Next header –time to live -> Hop Limit Redefined: Option mechanism

84 Simplifications Fixed format headers –no options -> no need for header length –options expressed as Extension headers No header checksum –reduce cost of header processing, no checksum updates at each router –minimal risk as encapsulation of media access protocols (e.g..., Ethernet, PPP) have checksum No segmentation –hosts should use path MTU discovery –otherwise use the minimum MTU (536 bytes)

85 Renaming Total Length Payload Length –not include header length –max length 64Kbytes with provision for larger packets using jumbo gram option Protocol Type Next header, can be set to: – Protocol type (UDP,TCP, etc..) – Type of first extension header TTL Hop limit – Truth in advertising!, – number of hops NOT number of seconds

86 New Fields Flow label & Priority –to facilitate the handling of real time traffic

87 Options Extension Headers Routers treats packets with options as second class citizens because it is slow to process, thus programmers tend not use them and options almost became obsolete.

88 Daisy Chain of Headers TCP Header + Data IPv6 Header Next Header= TCP TCP Header + Data IPv6 Header Next Header= Routing Routing Header Next Header= TCP

89 IPv6 extension headers Hop-by-hop options Routing Fragment Destination options Authentication Encryption Security Payload

90 Protocol & Header Types

91 Routing Header Next Header0Num addrs Next Addr strict/loose bit mask (24) Reserved Address[0] Address[Num Addrs -1] ………………………... Routers will only look at the routing header if they recognize one of their addresses in the destination field of the main header

92 Fragment Header Routers do not fragment oversized packets Sender is to fragment & Receiver is to reassemble Next Header ReservedFragment offsetResM Identification

93 Destination Option Header Will only be examined by the station specified in the destination address. Next Header Hdr Ext Len Options Option TypeOpt Data LenOption Data

94 Hop-by-Hop Option Header Will be examined by each router. Has same form as destination options hdr. 194 Opt Len = 4 Jumbo Payload Length To satisfy networking requirement of supercomputers, the Jumbo payload option is used to send very large packets (the IPv6 length field is set to zero):

95 ICMP…. Streamlined Removed unused functions in ICMP of v4 Incorporate IGMP of v4 Type CodeChecksum Message Body

96 ICMP Error Messages 1 Destination Unreachable. Codes: 0 No route to destination 1 destination prohibited 3 Address unreachable 4 Port unreachable 2 Packet Too Big contain next hop MTU. used for path MTU discovery 3 Time Exceeded. Codes: 0 Hop limit exceeded 1 Fragment reassebly time exceed 4 Parameter Problem No error message in response to multicast or ICMP packets

97 Other ICMP messages 128 Echo Request 129 Echo Reply 130 Group Membership Query 131 Group Membership Report 132 Group Membership Termination 133 Router Solicitation 134 Router Advertisement 135 Neighbor Solicitation 136 Neighbor Advertisement 137 Redirect

98 Impact on Upper Layers Upper-layer Checksums pseudoheadertransport headertransport data Source Address Destination Address 0Next headerPayload Length : Mandatory (even UDP)

99 Domain Name Service 32-bit address to 128-bit address Programming interface Address data structures AF_INET6, PF_INET6, in_addr6, sockaddr_in6 Name-to-address translation functions Address conversion functions

100 Points of Controversy Do we need more than 255 Hops? –allowing hop count to be very large, looping packets will be relayed many times before being discarded Should packets be larger than 64K? –allowing very large packets increase the size of queues and the variability of queuing delays Can we live without checksum? –Some IPv4 routers started to cut corners by not verifying checksums to gain advantage over competition. By removing checksum altogether offers all routers the same advantage.

101 Real-time Support & Flows A proper handling of flows is required for high- quality multimedia communications in the new Internet A flow is a sequence of packets sent from a particular source to a particular (unicast or multicast) destination for which the source desires special handling by the intervening routers.

102 Real-time flows & Data Queues S R1 R2 R3 data The flow label & source address are used to assert which packets belong to what flows In IPv6 port numbers deep inside due to daisy chaining Even may not be visible due to encryption

103 Security èIf security is provided at the IP level it becomes standard service that all applications can use èIt is absolutely necessary to implement if we want to develop of commercial use the Internet, e.g...., to deter sniffing attacks on passwords and credit card numbers.

104 Headers èAuthentication header Guarantee that the source address is authentic & the packet has not been altered during transmission. èEncryption header Guarantee that only legitimate receivers will be able to read the content of the packet

105 Transitioning the Internet At the beginning, all IPv6-capable hosts will also be IPv4-capable so as to retain connectivity with the existing Internet. To transform IPv4 into a dual-stack IPv6-capable host, it should include: –The IPv6 basic code –Handling IPv6 within TCP & UDP –Modify socket interface to support new addresses –Handling the interface with the name service

106 The 6-Bone The Similar to the M-Bone, Initially the connectivity is achieved by tunneling IPv6 packet will be encapsulated within IPv4 packets. IPv6 domain IPv6 domain R R IPv4 only Network


Download ppt "RIP ( Routing Information Protocol) RFC 1058 and 1723 Included in BSD UNIX in 1982 Distance vector algorithm Distance metric: number of hops (max = 15."

Similar presentations


Ads by Google