Introduction to OSPF

Hello Amit

It is possible to adjust the cost of each path on both the HQ and the remote site so that both paths are of the same cost. Remember that the default cost depends upon the type of interface that is being used. You may find that for both the 1Gbps and the 500Mbps links, you are using GigabitEthernet interfaces, so your cost may already be the same, even though the real bandwidth of one of those links is limited by the ISP.

The configuration of this cost involves the setting of the cost value on the appropriate interface and the usage of the correct reference bandwidth. Make sure that you configure the routers at HQ and at your branch with the same values, otherwise you will have unpredictable results. These configurations are shown in detail in this lesson:
https://networklessons.com/ospf/introduction-to-ospf

Now once you do this, you can check that this has been correctly configured by looking at the routing tables of the routers on either end. You should see routes to the networks on the other end of the link with two entries.

Now the question remains, should you do this? Well, it can cause some problems. Imagine you have at some point 1.1Gbps of traffic going from HQ to the branch office. OSPF will load balance half of that across one link, and half across the other link, that is 550Mbps on each link. You can see how the 500Mbps link will be saturated while the other link will not be. This will result in intermittent drops of packets, and will essentially give you a maximum bandwidth of 1Gbps. Anything above 1Gbps will result in intermittent drops. So this is not an efficient nor a sufficient method of load balancing.

In this case, I would suggest the use of EIGRP using a 2:1 variance for load balancing so you can fully take advantage of the available bandwidth.

Alternatively, you can use policy-based routing to route only some traffic via the lower bandwidth link. An example of exactly this implementation can be round at the following lesson:


This way, you can direct traffic from and to specific IP addresses or TCP/UDP ports to use particular links. Of course, this will depend on your traffic patterns, and it may need adjusting as your network traffic and services change, but it is a possible solution for you.

I hope this has been helpful!

Laz

Thanks Rene. We are now going with equal path load balancing option and in future we are planning for SDWAN as to change from OSPF to EIGRP isn’t that much easy task for us and also SDWAN give us more advantage to setup more remote offices.

1 Like

Hi ,

Just quick question, after doing equal cost load balancing, the traffic is going load balancing through session based not per packet load balance. In session based load balance, we don’t have any issues but my one link is utilising fully while other is comparatively very less , lets say only 30 %. Can I go for per packet load balancing option. Any issues with per packet load balancing because per session wise I can’t utilise my both the links very well. Your expert advise is highly appreciated.

Hello Amit

Per session (or per destination) load balancing can result in a less than equal load balancing simply because some sessions have much more traffic than others, just like you have discovered and describe in your post.

Per packet load balancing will result in a much more equal load balancing but can result in out of order packets due to the fact that the packets take different paths. For TCP sessions this can result in many retransmissions slowing down the sessions. For applications using UDP such as voice or video, you may have a lot of errors that result in bad quality voice or video (voice and video don’t use error correction mechanisms that TCP provides).

So I guess it really depends on the applications being used, and the susceptibility of those applications to out of order errors…

More information about this can be found in the following Cisco documentation. This particular document deals with BGP but the concept described in the section I’ve linked to applies to all kinds of routing protocol load balancing.

I hope this has been helpful!

Laz

Hi Lazaros,

In this quiz answer it says that router 2 is both a dr and bdr how would we known this from the attached picture? Also if we have a bunch of different networks but all under the first two bytes of 192.168 in keith barkers videos he always just uses the statement
Network 192 168.0.0 0.0.255.255 area 0 why not just do this everytime instead of having to put in each network 192.168.2.0 and 192 168.3.0 etc. as their own statement?

Hello Daniel

Remember that a DR/BDR election takes place on a per-network segment basis, and not on a per-area basis. This means that an OSPF router connected to multiple network segments may be a DR on one segment, a BDR on another, and neither on a third. This post tells you much more about this situation:

Now to answer your question specifically, you can see in the output you provided that:

  • on the network segment connected to the interface with IP address 10.12.0.1 the router is a DR
  • on the network segment connected to the interface with IP address 10.24.0.4 the router is a BDR
  • on the network segment connected to the interface with IP address 10.23.0.3 the router is neither

You can see this from the state column. So you see, a router can be DR, BDR, or neither at the very same time!

To answer this question, take a look at the following post:

I hope this has been helpful!

Laz

Hi Team,

I have a question i was reading about summary LSA and found somthing that’s confusing me

  1. ABR expects summary LSAs from Area 0 only. This means there should
    be at least one adjacency in FULL state built over Area 0 interface. In
    case if ABR has such adjacency, it will ignore summary-LSAs received
    over non-backbone areas. These LSAs will be installed in the database,
    but not used for SPF calculations.

  2. ABR will accept and use summary-LSAs learned over non-backbone area
    if it DOES NOT have a FULL adjacency built over an Area 0 interface. It is
    safe to do so, since the ABR will not be able to flood the summary back
    into Area 0 creating routing loops

question

  1. so summary LSA is only allowed form area 0
  2. if yes and an ABR is installed between 4 areas how will all other areas will know each other

Hello Ankush

Take a look at this diagram taken from the OSFP LSA Types Explained lesson:


As you can see, a Type 3 LSA is generated by an ABR as a result of the receipt of a Type 1 LSA from a non-backbone area. This Type 3 LSA may be relayed to other non-backbone areas, as you can see, but will never originate in a non-backbone area. Type 3 LSAs are only generated and sent out of interfaces of ABRs that are on Area 0 and are received by ABRs only on their Area 0 interfaces.

Therefore the statement “ABR expects summary LSAs from Area 0 only.” is correct. However, summary LSAs are allowed in non-backbone areas, and non-ABR routers in those areas may receive them. There is an exception to this rule, as stated in point number 2 in your post.

As for your second question, I believe it has been answered. Non-ABR routers can and do receive Type 3 LSAs from the ABR in non-backbone areas so they do indeed learn of each other’s networks.

I hope this has been helpful!

Laz

ospf_asbr
你好,我想要ospf区域内的其他路由(R3/R6)也能ping通我的虚拟机(192.168.85.128),需要怎么配置呢

Translated using Google Translate:

Hello, I want other routes (R3/R6) in the ospf area to be able to ping my virtual machine (192.168.85.128), how do I need to configure it?

Hello Hongxing

In your topology, it looks like R7 has one interface (F0/0) in area 2, while interface f0/1 is not participating in OSPF at all. Also, if we use a prefix of /24 it looks like the VM and F0/1 on R7 are in the same subnet.

If that is correct, then R7 becomes an Autonomous System Border Router (ASBR) because it has at least one interface in an OSPF area (F0/0) and at least one interface in a non-OSPF area (F0/1).

In order to allow your OSPF topology to learn about the subnet in which your VM exists, you must redistribute the route to the 192.168.85.0/24 subnet into OSPF. This is done using the redistribute command on R7.

In this particular case, you would use the redistribute connected subnets command in the OSPF configuration of R1. This will redistribute the subnets of connected interfaces on R7 that are not participating in OSPF, namely the 192.168.85.0/24 subnet.

If your VM was not on a directly connected subnet, then you could create a static route in R7 and then use the redistribute static command.

In any case, if R7 knows how to get to the VM IP address, using any means (directly connected, static, or another routing protocol), you can use the redistribute command to inject that route into OSPF.

I hope this has been helpful!

Laz

1 Like

Hello Laz
The following is the routing table of R7 and R6. It seems that the 192.168.85.0/24 subnet has been redistributed to the ospf area, but R6 still cannot establish communication with the vm (make sure the network where the vm is located is 192.168.85.0/24).
R7:
ospf_r7_route
R6:
ospf_r6_route

Hello Hongxing

Since the destination network is correctly within the routing tables of the routers involved, then it looks like OSPF is working fine. If you don’t have connectivity, then you will have to look elsewhere for the problem.

The first thing you should always do in such cases is to ensure that the closest router to the destination has connectivity with the destination. In this case, it is R7, and the destination is in the same subnet as the F0/1 interface of R7. Can R7 ping the VM? If not, then you should check the configuration on the VM (default gateway) and the network on which the VM is installed.

If you can ping from there, then you will have to trace your way back and check the whole path from the source to the destination.

Some things to keep in mind:

  1. Remember that routing must be configured correctly for both directions to function. The 192.168.85.0 network may be in the routing table, but is the subnet of the pinging device also in all the routing tables so that the response can reach it?
  2. Make sure the default gateway on the VM is configured correctly.

These thoughts may be able to help you out in your troubleshooting process.

I hope this has been helpful!

Laz

1 Like

Thanks a lot Laz :+1: :grin:It’s really a gateway problem :kissing_heart:

1 Like

Hi Rene,

The chapter mentions that the Area ID needs to be same for the routers to be OSPF neighbors. But I have a setup where the routers have different Area IDs and the link type is point-to-point and they have adjacency established between them. Could you please clarify if the requirement of matching Area ID applies for point-to-point link types also.

Hello Nithya

When we talk about “an OSPF router being in area 0” we have to keep in mind that some OSPF routers are in multiple areas. This is because the designation of area is not something that belongs to the router as a whole, but to particular interfaces. OSPF routers that have interfaces in different areas are called Area Border Routers or ABRs.

The network command specifies subnets that belong to a specific area. In turn, the interfaces with IP addresses within those defined subnets belong to those areas. Two directly connected OSPF routers will become neighbors only if the interfaces through which they are connected are in the same area. This is the case regardless of the network type being used.

I labbed this up just to be sure, and I configured point-to-point OSPF networks on both ends, with different area IDs, and an adjacency did not form. I did however get this error:

00:11:43: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 10.10.10.2, GigabitEthernet0/0/0

I hope this has been helpful!

Laz

Hey guys,
just want to be sure. The OSPF topic/explanation is about OSPFv2, right ?
Because there is OSPFv3 out there but for CCNA only OSPFv2 is needed.

kind regards,
Christopher

Hello Christopher

Yes, this lesson focuses on OSPFv2 which supports IPv4. For support of IPv6, you require OSPFv3.

You can find out about OSPFv3 and how it differs from previous versions at the following lesson:

You can also see detailed lessons where OSFPv3 is applied in unit 2 of the IPv6 course below:

I hope this has been helpful!

Laz

1 Like

Hi all, I was wondering if OSPF advertises p2p links, meaning /31 ? or what routing protocol would be needed for /31 links? thank you.

Hello Sidney

Using /31 prefixes for point-to-point links in IPv4 is considered acceptable, and is well defined within RFC3021. As such, OSPF, as well as other routing protocols are able to advertise /31 addresses normally, without any additional configuration parameters. I labbed this up and confirmed that a /31 prefix was successfully advertised by OSFP:

O        192.168.14.0/31 
           [110/2] via 192.168.12.1, 00:02:45, GigabitEthernet0/1

I hope this has been helpful!

Laz

To form neighbors adjacency, subnet and subnet mask has to match as well, right Rene?