Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE5803 Advanced Internet Protocols and Applications (9) 1 9.1 Introduction Chapter 6 introduced basic routing concepts inside Autonomous Systems. Chapter.

Similar presentations


Presentation on theme: "CSE5803 Advanced Internet Protocols and Applications (9) 1 9.1 Introduction Chapter 6 introduced basic routing concepts inside Autonomous Systems. Chapter."— Presentation transcript:

1 CSE5803 Advanced Internet Protocols and Applications (9) 1 9.1 Introduction Chapter 6 introduced basic routing concepts inside Autonomous Systems. Chapter 7 introduced improved IP addressing and address allocation. Chapter 8 discussed current EGP routing protocols for AS to AS routing. This chapter will discuss current IGP protocols for routing inside autonomous systems, which include RIP-2 and OSPF. 9.2 RIP-2 Features RIP-2 (RFC1723) is an extension of RIP-1 discussed in Chapter 6. It is a distance vector routing algorithm, with updates carried by UDP, but has many enhancement features such as the support of VLSM, authentication, etc.

2 CSE5803 Advanced Internet Protocols and Applications (9) 2 The complete update message format:

3 CSE5803 Advanced Internet Protocols and Applications (9) 3 Command, Version are the same as RIP-1 (RFC1058). Address Family Id (AFI) is the same as RIP-1, family of net (2 for IP). Metric is also the same as RIP-1, distance to net. Routing Domain: RFC1723 did not use this field. This is in case RIP-2 is used outside its own AS, not supported usually. Authentication: Only exist with the first update message from a router. If this is used, the identifier is fixed (0xFFFF). The only supported type is 2, with a password of no more than 16 octets. Route Tag: Each route in an update is assigned a route tag and is intended for tagging routes from other protocols, such as OSPF, BGP. Subnet Mask: This is for the network address entry. The support of VLSM. Next Hop: Next hop is normally derived from the source of RIP update. This can also be specified with each network entry, which override the source router IP.

4 CSE5803 Advanced Internet Protocols and Applications (9) 4 Multicast update: RIP-2 updates are not broadcasted, instead, they are multicasted to 224.0.0.9 (class D). This reduces the load on non RIP-2 routers and hosts. 9.3 Open Shortest Path First (OSPF) Basic Concepts OSPF Version 2 (RFC1247/1583/2178/2328) is a sophisticated protocol developed for the application in large IP networks. RFC2328 is the most up to date description (published in 1998). It is a link-state protocol, using Dijkstra’s SPF algorithm. This means routing decision is based on route costs. Unlike RIP, there is no unreachable metric. (not distance vector) OSPF has faster convergence than RIP. Link state advertisements (LSAs), not network addresses are exchanged. The LSAs reflect the actual network topology information. Any change in the network will trigger the flood of LSA to all routers It can be computationally expensive when recalculating the new routes. The information exchanged after a network change can also be very intensive.

5 CSE5803 Advanced Internet Protocols and Applications (9) 5 No periodic update is necessary if there is no change. This means OSPF is event driven (as against epoch in RIP). OSPF classifies subnets into different types and areas (explained in 9.7 and 9.8) according to their topologies and sizes for better routing. Requires more planning and careful use of network address assignments to benefit from it the best. RIP is rather ad-hoc in comparison. Supports VLSM, enables equal cost multipath. 9.4 OSPF Basic Components Link State Database Dijkstra’s Algorithm SPF Tree OSPF Routes OSPF Routing Table OSPF Domain IP Routing Table

6 CSE5803 Advanced Internet Protocols and Applications (9) 6 OSPF routers exchange link state information in the link state database (LSDB). This contains LSAs. Routers do not exchange direct routing information. LSDB describes the complete network topology with a list of nodes and connections, sometimes referred as topological database. All participating routers have the same LSDB. This is achieved by the initial and subsequent (when necessary) flood of LSAs to each other. OSPF uses its own transport mechanism, which is referred to as reliable flooding. It is carried directly on IP and does not use either TCP or UDP. Most OSPF messages are single-hop sent and acknowledged. Based on the information in LSDB, each router runs Dijkstra’s SPF algorithm individually, and constructs a tree of shortest paths (SPF tree) with itself as the root. A routing table is derived from the SPF tree.

7 CSE5803 Advanced Internet Protocols and Applications (9) 7 9.5 Communication of OSPF Peers OSPF uses its own Hello protocol for the exchange of LSAs and other relevant information, which is a reliable duplex protocol with handshake and acknowledgement. OSPF is directly on IP and it uses the following properties of IP: –TTL is set to 1, (most OSPF messages are single hop relayed) –The destination is either neighbor’s IP, or one of the two multicast IPs (224.0.0.5, 224.0.0.6) –The precedence bits of IP are set to 7 (net control). These are normally ignored, of course. –IP protocol field set to 89 (OSPF).

8 CSE5803 Advanced Internet Protocols and Applications (9) 8 –IP fragmentation/reassembly is used when a packet is larger then MTU. This does not happen often since OSPF packets are normally small. OSPF uses multicast if the network supports it. It uses unicast otherwise. The processes of LSA flooding and update of LSDB: –The router send LS update packet to all its interfaces if it has a change in its originating LS. –A neighbor router receives the LS update, it examines the LSA against its own LSDB to see whether it is more recent. –If yes, update its LSDB, and repackage the LSA before sending to all its interfaces except the receiving one. The acknowledgement is sent back to the receiving interface after a delay to see whether more LS update is coming. –If not, ignore the LS update.

9 CSE5803 Advanced Internet Protocols and Applications (9) 9 This example is for point to point network and is from “OSPF Anatomy of an Internet Routing Protocol”, John Moy, Addison- Wesley, 1999.

10 CSE5803 Advanced Internet Protocols and Applications (9) 10 9.6 LSDB Concepts and the Construction of SPF Tree A router builds up an LSA describing its immediate surroundings. Only directly connected networks are included in its LSA, which will propagate through the OSPF domain. Example network: N8R1 R2 R3 R5 R4 N9 2 2 Net 3 3 4 Net5 2 3 6 Net1 Net7 Net6 Net2 Net4 2 3 3 2 2 1 1 2

11 CSE5803 Advanced Internet Protocols and Applications (9) 11 The number associated with each link is the cost based on bandwidth. The cost is not the same for R1  R2 and R2  R1. It is assumed that all routers are connected by point-to-point links, but N8 and N9 are broadcast networks. The essential LSDB information looks like follows: Link State DB (all routers) R2 Net1/2, Net2/3, R1/2, R3/3 R1 Net1/3, Net3/2, Net4/6, Net8/2, R2/3, R3/2, R5/6 R3 Net3/3, Net2/1, Net7/1, Net5/4, R1/3, R5/1, R2/1, R4/4 R4 Net5/2, Net6/1, R3/2, R5/1 R5 Net4/3, Net7/2, Net6/2, Net9/2, R1/3, R3/2, R4/2

12 CSE5803 Advanced Internet Protocols and Applications (9) 12 Dijkstra’s algorithm is used to construct an SPF tree for each router. This is achieved by comparing the cost of all possible paths to a router or a network. R2 SPF tree is given here as an example: R2 R3R1 R3R5N8R4 R1 R5 R4N9 2 Net1 3 Net2 2 2 6 4 1 Net3 Net4 Net5 Net7 32 2 Net4 Net6

13 CSE5803 Advanced Internet Protocols and Applications (9) 13 The solid lines illustrate the final chosen route by the algorithm (Spanning Tree). While dotted lines are possible routes with higher costs, these are not kept in LSDB. As a result, R2 knows the lowest cost routes to all routers and nets. 9.7 OSPF and Different Network Types OSPF supports both point-to-point (PTP) links (T1, High Speed Serial Interfaces, PPP, etc), and Multiaccess networks. (How to assign IP addresses for PTP?) For point-to-point network, the communications methods explained in Section 9.5 are appropriate. The LSDBs at both ends of the link are peers at the same level. The routers are referred to as adjacent routers or adjacency. All OSPF packets are multicasted to 224.0.0.5. If the network belongs to a multiple access type, the case of adjacency needs to be looked at further. It is not necessary to have adjacencies maintained on all routers.

14 CSE5803 Advanced Internet Protocols and Applications (9) 14 Multiaccess networks include: –broadcast Multiaccess network (BMA) possibly with more than two routers attached (Ethernet, token ring, FDDI). A single message is sent to all routers (multicast). –Non-broadcast Multiaccess network (NBMA). ATM, Frame Relay, X.25. Messages are sent to each neighboring router. –Point to multipoint network. Such as group mode Frame Relay, or NBMA without full mesh connections. This can be viewed as individual pairs of PTPs, despite the fact that they are on the same subnet. 9.7.1 Adjacency and LSDB for BMA For BMA subnets, routers multicast Hello messages to neighbor routers initially to elect a designated router (DR) and its backup (BDR). These messages also list all Hellos it can receive from other routers. The router with highest router priority (or IP address with same priority) is elected as the DR. The next highest is BDR.

15 CSE5803 Advanced Internet Protocols and Applications (9) 15 The following example is from “OSPF Anatomy of an Internet Routing Protocol”, John Moy, Addison- Wesley, 1999. After the DR and BDR are elected to lead the whole subnet, all the other routers only need to form adjacencies with the DR and BDR. Synchronisation of their LSDBs with the DR and BDR, instead of each other.

16 CSE5803 Advanced Internet Protocols and Applications (9) 16 The DR and BDR form a subnet LSDB. The DR multicast route updates to the multicast group 224.0.0.5. Non DR routers multicast route update to 224.0.0.6. Hello packets are periodically multicasted to 224.0.0.5. The purposes are: to discover each other, decide whether or not to form adjacency and maintain adjacency. The reliable flooding in this BMA does not happen with routers on each other basis (too many messages flooding the network). 9.7.2 Adjacency and LSDB for NBMA Nonbroadcast multiaccess subnets with more than two routers are normally connected with meshed virtual circuits (VC), either switched or permanent (SVC, PVC). This means all routers have VCs to each other. The initial election of DR, BDR can be expensive since there is no broadcasting facility. A better alternative is to have them setup (more or less) by the administrator.

17 CSE5803 Advanced Internet Protocols and Applications (9) 17 Once DR and BDR are elected, the operation is similar to the BMA. Hello messages are unicasted to statically defined neighbors, since the concept of multicast does not quite work here. A problem exists with many routers on one subnet, the requirement of VCs becomes so huge it will not be possible. The point to multipoint model can be used in this case. The advantage of BMA is diminished in this case. 9.8 Hierarchical OSPF Hierarchical routing is employed to build large networks. This means that networks are divided into different layers and areas, instead of a flat structure. The obvious advantages are reduced network bandwidth for the transmission of routing information, and reduced memory + CPU requirements for many routers to store & process the local area routes only.

18 CSE5803 Advanced Internet Protocols and Applications (9) 18 The network is divided into areas where: –A separate LSDB is maintained for each area –Internal routers only maintain the LSDB of its own area –Border routers must maintain an LSDB for each area they are bordering –External routes are advertised into the area through border routers With careful network planning, networks within an area can be advertised in the form of a summary, reducing amount of processing. Network hierarchical definition: –Backbone area: a higher layer network with more bandwidth, another router connecting to backbone must use the backbone IP for the connection. –Other areas: lower layer of networks that rely on backbone to pass routing information. Classification of OSPF routers: –Internal routers: a router with all directly connected networks belonging to the same area. (can be pure backbone connections)

19 CSE5803 Advanced Internet Protocols and Applications (9) 19 –Area border routers (ABR): an area border router is a router with interfaces to multiple areas. ABRs need to keep LSDBs for all attached areas including backbone. ABR must have at least a connection to the backbone for routing information exchange. In case there is no direct link, a virtual link must be created. –AS boundary routers (ASBR): OSPF treats any non-OSPF networks (RIP, BGP) as outside its AS, thus external to it. An OSPF router connected to such networks is regarded as ASBR. ASBR keeps external routes that are advertised in the OSPF domain. –Backbone routers: routers with backbone connections, can be ABR, ASBR or internal routers within the backbone.

20 CSE5803 Advanced Internet Protocols and Applications (9) 20 ATM Area Backbone 130.192.0.0/24 Area One 130.192.1.0/24 Area Two 130.192.2.0/24 Area Three 130.192.3.0/24 Area Four 130.192.4.0/24 C A E B F H G D J (RIP)

21 CSE5803 Advanced Internet Protocols and Applications (9) 21 Internal routers: C, D, G, J, ABRs: A, B, E, F, H ASBR: J If an OSPF network has more than one area, summary links advertisements are generated by the area border routers. These can represent one or a range of networks within an area. These summary link advertisements are passed from an area to the backbone, or from backbone to an area. They are not sent from one area to another directly. A packet routing between areas must involve three paths, first from source to its area border, second from source area border through backbone to destination area border, third from destination border to the destination.

22 CSE5803 Advanced Internet Protocols and Applications (9) 22 OSPF stub area handling. Stub area is similar to a stub AS explained in Chapter 8, i.e. with one entry/exit point. OSPF stipulates that external routes must not be flooded into a stub area. A default route is advertised instead. Virtual link. A virtual link must be created when an area border router does not have an interface in the backbone. This is a lower OSI layer path through the transit area, and is treated as a point-to-point link. Adjacency issues will be solved as such.

23 CSE5803 Advanced Internet Protocols and Applications (9) 23 9.9 OSPF Messages 9.9.1 OSPF Common Header There are five types of OSPF messages. All have the common header. The common header has 24 bytes which include the following field: - Version (1-byte): version number, 2 is currently in use. - Type (1-byte): there are five different message types to carry out the functions of OSPF: 1- Hello, 2- Database description, 3- Link state request, 4- Link state update, and 5- Link state acknowledgement. - Packet length (2-byte): the length of packet in bytes, including the header. - Router ID (4-byte): RID of the packet source. - Area ID (4-byte): OSPF area of the packet. - Checksum (2-byte): including everything except the authentication field. - AuType (2-byte): Identifies the authentication scheme to be used. - Authentication (8-byte): 64-bit field used for authentication.

24 CSE5803 Advanced Internet Protocols and Applications (9) 24 9.9.2 OSPF Hello Packet Type 1. Sent periodically to all interfaces to discover and maintain peer relationships. In addition to the common header, it has the following fields: –Network mask (4) : network mask associated with this interface. –HelloInterval (2): number of seconds between this router’s Hello packets. –Options (1): Optional capability supported by the router, e.g. recognition of AS external routes. –Rtr Pri (1): Router’s priority to become the designated router (DR). –RouterDeadInterval (4): number of seconds before a silent router is considered down. –Designated Router (4): The IP interface of the designated router (DR) for this network. –Backup Designated Router (4): The IP interface of Backup DR. –Neighbour (variable) : The router IDs from which Hello packets have been received within the RouterDeadInterval.

25 CSE5803 Advanced Internet Protocols and Applications (9) 25 9.9.3 Database Description Packet Type 2. One or more messages of this type is used to inform OSPF peers the contents in a routers LSDB. It consists of 8-byte fields for options and sequence, which is followed by a list of LSA common headers (explained in 9.10). 9.9.4 Link State Request Packet Type 3. After exchanging type 2 messages, if a router find part of its LSDB out of date. It uses this type of packet to request more up-to- date information. In addition to the common header, a request list is attached. Each entry in the list is specified by an LS type, a Link ID and an Advertising Router. More details about these fields are explained in 9.10.

26 CSE5803 Advanced Internet Protocols and Applications (9) 26 9.9.5 Link State Update Packet Type 4. The message is used to send LSAs via reliable flooding, which needs to be acknowledged as discussed in 9.5. The flooding is implemented using multicast to save bandwidth. Any necessary retransmission is sent with unicast. One message can carry more than one LSA. This message includes the OSPF common header, the number of LSAs (4-byte) and followed by the LSAs (explained later in 9.10). 9.9.6 Link State Acknowledgement Packet Type 5. Message used to acknowledge Type 4. This can be multicasted or unicasted. This message includes the OSPF common header and a list of LSA common headers to indicated what have been received.

27 CSE5803 Advanced Internet Protocols and Applications (9) 27 9.10 Link State Advertisements (LSAs) 9.10.1 LSA Common Header Each OSPF router originates one or more LSAs to describe its local part of routing. These are taken together to form the LSDB. Each LSA has a common 20-byte header, which carries some general information about the LSA. 0 15

28 CSE5803 Advanced Internet Protocols and Applications (9) 28 LSA Age field: Each LSA in the LSDB is normally updated every 30 minutes. If an LSA is not updated in one hour, it will be removed from the LSDB. This field indicates the time since the LSA was updated by the originating router. Options: This can indicate whether an LSA deserves special handling during flooding or routing calculations. LS Type: OSPF has five LS types which broadly classifies LSAs according to their functions. - Type 1: router LSA. This includes all active links of a router and the type of networks they are connected to. It is flooded within an area. - Type 2: network LSA. This describes the type of a multiaccess (not point-to-point) network, and routers attached. OSPF network types were discussed in 9.7. It is flooded within an area. - Type 3 or 4: summary LSA. These describe inter-area routes, and enable route aggregation at area borders. Only area border routers generate them. Type 3 describes networks within an area, and 4 for a path to AS boundary routers. They are flooded between areas.

29 CSE5803 Advanced Internet Protocols and Applications (9) 29 - Type 5: External LSA. It describes routes to destination networks external to the AS, can be a default route to the AS. This is issued by AS boundary routers. Link State ID: This field is dependent on the LS Type. - LS Type 1: The originating router’s ID, RID. - LS Type 2: The interface IP address of the network’s Designated Router (DR). - LS Type 3: The destination network’s IP. - LS Type 4: The RID of the AS boundary router. - LS Type 5: The destination network’s IP. Advertising Router: Originating router’s ID, same as Link State ID in LS Type 1. LS Sequence Number: A 32-bit integer given to an LSA for identification to avoid old and repetitive LSA. Larger number means a more recent LSA.

30 CSE5803 Advanced Internet Protocols and Applications (9) 30 LS Checksum: This is on the complete contents of the LSA. Length: The total length of the LSA. It can be 20-65000 bytes but cannot use the full 16-bit binary length because LSA will be carried by IP which is restricted to 65,535 bytes. In practice, LSAs are generally short. Large LSAs tend to be router-LSAs when the router has many interfaces, which are likely to be a few hundred bytes. 9.10.2 Router LSA (Type 1) The common LSA header is set as discussed previously. The links are given as illustrated in the next page.

31 CSE5803 Advanced Internet Protocols and Applications (9) 31 |V|B|E| | # links Link ID Link Data Type | #TOS | metric … TOS | 0 | TOS metric Link ID Link Data … 0 31

32 CSE5803 Advanced Internet Protocols and Applications (9) 32 Bit V: The router is virtual link end point, when set to 1. Bit B: The router is area border router when set to1. Bit E: The router is AS boundary router when set to 1. Number of links: The number of router links described in this LSA. The following fields are used to describe each link. –Type: a quick description of the link. There are four different types: 1. Point to point. 2. Connection to a transit network. 3. Connection to a stub network. 4. Virtual link. –Link ID: identifies the object that this link is connected to. Contents depend on the link type. Type 1 link: Neighboring router’s ID Type 2 link: IP address of DR Type 3 link: IP network/subnet number Type 4 link: Neighboring router’s ID –Link Data: Network mask for type 3 link, link IP address for other link types.

33 CSE5803 Advanced Internet Protocols and Applications (9) 33 –Metric: The cost of using this router link. –The #TOS and TOS related metric specifically supported IP types of service and their costs. 9.10.3 Network LSA (Type 2) It has two fields: –Network mask. –A list of RIDs for all routers attached, including DR and all adjacent routers. The network topology within an area can be worked out with LSA types 1 and 2. The other LSA types are used for efficient network operation and communication with other areas of the AS and other ASes.


Download ppt "CSE5803 Advanced Internet Protocols and Applications (9) 1 9.1 Introduction Chapter 6 introduced basic routing concepts inside Autonomous Systems. Chapter."

Similar presentations


Ads by Google