1. Главная
  2. Документы
  3. Network Lessons
  4. OSPF
  5. Intruduction

Intruduction

OSPF is a link-state routing protocol, and it’s one of the routing protocols you need to understand if you want to do the Cisco CCNA, CCNP, or CCIE R&S exam(s). In this lesson, I’ll explain the basics of OSPF to you and you will learn how and why it works.

I don’t know about you, but I love my navigation system. The good thing about them is you can just drive and there is no need to look for traffic signs, the bad thing is that I’m absolutely lost when it’s not working. I’m bad at reading maps (or maybe I don’t like them) and if I had to find my way to some street in any big city I’d be doomed.

Link-state routing protocols are like your navigation system, they have a complete map of the network. If you have a full map of the network you can calculate the shortest path to all the different destinations out there. This is cool because if you know about all the different paths, it’s impossible to get a loop since you know everything! The downside is that this is more CPU intensive than a distance vector routing protocol. It’s just like your navigation system…if you calculate a route from New York to Los Angeles, it’s going to take a bit longer than when you calculate a route from one street to another street in the same city.

Let’s take a good look at link-state to see what it exactly means:

Each OSPF router needs to have a unique router ID which is based on the highest IP address on any active interface. There is a catch here, however. On any Cisco router, you can create loopback interfaces which are like a virtual interfaces. You can configure an IP address on it, and when you try to ping it, you will always get a response.

If you have a loopback interface on your OSPF router, then this IP address will be used as the router ID even when it’s not the highest active IP address. Why does OSPF do this? Well, it makes sense…your loopback interface will never go down unless your router crashes.

Using a loopback interface, you can do two things:

  • Advertise the IP address on the loopback interface in OSPF.
  • Don’t advertise the IP address on the loopback interface in OSPF.

What’s the difference? If you advertise a loopback interface, other routers will be able to reach and ping the IP address on this loopback interface or even use it to telnet into the router. If you don’t, then well, you can’t…it’s as easy as that.

Everything is well. We have configured OSPF…we have become neighbors with a bunch of routers and they have exchanged link-state advertisements. Our routers have built their LSDB and they have a full topology picture of our network. Next step is to run the SPF algorithm and see what the shortest path to our destination is.

Remember metrics? The metric is what the routing protocol uses in order to determine the best path. OSPF uses a metric called cost which is based on the bandwidth of an interface, it works like this:

fdffdf
fdfdf

Как вам помочь?