* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download document
Wireless security wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Distributed firewall wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Computer network wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Airborne Networking wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Network tap wikipedia , lookup
Deep packet inspection wikipedia , lookup
Serial digital interface wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
TCOM 515 Lecture 3 Objectives • • • • • • OSPF Packets OSPF Operation OSPF Neighbors & Adjacencies Designated Routers and Backups Areas Link State Advertisements LSAs OSPF Background OSPF version 1 - only used in experimental form - RFC 1131 OSPF version 2 - RFCs 1247,1583,2178, 2328 (most current) since 1991 John Moy is the expert on OSPF. He wrote most of the RFCs and the definitive OSPF book, OSPF Anatomy of an Internet Routing Protocol. OSPF stands for Open Shortest Path First and is the IETF’s recommended IGP. Advantages of OSPF include: fast reconvergence, support for large networks, classless routing, VSLM, equal cost load balancing, and route tagging. Most Large networks use OSPF or IS-IS as their IGP. Existing working group for OSPF - show draft & website OSPF Terms Interface or Link - connection from local router to attached network Link State - status of link between two routers, relationship to neighbor router Cost - value assigned to link, based on media speed Autonomous system - group of router exchanging routing info using same routing protocol Area - set of routers and networks that have the same area designation, each router in an area has same info Neighbors - two routers that share a common network, discover and exchange routing info across it Hello - Protocol used to establish and maintain neighbor relationships LSA - Link-State Advertisements, includes interfaces, associated cost and network information Neighbor Database - list of all neighbors with established two-way communications Link-State Database - listing of link-state entries from all other routers in area, same database for each router in an area, generated from LSAs received OSPF Operation 1. OSPF enabled router sends hello packets out all enable interfaces • 2. 3. Routers with shared link may become neighbors via negotiation Some neighbors form adjacencies based on network and hello type. Router send Link State Advertisements (LSA) over its adjacencies. • LSA include interface link, state and cost information. 4. Router receives other LSAs and records it in its Link State Database. Then it sends the LSA out its enabled interfaces. 5. 6. LSAs flood the OSPF area and each router has same Database. Router uses Shortest Path First Algorithm (SPF) to build a SPF tree with a node for each router/destination. 7. Router uses the SPF tree to build its routing table. *LSAs are only sent out every 30 minutes or if a topology change happens. OSPF Neighbors OSPF routers build a neighbor table based on its exchange of hello packets out its OSPF enabled interfaces To become neighbors, the two routers must share a link, both interfaces must be OSPF enable. The routers will negotiate via the use of the hello packets on the agreement of certain parameters: Area ID, Authentication, Network Mask. Neighbors are identified in OSPF by their Router ID The Router ID is: • The numerically highest loopback interface IP address on the router. • If there are no loopbacks, the numerically highest physical interface IP address of the router. Loopbacks are preferred because of the stability of the interface ( no flapping) and the network administrator’s ability to change and assign the loopbacks. OSPF Metric & Paths OSPF Metric is cost based on the sum of the costs of all outgoing interfaces to a destination. Recorded as a 16 bit number between 1 and 65,535. This metric is applied on all router links. The lower the cost the better. The cost metric - 10^8/ bandwidth of a link so: FastEthernet = 100Mbps => cost of 1 Ethernet = 10Mbps => cost of 10 T1 = 1.544 Mbps => cost of 64 Path Types • Intra-area - within one of the router’s attached areas • Inter-area - destination in another area but same OSPF domain • Type 1 External - to destination outside of OSPF domain with metric • Type 2 External - to destination outside of OSPF domain without metric OSPF Packet Header Version number - OSPF version number, most recent version 2 Type - OSPF packet type following the header 1 - Hello - Establishes and maintains neighbor relationships. 2 - Database description - contents of the topological database upon adjacency formation 3 - Link State request - Requests pieces of the topological database from neighbor routers 4 - Link State Update—Responds to a link state request packet 5 - Link State Acknowledgment—Acknowledges link state update packets. Packet length - Entire packet length, including the OSPF header, in bytes. Router ID - Identifies the originating router Area ID - Identifies the area from where the packet originated. Checksum - IP checksum for entire packet including header Authentication type - mode of authentication 1 - Null, none 2 - Simple, clear text 3 - MD5 encrypted Authentication - information needed to authentication at other end, password, Key, etc Data—Contains encapsulated upper-layer information. OSPF Packet Types Hello Packet & Protocol • Used to discover neighbors • Used as keepalives for existing neighbors • Elect Designated Routers and Backup Designated routers • 10 second interval by default Database Descriptions • Used to build adjacencies by matching LSAs in the Database Link State Request • Used to request new or more recent LSAs from neighbors Link State Update • Used to flood LSAs and responds to Link State Requests Links State Acknowledgement • Used to ACK LSAs to make the process reliable Hello Packet Additional fields after OSPF packet header: Network mask 4 bytes- subnet mask of interface of originating packet Hello Interval 2 bytes - time in seconds between Hello packets on interface Options 1 byte - checks compatible capabilities Router Priority 1 byte - for DR and BDR election Router Dead Interval 4 bytes - time in seconds to wait for hello packet before considered dead neighbor Designated Router 4 bytes - IP address of interface of the DR on the network Backup Designated Router 4 bytes- IP address of interface of the BDR on the network Neighbor 8 bytes - multiple instances of this field are possible, neighbors on the network from which originating router has received hellos Link State Request Packet Additional fields after OSPF packet header: Link State Type 4 bytes - LS type number 1- Router LSA 2 - Network LSA 3 - Network Summary LSA 4 - ASBR Summary LSA 5 - AS External LSA 6 - Group Membership LSA 7 - NSSA External LSA 8 - External Attributes LSA 9, 10 ,11 - Opaque LSAs Link State ID 4 bytes - Type dependant on LSA header Advertising Router 4 bytes - Router ID of LSA originating router Link State Update & Acknowledgement Packets Update additional fields to OSPF packet header: Number of LSAs 8 bytes - number of LSAs to follow LSA - full LSA, multiple LSAs can be included as Specified in the number field Acknowledgement additional fields to OSPF packet header: LSA headers - headers of all LSAs to be acknowledged, Each header is 5 bytes long. LSA Types 1 - Router - produced by each router w/ info on interfaces, state and cost for each area it belongs to, flooded within area 2 - Network - produced by each DR listing all connected routers on multiaccess networks flooded to within the area the network belongs to 3 - Network Summary - produced by ABRs to let one area know about another 4 - ASBR Summary - produced by ABRs to advertise ASBRs outside of the area 5 - AS External - originated by ASBRs to advertise external AS routes 6 - Group Membership 7 - NSAA External - allows ASBR in NSA to advertise external AS routes 8 - External Attributes 9 - Opaque (link local) 10 - Opaque (area local) 11 Opaque (AS) OSPF Areas •Area - logical grouping of OSFP routes and links that effectively divide an OSPF domain into sub-domains. •A router in an area knows nothing detailed of topology outside of its own area. •Expressed in an Area ID of 32 bits, most often as decimal, but can be in dotted decimal like an IP address. •Area 0 must exist in all OSPF implementations and should be the backbone area of the network. •The use of areas allows administrators to cluster groups of routers together to reduce the CPU load and memory needed for running OSPF on every router. OSPF Area Traffic Intra-area traffic - includes any traffic that originates and is delivered within the same area, not leaving it Inter-area traffic - includes any traffic that originates on a router in one area and is delivered by a router in another areas, transiting between at least 2 areas. External traffic - includes any traffic that originates from within one OSPF domain and transits to a router in another Autonomous System, requires a EGP OSPF Area Types Backbone area - only one per OSPF domain, should be area 0, receives LSA types 1 - 5 Non-backbone, Non-stub area - also receives LSA types 1-5 Stub area - receives LSA types 1-4, instead of receiving ASBR summary Type 4s with real info, default routes are inserted by ABRs to reduce routes, load and memory. Requirements for a Stub Area: •All routers must have identical Link State Databases. •There can be no virtual links. •No router in a stub area can be a ASBR. •There can be more than 1 ABR but there is no preference. OSPF Area Types 2 Totally Stubby area - Only LSA types 1 and 2 are allowed. A special default only route version of LSA is sent by the ABRs. This reduces the routes, CPU load and memory usage even more. Not-So-Stubby area - LSA types 1 - 4 are allowed, in addition two type 7 which allows external routes to be advertised into the area. These special Type 7 LSA are the only difference from normal stubby areas. OSPF Router Types Internal Router - all interfaces belong to the same area Area Border Router (ABR) - router has interfaces in more than one area and acts a a gateway for traffic between the areas, “interarea traffic.” An ABR must have one interface in the Backbone area. It has a separate Link State database for each area. Backbone Router - router has at least one interface in the backbone area. Every ABR is a Backbone router, but not every backbone router is an ABR. Autonomous Systems Boundary Router (ASBR) - a router that acts as a gateway for traffic external to the OSPF domain using routes learned through another routing protocol. Designated Routers Multi-access networks need DRs and BDRs: •The existence of a large number of unneccessary LSAs created on the network. •The flooding of these LSAs by all the routers would disrupt the operation of the network. DR - Designated Router •Elected base on router priority •Forms an adjacency with each router and receives all LSAs •Sends LSAs to every router •Forms adjacency with BDR •Exists on an Interface BDR - Backup Designated router •Forms an adjacency with each router in case DR disappears •Forms adjacency with DR •Takes over for DR in case of failure DR Election 1. Each router makes a list including • All eligible routers • All routers declaring themselves to be the DR • All routers declaring themselves to the be BDR 2. Makes a subset list of all routers no claiming to be DR as possible BDRs 3. From that subset, neighbor with highest priority is selected as BDR 4. If no router in subset claims to be BDR, than any neighbor with highest priority is elected BDR. 5. In case of tie with priority, the neighbor with the highest Router ID wins the tie. 6. If there is no DR, the BDR becomes the DR and a new BDR is elected through the same process. **If a new router comes online with a higher priority, it will not knock the BDR or the DR out of place, only the failure of either one will result in a new election. OSPF SPF Example Make a SPF tree for this example from Router 1 perspective. Then build your routing table. OSPF SPF Example Cont Link Speed Cost Links 100Mbps 1 A, C, F 10Mbps 10 B, D, G, H, J T1-1.544Mbps 64 E, I, K OSPF SPF Example Cont This is the routing table from Router 1. Destination Cost Next Hop 2 1 2 3 2 2 4 12 2 5 2 2 6 12 2 7 11 2 OSPF SPF Example 2 Links C and F having failed. Make a new SPF tree for Router 1 and build its routing table. OSPF SPF Example 2 Cont This is the SPF tree. OSPF SPF Example 2 Cont This is the routing table from Router 1. Destination Cost Next Hop 2 1 2 3 10 3 4 20 3 5 31 2 6 21 2 7 11 2 Summary •OSPF Areas •OSPF Packet Types •OSPF Header •OSPF DRs and BDRs •OSPF Neighbors •OSPF SPF •OSPF LSAs