VMware NSX for the little ones. Part 4. Setting up routing

VMware NSX for the little ones. Part 4. Setting up routing

Part one. Introductory
Part two. Configuring Firewall and NAT Rules
Part three. Configuring DHCP

NSX Edge supports static and dynamic (ospf, bgp) routing.

Initial setup
Static routing
OSPF
BGP
Route redistribution


To configure routing, in vCloud Director, go to Administration and click on the virtual data center. From the horizontal menu, select the tab Edge gateways. Right-click on the desired network and select the option Edge Gateway Services.
VMware NSX for the little ones. Part 4. Setting up routing

Go to the Routing menu.
VMware NSX for the little ones. Part 4. Setting up routing

Initial Configuration (Routing Configuration)

In this deposit, you can:
— activate the ECMP parameter, which allows you to set up to 8 equivalent routes in the RIB.
VMware NSX for the little ones. Part 4. Setting up routing

- change or disable the default route.
VMware NSX for the little ones. Part 4. Setting up routing

- select Router-ID. As Router-ID, you can select the address of the external interface. Without the Router-ID, it is not possible to start the OSPF or BGP processes.
VMware NSX for the little ones. Part 4. Setting up routing

Or add your own by clicking +.
VMware NSX for the little ones. Part 4. Setting up routing
VMware NSX for the little ones. Part 4. Setting up routing

We save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

Done.
VMware NSX for the little ones. Part 4. Setting up routing

Setting up static routing

Go to the Static routing tab and click +.
VMware NSX for the little ones. Part 4. Setting up routing

To add a static route, fill in the following required fields:
— Network—destination network;
- Next Hop - IP addresses of the host / router through which traffic will pass to the destination network;
- Interface - the interface behind which the required Next Hop is located.
Click Keep.
VMware NSX for the little ones. Part 4. Setting up routing

We save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

Done.
VMware NSX for the little ones. Part 4. Setting up routing

Configuring OSPF

Go to the OSPF tab. Enable the OSPF process.
If required, disable Graceful restart, which is enabled by default. Graceful restart is a protocol that allows you to continue forwarding traffic during the process of control plane convergence.
Here you can also activate the default route announcement, if it is in RIB - the default originate option.
VMware NSX for the little ones. Part 4. Setting up routing

Next, add Area. Area 0 is added by default. NSX Edge supports 3 types of Area:
- Backbone area (area 0+Normal);
— Standard area (Normal);
- Not-so-stubby area (NSSA).

Click + in the Area Definition field to add a new Area.
VMware NSX for the little ones. Part 4. Setting up routing

In the window that appears, specify the following required fields:
- Area ID;
— area type.
VMware NSX for the little ones. Part 4. Setting up routing

If required, set up authentication. NSX Edge supports two types of authentication: clear text (password) and MD5.
VMware NSX for the little ones. Part 4. Setting up routing

Click Keep.
VMware NSX for the little ones. Part 4. Setting up routing

We save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

Now add the interfaces on which the OSPF neighbor will be raised. To do this, click + in the Interface Mapping field.
VMware NSX for the little ones. Part 4. Setting up routing

In the window that appears, specify the following parameters:
- Interface - the interface that will be used in the OSPF process;
- Area ID;
— Hello/Dead interval — protocol timers;
— Priority – priority required to select DR/BDR;
- Cost - the metric needed to calculate the best path. Click Keep.
VMware NSX for the little ones. Part 4. Setting up routing

VMware NSX for the little ones. Part 4. Setting up routing

Let's add an NSSA Area to our router.
VMware NSX for the little ones. Part 4. Setting up routing

VMware NSX for the little ones. Part 4. Setting up routing

We save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

In the screenshot below we see:
1. established sessions;
2. established routes in RIB.

VMware NSX for the little ones. Part 4. Setting up routing

Configuring BGP

Go to the BGP tab.
VMware NSX for the little ones. Part 4. Setting up routing

Enable the BGP process.
If required, disable Graceful Restart, which is enabled by default. Here you can also activate the default route announcement, even if it is not in the RIB - the Default Originate option.
Specify the AS of our NSX Edge. 4-byte AS support only available from NSX 6.3
VMware NSX for the little ones. Part 4. Setting up routing

To add a Neighbors peer, click +.
VMware NSX for the little ones. Part 4. Setting up routing

In the window that appears, specify the following parameters:
— IP Address—BGP peer address;
— Remote AS—AS BGP number of the peer;
- Weight - a metric that can be used to control outgoing traffic;
- Keep Alive/Hold Down Time - protocol timers.
VMware NSX for the little ones. Part 4. Setting up routing

Next, we will configure BGP Filters. For an eBGP session, by default, all advertised and received prefixes on this router are filtered, except for the default route. It is announced with the default originate option.
Click + to add BGP Filter.
VMware NSX for the little ones. Part 4. Setting up routing

Set up a filter for an outgoing update.
VMware NSX for the little ones. Part 4. Setting up routing

Set up a filter for an incoming update.
VMware NSX for the little ones. Part 4. Setting up routing

Click Keep to complete the setup.
VMware NSX for the little ones. Part 4. Setting up routing

Save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

Done.
VMware NSX for the little ones. Part 4. Setting up routing

In the screenshot below we see:
1. established session.
2. received prefixes (4 prefixes /24) from BGP peer.
3. default route announcement. The 172.20.0.0/24 prefix is ​​not advertised as it is not added to BGP.
VMware NSX for the little ones. Part 4. Setting up routing

Configuring Route Redistribution

Go to the Route Redistribution tab.
VMware NSX for the little ones. Part 4. Setting up routing

Enable route import for the protocol (BGP or OSPF).
VMware NSX for the little ones. Part 4. Setting up routing

To add an IP prefix, click +.
VMware NSX for the little ones. Part 4. Setting up routing

Specify the name of the IP prefix and the prefkis itself.
VMware NSX for the little ones. Part 4. Setting up routing

VMware NSX for the little ones. Part 4. Setting up routing

Set up a Route Distribution Table. Click +.
VMware NSX for the little ones. Part 4. Setting up routing

- Prefix Name - select the prefix that we will import into the corresponding protocol.
- Learner Protocol - the protocol where we will import the prefix;
- Allow learning - protocol, from where we export the prefix;
- Action - the action that will be applied to this prefix.
VMware NSX for the little ones. Part 4. Setting up routing

We save the configuration.
VMware NSX for the little ones. Part 4. Setting up routing

Done.
VMware NSX for the little ones. Part 4. Setting up routing

The screenshot below shows that a corresponding announcement has appeared in BGP.
VMware NSX for the little ones. Part 4. Setting up routing

That's all about routing with NSX Edge. Ask if something is unclear. Next time we will deal with the balancer.

Source: habr.com

Add a comment