OSPF LSAs. Why there are a dirty dozen of them Part 3

Similar documents
OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

Route Discovery Protocols

Monitoring Routing. Monitoring OSPF LSAs. Type 1 CHAPTER

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

GregSowell.com. Mikrotik Routing

OSPF Routing Protocol

OSPF Configuring Multi-Area OSPF

Routing with OSPF. Introduction

Example: Advertised Distance (AD) Example: Feasible Distance (FD) Example: Successor and Feasible Successor Example: Successor and Feasible Successor

Layer 3 Routing User s Manual

Introduction to TCP/IP

Interconnecting Multiple OSPF Areas

ZXR /5200 Series

Link-State Routing Protocols

Using OSPF in an MPLS VPN Environment

IP Routing Configuring RIP, OSPF, BGP, and PBR

CCNA2 Chapter 11 Practice

Networking. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Cisco s OSPF Implementation P1C-107

CCNP CISCO CERTIFIED NETWORK PROFESSIONAL LAB MANUAL

CCNA 2 v5.0 Routing Protocols Final Exam Answers

Introduction to Link State Protocols

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Introduction to ISIS. ISP/IXP Workshops

Routing Protocols OSPF CHAPTER. The following topics describe supported routing protocols. Topics include OSPF, page 9-1 IS-IS Protocol, page 9-3

Border Gateway Protocol (BGP)

OSPF Test Suite and Router configuration

Using the Border Gateway Protocol for Interdomain Routing

IP - The Internet Protocol

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Based on Computer Networking, 4 th Edition by Kurose and Ross

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

GregSowell.com. Intro to Networking Mikrotik/Cisco

How To Understand Bg

Deploying OSPF for ISPs. OSPF Design. Agenda. Service Providers. SP Architecture. SP Architecture. OSPF Design in SP Networks

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

Route Optimization. rek Petr Grygarek, VSB-TU Ostrava, Routed and Switched Networks 1

O /27 [110/129] via , 00:00:05, Serial0/0/1

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

(Refer Slide Time: 02:17)

8.2 The Internet Protocol

Brocade to Cisco Comparisons

Seminar Seite 1 von 10

Border Gateway Protocol (BGP-4)

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Transport and Network Layer

IP Routing Configuring Static Routes

Introduction to IP v6

2. IP Networks, IP Hosts and IP Ports

APNIC elearning: BGP Basics. Contact: erou03_v1.0

IP Addressing A Simplified Tutorial

IP Multicasting. Applications with multiple receivers

6.263 Data Communication Networks

Source net: Destination net: Subnet mask: Subnet mask: Router Hub

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

APNIC elearning: BGP Attributes

Security in Internet Routing Protocols

Administrative Distance

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

The Complete IS-IS Routing Protocol

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

Network Layer: Network Layer and IP Protocol

Chapter 10 Link-State Routing Protocols

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Advanced IP Addressing

Future Internet Technologies

Configuration IP Routing and Multicast Avaya Ethernet Routing Switch 4500 Series

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

- IPv4 Addressing and Subnetting -

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

How to Configure Cisco 2600 Routers

Internet Addresses (You should read Chapter 4 in Forouzan)

Cisco Router Configuration Tutorial

IP Subnetting and Addressing

Juniper Exam JN0-343 Juniper Networks Certified Internet Specialist (JNCIS-ENT) Version: 10.1 [ Total Questions: 498 ]

IP address format: Dotted decimal notation:

Interconnecting Cisco Networking Devices Part 2

Module 2: Assigning IP Addresses in a Multiple Subnet Network

Owning the Routing Table New OSPF Attacks

IPv6 Routing Protocols. OSPFv3 TLF 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Application Protocols for TCP/IP Administration

Module 10 Subnetting Class A, B and C addresses. Solutions to the Lab Exercises a, b, c and d

IP Routing Features. Contents

IPv6 Trace Analysis using Wireshark Nalini Elkins, CEO Inside Products, Inc.

Introduction to Dynamic Routing Protocols

EIGRP Commands. Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols IP2R-141

IMPLEMENTING CISCO IP ROUTING V2.0 (ROUTE)

Cisco Certified Network Associate Exam. Operation of IP Data Networks. LAN Switching Technologies. IP addressing (IPv4 / IPv6)

IP Multicast and IGMP: Hewlett-Packard Procurve Switch 4108GL Default Behavior, Address Mapping, and Reserved Addresses

RARP: Reverse Address Resolution Protocol

Understanding Route Redistribution & Filtering

Internet Protocol version 4 Part I

CHAPTER 10 IP MULTICAST

Transcription:

OSPF LSAs Why there are a dirty dozen of them Part 3 (C) Herbert Haas 2005/03/11 1

An algorithm must be seen to be believed Donald E. Knuth 2

LSA Sequence Number In order to stop flooding, each LSA carries a sequence number Only increased if LSA has changed So each router can check if a particular LSA had already been forwarded To avoid LSA storms 32 bit number LSA Nr. 44 LSA Nr. 44 LSA Nr. 44 LSA Nr. 44 LSA Nr. 44 Slower: Is discarded! 3 When reaching the end of the 32 bit sequence number the associated router will wait for an hour so that this LSA ages out in each link state database. Then the router resets the sequence number (lowest negative number i. e. MSB=1, 80000001) and continues to flood this LSA. Each LSA carries also a 16 bit age value, which is set to zero when originated and increased by every router during flooding. LSAs are also aged as they are held in each router's database. If sequence numbers are the same, the router compares the ages the younger the better but only if the age difference between the recently received LSA is greater than MaxAgeDiff; otherwise both LSAs are considered to be identical. Note: Radia Perlman proposed a "Lollipop" sequence number space but today a linear space is used as described above. Since signed integers are used to describe sequence numbers, 8000001 represents the most-negative number in a hexadecimal format. To verify this, the 2- complement of this number must be calculated. This can be done in two steps. First calculate the 1-complement by simply inverting the binary number, that is the most significant byte "0x80" which is "1000 000" is transformed to "0111 111", the least significant byte "0x01" which is "0000 0001" is transformed to "1111 1110" and all other bytes inbetween are now "1111 1111". Secondly, in order to receive the 2-complement, "1" must be added. Then the final result is "0111 1111 1111 1111 1111 1111 1111 1111", which is the absolute number (without sign). 3

Detailed Flooding Decisions LSA is identified by its LS type Link State ID Advertising Router The most recent one of two instances of the same LSA is determined by: LS sequence number LS checksum LS age MaxAgeDiff (15 min) as tolerance value MaxAge On comparing two LSAs, the most recent one is that with One LSA has MaxAge Greater SeqNr Greater Checksum Smaller Age Same SeqNr Same Checksum AgeDiff > MaxAgeDiff Both are considered to be identical AgeDiff < MaxAgeDiff 4 Each LSA carries also a 16 bit age value, which is set to zero when originated and increased by every router during flooding. LSAs are also aged as they are held in each router's database. If sequence numbers are the same, the router compares the ages the younger the better but only if the age difference between the recently received LSA is greater than MaxAgeDiff; otherwise both LSAs are considered to be identical. 4

LS Age Originating router sets LS age = 0 seconds Increased during flooding by InfTransDelay by every router Also increased while stored in database Age is never incremented past MaxAge (60 min) LSAs having MaxAge: Are not used in routing table calculation anymore Are reflooded immediately Are always considered as most recent Thus quickly flushed from routing domain Responsible router maintains LSRefreshTime (30 min) to refresh LSAs periodically 5 5

Router LSA Type 1 Router ID (Highest IP address) Number of Links Link Descriptions Link type (P2P, Stub,...) Neighboring router ID Router interface address ToS (typically not supported today) Metrics 6 6

Network LSA Type 2 DR's IP address One Subnet mask for this broadcast segment List of Router-IDs of all routers in the broadcast segment 7 7

Network Summary LSA Type 3 Originated by ABRs only Each LSA Type 3 contains a number of Destination networks + Subnet masks Metric for each destination network This is basically a distance-vector routing information (!) 8 8

ASBR Summary LSA Type 4 Originated by ABRs Advertise routes to ASBRs Nearly identical to Type 3 Except destination is ASBR not a network Each LSA Type 4 contains Router IDs of ASBRs Mask 0.0.0.0 (host route) Metric 9 9

AS External LSA Type 5 Originated by ASBRs External type 1 External type 2 (default) Advertises External routes Default route Contains External Net-ID + Mask Metric Next hop (external, not ASBR) 10 10

NSSA External LSA Type 7 Originated by ASBRs within NSSAs Almost identical to Type 5 But only flooded within NSSA RFC 1587 11 11

Other LSAs Group Membership LSA (6) For MOSPF External Attribute LSA (8) Alternative to IBGP Should transport BGP information within an OSPF domain Not yet implemented, no RFC yet (?) Opaque LSA (9) Application specific information Link local scope 12 Opaque LSAs are e. g. used as load indication messages with MPLS. 12

Other LSAs Opaque LSA (10) Application specific information Area-local scope Opaque LSA (11) Application specific information AS scope 13 Opaque LSAs are e. g. used as load indication messages with MPLS. 13

General OPSF Packet Structure Version = 2 32 bits Type 1. Hello 2. Database Description 3. Link State Request 4. Link State Update 5. Link State ACK OSPF Packet Length 24 bytes Router ID of originating router Area ID of originating area Checksum Authentication Type Authentication Authentication Packet Data (Hello, Database Description, LS Request, LSU, LS Ack) Carried directly in IP (protocol number 89) All OSPF packets begin with a 24-byte OSPF packet header 14 The OSPF version we use today is version 2. The packet type identifies the actual OSPF message type that is carried in the packet data area at the bottom. The OSPF packet length describes the number of bytes of the OSPF packet including the OSPF header. Router and Area IDs identify the originator of this packet. If a packet is sent over a virtual link, the Area ID will be 0.0.0.0, because virtual links are considered part of the backbone area. The checksum is calculates over the entire packet including the header. Three authentication types had been defined: 0 No authentication 1 Simple clear text password authentication 2 MD5 Checksum If the Authentication Type = 1, then a 64 bit clear text password is carried in the authentication fields. If the Authentication Type = 2, then the authentication fields contain a key-id, the length of the message digest, and a nondecreasing cryptographic sequence number to prevent replay attacks. The actual message digest would be appended at the end of the packet. The efficiency of routing updates also depends on the maximum transfer unit (MTU) defined. Cisco defined a MTU of 1500 bytes for OSPF. 14

Hello Packet Type 1 In seconds. Must match! (10 secs on LAN, 30 secs on non-broadcast networks) Seconds before neighbor is decleared dead. Must match! (4 x hello interval) IP address of interface of assumed DR IP address of interface of assumed BDR Must match with receiving interface Hello Interval Options 0 0 DC EA N/P MC E T Translate LSA7 to LSA5 (carried in LSA7 only) Network Mask of originating interface Options Router Dead Interval Designated Router Backup Designated Router Neighbor #1 Neighbor #n OSPF Demand Circuits supported External Attributes LSAs supported NSSA External LSAs supported MOSPF supported ToS supported AS External LSAs supported To ensure compatibility Router Priority Used to elect DR and BDR "manually" (0-255) 15 The network mask must match the mask on the receiving interface, ensuring that they share a segment and network. The Options field is also used by other message types. If the Router Priority is set to zero this router cannot become DR or BDR. Note that the fields "Designated Router" and "Backup Designated Router" only contain the interface IP address of the DR or BDR on that network, not the router ID!! If these numbers are unknown or not necessary (other network type) then these fields are set to 0.0.0.0. It is important to know that neighbors must have configured identical Hello and Dead Intervals. 15

Database Description Packet Also called "DDP" Type 2 Size of the largest IP packet that can be sent without fragmentation Marks the initial packet of a series of DD packets Same definition as for the Hello Packet More DD packets will follow Master=1 Slave=0 Interface MTU Options DD Sequence Number 0 0 0 0 0 I M MS To ensure that the full sequence of DD packets are received LSA Headers 16 The DD sequence number is set by the master to some unique value in the first DD packet. This number will be incremented in subsequent packets. 16

Link State Request Packet Type 3 Which type of LSA is requested (Router LSA, Network LSA,...) Usage depends on the LSA type Router ID of originator of this LSA Link State Type Link State ID Advertising Router Link State Type Link State ID Advertising Router Link State Type Link State ID Advertising Router... 17 Note that the Link State Request Packet uniquely identifies the LSA by Type, ID, and advertising router fields of its header. It does not include the sequence number, checksum, and age, because the requestor is not interested in a specific instance of the LSA but in the most recent instance. 17

Link State Update Packet Type 4 Number of LSAs LSAs LSUs contain one or more LSAs (limited by MTU) Used for flooding and response to LS requests LSUs are carried hop-by-hop 18 18

Link State ACK Packet Type 5 The LS ACK packet consists only of a list of LSA headers (and an OSPF header of course) LSA Headers Each LSA received must be explicitely acknowledged reliable flooding! Acknowledged LSA is identified by LSA header Single Link State ACK packet can acknowledge multiple LSAs 19 19

The LSAs Time in seconds since this LSA was originated. Incremented at each router. Same definition as for the Hello Packet LSA Header Age Options LSA Type Link State ID Router ID of Advertising Router Sequence Number Checksum Length Usage depends on LSA Type Calculated over whole LSA except Age field Incremented each time a new instance of the LSA is originated These three fields uniquely identify every LSA LSA Body Number of bytes of LSA header + body 20 All LSAs have the LSA header at the beginning. This LSA header is also used in Database Description and Link State Acknowledgement packets. The Age is incremented by InfTransDelay seconds at each router interface this LSA exits. The Age is also incremented in seconds as it resides in a link state database. The Options field describes optional capabilities supported at that topological portion described by this LSA. The LSA Type describes which information is carried in the LSA Body. Here the structural differences between Router LSAs, Network LSAs, etc. are identifed. The Link State ID is used differently by the LSA types. Basically this field contains some information identifying the topological portion described by this LSA. For example a Router ID or an interface address is used here. The following slides will explain this field for each LSA type. The Router ID identifies the originating router of this LSA. The Sequence Number helps routers to identify the most recent instance of this LSA. The Checksum is a so-called 8 bit Fletcher checksum, providing more protection than traditional checksum methods such as used for TCP. The first eight bits contain the 1's complement sum of all octets, while the second eight bits contain a high-order sum of the running sums. See RFC 1146 for more details. 20

Router LSA LSA Header One ToS metríc for each ToS Age Options LSA Type = 1 Link State ID = Advertising Router ID Router ID of Advertising Router Sequence Number Checksum Length 0 0 0 0 0 V E B 0 0 0 0 0 0 0 0 Number of Links Link ID Link Data Link Type Number of ToS Metric ToS 0 0 0 0 0 0 0 0 ToS Metric ToS 0 0 0 0 0 0 0 0 ToS Metric.. Link ID Link Data Link Type Number of ToS Metric ToS 0 0 0 0 0 0 0 0 ToS Metric Identical 1st Link 2nd Link 21 Router LSAs are generated by all OSPF routers and must describe all links of the originating router! The V-bit (Virtual Link Endpoint) is set to one if the originating router is a virtual link endpoint and this area is a transit area. The E-bit (External) is set if the originating router is an ASBR. The B-bit (Border) is set if the originating router is an ABR. The Link ID and Link Data depend on the Link Type field which describes the general type of connection the link provides. Link Type 1 is a point-to-point link, the Link ID describes the Neighbor Router ID and the Link Data field contains the IP address of the originating router's interface to the network. Link Type 2 is a link to a transit network, the Link ID describes the interface address of the Designated Router and the Link Data field contains the IP address of the originating router's interface to the network. Link Type 3 is a link to stub network, the Link ID describes the IP network number or subnet address and the Link Data field contains the network's IP address or subnet mask. Link Type 4 is a virtual link, the Link ID describes the neighboring router's Router ID and the Link Data contains the MIB-II ifindex value for the originating router's interface. Number of ToS specifies the number of ToS Metrics listed for this link. For each ToS an additional line is appended to this link state section. Generally, ToS is not used today anymore and the Number of ToS field is set to all-zero. Metric is the cost of the interface that established this link. 21

Network LSA LSA Header Age Options LSA Type = 2 Link State ID = IP address of DR's interface to this network Router ID of Advertising Router Sequence Number Checksum Length Network Mask Attached Router Attached Router 22 Network LSAs are originated by DRs and describe the multi-access network and all routers attached to it, including the DR. 22

Network Summary LSA LSA Header Age Options LSA Type = 3 Link State ID = IP address of advertised network Router ID of Advertising Router Sequence Number Checksum Length Network Mask 0 0 0 0 0 0 0 0 Metric ToS ToS Metric.. Optional If a default route is advertised, both the Link State ID and the Network Mask fields will be 0.0.0.0 Also used for route summarization Note: Cisco only supports ToS=0 23 A Network Summary LSA is originated by an ABR and advertises networks external to an area. 23

ASBR Summary LSA LSA Header Age Options LSA Type = 4 Link State ID = Router ID of ASBR being advertised Router ID of Advertising Router Sequence Number Checksum Length 0.0.0.0 0 0 0 0 0 0 0 0 Metric ToS ToS Metric.. Optional Note: Cisco only supports ToS=0 24 A ASBR Summary LSA is originated by an ABR and advertises ASBRs external to an area. 24

Autonomous System External LSA LSA Header Metric types E1 and E2 Age Options LSA Type = 5 Link State ID = IP address of destination Router ID of Advertising Router Sequence Number Checksum Length Network Mask E 0 0 0 0 0 0 0 Metric Forwarding Address External Route Tag E ToS ToS Metric Forwarding Address External Route Tag.. Not used by OSPF Next hop (0.0.0.0 if ASBR is next hop) Optional When describing a default route, both the Link State ID and the Network Mask are set to 0.0.0.0. 25 25

NSSA External LSA Same structure as AS External LSA Forwarding address is Next hop address for the network between NSSA and adjacent AS, if this network is advertised as internal route Router ID of NSSA-ASBR otherwise 26 26