VMware NSX Edge Static vs Dynamic Routing
VMware NSX Edge Static vs Dynamic Routing – In this post i would talk about the static and dynamic configurations present within NSX Edge and also show how you can create these routes using PowerNSX.
So what is a Router ? – Routers basically help to route a network packet, they only care about the destination its being sent too, routers consult the routing tables to determine where to send the packet, if the route exists in the routeing table it will use that route to route the packet, if there is no entry it will send the packet to the default gateway, and if there is no gateway it will go ahead and discard the network packet.
Static Routes
Static Routes are created manually on the NSX edge, so they are kind of controlled and created by admins if they know where the packet needs to go and is used mostly in small networks and networks that do not change or not. They are also used in stub networks in large networks which forever will move packet in one direction. Mostly networks which are not dynamic go for static routes.
Static routes are easy to configure, and they need to be configured bi-directional if you want the traffic to flow both sides as they are generally one way.
Next lets look at how to create a static route in NSX edge, if you are creating it via the GUI, you need to double click on the NSX edge, and head over to routing tab and click on static routes
Click on “+” to create the static route, as you can see in the figure below, the Network textbox is where you need to enter the destination address, click on ok and click on publish changes
Note :- If you are using DLR in conjuction with the NSX edge, you need to create a static route on the DLR too.
Next lets see an example of how to use PowerNSX and create the static routes on the DLR, this is just to show how powerful PowerNSX is so please do not care give much importance to the sample values i enter.
First connect to the vCenter Server and the NSX manager
Next get a list of DLR’s in the environment, in my test environment i have one NSX edge and one DLR.
Once we see that the DLR returns correct, lets create the static route.
Now if you refresh the vSphere Webclient, you will see that the routes are created.
Now this was a way to create the static routes in DLR, you can also create static routes on NSX edge using the New-NsxEdgeStaticRoute cmdlet.
Here’s a small extract from the cmdlet help.
Dynamic Routing
Now in large scale networks, creating static routes becomes tedious task and is not recommended, in this scenario we go for dynamic routes, in dynamic routing the routers talk to each other and share the information they have in routing table, so rather then creating static routes on both the DLR and NSX edge, we can configure dynamic routing so that they share the information with one another.
So now, lets go ahead and configure a dynamic routing on a DLR and NSX Edge, we would enable this for the OSPF protocol.
Head over to the NSX Edge, click on manage routing – OSPF and click on edit.
Once you have enabled OSPF, you need to create an Area ID on both the NSX Edge and DLR, with this common Area ID, both the routers will be able to share in the information with one another and hence we can avoid creation of any static routes.
You would need to do a similar set of steps to enable OSPF and create Area ID on the DLR.
Also note that PowerNSX has a list of cmdlets which allows you to work with OSPF, as you can see you can enable / disable OSPF on both Edge and DLR using the Set-NsxEdgeOspf, Set-NsxLogicalRouterOspf cmdlets. also create the Areas using New-NsxEdgeOspfArea and the New-NsxLogicalRouterOspfArea cmdlets.
Here’s a list of all cmdlets which allows you to work with OSPF configurations.
I hope this blog was helpful and translates to some real world scenarios for you to use PowerNSX .
Do check out some of my other Posts on NSX
- VMware NSX PowerShell Installation and System Requirements Part-1.
- VMware NSX : Why we need it in SDDC.
- VMware NSX Components & Architecture
- Vmware NSX Controller Cluster creation using PowerShell
- VMware NSX Logical Switch and DLR config GUI-API
- Getting Started with PowerNSX
- VMware NSX Edge Static vs Dynamic Routing – PowerShell Config
- VMware NSX Edge SNAT vs DNAT – PowerShell Config