Two sites, two switches, and issue setting up RIP

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • (Edited)
We have two sites with two Summit switches at each.  We had a MPLS connection between the two sites and have since added a direct point to point (P2P) connection between the two locations.  What we want to do it to configure the network so that all traffic between these sites will default to using the P2P connection and fail over to the MPLS is necessary.  We don't believe our license allows for the use of OSPF, so we decided to attempt to implement RIP.  We configured RIP to only export "direct routes".  Things seem to be going well, but there is a route in each site that for some reason will not become the default and we don't know why:


Related routes at one end (172.22.16.5 is the MPLS router at the site and 172.19.1.1 is the P2P address at the far end of the P2P)
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#s   172.22.62.0/20     172.22.16.5     2    UG---S-um--f- Internal_Appliances 0d:0h:40m:13s
 r   172.22.62.0/20     172.19.1.1      2    UG-D---um---- P2P_Express 0d:1h:56m:37s
#s   201.133.58.0/24    172.22.16.5     1    UG---S-um--f- Internal_Appliances 0d:2h:3m:4s
#r   201.133.58.64/26   172.19.1.1      2    UG-D---um--f- P2P_Express 0d:1h:56m:37s


Related routes at the other end (172.22.62.3 is the MPLS router at the site and 172.19.1.14 is the P2P address at the far end of the P2P):
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#s   144.202.234.0/24   172.22.62.3     1    UG---S-um--f- Default    775d:17h:39m:55s
#r   144.202.234.128/25 172.19.1.14     2    UG-D---um--f- P2P_Express 0d:2h:9m:37s
#s   172.22.16.0/20     172.22.62.3     1    UG---S-um--f- Default    0d:1h:55m:38s
 r   172.22.16.0/20     172.19.1.14     2    UG-D---um---- P2P_Express 0d:2h:9m:38s

Why is it that the one route acquired by rip became the "Preferred unicast and multicast route" but the other one did not?  Is the issue because there is already a statically defined route for that network and static routes take precedence over RIP imported routes?
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Stephen,

From EXOS User Guide:

Multiple Routes
When there are multiple, conflicting choices of a route to a particular destination, the router picks the route with the longest matching network mask. If these are still equal, the router picks the route using the following default criteria (in the order specified):
• Directly attached network interfaces
• Static routes
• ICMP redirects
• Dynamic routes
• Directly attached network interfaces that are not active.


In the first case, the static route and the dynamic route to 172.22.62.0/20 have the same cost, so the precedence rule dictates that the static route will be the one chosen as active.

The second RIP route is active even though it has a higher cost, because it is MORE SPECIFIC (/26) than the static route (/24). That means that all traffic to 201.133.58.0/24 will use the static route EXCEPT traffic destined to 201.133.58.64/26, that will use the dynamic route.

In the second case, the cost of the static route to 172.122.16.0 is LOWER than the dynamic route, so it will be preferred.

Again, the second RIP route is active even though it has a higher cost, because it is MORE SPECIFIC (/25) than the static route (/24). That means that all traffic to 144.202.234.0/24 will use the static route EXCEPT traffic destined to 144.202.234.128/25, that will use the dynamic route.

If you want your dynamic routes (RIP) to have precedence, you have to increase the cost of the static routes using the metric keyword.

configure iproute add [ipNetmask | ip_addr mask] gateway {bfd} {metric} {multicast | multicast-only | unicast | unicast-only} {vlan egress_vlan} {vr vrname}
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
When I attempt to issue the command "enable rip export direct cost" with either a "0" or "1" as the value for the metric, the rip routes still get exported as having a metric of "2".  Is there any way around that, or do I just deal with it and then assign the static routes a value of "3" or higher?
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Change the cost of the static routes so it is higher than the cost of the RIP routes.
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
I just tried it with no change:

#s   172.22.62.0/20     172.22.16.5     3    UG---S-um--f- Internal_Appliances 0d:0h:3m:13s
 r   172.22.62.0/20     172.19.1.1      2    UG-D---um---- P2P_Express 0d:4h:35m:12s
(Edited)
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Can you post the whole routing table, including direct interfaces?
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
The one end:
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#s   Default Route      172.22.62.11    1    UG---S-um--f- Default    729d:18h:53m:18s
#s   61.254.101.100/32  172.22.62.30    1    UG---S-um--f- Default    775d:20h:32m:20s
#s   61.254.101.101/32  172.22.62.31    1    UG---S-um--f- Default    775d:20h:32m:9s
#s   61.254.101.104/32  172.22.62.251   1    UG---S-um--f- Default    307d:1h:9m:16s
#s   62.41.11.112/30    172.22.62.3     1    UG---S-um--f- Default    775d:20h:31m:41s
#s   141.206.228.0/26   172.22.62.3     1    UG---S-um--f- Default    737d:19h:29m:40s
#s   141.206.234.0/24   172.22.62.3     1    UG---S-um--f- Default    775d:20h:30m:8s
#r   141.206.234.128/25 172.19.1.14     2    UG-D---um--f- P2P_Express 0d:0h:16m:54s
#s   170.140.183.112/29 172.22.62.251   1    UG---S-um--f- Default    19d:2h:38m:37s
#d   172.19.1.0/28      172.19.1.1      1    U------um--f- P2P_Express 33d:0h:47m:28s
#s   172.19.6.0/24      172.22.62.3     1    UG---S-um--f- Default    775d:20h:30m:0s
#s   172.19.7.0/24      172.22.62.3     1    UG---S-um--f- Default    775d:20h:29m:51s
#s   172.19.9.0/24      172.22.62.251   1    UG---S-um--f- Default    285d:1h:42m:24s
#s   172.22.0.0/20      172.22.62.3     1    UG---S-um--f- Default    775d:20h:29m:13s
#s   172.22.16.0/20     172.22.62.3     1    UG---S-um--f- Default    0d:4h:45m:50s
 r   172.22.16.0/20     172.19.1.14     2    UG-D---um---- P2P_Express 0d:4h:59m:50s
#s   172.22.32.0/20     172.22.62.3     1    UG---S-um--f- Default    775d:20h:28m:50s
#d   172.22.62.0/20     172.22.62.1     1    U------um--f- Default    729d:14h:53m:11s
#s   172.22.112.0/20    172.22.62.3     1    UG---S-um--f- Default    775d:20h:28m:31s
#s   172.22.226.0/24    172.22.62.3     1    UG---S-um--f- Default    775d:20h:30m:17s
#d   201.64.34.64/26   201.64.34.65   1    U------um--f- Servers    729d:19h:1m:51s
#s   201.64.34.128/26  172.22.62.251   1    UG---S-um--f- Default    74d:0h:15m:54s
#s   207.87.151.72/30   172.22.62.3     1    UG---S-um--f- Default    775d:20h:31m:57s
#s   216.30.60.204/30   172.22.62.3     1    UG---S-um--f- Default    775d:20h:31m:32s
#s   216.149.31.92/30   172.22.62.3     1    UG---S-um--f- Default    775d:20h:31m:20s
The other end:
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#s   Default Route      172.22.16.11    1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   61.254.108.128/25  172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   62.41.11.112/30    172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#d   141.206.234.128/25 141.206.234.129 1    U------um--f- Routable   289d:10h:46m:51s
#s   141.206.238.157/32 172.22.16.11    1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#d   172.19.1.0/28      172.19.1.14     1    U------um--f- P2P_Express 33d:1h:24m:22s
#s   172.19.6.0/24      172.22.16.15    1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   172.19.8.0/24      172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   172.19.9.0/24      172.22.16.5     1    UG---S-um--f- Internal_Appliances 285d:8h:19m:36s
#s   172.22.0.0/20      172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#d   172.22.16.0/20     172.22.16.1     1    U------um--f- Internal_Appliances 289d:10h:46m:51s
#s   172.22.32.0/20     172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   172.22.62.0/20     172.22.16.5     3    UG---S-um--f- Internal_Appliances 0d:0h:7m:9s
 r   172.22.62.0/20     172.19.1.1      2    UG-D---um---- P2P_Express 0d:4h:39m:8s
#s   172.22.112.0/20    172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   172.22.226.0/24    172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   201.64.34.0/24    172.22.16.5     1    UG---S-um--f- Internal_Appliances 0d:4h:45m:35s
#r   201.64.34.64/26   172.19.1.1      2    UG-D---um--f- P2P_Express 0d:0h:5m:0s
#s   207.87.151.72/30   172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   216.30.60.204/30   172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
#s   216.149.31.92/30   172.22.16.5     1    UG---S-um--f- Internal_Appliances 289d:10h:44m:17s
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Stephen,

I'm sorry. I made a mistake. I can only say in my defense that today is Monday...

Your problem is the PRIORITY of the route origin and that is not solved by changing costs.

Each route origin has a certain relative priority.


Static has a higher priority than RIP so a static route will ALWAYS be preferred over RIP routes, no matter the cost.

The command to change the PRIORITY of route origin is:
configure iproute {ipv4} priority [blackhole | bootp | ebgp | ibgp | icmp | isis | isis-level-1 | isis-level-1-external | isis-level-2 | isis-level-2-external | mpls | ospf-as-external | ospf-extern1 | ospf-extern2 | ospf-inter | ospf-intra | rip | static] priority {vr vrname} 

However,THIS IS NOT RECOMMENDED. The documentation says:

Although these priorities can be changed, do not attempt any manipulation unless you are expertly
familiar with the possible consequences. If you change the route priority, you must save the configuration and reboot the system.
Note
The priority for a blackhole route cannot overlap with the priority of any other route origin.
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
So I guess there is no way to do what we want (without changing settings that aren't recommended to be changed) unless we change our static routes to point to the other end of the dedicated P2P line and then let the router create RIP routes for the MPLS connection?
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Stephen,

You have two vlans through which the networks can be reached: the one that connects to MPLS and the one that connects to P2P. Why don't you simply enable RIP in both of them and forget about static routes?

RIP lets you change the cost of routes received through a vlan with the command:
configure rip vlan [vlan_name | all] cost cost

The cost you configure is added to the cost of the route. So, if your preferred route is through the P2P link, you should increase the cost of the vlan that connects to the MPLS link in both switches. Since the default cost is 1, using 2 should be enough.
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
And we would only need to enable RIP on the VLAN connected to the MPLS link and the one connected to the P2P, correct?

If that is the case and I have enabled RIP on those two VLANs, then when I remove the static route listed below, the RIP one should take over and then a new one will also appear that will basically take the place of the existing static but it will be a RIP advertised one?


#s   172.22.62.0/20     172.22.16.5     3    UG---S-um--f- Internal_Appliances 0d:0h:7m:9s
 r   172.22.62.0/20     172.19.1.1      2    UG-D---um---- P2P_Express 0d:4h:39m:8s
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
When you remove the static route you should only see the preferred route. If that preferred route disappears, the secondary route will appear in the routing table.

An example:
Preferred route available
lab9.sw0.2 # sh ipr
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#d   10.0.0.0/24        10.0.0.1        1    U------um--f- r0         0d:0h:2m:29s
#r   10.1.0.0/24        192.168.2.1     2    UG-D---um--f- l2         0d:0h:0m:1s
#d   192.168.1.0/24     192.168.1.2     1    U------um--f- l1         0d:0h:2m:29s
#d   192.168.2.0/24     192.168.2.2     1    U------um--f- l2         0d:0h:2m:29s

Preferred route not available
lab9.sw0.2 # sh ipr
Ori  Destination        Gateway         Mtr  Flags         VLAN       Duration
#d   10.0.0.0/24        10.0.0.1        1    U------um--f- r0         0d:0h:2m:25s
#r   10.1.0.0/24        192.168.1.1     3    UG-D---um--f- l1         0d:0h:0m:58s
#d   192.168.1.0/24     192.168.1.2     1    U------um--f- l1         0d:0h:2m:25s
#d   192.168.2.0/24     192.168.2.2     1    U------um--f- l2         0d:0h:2m:25s
Photo of Stephen Stormont

Stephen Stormont

  • 822 Points 500 badge 2x thumb
So we should not expect to see all routes in the table at once, correct?  For instance, using your example, we shouldn't expect to see one entry for a learned RIP route that is preferred and another RIP route waiting in standby?

#r   10.1.0.0/24        192.168.2.1     2    UG-D---um--f- l2         0d:0h:0m:1s
  r   10.1.0.0/24        192.168.1.1     3    UG-D---um--f- l1         0d:0h:0m:58s

If we shouldn't see anything like that via "show iproute", should we at least see all of the RIP routes (active or not) when issuing "show rip routes"?