Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rick Graziani Cabrillo College

Similar presentations


Presentation on theme: "Rick Graziani Cabrillo College"— Presentation transcript:

1 Rick Graziani Cabrillo College graziani@cabrillo.edu
Single Area OSPFv2 Rick Graziani Cabrillo College

2 Overview of Single Area OSPFv2
Rick Graziani Cabrillo College

3 Types of Routing Protocols
Exterior Gateway Protocols Interior Gateway Protocols Distance Vector Link State Path Vector Distance Vector Routing Protocols Link State Routing Protocols Path Vector RIPv2 EIGRP OSPFv2 IS-IS BGP-4 RIPng EIGRP for IPv6 OSPFv3 * IS-IS for IPv6 BGP-4 for IPv6 or MP-BGP IPv4 IPv6 * OSPFv3, EIGRP with Address Families supports routing both IPv4 and IPv6, along with MP-BGP.

4 Introduction to OSPF OSPF is: Classless
Link-state routing protocol (See video on Link-State Operations) Uses areas for scalability RFC 2328 defines the OSPF metric as an arbitrary value called cost. Cisco IOS software uses bandwidth to calculate the OSPF cost metric. OSPF is: Classless Link-state routing protocol Uses the concept of areas for scalability RFC 2328 defines the OSPF metric as an arbitrary value called cost. Cisco IOS software uses bandwidth to calculate the OSPF cost metric.

5 1987 - Initial development by IETF OSPF Working Group.
OSPFv1 was published in RFC 1131. OSPFv2 was introduced in RFC 1247 by John Moy. ISO was working IS-IS IETF chose OSPF as its recommended IGP (interior gateway protocol). In OSPFv2 specification was updated in RFC 2328 and is the current RFC for OSPF. IS-IS is also a very popular routing protocol, and some arguing better designed with fixed-length TLVs (for another video). Initial development by IETF OSPF Working Group. OSPFv1 was published in RFC 1131. OSPFv2 was introduced in RFC 1247 by John Moy. ISO was working IS-IS IETF chose OSPF as its recommended IGP (interior gateway protocol). In OSPFv2 specification was updated in RFC 2328 and is the current RFC for OSPF.

6 Note: OSPFv3 with Address Families supports both IPv4 and IPv6
Adjacency Database Link-State Database Routing Table Adjacency Database Link-State Database Routing Table IPv4 Network R1 R2 IPv6 Network OSPFv3 OSPFv3 IPv6 OSPFv3 OSPFv3 IPv6 Adjacency Database Link-State Database Routing Table Adjacency Database Link-State Database Routing Table Note: OSPFv3 with Address Families supports both IPv4 and IPv6

7 OSPF Message Encapsulation
In the IP packet header: Protocol field is set to 89 (OSPF) Destination address is typically set to one of two multicast addresses: (IPv4) FF02::5 (IPv6) (IPV4) FF02::6 (IPv6) Destination MAC address is also a multicast address: E (IPv4) (IPv6) E (IPv4) (IPv6) This data field can include one of five OSPF packet types. In the IP packet header: Protocol field is set to 89 (OSPF) Destination address is typically set to one of two multicast addresses: If the OSPF packet is encapsulated in an Ethernet frame, the destination MAC address is also a multicast address: E E

8 OSPF Algorithm Each OSPF router maintains a link-state database containing the LSAs received from all other routers. When a router has received all the LSAs and built its local link-state database, OSPF uses Dijkstra’s shortest path first (SPF) algorithm to create an SPF tree. The SPF tree is then used to populate the IP routing table with the best paths to each network.

9 Administrative Distance
Administrative distance (AD) is the trustworthiness (or preference) of the route source. OSPF has a default AD of 110. Administrative distance (AD) is the trustworthiness (or preference) of the route source. OSPF has a default AD of 110.

10 OSPF SPF is based on Dijkstra's Algorithm
To learn how Dijkstra's Algorithm works, check out my video:

11 Overview of Single Area OSPFv2
Rick Graziani Cabrillo College

12 OSPFv2 Operations: OSPF Packet Types and Establishing Adjacencies
Rick Graziani Cabrillo College

13 OSPFv2 packet types

14 OSPFv2 Packet Types Five types of OSPF LSPs (link-state packets).
Hello: Used to establish and maintain adjacency. DBD (Database Description): Abbreviated list of the sending router’s link-state database. LSR (Link-State Request) : Used by routers to request more information about any entry in the DBD. LSU: (Link-State Update): Link-state information. LSAck (LSA Acknowledgment): Router sends a link-state (LSAck) to confirm receipt of an OSPF message (not Hellos). Five types of OSPF LSPs (link-state packets). Hello: Used to establish and maintain adjacency. DBD (Database Description): Abbreviated list of the sending router’s link-state database. LSR (Link-State Request) : Used by routers to request more information about any entry in the DBD. LSU: (Link-State Update): Link-state information. LSAck (LSA Acknowledgment): Router sends a link-state (LSAck) to confirm receipt of the LSU.

15 OSPFv2 packet types Link-State Updates (LSU) are the packets used for OSPF LSDB synchronization and routing updates. Can contain 11 different types of LSAs (Link-State Advertisements) At times, these terms are used interchangeably.

16 Establishing Adjacencies
Hello, I’m R2 Hello, I’m R3 Hello, I’m R1 Before an OSPF router can flood its link states, must discover neighbors. Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval Dead interval Network type MTU (not a requirement but will be stuck in DBD exchange) Both the interfaces must be part of the same network, including having the same subnet mask. Before an OSPF router can flood its link states, must discover neighbors. Receipt confirms there is another OSPF router on this link. Adjacency is now established. Routers are not considered fully adjacent, at this point each router is aware of the other OSPF router on the link. Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval Dead interval Network type Both the interfaces must be part of the same network, including having the same subnet mask.

17 Hello Intervals Hello, I’m R2 Hello, I’m R3 Hello, I’m R1
By default, OSPF Hello packets are sent: 10 seconds on multiaccess and point-to-point segments 30 seconds on nonbroadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM). Sent to ALLSPFRouters at By default, OSPF Hello packets are sent: 10 seconds on multiaccess and point-to-point segments 30 seconds on nonbroadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM). In most cases, OSPF Hello packets are sent as multicast to an address reserved for ALLSPFRouters at

18 Dead Intervals Hello, I’m R2 Hello, I’m R3 Hello, I’m R1
Dead interval - Period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor “down.” Cisco uses a default of four times the Hello interval. 40 seconds - Multiaccess and point-to-point segments. 120 seconds - NBMA networks. Dead interval expires OSPF removes that neighbor from its link-state database. Floods the link-state information about the “down” neighbor out all OSPF-enabled interfaces.. Dead interval - Period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor “down.” Cisco uses a default of four times the Hello interval. 40 seconds - Multiaccess and point-to-point segments. 120 seconds - NBMA networks. Dead interval expires OSPF removes that neighbor from its link-state database. Floods the link-state information about the “down” neighbor out all OSPF-enabled interfaces. Network types are discussed later in the chapter.

19 OSPFv2 Operations: OSPF Packet Types and Establishing Adjacencies
Rick Graziani Cabrillo College

20 OSPFv2 Operations: Establishing Full-State Adjancency
Rick Graziani Cabrillo College

21 OSPF Router ID What’s my Router ID? What’s my Router ID?
Cisco routers derive the router ID based on three criteria and with the following precedence: 1. IP address configured with the OSPF router-id command. 2. Highest IP address of any of its loopback interfaces. 3. Highest active IP address of any of its physical interfaces. The interface does not need to be enabled for OSPF, i.e. it does not need to be included in one of the OSPF network commands. Cisco routers derive the router ID based on three criteria and with the following precedence: 1. Use the IP address configured with the OSPF router-id command. 2. If the router ID is not configured, the router chooses the highest IP address of any of its loopback interfaces. 3. If no loopback interfaces are configured, the router chooses the highest active IP address of any of its physical interfaces. The interface does not need to be enabled for OSPF, i.e. it does not need to be included in one of the OSPF network commands.

22 Steps to OSPF Operation with OSPF States
1. Establishing router adjacencies (Routers are adjacent) Down State – No Hello received Init State – Hello received, but not with this router’s Router ID “Hi, my name is Carlos.” “Hi, my name is Maria.” Two-way State – Hello received, and with this router’s Router ID “Hi, Maria, my name is Carlos.” “Hi, Carlos, my name is Maria.” 1. Establishing router adjacencies (Routers are adjacent) Down State – No Hello received Init State – Hello received, but not with this router’s Router ID “Hi, my name is Carlos.” “Hi, my name is Maria.” Two-way State – Hello received, and with this router’s Router ID “Hi, Maria, my name is Carlos.” “Hi, Carlos, my name is Maria.” 2. Electing DR and BDR – Multi-access (broadcast) segments only ExStart State with DR and BDR Two-way State with all other routers 3. Discovering Routes ExStart State Exchange State Loading State Full State (Routers are “fully adjacent”) 4. Calculating the Routing Table 5. Maintaining the LSDB and Routing Table

23 Steps to OSPF Operation with OSPF States
Electing DR and BDR – Multi-access (broadcast) segments only Exchanging Link-States and Synchronizing Databases 4. Calculating the Routing Table 5. Maintaining the LSDB and Routing Table 1. Establishing router adjacencies (Routers are adjacent) Down State – No Hello received Init State – Hello received, but not with this router’s Router ID “Hi, my name is Carlos.” “Hi, my name is Maria.” Two-way State – Hello received, and with this router’s Router ID “Hi, Maria, my name is Carlos.” “Hi, Carlos, my name is Maria.” 2. Electing DR and BDR – Multi-access (broadcast) segments only ExStart State with DR and BDR Two-way State with all other routers 3. Discovering Routes ExStart State Exchange State Loading State Full State (Routers are “fully adjacent”) 4. Calculating the Routing Table 5. Maintaining the LSDB and Routing Table

24 Establishing Adjacencies
Hello Hello 2-way Down Init 2-way Down Init Hello Hello Down State - Init State – Two Way State Down State - OSPF routers send Hello packets at regular intervals (10 sec.) to establish neighbors. When a router (sends or) receives its first Hello packet, it enters the init state. Hello packet contains a list of known neighbors. When the router sends a Hello packet (unicast reply) to the neighbor with its RouterID and the neighbor sends a Hello packet packet back with that Router ID, the router’s interface will transition to the two-way state. Now, the router is ready to take the relationship to the next level.

25

26 Dissemination of LSA-Update
OSPF is a link state routing protocol and does not send periodic updates like RIP. OSPF only floods link state state advertisements when there is a change in topology (this includes when a routers are first booted). OSPF uses hop-by-hop flooding of LSAs; an LSA received on one interface are flooded out other OSPF enabled interfaces. If a link state entry in the LSDB (Link State DataBase) reaches an age of 60 minutes (MaxAge) without being updated, it is removed and SPF is recalculated. Every 30 minutes (LSRefreshTime), OSPF routers flood only their link states to all other routers (in the area). This is known as a “paranoid update” These do not trigger SPF recalculations. Special note: When a link goes down and a router wants to send a LSA to tell other routers to remove this link state, it sends this link state with a value of 60 minutes (MAXAGE). OSPF is a link state routing protocol and does not send periodic updates like RIP. OSPF only floods link state state advertisements when there is a change in topology (this includes when a routers are first booted). OSPF uses hop-by-hop flooding of LSAs; an LSA received on one interface are flooded out other OSPF enabled interfaces. If a link state entry in the LSDB (Link State DataBase) reaches an age of 60 minutes (MaxAge) without being updated, it is removed and SPF is recalculated. Every 30 minutes (LSRefreshTime), OSPF routers flood only their link states to all other routers (in the area). This is known as a “paranoid update” These do not trigger SPF recalculations. Special note: When a link goes down and a router wants to send a LSA to tell other routers to remove this link state, it sends this link state with a value of 60 minutes (MAXAGE).

27 Designated Router and Backup Designated Router
OSPF elects a Designated Router (DR) to be the collection and distribution point for LSAs sent and received. Used to reduce the amount of OSPF traffic on multiaccess networks A Backup Designated Router (BDR) is also elected in case the DR fails. All other routers become DROthers. Adjacencies are still formed between all routers.

28 R1 sends LSAs to the DR (The BDR listens, too.)
DROther DROther DROther DROther DROther DROther DROthers only form full adjacencies with the DR and BDR in the network. send their LSAs to the DR and BDR, multicast address (ALLDRouters) R1 sends LSAs to the DR (The BDR listens, too.) The DR is responsible for forwarding the LSAs from R1 to all other routers. DR uses the multicast address (AllSPFRouters, all OSPF routers). Only one router doing all the flooding.

29 DR/BDR Election BDR DROther DR The following criteria are applied:
1. DR: Router with the highest OSPF interface priority. 2. BDR: Router with the second highest OSPF interface priority. 3. If OSPF interface priorities are equal, the highest router ID is used to break the tie. Default OSPF interface priority is 1. Current configuration, the OSPF router ID is used to elect the DR and BDR.

30 OSPFv2 Operations: Establishing Full-State Adjancency
Rick Graziani Cabrillo College

31 OSPFv2: Basic Configuration

32 The router ospf Command
R1(config)# router ospf 10 R1(config-router)# The process-id Between 1 and 65,535 Chosen by the network administrator. Locally significant: Does not have to match other OSPF routers. This differs from EIGRP. We are using the same process ID simply for consistency. The process-id Between 1 and 65,535 Chosen by the network administrator. Locally significant: Does not have to match other OSPF routers. This differs from EIGRP. We are using the same process ID simply for consistency.

33 OSPF Router ID What’s my Router ID? What’s my Router ID?
Cisco routers derive the router ID based on three criteria and with the following precedence: 1. IPv4 address configured with the OSPF router-id command. 2. Highest IPv4 address of any of its loopback interfaces. 3. Highest active IPv4 address of any of its physical interfaces. The interface does not need to be enabled for OSPF, i.e. it does not need to be included in one of the OSPF network commands. Cisco routers derive the router ID based on three criteria and with the following precedence: 1. Use the IP address configured with the OSPF router-id command. 2. If the router ID is not configured, the router chooses the highest IP address of any of its loopback interfaces. 3. If no loopback interfaces are configured, the router chooses the highest active IP address of any of its physical interfaces. The interface does not need to be enabled for OSPF, i.e. it does not need to be included in one of the OSPF network commands.

34 Define the Router ID Assign a specific router ID to the router.
Router(config)# router ospf process-id Router(config-router)# router-id ip-address Any unique arbitrary 32-bit value in an IP address format (dotted decimal) can be used. If this command is used on an OSPF process that is already active, then the new router ID takes effect: After the next router reload. After a manual restarting of the OSPF process using the clear ip ospf process privileged EXEC command. Use the OSPF router-id command to ensure that OSPF selects a specific router ID. The ip-address parameter can be any unique arbitrary 32-bit value in an IP address dotted decimal format. After the router-id command is configured, use the clear ip ospf process command. This command restarts the OSPF routing process so that it will reselect the new IP address as its router ID. Router# clear ip ospf process

35 Define the Router ID R1(config)# router ospf 10
R1(config-router)# router-id R1(config-router)# end R1# *Mar 25 19:50:36.595: %SYS-5-CONFIG_I: Configured from console by console

36 Define the Router ID R1# show ip protocols
*** IP Routing is NSF aware *** Routing Protocol is "ospf 10" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID Number of areas in this router is 0. 0 normal 0 stub 0 nssa Maximum path: 4 <Output omitted>

37 Changing the OSPF Router-ID
R1(config)# router ospf 10 R1(config-router)# router-id % OSPF: Reload or use "clear ip ospf process" command, for this to take effect R1(config-router)# end R1# R1# clear ip ospf process Reset ALL OSPF processes? [no]: y *Mar 25 19:46:22.423: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/1 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 25 19:46:22.423: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 25 19:46:22.475: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/1 from LOADING to FULL, Loading Done *Mar 25 19:46:22.475: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/0 from LOADING to FULL, Loading Done R1# show ip protocols | section Router ID Router ID

38 Alternative: Configure a Loopback
R1(config)# interface loopback 0 R1(config-if)# ip address R1(config-if)# end R1#

39 The network Command Router(config-router)# network network-address wildcard-mask area area-id The network command (same function as when used with other IGP routing protocols) Any interfaces on a router that match the network address in the network command will be enabled to send and receive OSPF packets. This network (or subnet) will be included in OSPF routing updates. Requires the wildcard mask. Used to specify the interface or range of interfaces that will be enabled for OSPF. The network command (same function as when used with other IGP routing protocols): Any interfaces on a router that match the network address in the network command will be enabled to send and receive OSPF packets. This network (or subnet) will be included in OSPF routing updates. Requires the wildcard mask. Used to specify the interface or range of interfaces that will be enabled for OSPF.

40 The network Command Router(config-router)# network network-address wildcard-mask area area-id Subtract the subnet mask Wildcard mask The wildcard mask can be configured as the inverse of a subnet mask. Note: Like EIGRP, some Cisco IOS software versions allow you to simply enter the subnet mask instead of the wildcard mask. The Cisco IOS software then converts the subnet mask to the wildcard mask format. The wildcard mask can be configured as the inverse of a subnet mask. R1’s FastEthernet 0/0 interface is on the /28 network. The subnet mask for this interface is /28 or The wildcard mask would be Note: Like EIGRP, some Cisco IOS software versions allow you to simply enter the subnet mask instead of the wildcard mask. The Cisco IOS software then converts the subnet mask to the wildcard mask format.

41 The network Command Router(config-router)# network network-address wildcard-mask area area-id The area area-id refers to the OSPF area. A group of routers that share link-state information. Identical link-state databases. In this chapter, we configure all the OSPF routers within a single area. This is known as single-area OSPF. The network commands must be configured with the same area ID on all routers. Good practice to use an area ID of 0 with single-area OSPF. The area area-id refers to the OSPF area. A group of OSPF routers that share link-state information. All OSPF routers in the same area must have the same link-state information in their link-state databases. This is accomplished by routers flooding their individual link states to all other routers in the area. In this chapter, we configure all the OSPF routers within a single area. This is known as single-area OSPF. The network commands must be configured with the same area ID on all routers. Although any area ID can be used, it is good practice to use an area ID of 0 with single-area OSPF. This convention makes it easier if the network is later configured as multiple OSPF areas where area 0 becomes the backbone area. Mult-Area OSPF is discussed in CCNP.

42 Advertising OSPF Networks
R1(config)# router ospf 10 R1(config-router)# router-id R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# network area 0 R1(config-router)# end R1#

43 Optional Method: Identify OSPF Networks
No network command needed. Because this command is configured explicitly for the interface, it takes precedence over the network area command. R1(config)# interface gig 0/0 R1(config-router)# ip ospf 10 area 0 R1(config-router)# exit R1(config)# interface serial 0/0/0 R1(config)# interface serial 0/0/1 R1(config-router)# end

44 OSPFv2: Basic Configuration

45 OSPFv2: Passive Interfaces

46 Passive Interface By default, OSPF messages are forwarded out all OSPF-enabled interfaces. Inefficient Use of Bandwidth - Available bandwidth is consumed transporting unnecessary messages. Messages are multicasted; therefore, switches are also forwarding the messages out all ports. Inefficient Use of Resources - All devices on the LAN must process the message and eventually discard the message. Increased Security Risk - Advertising updates on a broadcast network is a security risk. OSPF messages can be intercepted with packet sniffing software. Routing updates can be modified and sent back to the router, corrupting the routing table with false metrics that misdirect traffic.

47 Configuring Passive Interfaces on R1 & R2
R1(config)# router ospf 10 R1(config-router)# passive-interface GigabitEthernet 0/0 R1(config-router)# end R1# R2(config)# router ospf 10 R2(config-router)# passive-interface GigabitEthernet 0/0 R2(config-router)# end R2#

48 Verifying Passive Interfaces on R1 and R2
R1# show ip protocols | section Passive Passive Interface(s): GigabitEthernet0/0 R1# R2# show ip protocols | section Passive Passive Interface(s): GigabitEthernet0/0 R2#

49 Configuring Passive Interfaces on R3
R3(config)# router ospf 10 R3(config-router)# passive-interface default R3(config-router)# *Apr 7 16:22:58.090: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Apr 7 16:22:58.090: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/1 from FULL to DOWN, Neighbor Down: Interface down or detached R3(config-router)# no passive-interface serial 0/0/0 *Apr 7 16:23:18.590: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/0 from LOADING to FULL, Loading Done R3(config-router)# no passive-interface serial 0/0/1 *Apr 7 16:23:24.462: %OSPF-5-ADJCHG: Process 10, Nbr on Serial0/0/1 from LOADING to FULL, Loading Done

50 OSPFv2: Passive Interfaces

51 OSPF Metric (Cost)

52 OSPF Metric The OSPF metric is called cost. The following passage is from RFC 2328: A cost is associated with the output side of each router interface. This cost is configurable by the system administrator. The lower the cost, the more likely the interface is to be used to forward data traffic. RFC 2328 does not specify which values should be used to determine the cost. The OSPF metric is called cost. The following passage is from RFC 2328: A cost is associated with the output side of each router interface. This cost is configurable by the system administrator. The lower the cost, the more likely the interface is to be used to forward data traffic. RFC 2328 does not specify which values should be used to determine the cost.

53 OSPF Metric Cisco IOS Cost for OSPF = 108/bandwidth in bps
Cisco IOS software uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value. 108 is known as the reference bandwidth So that interfaces with the higher bandwidth values will have a lower calculated cost. Cisco IOS software uses the cumulative bandwidths of the outgoing interfaces from the router to the destination network as the cost value. 108 is known as the reference bandwidth Dividing 108 by the interface bandwidth is done so that interfaces with the higher bandwidth values will have a lower calculated cost. Remember, in routing metrics, the lowest-cost route is the preferred route.

54 Reference Bandwidth The reference bandwidth
Defaults to 108, which is 100,000,000 bps or 100 Mbps. This results in interfaces with a bandwidth of 100 Mbps and higher having the same OSPF cost of 1. Can be modified using the OSPF command Router(config-router)# auto-cost referencebandwidth Mb/s When necessary use on all routers so the OSPF routing metric remains consistent. The reference bandwidth defaults to 108, which is 100,000,000 bps or 100 Mbps. This results in interfaces with a bandwidth of 100 Mbps and higher having the same OSPF cost of 1. The reference bandwidth can be modified to accommodate networks with links faster than 100,000,000 bps (100 Mbps) using the OSPF command auto-cost referencebandwidth. When this command is necessary, it is recommended that it is used on all routers so the OSPF routing metric remains consistent.

55 Accommodating 10Gig Interfaces
In Mb/s R1(config-router)# auto-cost reference-bandwidth 10000

56 Adjusting to Reference Bandwidth for Gig
Cost = 1 Cost = 647 R1(config)# router ospf 10 R1(config-router)# auto-cost reference-bandwidth 1000 R2(config)# router ospf 10 R2(config-router)# auto-cost reference-bandwidth 1000 R3(config)# router ospf 10 R3(config-router)# auto-cost reference-bandwidth 1000

57 Adjusting to Reference Bandwidth for Gig
Cost = 1 Cost = 647 R1# show ip ospf interface serial 0/0/0 Serial0/0/0 is up, line protocol is up Internet Address /30, Area 0, Attached via Network Statement Process ID 10, Router ID , Network Type POINT_TO_POINT, Cost: 647 Topology-MTID Cost Disabled Shutdown Topology Name no no Base <Output omitted> R1#

58 Verify the Adjusted Reference Bandwidth
Cost = 1 Cost = 647 = 648 R1# show ip route | include O /24 [110/648] via , 00:06:03, Serial0/0/0 R1# R1# show ip route Routing entry for /24 Known via "ospf 10", distance 110, metric 648, type intra area Last update from on Serial0/0/0, 00:06:17 ago Routing Descriptor Blocks: * , from , 00:06:17 ago, via Serial0/0/0 Route metric is 648, traffic share count is 1

59 OSPF Metric (Cost)

60 OSPFv2: Modifying the Bandwidth on Serial Links

61 Default Bandwidth on Serial Interfaces
R1# show interface serial 0/0/0 Serial0/0/0 is up, line protocol is up Hardware is GT96K Serial Description: Link to R2 Internet address is /30 MTU 1500 bytes, BW 1544 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 On Cisco routers, the bandwidth value on many serial interfaces defaults to T1 (1.544 Mbps). Always check this with the show interface command. Rick’s tip – Always use the bandwidth command on serial interfaces. Modified bandwidth values are shown in running-config. Bandwidth value does not actually affect the speed of the link On Cisco routers, the bandwidth value on many serial interfaces defaults to T1 (1.544 Mbps). Always check this with the show interface command. Rick’s tip – Always use the bandwidth command on serial interfaces. However, some serial interfaces may default to 128 Kbps. Therefore, never assume that OSPF is using any particular bandwidth value. Always check the default value with the show interface command. Bandwidth value does not actually affect the speed of the link It is used by some routing protocols to compute the routing metric. It is important that the bandwidth value reflect the actual speed of the link so that the routing table has accurate best path information.

62 Default Bandwidth on Serial Interfaces
Serial interfaces bandwidth value defaults to T1 or 1544 Kbps. R1# show ip route <route ouput omitted> O [110/1294] via , 14:27:57, Serial0/0/1 [110/1294] via , 14:27:57, Serial0/0/0 R1 believes that both of its serial interfaces are connected to T1 links. R1’s routing table having two equal-cost paths to the /30 network. Serial 0/0/0 is actually the better path. R1 believes that both of its serial interfaces are connected to T1 links, although one of the links is a 64 Kbps link and the other one is a 256 Kbps link. This results in R1’s routing table having two equal-cost paths to the /30 network, when Serial 0/0/1 is actually the better path.

63 Adjusting Interface Bandwidth
To adjust the interface bandwidth use the bandwidth kilobits interface configuration command.

64 Modifying the Cost of the Link
Both sides of the link should be configured to have the same value. R1(config)# inter serial 0/0/1 R2(config-if)# bandwidth 64 R2(config-if)# inter serial 0/0/1 R2(config-if)# bandwidth 1024 R3(config)# inter serial 0/0/1 R3(config-if)# inter serial 0/0/0 R3(config-if)# bandwidth 64 Both sides of the link should be configured to have the same value.

65 The ip ospf cost Command
R1(config)# inter serial 0/0/1 R1(config-if)# bandwidth 64 R1(config-if)# end R1# show ip ospf interface serial 0/0/0 Serial0/0 is up, line protocol is up Internet Address /30, Area 0 Process ID 1, Router ID , Network Type POINT_TO_POINT,Cost: 15625 1,000,000,000/64,000 = 15625 R1(config)# interface serial 0/0/1 R1(config-if)# ip ospf cost 15625 An alternative method to using the bandwidth command is to use the ip ospf cost command, which allows you to directly specify the cost of an interface. This will not change the output of the show ip ospf interface command. An alternative method to using the bandwidth command is to use the ip ospf cost command, which allows you to directly specify the cost of an interface. This will not change the output of the show ip ospf interface command,

66 OSPFv2: Modifying the Bandwidth on Serial Links

67 Verifying OSPFv2

68 Verifying OSPF Settings
R1# show ip protocols *** IP Routing is NSF aware *** Routing Protocol is "ospf 10" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: area 0 area 0 area 0 Routing Information Sources: Gateway Distance Last Update :17:18 :14:49 Distance: (default is 110) R1# Network command Neighbors

69 Verifying OSPF Neighbors
Lists of OSPF neighbors in the order they were learned. The amount of time remaining before declaring the neighbor down. The local interface to reach this neighbor. R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface FULL/ :00: Serial0/0/1 FULL/ :00: Serial0/0/0 R1# The OSPF priority of the interface. Used in DR/BDR election. The state of the OSPF enabled interface. FULL state means that the router and its neighbor have identical OSPF LSDB. The neighbor’s IP address

70 Verifying OSPF Routes R1# show ip route | include 172.16.2.0
O /24 [110/65] via , 03:39:07, Serial0/0/0 R1# R1# show ip route Routing entry for /24 Known via "ospf 10", distance 110, metric 65, type intra area Last update from on Serial0/0/0, 03:39:15 ago Routing Descriptor Blocks: * , from , 03:39:15 ago, via Serial0/0/0 Route metric is 65, traffic share count is 1

71 Verifying OSPF Interface Information
R1# show ip ospf interface serial 0/0/0 Serial0/0/0 is up, line protocol is up Internet Address /30, Area 0, Attached via Network Statement Process ID 10, Router ID , Network Type POINT_TO_POINT, Cost: 647 Topology-MTID Cost Disabled Shutdown Topology Name no no Base Transmit Delay is 1 sec, State POINT_TO_POINT Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:01 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 3/3, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s)

72 Verifying OSPF Interface Information in Brief
R1# show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Se0/0/ / P2P 1/1 Se0/0/ / P2P 1/1 Gi0/ / DR 0/0 R1#

73 Verifying the OSPF Process
R1# show ip ospf Routing Process "ospf 10" with ID Start time: 01:37:15.156, Time elapsed: 01:32:57.776 <Output omitted> Number of areas in this router is 1. 1 normal 0 stub 0 nssa Number of areas transit capable is 0 External flood list length 0 IETF NSF helper support enabled Cisco NSF helper support enabled Reference bandwidth unit is 1000 mbps Area BACKBONE(0) Number of interfaces in this area is 3 Area has no authentication SPF algorithm last executed 01:30: ago SPF algorithm executed 3 times Area ranges are Number of LSA 3. Checksum Sum 0x02033A

74 Verifying OSPFv2

75 Introducing Single Area OSPFv3

76 IPv4 and IPv6 Routing Protocols
Exterior Gateway Protocols Interior Gateway Protocols Distance Vector Link State Path Vector Distance Vector Routing Protocols Link State Routing Protocols Path Vector RIPv2 EIGRP OSPFv2 IS-IS BGP-4 RIPng EIGRP for IPv6 OSPFv3 * IS-IS for IPv6 BGP-4 for IPv6 or MP-BGP IPv4 IPv6 * OSPFv3 supports routing both IPv4 and IPv6. The basic operations and algorithms you learned about OSPFv2 for IPv4 also apply to OSPFv3 for IPv6. BGP-4 Multiprotocol Extensions for IPv6 There are some changes, but the basics remain the same.

77 Comparing Flavors of OSPF
OSPFv2 for IPv4 Traditional OSPFv3 for IPv6 OSPFv3 Address Families OSPF version OSPFv2 OSPFv3 Advertised routes IPv4 networks IPv6 prefixes IPv4 networks and IPv6 prefixes Link-state Yes Metric Cost (Cisco: BW) Support multiple areas Router-ID 32-bit DR and BDR “Traditional OSPFv3”

78 OSPFv2 for IPv4 Traditional OSPFv3 for IPv6 OSPFv3 Address Families Layer 3 encapsulation IPv4 IPv6 Source address IPv4 address IPv6 link-local address Destination - All OSPF Routers FF02::5 Destination – ALL DR/BDR FF02::6 Destination - Neighbor IPv6 Unicast Routing N/A (IP unicast routing default) Required Required (Even if only using IPv4 address family) Authentication Plain text and MD5 IPsec LSAs OSPFv3 renames two LSA types and defines two additional LSA types that do not exist in OSPFv2.

79 Comparing OSPFv2 and OSPFv3 LSAs
Type Name LS Type Code 1 Router LSA 0x2001 2 Network LSA 0x2002 3 Network Summary LSA 0x2003 Inter-Area Prefix LSA 4 ASBR Summary LSA 0x2004 Inter-Area Router LSA 5 AS-External LSA 0x4005 6 Group Membership LSA 0x2006 7 NSSA External LSA 0x2007 Type-7 LSA 0x2008 Link LSA 0x2009 Intra-Area Prefix LSA Note: Intra-Area Prefix LSA is a new LSA in OSPFv3 and used in order to advertise one or more IPv6 prefixes. In OSPFv2 the intera-area prefix information was carried in the router and network LSA's (Type 1 & 2). OSPFv3 does also change the info that is carried in type 1 and type 2 LSAs. There is no IPv6 specific info in them which is different from OSPFv2 The LS type of an AS-external-LSA is set to the value 0x AS- external-LSAs have AS flooding scope. Link LSAs (Type 8)--Have local-link flooding scope and are never flooded beyond the link with which they are associated. Link LSAs provide the link-local address of the router to all other routers attached to the link, inform other routers attached to the link of a list of prefixes to associate with the link, and allow the router to assert a collection of Options bits to associate with the network LSA that will be originated for the link. Intra-Area-Prefix LSAs (Type 9)--A router can originate multiple intra-area-prefix LSAs for each router or transit network, each with a unique link-state ID. The link-state ID for each intra-area-prefix LSA describes its association to either the router LSA or the network LSA and contains prefixes for stub and transit networks.

80 Comparing OSPFv2 and OSPFv3 (without AF)
IPv4 OSPFv2 OSPFv2 IPv4 Neighbor Table LSDB Routing Table Neighbor Table LSDB Routing Table IPv4 Network R1 R2 IPv6 Network OSPFv3 OSPFv3 IPv6 OSPFv3 OSPFv3 IPv6 R2 Neighbor Table LSDB Routing Table Neighbor Table LSDB Routing Table

81 Configured with eigrp router-id router-id command
2001:DB8:CAFE:1::/64 Area 0 2001:DB8:77::/64 G0/0 :1 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64 FE80::1 FE80::2 FE80::3 S0/0/1 :2 S0/0/0 :2 S0/0/1 :2 G0/0 :1 S0/0/0 :1 S0/0/1 :1 ISP R1 R2 R3 R1(config)# ipv6 route ::/0 2001:db8:77::1 R1(config)# ipv6 unicast-routing R1(config)# ipv6 router ospf 2 R1(config-rtr)# router-id R1(config-rtr)# passive-interface gig 0/0 R1(config-rtr)# default-information originate R1(config-rtr)# exit R1(config)# interface gigabitethernet 0/0 R1(config-if)# ipv6 ospf 2 area 0 R1(config-if)# exit R1(config)# interface serial 0/0/0 Required OSPF process-id does not need to match other routers Uses same process as OSPFv2 for determining the 32-bit router-id; required command if there is no IPv4 address OSPF for IPv6 is enabled on the interface, no network command Criteria for deriving the router ID: Configured router ID: Configured with eigrp router-id router-id command Note: Some versions of IOS will accept router-id. Highest Loopback IPv4 address: Highest active interface IPv4 address: EIGRP (IPv4 and IPv6) requires a 32-bit router ID. If there is no 32-bit IPv4 address configured on the router, then a router-id command is required. This is used to uniquely identify the router in EIGRP messages.

82 Configured with eigrp router-id router-id command
2001:DB8:CAFE:1::/64 Area 0 2001:DB8:77::/64 G0/0 :1 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64 FE80::1 FE80::2 FE80::3 S0/0/1 :2 S0/0/0 :2 S0/0/1 :2 G0/0 :1 S0/0/0 :1 S0/0/1 :1 ISP R1 R2 R3 R2(config)# ipv6 unicast-routing R2(config)# ipv6 router ospf 2 R2(config-rtr)# router-id R2(config-rtr)# exit R2(config)# interface serial 0/0/0 R2(config-if)# ipv6 ospf 2 area 0 R2(config-if)# exit *Aug 1 02:42:29.015: %OSPFv3-5-ADJCHG: Process 2, Nbr on Serial0/0/0 from LOADING to FULL, Loading Done R2(config)# interface serial 0/0/1 R2(config-if)# Criteria for deriving the router ID: Configured router ID: Configured with eigrp router-id router-id command Note: Some versions of IOS will accept router-id. Highest Loopback IPv4 address: Highest active interface IPv4 address: EIGRP (IPv4 and IPv6) requires a 32-bit router ID. If there is no 32-bit IPv4 address configured on the router, then a router-id command is required. This is used to uniquely identify the router in EIGRP messages.

83 Configured with eigrp router-id router-id command
2001:DB8:CAFE:1::/64 Area 0 2001:DB8:77::/64 G0/0 :1 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64 FE80::1 FE80::2 FE80::3 S0/0/1 :2 S0/0/0 :2 S0/0/1 :2 G0/0 :1 S0/0/0 :1 S0/0/1 :1 ISP R1 R2 R3 R3(config)# ipv6 unicast-routing R3(config)# ipv6 router ospf 2 R3(config-rtr)# router-id R3(config-rtr)# passive-interface gigabitethernet 0/0 R3(config-rtr)# exit R3(config)# interface serial 0/0/1 R3(config-if)# ipv6 ospf 2 area 0 *Jul 2 19:17:36.335: %OSPFv3-5-ADJCHG: Process 2, Nbr on Serial0/0/1 from LOADING to FULL, Loading Done R3(config-if)# exit R3(config)# interface gigabitethernet 0/0 Criteria for deriving the router ID: Configured router ID: Configured with eigrp router-id router-id command Note: Some versions of IOS will accept router-id. Highest Loopback IPv4 address: Highest active interface IPv4 address: EIGRP (IPv4 and IPv6) requires a 32-bit router ID. If there is no 32-bit IPv4 address configured on the router, then a router-id command is required. This is used to uniquely identify the router in EIGRP messages.

84 Area 0 ISP R1 R2 R3 2001:DB8:CAFE:1::/64 2001:DB8:77::/64 G0/0 :1
:2 S0/0/0 :2 S0/0/1 :2 G0/0 :1 S0/0/0 :1 S0/0/1 :1 ISP R1 R2 R3 R1# show ipv6 ospf neighbor OSPFv3 Router with ID ( ) (Process ID 2) Neighbor ID Pri State Dead Time Interface ID Interface FULL/ :00: Serial0/0/0 R1# R2’s OSPFv3 32-bit router-id

85 Area 0 ISP R1 R2 R3 2001:DB8:CAFE:1::/64 2001:DB8:77::/64 G0/0 :1
:2 S0/0/0 :2 S0/0/1 :2 G0/0 :1 S0/0/0 :1 S0/0/1 :1 ISP R1 R2 R3 R3# show ipv6 route ospf IPv6 Routing Table - default - 8 entries <output omitted> OE2 ::/0 [110/1], tag 2 via FE80::2, Serial0/0/1 O :DB8:CAFE:1::/64 [110/129] O :DB8:CAFE:2::/64 [110/128] R3# Default route originated by R1 Administrative distance of OSPF and OSPF metric Single area ospf Link-local address of R2

86 Introducing Single Area OSPFv3


Download ppt "Rick Graziani Cabrillo College"

Similar presentations


Ads by Google