Jeremy's IT Lab
Day 54 Part 3WAN/Cloud

VRF

18m5 chapters86 cues9 cards1 lab
Day 54 Part 3YT: Ge4644KUvh4
00:00 / 18:03

Synchronized Transcript

86 cues indexed • Click dialogue or words to jump
Jeremy

Welcome to Jeremy's IT Lab. This is a complete course for the CCNA. In this video, we will cover virtual routing and forwarding, VRF.

Jeremy

VRF allows us to divide one physical router into multiple virtual routers. You can think of it like VLANs for routers. routers.

Jeremy

VLANs divide a switch into multiple virtual switches, each with their own broadcast domain. broadcast domain. And VRF divides a router into multiple virtual routers, each with their own routing table.

Jeremy

routing table. Here's what we'll cover in this video. First, I will introduce the concept of VRF and its capabilities. And then introduce VRF configuration.

Jeremy

Note that VRF configuration isn't actually a CCNA exam topic. But I think seeing the configurations will help you understand how it works.

Jeremy

Unfortunately, VRF isn't supported in Packet Tracer. So, if you want to try it in a lab, you'll need to use something like Cisco Modeling Labs, CML.

Jeremy

Or real Cisco devices. Let's get started. The diagram at the bottom gives an idea of how VRFs work. The black box in the middle represents R1, a single physical router.

Jeremy

The blue, green, and red router icons inside represent three virtual routers inside R1, three VRFs. Let's call them VRF1, VRF2, and VRF3.

Jeremy

So, virtual routing and forwarding is used to divide a single router into multiple virtual routers. This is similar to how VLANs are used to divide a single switch, a LAN, into multiple virtual switches, virtual LANs.

Jeremy

By default, all interfaces on a switch are in the same LAN, the same broadcast domain. domain. When using VLANs, we can divide that one broadcast domain into multiple virtual broadcast domains.

Jeremy

broadcast domains. Similarly, by default, all router interfaces are all in the same routing domain. domain. By routing domain, I mean by default traffic received on one router interface can be forwarded out of any other interface on the router if the routing table says to do so.

Jeremy

For example, without using VRF, in the diagram below, traffic received on R1's G0/0 interface can be routed to and forwarded out of R1's G1/2 interface.

Jeremy

However, with VRF, that won't be possible. possible. G0/0 is in VRF 1 and G1/2 is in VRF 3. So, traffic cannot be forwarded between them.

Jeremy

them. How does VRF accomplish this? It does this by allowing a router to build separate routing tables. Normally, a router has one routing table, but with VRF, it has multiple.

Jeremy

Interfaces, specifically layer 3 interfaces, are configured to be in a specific VRF, also known as a VRF instance. instance.

Jeremy

Keep in mind that VRF does not apply to layer 2 interfaces on a switch. Only router interfaces, SVIs, and routed ports on multi-layer switches can be configured in a VRF.

Jeremy

It's a layer 3 concept. concept. As I mentioned before, traffic in one VRF cannot be forwarded out of an interface in another VRF. However, as an exception, VRF leaking can be configured to allow traffic to pass between VRFs.

Jeremy

That is a more advanced concept, though, and I won't cover it in this video. So, what is the main purpose of VRF? Well, VRF is commonly used to facilitate MPLS, Multi-Protocol Label Switching.

Jeremy

However, that's actually not the kind of VRF we are talking about here. The kind of VRF we are talking about is VRF light, VRF without MPLS.

Jeremy

So, keep in mind that when I say VRF in this video, I'm really referring to VRF light. light. VRF is commonly used by service providers to allow one device to carry traffic from multiple customers.

Jeremy

How does it help with that? Well, there are two main points. First, each customer's traffic is isolated from the others because each customer connects to their own virtual router within the service provider's physical router.

Jeremy

physical router. In the diagram below, let's say the blue, green, and red devices represent three different customers. All customers connect to the same service provider router, R1, but each connects to a different virtual router, a different VRF instance.

Jeremy

And another major point is that customer IP addresses can overlap without issues. For example, the blue customer uses subnets 192.168.1.0/24 and 192.168.2.0/24.

Jeremy

The green customer also uses 192.168.1.0/24 192.168.1.0/24 and 2.0/24. and 2.0/24. And so does the red customer.

Jeremy

Without VRF, this kind of configuration is not possible on a router. But with VRF, it works fine even though the IP addresses all overlap.

Jeremy

Okay, now let's try configuring VRF to help understand how it works. To demonstrate VRF configuration, I'll use the network below.

Jeremy

SPR1 is a service provider router providing WAN services to two customers, customer one and customer two. C1R1 and C1R2 belong to customer one and C2R1 and C2R2 belong to customer two.

Jeremy

Note the subnets being used. Both customer one and customer two use subnet 192.168.1.0/30.

Jeremy

First, let's see what happens when we try to configure this without using VRF. First, I configured SPR1's G0/0 and G0/1, G0/1, both connected to customer one's routers.

Jeremy

No problems yet. But when I try to configure G0/2, I get an error message. 192.168.1.0 192.168.1.0 overlaps with G0/0.

Jeremy

G0/2 cannot use IP address 192.168.1.1 because it is in the same subnet as G0/0. G0/0. In this case, it's the exact same IP address.

Jeremy

But even if the IP address is different, it won't work. Let me demonstrate that. demonstrate that. To prove that point, I tried to configure it as 192.168.1.2, but again, it didn't work.

Jeremy

Even if the IP address is different, G0/2 cannot be configured in the same subnet as G0/0. So, without the use of VRF, two interfaces on the same router cannot be in the same subnet.

Jeremy

Next, let's use VRF to configure this network properly. First, we have to create the VRFs, which can be done in global config mode with the command IP VRF followed by the VRF name.

Jeremy

name. Here, I created two VRFs, one named customer one and the other customer two. I then used the command show IP VRF, which shows all of the VRFs on the router.

Jeremy

router. As you can see, the customer one and customer two VRFs were created. The next step is to assign interfaces to each VRF.

Jeremy

each VRF. So, from interface config mode for G0/0, I used the command IP VRF forwarding customer one. customer one. G00 is now part of the customer one VRF.

Jeremy

However, I also got this message. Interface G00 IPv4 disabled and addresses removed due to enabling VRF customer one.

Jeremy

customer one. If an interface has an IP address configured, the IP address will be removed when you assign the interface to a VRF. a VRF. So, I then reconfigured the IP address 192.168.1.1/30.

Jeremy

I then configured G01. Again, the IP address I configured before was removed when I assigned it to the VRF. So, I had to reconfigure it.

Jeremy

I then configured the G02 interface. Note that this time it worked. I was able to configure G02 as 192.168.1.1/30 even though it overlaps with G00.

Jeremy

That's because they are in separate VRFs. VRFs. I then configured G03 as well. I then once again confirmed the VRFs and now you can see the interfaces listed in the output.

Jeremy

the output. So, SPR1 is now divided into two separate virtual routers. The customer one VRF, which includes G00 and G01, and the customer two VRF, which includes G02 and G03.

Jeremy

So, basic configuration of VRF light is simple. Create VRFs with the IP VRF command and then assign interfaces to VRFs with the IP VRF forwarding command.

Jeremy

There is, of course, a lot more depth to VRFs, but that's all we'll look at for now. now. I then used show IP route on SPR1, but I don't see any routes.

Jeremy

Usually, you'd expect to see connected and local routes after configuring IP addresses on interfaces. So, why is nothing displayed here?

Jeremy

Show IP route displays the global routing table. That's the normal routing table you're used to when not using VRFs. In this case, all of SPR1's interfaces are configured in VRFs, so nothing displays here.

Jeremy

displays here. By the way, you can have a mix of interfaces using and not using VRFs. So, I then use the command show IP route VRF customer one.

Jeremy

And now we can see some routes. Connected and local routes for G00 and G01. G01. So, if you want to see a VRF's routing table, you have to add VRF and the VRF's name to the end of the command.

Jeremy

Here I viewed the customer two VRF's routing table. So, these are separate routing tables from each other and from the global routing table. routing table.

Jeremy

By the way, if an interface is not in a VRF, its routes will appear in the global routing table. And it will be isolated from the interfaces in VRFs, just like interfaces in different VRFs are isolated from each other.

Jeremy

other. To test reachability, I tried some pings from SPR1. I first pinged 192.168.1.2, but all the pings failed.

Jeremy

Why is that? It's because in the global routing table, there are no routes. As I showed in the previous slide, the global routing table is empty.

Jeremy

You can specify the VRF when pinging like this. Ping VRF, the VRF name, and then the destination. destination. This time the pings worked.

Jeremy

Which device was SPR1 pinging in this case? case? There are two devices with the IP address 192.168.1.2, C1R1 and C2R1.

Jeremy

But in this case, SPR1 was pinging C1R1 because I specified the customer one VRF. VRF. In the customer one VRF again, I pinged 192.168.11.2, 192.168.11.2, C1R2, which worked.

Jeremy

And then 192.168.12.2, 192.168.12.2, C2R2, which didn't work. That's because in the customer one VRF's routing table, there is no route to the destination .12.2.

Jeremy

destination .12.2. This time I pinged 192.168.1.2 and specified the customer two VRF. Who is SPR1 pinging this time?

Jeremy

C2R1, connected to G02 in the customer two VRF. two VRF. And I pinged 192.168.12.2, C2R2, which worked this time because I pinged in the proper VRF.

Jeremy

So, to sum it up, hosts in the same VRF can communicate with each other. And hosts in different VRFs can't. SPR1 was divided into two separate virtual routers.

Jeremy

Here's what we covered in this video. I introduced VRFs and showed the basics of how they are configured in Cisco IOS. But remember, what we mentioned in this video is more accurately called VRF light, which means we're not using VRF with MPLS.

Jeremy

with MPLS. VRF is used to split a router up into multiple virtual routers, each with their own routing table. Service providers can use VRFs to allow multiple customers to connect to the same infrastructure while still allowing their traffic to be isolated.

Jeremy

Plus, it doesn't matter if customers use the same IP addresses in their networks because each VRF is a separate routing table. table. For the CCNA, it's enough to just understand the basic purpose of VRF.

Jeremy

But if you go further to study at the CCNP level and beyond, you'll definitely have to study VRF in more depth. Okay, let's go to the quiz.

Jeremy

Here's question one. You issue the following commands on R1's G00 interface. G00 interface. However, after issuing show IP interface brief, brief, you notice that G00 does not have an IP address.

Jeremy

address. Why is that? Pause the video now to think about the answer. Okay, the answer is B.

Jeremy

The IP address was removed by the IP VRF forwarding VRF 1 command. 1 command. As I showed earlier, if an interface already has an IP address, that IP address will be removed when you assign it to a VRF.

Jeremy

You will then have to reconfigure the IP address. address. So, if you're planning to use VRFs, you should configure the interface IP addresses after assigning them to VRFs.

Jeremy

Okay, let's go to question two. Examine the network below. If you issue the command ping 192.168.1.10 192.168.1.10 on R1, which device will respond?

Jeremy

Pause the video now to select the best answer. Okay, the answer is D. No device will respond.

Jeremy

respond. Actually, R1 won't be able to even send the pings. the pings. All of R1's interfaces are assigned to VRFs, VRFs, and a ping without specifying a VRF will use the global routing table.

Jeremy

None of R1's interfaces are using the global routing instance, so the routing table will be empty, and it won't be able to send the pings. Okay, let's go to question three.

Jeremy

Which of the following statements about VLANs and VRFs are true? Select three. Pause the video now to select your answers.

Jeremy

Okay, the answers are C, D, and F. VRFs divide routers up by creating separate routing tables. In effect, you are dividing the router into separate virtual routers.

Jeremy

VLANs, on the other hand, divide switches up by creating separate broadcast domains. broadcast domains. And router interfaces in different VRFs can have the same IP address, as I demonstrated in this video.

Jeremy

A is incorrect because VRFs do not create separate broadcast domains. Router interfaces are already in separate broadcast domains anyway, without VRFs.

Jeremy

without VRFs. B is wrong because VLANs do not create separate MAC address tables. Even when using VLANs, the switch still keeps one MAC address table.

Jeremy

And E is wrong because VRFs can also be configured on the SVIs and routed ports of multilayer switches, not just on routers.

Jeremy

routers. Okay, that's all for the quiz and this video. I hope it was helpful. Thanks for watching. watching. Before finishing this video, let me thank my JNCIP level channel members.

Jeremy

To become a member, please click the join button under the video. Thanks to Yonatan Macara, Velva Jacob, George Streeter, Funny Dart, Naseer Choudhury, Devin Suku, Gustavo Biar, Gerard Baker, Marcel Lord, Pavel M, Mr.

Jeremy

Earlesson, Dragos Hirnea, Zaki Shah, Mer Salmon, Mazen Anderson, Vytautas 194, Gino Lindley, Nehemia, Justin Watky, Mark Jackson, Bold 1C1U, Michael Carroll, Gerald Guian, Gabriel Braga, Renan Morais, Hector Hernandez,

Jeremy

Ali Polat, Maratuba, Roji Kuriakose, Arpad Konives, 5 Feet, Daniel Brown, Tricky Micky 123456, Scott Thompson, Jose Alvarez, Kevin Hayes, Hussein Yavuz, Samuel Tavares, Mustafa Ersoy, Dear Diso, Nasser Zahar, Alexandru

Jeremy

Badici, Brian Grant, Georgi Gemidjev, Ahmed Ismail, Dibya Swain, Tan No, Arlin Plgaria, Adilson Pereira, Abdo Zizo, and Farhad 69.

Jeremy

Sorry if I pronounced your name incorrectly, but thank you so much for your support. Thanks to you and my other supporters, I am able to make these videos and release them for free on YouTube.

Jeremy

So, I really appreciate the support. Another great way to support the channel is to like the video, leave a comment, subscribe, and most importantly, share this video with others.

Jeremy

So, if this video was helpful, I'd appreciate it if you did any of those. Thanks for watching.

Keyboard shortcuts

Shortcuts are ignored while you are typing in a search box, note field, or the scratchpad.

Playback

SpaceK
Play or pause
←→
Seek 5 seconds
JL
Seek 10 seconds
C
Toggle in-video captions

Scrubber (when focused)

←→
Seek 5 seconds
Shift←/→
Seek 10 seconds
Page UpPage Down
Seek 30 seconds
HomeEnd
Jump to start or end

Flashcards

Space
Reveal the answer
1234
Grade Again / Hard / Good / Easy

Navigation

←→
Move between study-mode tabs
HomeEnd
First or last study-mode tab
?
Open or close this sheet