Presentation is loading. Please wait.

Presentation is loading. Please wait.

資 管 Lee Lesson 10 RIP, OSPF, and BGP. 資 管 Lee Routing in Internet An internet is divided into autonomous systems. An autonomous system(AS) is a group.

Similar presentations


Presentation on theme: "資 管 Lee Lesson 10 RIP, OSPF, and BGP. 資 管 Lee Routing in Internet An internet is divided into autonomous systems. An autonomous system(AS) is a group."— Presentation transcript:

1 資 管 Lee Lesson 10 RIP, OSPF, and BGP

2 資 管 Lee Routing in Internet An internet is divided into autonomous systems. An autonomous system(AS) is a group of networks and routers under the authority of a single administration. Routing inside an AS is called interior routing, Routing between ASs is referred to as exterior routing. RIP and OSPF are protocols used in interior routing, and BGP is for exterior routing. autonomous system R1 R2 Routers R1 and R2 use an interior and an exterior routing, others use only interior routing protocols.

3 資 管 Lee RIP (Routing Information Protocol) RIP based on distance vector routing, which uses the Bellman-Ford algorithm for calculating the routing tables. In distance vector routing, each router periodically shares its knowledge about the entire internet with neighbors. Three keys: ◦ Sharing knowledge about the entire autonomous system. ◦ Sharing only with neighbors. ◦ Sharing at regular internals. At every 30 seconds Routing Table DestinationHop CountNext Hop Other Information 163.5.0.07172.6.23.4 197.5.13.05176.3.6.17 189.45.0.04200.5.1.6

4 資 管 Lee 資 管 Routing Table RIP Updating Algorithm Receive: a response RIP message 1. Add one hop to the hop count for each advertised destination. 2. Repeat the following steps for each advertised destination: 1. if (destination not in the routing table) 1. add the advertised information to the table. 2. else 1. if (next-hop field is the same) 1. replace entry in the table with the advertised one. 2. else, 1. if (advertised hop count smaller than one in the table) 1. add it to the routing table. 2.else 1. do nothing 3. Return The routing table is updated upon receipt of a RIP response message. The following Shows the updating algorithm used by RIP.

5 資 管 Lee Example of updating table Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net94F Updating algorithm Net17A Net25C Net39C Net65C Net84E Net94F RIP message from C RIP message from C after increment Note: for Net6, the RIP massage Contains a lower hop count and this shows up on the new routing table. For Net2, both identify the same next hop (router C). Although the value of hop Count is less than that comes from RIP The value is updated to 5.

6 資 管 Lee 資 管 Initializing status to the routing table Net: 14 Net: 78 Net: 23 Net: 55 Net: 92 Net: 66 Net: 08 141- 231- 781- A 141- 551- B 781- 921- F 081- 231- E 081- 661- D 551- 661- C

7 資 管 Lee 資 管 Final the routing table for the previous Net: 14 Net: 78 Net: 23 Net: 55 Net: 92 Net: 66 Net: 08 082E 141- 231- 552B 663E 781- 922F ABFEDC 082D 142B 233D 551- 661- 783B 924B 081- 142A 231- 553A 662D 782A 923A 081- 143E 232E 552C 661- 783E 924E 083A 141- 232A 551- 662C 782A 923A

8 資 管 Lee 資 管 RIP Message Format CommandVersionReserved FamilyAll 0s Network address All 0s Distance Command. The 8-bit field specifies the type of message: request (1) or response (2). Version. The 8-bit field defines the version. Version 1, version 2. Family. This 16-bit field defines the family of the protocol used. For TCP/IP the value is 2. Address. Defines the address of the destination network. RIP allocated 14 bytes for this field. IP currently uses only four bytes. Distance. 32-bit field defines the hop count from the advertising router to the destination network. RIP message are used UDP user datagram with port 520. A RIP message does not include length field, since that can be found in the UDP. Com: 1VersionReserved FamilyAll 0s Network address All 0s Distance Com: 1VersionReserved FamilyAll 0s Distance Repeated Request for some Request for all

9 資 管 Lee Com: 2VersionReserved Family:2All 0s 141.12.0.0 All 0s 5 Family:2All 0s 181.2.0.0 All 0s 2 Family:2All 0s 97.0.0.0 All 0s 4 141.12.0.05 181.2.0.02 97.0.0.04 Conceptual message Response message

10 資 管 Lee Problems with RIP Slow Convergence Net: 2 Net: n+1 R1R2Rn Net: 1 0 seconds 15 seconds 15x n seconds Instability Net: 2 Net: 1 Net: 3 Net 11- …… 2A …… AB Net: 2 Net: 1 Net 116- …… Net 12A …… AB Net: 3 Net 12A …… Net: 2 Net: 1 Net 13B …… 2A …… AB Net: 3 Net 14A ……

11 資 管 Lee Open Shortest Path First (OSPF) An autonomous system(AS) is divided into many different areas. Routers inside an area flood the area with routing information. At the border of an area, special routers called area border routers summarize the information about the area and send it to other areas. R1 Area border router R2 To other ASs AS Boundary router Backbone router Area border router Area 0 Area 1 Area 2

12 資 管 Lee Areas and backbone An area is a collection of networks, host, and routers all contained within an autonomous system. Routers inside an area flood the area with routing information. At the border of an area, special routers called area border routers summarize the information about the area and send it to other areas. One special area called backbone; all of the areas inside an autonomous must be connected to the backbone. Each area has an area identification. The backbone area is area zero.

13 資 管 Lee OSPF Metric: OSPF protocol allows the administrator to assign a cost, called the metric, to each route. The,metric can be based on a type of service (min. delay, max. throughput). As a matter of fact, a router can have multiple routing tables, each based on a different type of service. Link state routing: OSPF uses link state routing to update the routing tables in an area. Three keys to the link state routing: ◦ Sharing knowledge about the neighborhood. Each router sends the state of its neighbor to every other router in the area. ◦ Sharing with every other router. Each router sends the state of its neighbor to every other router in the area. It does so by flooding, a process sends its information to all of its neighbors. ◦ Sharing when there is a change. Each router shares the state of its neighbor only when there is a change.

14 資 管 Lee Types of Links In OSPF terminology, a network is called a link. Four types are defined: ◦ Point-to-point Link: a point-to-point link connects two routers without any other host or router in between. ◦ Transient Link: a network with several routers attached to it. All LANs and some WANs with two or more routers are of this type. ◦ Stub Link: a network that is connected to only one router. ◦ Virtual Link: when the link between two routers is broken. A virtual link between them uses a longer path. A B ABCDEABCE Designed Network DAA point-to-point Link stub Link Transient Link

15 資 管 Lee C A B D EF FDDI Token ring T1 line N1 N2 Ethernet T3 line Ethernet N4 N3 N5 A B C D E F N2 N1 N3 N4 N5 2 3 8 8 5 7 4 4 5 2 9 5 Example of an internet Graphical representation of an internet

16 資 管 Lee Link state advertisement (LSA, 1/5) Five LSAs: ◦ Router link, defines the links of a true router. Announce information about all of its links and what is at the other side of the link(neighbors) Point-to-point Virtual To stub network To transient network Advertising router with 4 links

17 資 管 Lee Link state advertisement (LSA, 2/5) ◦ Network link: a network defines the links of a network. A designated router, on behalf of the transient network, distributes this type of LSA packet. The packet announces the existence of all of the routers connected to the network. Network with 5 links Designated router advertises the links

18 資 管 Lee Link state advertisement (LSA, 3/5) Summary link to network: router link and network link advertisements flood the area with information about the router links and network links inside an area. But a router should also know about the networks outside its area, and the area border routers can provide this information. An area border router is active in more than one area. It receives router link and network link advertisements and creates a routing table for each area. R1 R2 Area 1 Area 2 Area 0 Summary link to network Flooded by the area boarder router into the area N1 Router R1has two routing tables, one for area 1 and one for area 0. R1 floods area 1 with information about how to reach a network located in an area 0 Flooded by the area boarder router into the area Summary link to network

19 資 管 Lee Link state advertisement (LSA) ◦ Summary Link to AS boundary router:. External link: R1R1 R2R2 Area 1 Area 2 Area 0 Flooded by the area boarder router into the area ASAS Summary link to AS boundary router AS boundary router Area 1 Area 2 Area 0 ASAS Flooded by the AS boundary router into the AS External link

20 資 管 Lee Dijkstra Algorithm ◦ Every router in the same area had the same link state database. ◦ Use Dijkstra to calculate the shortest path between two points on a network using a graph made of modes and edges. Dijkstra Algorithm 1. Start with the local node (router): the root of the tree 2. Assign a cost of 0 to this node and make it the first permanent node. 3. Examine each neighbor node of the node that was the last permanent node. 4. Assign a cumulative cost to each node and make it tentative. 5. Among the list of tentative nodes 1. Find the node with the smallest cumulative cost and make it permanent. 2. If a node can be reached from more than one direction 1. Select the direction with the shortest cumulative cost. 6. Repeat step3 3 to 5 until every node becomes permanent.

21 資 管 Lee A AD N1 8 5 0 AD 8 5 C 5 B 5 AD 8 5 C 5 B 5 N2 AD N1 8 5 C 5 B 5 7 N2 AD N1 8 5 C 5 B 5 7 E 9 E 9 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10

22 資 管 Lee N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 N4 11 14 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 N4 11 F 10 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 N4 11 F 10 N5 15 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 11 F 10 N5 15 N2 AD N1 8 5 C 5 B 5 7 E 9 N3 10 N4 11 F 10 N5 15 N4

23 資 管 Lee OSPF’s routing table NetworkCostNext RouterOther Information N15- N27C N310D N411B N515D Every router uses the shortest path tree method to construct its routing table. The routing table shows the cost of reaching each network in the area. To find the cost of reaching networks outside of the area, and the external link advertisements.

24 資 管 Lee Types of packets in OSPF OSPF packets Hello Database description Link state update Link state request Link state acknowledgement Link state request Router link Network link Summary link to network Summary link to AS boundary router External link

25 資 管 Lee Packet Format in OSPF Version (2)Type (1:5)Message length Source router IP address Area ID ChecksumAuthentication type Authentication (64-bit) OSPF packet header (24 bytes) Authentication type: defines the authentication method used in this area. At this time, two types are defined: 0 for none and 1 for password. Authentication. This 64-bit field is the actual value of the authentication data. In the future, when more authentication types are defined, this field will contain the result of the authentication calculation. For now, if the type is 0, this field is filled with 0s. If the type is 1, this field carries an eight-character password.

26 資 管 Lee Hello message in OSPF Common header 24 bytes TYPE:1 Network mask Hello intervalAll 0sETPriority Dean interval Designed router IP address Backup designed router IP address Neighbor IP address [repeated] Hello message: header plus data OSPF uses the hello message to create neighbor relationships and to test the reachability of neighbors. Network mask. Hello interval. Defines the number of seconds between hello messages. E flag. The area is a stub. T flag, supports multiple metrics. Priority. Defines the priority of the router. After all neighbors declare their priorities, the router with the highest priority is chosen as the designed router. Dead intervals, Designed router IP address, The IP address of the designed router over which the message is sent Neighbor IP address, list of all the neighbors from which the sending router has received.

27 資 管 Lee Database description message in OSPF Common header 24 bytes TYPE:2 All 0s EB IMMSMS Message sequence number Link sate header (20 bytes)[repeated] OSPF uses the database description to give an outline about the database from sending router. The received router finds out which lines of information it does not have. It then sends one or more link state request packets to get full information. E flag. Set to 1 if the advertising router is an autonomous boundary router (E stands for external) B flag. Set to 1 if the advertising router is an area border router. I flag. Set to 1 if the message is the first message. M flag. Set to 1 if this is not the last message. M/S flag. Indicates the origin of the packet: master (1) or slave (0) Message sequence number. Used to match a request with response. Link state header. Gives the outline of each link, without details.

28 資 管 Lee Link State request&update packet in OSPF Common header 24 bytes TYPE:3 (request) Link state type Message sequence number Advertising router Request is sent by a router that needs information about a specific route or routes. It is answered with a link update packet. Update: used by a router to advertise the states of its links. Each update packet may contain several different LSAs. For example, a link state update packet can contain 14 LSAs. Four of which are router link advertisements, three are network link advertisements, two are summary link to networks, two are summary link to AS boundary router advertisements, and thee are external link advertisements. Common header 24 bytes TYPE:4 (update) Number of link state advertisement Link state advertisement (five different types) [repeated] repeated

29 資 管 Lee Link state agereservedETLink state type Link state ID Advertising router Link sate sequence number Link state checksumLength Link state age. Indicates the number of seconds elapsed since this message was first generated. E flag. Set to 1, means the area is a stub area. T flag. Set to 1 if the router can handle mltiple types of service. Link state type. Link state ID. LSA header

30 資 管 Lee BGP: Border Gateway Protocol

31 資 管 Lee BGP ◦ BGP: an inter-autonomous system routing protocol. It first appeared in 1989 and has gone through four versions. BGP is based on a routing method called path vector routing.Why not the distance vector and link state routing? Distance vector is not a good candidate because there are occasions in which the route with the smallest hop count is not the preferred route. Link state result in huge routing table when do the inter-autonomous system. ◦ Path vector routing: each entry in the routing table contains the destination, the next router, and the path to reach the destination. The path is usually defined as an ordered list of autonomous systems that a packet should travel through to reach the destination. NetworkNext RouterPath N01R01AS14, AS23, AS67 N02R05AS22, AS67, AS05, AS89 N03R06AS67, AS89, AS09,AS34 N04R12AS62, AS02, AS09

32 資 管 Lee R1 R2 AS1 AS2 AS3 R3R4 AS4 N1 R1 AS1 N1 R2 AS2, AS1 N1 R3 AS3, AS2, AS1 ◦ Path vector messages: the AS boundary routers that participate in path vector routing advertise the reach ability of the networks in their own AS to neighbor AS boundary routers. The concept of neighborhood here is the same as the one described in the RIP or OSPF protocol. The router R1 sends a path vector message advertising the reachability of N1. router R2 receives the message, update its routing table, and after adding its AS to the path and inserting itself as the next router.

33 資 管 Lee Quiz RIP, OSPF, and BGP are acronym for? What are the functions of RIP, OSPF, and BGP? What is Path vector routing? Why BGP uses it? What are the problems with RIP? Can you tell the advantages and disadvantages among RIP, OSPF and BGP?


Download ppt "資 管 Lee Lesson 10 RIP, OSPF, and BGP. 資 管 Lee Routing in Internet An internet is divided into autonomous systems. An autonomous system(AS) is a group."

Similar presentations


Ads by Google