Presentation is loading. Please wait.

Presentation is loading. Please wait.

Single-Area OSPF (Open Shortest Path First Protocol)

Similar presentations


Presentation on theme: "Single-Area OSPF (Open Shortest Path First Protocol)"— Presentation transcript:

1 Single-Area OSPF (Open Shortest Path First Protocol)
1st semester

2 Outline Link-State Routing Protocols Link-State Routing Process
OSPF Configuration Loopback interface OSPF Configuration Mode OSPF router ID Enabling OSPF on Interfaces Wildcard Mask OSPF cost Reference BW Interface BW Verify OSPF

3 Types of Routing Protocols
3 Types of Routing Protocols

4 Link-State Routing Protocols
In contrast to distance vector routing protocol operation, a router configured with a link-state routing protocol can create a complete view or topology of the network by gathering information from all of the other routers. A link-state router uses the link-state information to create a topology map and to select the best path to all destination networks in the topology A link-state routing protocol is like having a complete map of the network topology. The sign posts along the way from source to destination are not necessary, because all link-state routers are using an identical map of the network. A link-state router uses the link-state information to create a topology map and to select the best path to all destination networks in the topology.

5 Link-State Routing Process
5 Link-State Routing Process

6 6 Link and Link-State The first step in the link-state routing process is that each router learns about its own links, its own directly connected networks. 

7 7 Say Hello The second step in the link-state routing process is that each router is responsible for meeting its neighbors on directly connected networks.

8 8 Link State Updates The third step in the link-state routing process is that each router builds a link-state packet (LSP) containing the state of each directly connected link.

9 Flooding the LSP and Building the Link-State Database
9 Flooding the LSP and Building the Link-State Database The fourth step in the link-state routing process is that each router floods the LSP to all neighbors, who then store all LSPs received in a database.

10 Computing the Best Path
10 Computing the Best Path The final step in the link-state routing process is that each router uses the database to construct a complete map of the topology and computes the best path to each destination network.

11 Adding Routes to the Routing Table
11 Adding Routes to the Routing Table The best paths are inserted into the routing table

12 OSPF Administrative Distance

13 OSPF Configuration

14

15 Loopback Interface 15 4.1.3 Basic Settings on a Router
Configure a Loopback Interface Packet Tracer – Configuring IPv4 and IPv6 Interfaces 15 Loopback Interface Loopback interface is a logical interface internal to the router. It is not assigned to a physical port (not connected to any other device), it is considered a software interface that is automatically in an UP state. Loopback interfaces are very useful because they will never go down, unless the entire router goes down. This helps in managing routers because there will always be at least one active interface on the routers Also it is important in the OSPF routing process.

16 Configure a Loopback Interface
4.1.3 Basic Settings on a Router Configure a Loopback Interface Packet Tracer – Configuring IPv4 and IPv6 Interfaces 16 Configure a Loopback Interface Any number between 0 and 2,147,483,647

17 Configuring Single-Area OSPFv2
OSPFv2 is enabled using the global configuration mode command router ospf process-id. The process-id value is locally significant, which means that it does not have to be the same value on the other OSPF routers to establish adjacencies with those neighbors any number between 1 and 65,535 The process-id value represents a number between 1 and 65,535 and is selected by the network administrator

18 Configuring Single-Area OSPFv2
Note: The list of commands has been altered to display only the commands that are used in this chapter. 18 Configuring Single-Area OSPFv2

19 Router IDs

20 Router IDs Every router requires a router ID to participate in an OSPF domain. The router ID can be defined by an administrator or automatically assigned by the router. The router ID is used by the OSPF-enabled router to: Uniquely identify the router Participate in the election of the DR Uniquely identify the router - The router ID is used by other routers to uniquely identify each router within the OSPF domain and all packets that originate from them. 2. Participate in the election of the DR – - In a multiaccess LAN environment, the election of the DR occurs during initial establishment of the OSPF network. - When OSPF links become active, the routing device configured with the highest priority is elected the DR. Assuming there is no priority configured, or there is a tie, then the router with the highest router ID is elected the DR. The routing device with the second highest router ID is elected the BDR.

21 Router IDs But how does the router determine the router ID?

22 Router IDs The router ID is explicitly configured using the OSPF router configuration mode command router-id rid. The rid value is any 32-bit value expressed as an IPv4 address. This is the recommended method to assign a router ID.

23 Router IDs If the router ID is not explicitly configured, the router chooses the highest IPv4 address of any of configured loopback interfaces. This is the next best alternative to assigning a router ID. The IPv4 address of the loopback interface should be configured using a 32-bit subnet mask ( ).

24 Router IDs If no loopback interfaces are configured, then the router chooses the highest active IPv4 address of any of its physical interfaces. This is the least recommended method because it makes it more difficult for administrators to distinguish between specific routers. This means that the interface address does not need to be included in one of the OSPF network commands for the router to use that IP address as the router ID. If the router uses the highest IPv4 address for the router ID, the interface does not need to be OSPF-enabled. This means that the interface address does not need to be included in one of the OSPF network commands for the router to use that IP address as the router ID. The only requirement is that the interface is active and in the up state.

25 Router IDs Note: The router ID looks like an IP address, but it is not routable and, therefore, is not included in the routing table, unless the OSPF routing process chooses an interface (physical or loopback) that is appropriately defined by a network command.

26 Configuring an OSPF Router ID
An OSPF router identifies itself to other routers using this router ID.

27 If the router ID is the same on two neighboring routers, the router displays an error message similar to the one below:

28 Modifying a Router ID 28 8.2.1.3/4/5/6
Sometimes a router ID needs to be changed. However, after a router selects a router ID, an active OSPF router does not allow the router ID to be changed until the router is reloaded or the OSPF process cleared. The reason is because the router already has adjacencies with other neighbors using the router ID. Those adjacencies must be renegotiated using the new router.

29 Clearing the OSPF process is the preferred method to reset the router ID.
This forces OSPF on R1 to transition to the Down and Init states.

30 Single-area and Multiarea OSPF
30 Single-area and Multiarea OSPF OSPF allows the grouping of routers into a set, called an area.

31 Single-area and Multiarea OSPF
31 Single-area and Multiarea OSPF

32 Enabling OSPF on Interfaces
The basic command syntax is network network-address wildcard-mask area area-id In single-area OSPF, area-id value is a same 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 altered to support multiarea OSPF.

33 Enabling OSPF on Interfaces
The network command determines which interfaces participate in the routing process for an OSPF area. Any interfaces on a router that match the network address in the network command are enabled to send and receive OSPF packets. As a result, the network (or subnet) address for the interface is included in OSPF routing updates.

34 Configure Single-area OSPFv2 The wildcard mask
34 Configure Single-area OSPFv2 The wildcard mask calculates the wildcard mask from the network address of /24. culates the wildcard mask from the network address of /26.

35 The wildcard mask is typically the inverse of the subnet mask.
A wildcard mask is a string of 32 binary digits used by the router to determine which bits of the address to examine for a match. In a subnet mask, binary 1 is equal to a match and binary 0 is not a match. In a wildcard mask, the reverse is true: Wildcard mask bit 0 - Matches the corresponding bit value in the address. Wildcard mask bit 1 - Ignores the corresponding bit value in the address.

36 Enabling OSPF on Interfaces
As an alternative, OSPFv2 can be enabled using the command network intf-ip-address area area-id The advantage of specifying the interface is that the wildcard mask calculation is not necessary. OSPFv2 uses the interface address and subnet mask to determine the network to advertise.

37 Configure Single-area OSPFv2 The network Command
Figure 1 displays the required commands to determine which interfaces on R1 participate in the OSPFv2 routing process for an area. Notice the use of wildcard masks to identify the respective interfaces based on their network addresses. Because this is a single-area OSPF network, all area IDs are set to 0. Figure 2 provides an example of specifying the interface IPv4 address with a quad 0 wildcard mask. Entering network area 0 on R1 tells the router to enable interface Serial0/0/0 for the routing process. As a result, the OSPFv2 process will advertise the network that is on this interface ( /30). 37 Configure Single-area OSPFv2 The network Command There are several ways to identify the interfaces that will participate in the OSPFv2 routing process.

38 Configure Single-area OSPFv2 Configuring Passive Interfaces
By default, OSPF messages are forwarded out all OSPF-enabled interfaces. However, these messages really only need to be sent out interfaces connecting to other OSPF-enabled routers. Sending out unneeded messages on a LAN affects the network in three ways: 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. 38 Configure Single-area OSPFv2 Configuring Passive Interfaces Use the passive-interface router configuration mode command to prevent the transmission of routing messages through a router interface, but still allow that network to be advertised to other routers.

39

40 OSPF Cost OSPF Metric = Cost
Recall that a routing protocol uses a metric to determine the best path of a packet across a network. A metric gives indication of the overhead that is required to send packets across a certain interface. OSPF uses cost as a metric. A lower cost indicates a better path than a higher cost. The cost of an interface is inversely proportional to the bandwidth of the interface. [ a higher bandwidth indicates a lower cost].

41 OSPF Cost OSPF Metric = Cost
41 OSPF Cost OSPF Metric = Cost Cost = reference bandwidth / interface bandwidth (default reference bandwidth is 10^8) Cost = 100,000,000 bps / interface bandwidth in bps 

42 OSPF Cost OSPF Metric = Cost
Notice that FastEthernet, Gigabit Ethernet, and 10 GigE interfaces share the same cost, because the OSPF cost value must be an integer. Consequently, because the default reference bandwidth is set to 100 Mb/s, all links that are faster than Fast Ethernet also have a cost of 1.

43 OSPF Cost OSPF Accumulates Costs
43 OSPF Cost OSPF Accumulates Costs Cost of an OSPF route is the accumulated value from one router to the destination network

44

45 OSPF Cost Adjusting the Reference Bandwidth
To assist OSPF in making the correct path determination, the reference bandwidth must be changed to a higher value to accommodate networks with links faster than 100 Mb/s. Changing the reference bandwidth does not actually affect the bandwidth capacity on the link; rather, it simply affects the calculation used to determine the metric. 45 OSPF Cost Adjusting the Reference Bandwidth Use the command - auto-cost reference-bandwidth  Must be configured on every router in the OSPF domain Notice that the value is expressed in Mb/s: Gigabit Ethernet - auto-cost reference-bandwidth 1000 10 Gigabit Ethernet - auto-cost reference-bandwidth 10000

46

47 OSPF Cost Default Interface Bandwidths
All interfaces have default bandwidth values assigned to them. As with reference bandwidth, interface bandwidth values do not actually affect the speed or capacity of the link. Instead, they are used by OSPF to compute the routing metric. Therefore, it is important that the bandwidth value reflect the actual speed of the link so that the routing table has accurate best path information.

48 OSPF Cost Default Interface Bandwidths
Although the bandwidth values of Ethernet interfaces usually match the link speed, some other interfaces may not. For instance, the actual speed of serial interfaces is often different than the default bandwidth. On Cisco routers, the default bandwidth on most serial interfaces is set to Mb/s. 48 OSPF Cost Default Interface Bandwidths On Cisco routers, the default bandwidth on most serial interfaces is set to Mb/s Do buttons on

49 OSPF Cost Adjusting the Interface Bandwidths
49 OSPF Cost Adjusting the Interface Bandwidths

50 OSPF Cost Manually Setting the OSPF Cost
50 OSPF Cost Manually Setting the OSPF Cost Both the bandwidth interface command and the ip ospf cost interface command achieve the same result, which is to provide an accurate value for use by OSPF in determining the best route. Do buttons on

51 Verify OSPF Verify OSPF Neighbors
51 Verify OSPF Verify OSPF Neighbors Verify that the router has formed an adjacency with its neighboring routers

52 Verify OSPF Verify OSPF Protocol Settings
52 Verify OSPF Verify OSPF Protocol Settings

53 Verify OSPF Verify OSPF Interface Settings
53 Verify OSPF Verify OSPF Interface Settings

54 Any Question?


Download ppt "Single-Area OSPF (Open Shortest Path First Protocol)"

Similar presentations


Ads by Google