Open drewloveland opened 5 years ago
Hi,
What release of NSX do you are using ?
do you have try to don't specify some parameter ? (like Vnic or AdminDistance)
6.4.1 I tried with just -NextHop and -Network and the error was the same.
what do you have with Get-NsxLogicalRouter "myDLR" | Get-NsxLogicalRouterRoutin
there is interface with IP on range 100.99.255.x ?
PS C:\windows\System32> Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting
version : 54
enabled : true
routingGlobalConfig : routingGlobalConfig
staticRouting : staticRouting
ospf : ospf
bgp : bgp
logicalrouterId : edge-5
Yes, there is an interface for the IP range in question (the IPs I posted above are not the actual IPs I'm using). In fact there are already 2 other static routes created but they were done manually. Creating this route is successful if done manually using the vSphere web interface.
what do you have on staticRouting ? (Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting).staticRouting
Do you have a defaultRoute ?
Yes there is a default route.
PS C:\Windows\System32> (Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting)
version : 108
enabled : true
routingGlobalConfig : routingGlobalConfig
staticRouting : staticRouting
ospf : ospf
bgp : bgp
logicalrouterId : edge-5
PS C:\Windows\System32> (Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting).staticRouting
defaultRoute staticRoutes
------------ ------------
defaultRoute staticRoutes
PS C:\Windows\System32> (Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting).staticRouting.defaultRoute
vnic description gatewayAddress adminDistance
---- ----------- -------------- -------------
2 100.82.254.10 1
and on staticRoutes ?
Try on NSX-V 6.4.5 and work on for me...
Static routes:
PS C:\Windows\system32> (Get-NsxLogicalRouter "Private Services DLR" | Get-NsxLogicalRouterRouting).staticRouting.staticRoutes.route
description :
type : user
vnic : 3
network : 100.82.3.0/24
nextHop : 100.82.255.10
adminDistance : 1
description :
type : user
vnic : 3
network : 100.82.4.0/24
nextHop : 100.82.255.11
adminDistance : 1
description :
type : user
vnic : 3
network : 10.160.26.192/26
nextHop : 100.82.255.12
adminDistance : 1
Attempting to add a static route to a logical router:
...produces the following error:
Note that the first 2 piped commands return normally (Get-NsxLogicalRouter and Get-NsxLogicalRouterRouting).