Can't find what you need?


• Ask the Community
• Create a Case
Reset Search
 

 

Article

Why is a static route not being added to the routing table, and why is my gateway address incorrect?

« Go Back

Information

 
TitleWhy is a static route not being added to the routing table, and why is my gateway address incorrect?
Question
When configuring a static route in NOS, it will notbe added to the routing table if the next hop address is not reachable.

Example of static default route configured:

vdx8770-1# show running-config rbridge-id 1 | i route
ip route 0.0.0.0/0 7.7.7.7


When checking the routing table, it is not installed:
vdx8770-1# show ip route
Total number of IP routes: 4
Type Codes - B:BGP D:Connected O:OSPF S:Static U:Unnumbered +:Leaked route; Cost - Dist/Metric
BGP Codes - i:iBGP e:eBGP
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
Destination GatewayPortCostType Uptime
192.168.1.0/24DIRECT Ve 100 0/0 D 5d21h
192.168.1.100/32 DIRECT Ve 100 0/0 D 5d21h
192.168.2.0/24 DIRECT Ve 200 0/0 D 1d2h
192.168.2.100/32 DIRECT Ve 200 0/0 D 1d2h


Interfaceoutputof VDX 8770 with two configured VE interfaces:
vdx8770-1# show ip int brief | e down

Flags: U - Unnumbered interface
InterfaceIP-AddressVrfStatusProtocol
========================== ========== ========== ==============
FortyGigabitEthernet 1/2/1unassigneddefault-vrfupup
HundredGigabitEthernet 1/1/1 unassigneddefault-vrf upup
Ve 100192.168.1.100 default-vrf upup
Ve 200192.168.2.100 default-vrf upup






Environment
Answer
For a route to be installed, it must be reachable via a connected interface.

In this example, the user has added another default static route, this time with a next hop that is reachable over VE 100.

vdx8770-1# show running-config rbridge-id 1 | i route
ip route 0.0.0.0/0 7.7.7.7
ip route 0.0.0.0/0 192.168.1.200


The static routethat is reachable over a connected interface isnow installed in the routing table:
vdx8770-1# sh ip route
Total number of IP routes: 5
Type Codes - B:BGP D:Connected O:OSPF S:Static U:Unnumbered +:Leaked route; Cost - Dist/Metric
BGP Codes - i:iBGP e:eBGP
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
DestinationGatewayPortCost Type Uptime
0.0.0.0/0192.168.1.200Ve 100 1/1S0m3s
192.168.1.0/24DIRECT Ve 100 0/0D 5d21h
192.168.1.100/32 DIRECT Ve 100 0/0D5d21h
192.168.2.0/24DIRECT Ve 200 0/0D1d2h
192.168.2.100/32 DIRECT Ve 200 0/0D1d2h



Keep in mind that the Gateway address that will get installed in the routing table is the final destination after all recursive lookups.

In this example, the user hasconfigured a static route to reach the 7.7.7.0/24 network through the next-hop of 192.168.1.200. They also have a static default route configured, with a next hop of 7.7.7.15:

vdx8770-1# show running-config rbridge-id 1 | i route
ip route 0.0.0.0/0 7.7.7.15
ip route 7.7.7.0/24 192.168.1.200


When looking at the routing table, the default route's next hop is shown as 192.168.1.200:
vdx8770-1# sh ip route
Total number of IP routes: 6
Type Codes - B:BGP D:Connected O:OSPF S:Static U:Unnumbered +:Leaked route; Cost - Dist/Metric
BGP Codes - i:iBGP e:eBGP
OSPF Codes - i:Inter Area 1:External Type 1 2:External Type 2 s:Sham Link
DestinationGateway PortCost Type Uptime
0.0.0.0/0 192.168.1.200 Ve 100 1/1 S 0m4s
7.7.7.0/24192.168.1.200 Ve 100 1/1 S 0m19s
192.168.1.0/24DIRECT Ve 100 0/0 D 5d22h
192.168.1.100/32 DIRECT Ve 100 0/0 D 5d22h
192.168.2.0/24DIRECT Ve 200 0/0 D 1d3h
192.168.2.100/32 DIRECT Ve 200 0/0 D 1d3h



The reason for this is that the recursive lookup for 7.7.7.15 shows the next hop is 192.168.1.200. This is the Gateway address that gets installed in the routing table.



Additional notes

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255