VMware NSX for the smallest. Part 4. Setting Up Routing

VMware NSX for the smallest. Part 4. Setting Up Routing

Part One. Introduction
Part Two. Configuring Firewall and NAT Rules
Part Three. DHCP Configuration

NSX Edge supports static and dynamic (OSPF, BGP) routing.

The initial setup
Static Routing
OSPF
BGP
Route Redistribution


To configure routing, go to the section in vCloud Director Administration and click on the virtual data center. In 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 smallest. Part 4. Setting Up Routing

Go to the Routing menu.
VMware NSX for the smallest. Part 4. Setting Up Routing

Initial Setup (Routing Configuration)

In this tab, you can:
β€” activate the ECMP option, allowing up to 8 equal-cost routes to be established in the RIB.
VMware NSX for the smallest. Part 4. Setting Up Routing

β€” modify or disable the default route.
VMware NSX for the smallest. Part 4. Setting Up Routing

β€” select the Router-ID. You can choose the address of the external interface as the Router-ID. Without specifying a Router-ID, it is impossible to initiate OSPF or BGP processes.
VMware NSX for the smallest. Part 4. Setting Up Routing

Or add your own by clicking +.
VMware NSX for the smallest. Part 4. Setting Up Routing
VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Done.
VMware NSX for the smallest. Part 4. Setting Up Routing

Configuring Static Routing

Go to the Static Routing tab and click +.
VMware NSX for the smallest. Part 4. Setting Up Routing

To add a static route, fill in the following mandatory fields:
β€” Network – destination network;
β€” Next Hop – IP address of the host/router through which the traffic will pass to the destination network;
β€” Interface – the interface behind which the desired Next Hop is located.
Click Keep.
VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Done.
VMware NSX for the smallest. Part 4. Setting Up Routing

Configuring OSPF

Go to the OSPF tab. Enable the OSPF process.
If necessary, disable Graceful Restart, which is enabled by default. Graceful Restart is a protocol that allows traffic forwarding to continue during the convergence of the control plane.
You can also activate the default route advertisement, if it exists in the RIB β€” the default originate option.
VMware NSX for the smallest. Part 4. Setting Up Routing

Next, add an Area. By default, Area 0 is added. 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 smallest. Part 4. Setting Up Routing

In the pop-up window, specify the following mandatory fields:
β€” Area ID;
β€” Area type.
VMware NSX for the smallest. Part 4. Setting Up Routing

If necessary, configure authentication. NSX Edge supports two types of authentication: clear text (password) and MD5.
VMware NSX for the smallest. Part 4. Setting Up Routing

Click Keep.
VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Now add the interfaces on which OSPF adjacency will be established. To do this, click + in the Interface Mapping field.
VMware NSX for the smallest. Part 4. Setting Up Routing

In the pop-up window, specify the following parameters:
β€” Interface – the interface to be used in the OSPF process;
β€” Area ID;
β€” Hello/Dead interval – the protocol timers;
β€” Priority – the priority needed for selecting DR/BDR;
β€” Cost – the metric needed to calculate the best path. Click Keep.
VMware NSX for the smallest. Part 4. Setting Up Routing

VMware NSX for the smallest. Part 4. Setting Up Routing

Let's add NSSA Area to our router.
VMware NSX for the smallest. Part 4. Setting Up Routing

VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

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

VMware NSX for the smallest. Part 4. Setting Up Routing

BGP Configuration

Go to the BGP tab.
VMware NSX for the smallest. Part 4. Setting Up Routing

We enable the BGP process.
If necessary, disable Graceful Restart, which is enabled by default. Here you can also activate the default route announcement, even if it is not present in the RIB β€” the Default Originate option.
Specify the AS of our NSX Edge. Support for 4-byte AS is available only from NSX version 6.3.
VMware NSX for the smallest. Part 4. Setting Up Routing

To add peer Neighbors, click +.
VMware NSX for the smallest. Part 4. Setting Up Routing

In the pop-up window, specify the following parameters:
β€” IP Address – the BGP peer address;
β€” Remote AS – the AS number of the BGP peer;
β€” Weight – a metric to control outbound traffic;
β€” Keep Alive/Hold Down Time – protocol timers.
VMware NSX for the smallest. Part 4. Setting Up Routing

Next, we will configure BGP Filters. For eBGP sessions, all announced and received prefixes on this router are filtered by default, except for the default route. It is announced using the default originate option.
Click + to add a BGP Filter.
VMware NSX for the smallest. Part 4. Setting Up Routing

Configure the filter for outbound updates.
VMware NSX for the smallest. Part 4. Setting Up Routing

Configure the filter for inbound updates.
VMware NSX for the smallest. Part 4. Setting Up Routing

Click Keep to finish the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Done.
VMware NSX for the smallest. Part 4. Setting Up Routing

In the screenshot below, we see:
1. established session.
2. received prefixes (4 prefixes /24) from the BGP peer.
3. default route announcement. The prefix 172.20.0.0/24 is not announced, as it is not added to BGP.
VMware NSX for the smallest. Part 4. Setting Up Routing

Route Redistribution Configuration

Go to the Route Redistribution tab.
VMware NSX for the smallest. Part 4. Setting Up Routing

Enable route import for the protocol (BGP or OSPF).
VMware NSX for the smallest. Part 4. Setting Up Routing

To add an IP prefix, click +.
VMware NSX for the smallest. Part 4. Setting Up Routing

Specify the name of the IP prefix and the prefix itself.
VMware NSX for the smallest. Part 4. Setting Up Routing

VMware NSX for the smallest. Part 4. Setting Up Routing

Let's configure the Route Distribution Table. Click +.
VMware NSX for the smallest. Part 4. Setting Up Routing

β€” Prefix Name β€” select the prefix we will import into the corresponding protocol.
β€” Learner Protocol β€” the protocol to which we will import the prefix;
β€” Allow learning β€” the protocol from which we export the prefix;
β€” Action β€” the action that will be applied to this prefix.
VMware NSX for the smallest. Part 4. Setting Up Routing

Save the configuration.
VMware NSX for the smallest. Part 4. Setting Up Routing

Done.
VMware NSX for the smallest. Part 4. Setting Up Routing

In the screenshot below, you can see that the corresponding announcement has appeared in BGP.
VMware NSX for the smallest. Part 4. Setting Up Routing

That’s all I have about routing with NSX Edge. Feel free to ask if anything remains unclear. Next time, we'll tackle the load balancer.

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers πŸ”₯ Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster