cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
587
Views
5
Helpful
2
Replies

VRF-lite route leaking on nx-os 6 and Nexus 3048

TheDetective
Level 1
Level 1

Hi all,
I have a Cisco Switch NEXUS 3048 with nx-os 6.0(2)U3(7) and licence LAN_ENTERPRISE.

 

I want to know if the following if possible:

  • I have a simple network for an experiement.
  • I have a Router #1, which gives me the up-link to the rest of our network and to the internet.
  • I have a Cisco Switch NEXUS 3048, which is connected to Router #1.
  • I have 4 machines that are connected to the Cisco Switch:
    • 2 machines #A and #B via interface Ethernet 1/1 and 1/2
    • 2 machines #C and #D via interface Ethernet 1/3 and 1/4
  • I want #A and #B to be part of the network "net1" subnet.
  • I want #C and #D to be part of the network "net2" subnet
  • I want to route traffic from net1 to my up-link Router #1.
  • I want to route traffic from net2 to my up-link Router #1.

 

                            +---------------+
                            | Router #1     |
                            | (not a cisco) |
                            | 172.16.0.0/16 |
                            | Gateway:      |
                            | 172.16.0.1    |
                            +---------------+


+-------------------------+------------------- ----------------------------+
| Cisco Switch NEXUS 3048 - licence LAN_ENTERPRISE                         |
| nx-os 6.0(2)U3(7)                                                        |
|                                                                          |
|   +------------------+    +------------------+    +------------------+   |
|   | VRF net1         |    | VRF net2         |    | VRF uplink       |   |
|   | 172.16.196.0/22  |    | 172.16.228.0/22  |    | 172.16.0.0/16    |   |
|   |                  |    |                  |    |                  |   |
|   | Interfaces eth:  |    | Interfaces eth:  |    | Interfaces eth:  |   |
|   | 1/1: 172.16.196.1|    | 1/3: 172.16.228.1|    | 1/46: 172.16.0.2 |   |
|   | 1/2: 172.16.196.2|    | 1/4: 172.16.228.2|    |                  |   |
|   +------------------+    +------------------+    +------------------+   |
|                                                                          |
+--------------------------------------------------------------------------+

Figure 1.

There are several ways to achieve this topology. I heard about VRF virtual routing and forwarding and VRF Route Leaking. I want to know if I can create multiple routers in my cisco switch and route their traffic outside the switch.

 

This way by taking advantage of VRF, with only 1 physical switch, I could have multiple routers.

My Cisco switch seems to be compatible with VRF-lite. I don't know if Figure 1. is possible to achieve.

My idea was to create 1 VRF for net1 and 1 VRF for net2. Then I want to route
the traffic of net1 to Router #1. I want the same for net2.

Creating VRF is OK and it works. Creating the VRF L3 interfaces is OK with
VRF member**bleep**.

But I don't understand how to do "route leaking" or how to route VRF net1 and VRF net2 outside of the cisco nexus. I assume I need a third VRF, which is connected to Router #1.

And I assume I must do route leaking between:

(VRF net1) <--> (VRF uplink) <--------> (Router #1)

and 

(VRF net2) <--> (VRF uplink) <--------> (Router #1)

This is what I have read so far:


If it is possible, what is the easiest way to achieve my simple use case ?


Thank you for your time reading.
--
TheDetective

 

2 Replies 2

Hello

i am assuming this is vrf lite and you do not want either net network to be able to communicate with each other?

Just  have the facilitiy for either vrf net to gain wan access?

 

As such you don’t need to use PBR or route-targets you just need to install a default route into each vrf rib table to point to the global routing table next-hop address and to point the switch via a static route for each vrf subnet towards the interface that vrf subnet resides in

 

However not tested this on a nx-os switch but it should go something like this 

 

Example:

ip route vrf neta 0.0.0.0 0.0.0.0 x.x.x.x global 

 

ip route (neta subnet) (neta sub-interface ip address)

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thank you for your answer Paul !


@paul driver wrote:

Hello

i am assuming this is vrf lite and you do not want either net network to be able to communicate with each other?

Just  have the facilitiy for either vrf net to gain wan access?


Yes this is VRF lite. Yes I want my VRF to gain WAN access. In some cases, I want that 2 VRFs communicate with each over (outside of the WAN). But in other, I don't want.

 

I am glad if I don't need PBR or route targets or to configure routing protocols.

 


@paul driver wrote:
However not tested this on a nx-os switch but it should go something like this

Indeed that's my problem: I found a lot of examples for iOS (see my list of readings). Your CLI are iOS ones I believe. And I was not sure my cisco nexus 3048 was compatible with what I want to do.

 

Conclusion: I will try to set static routes and configure WAN access. If I have a working solution, I update this thread.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card