02-04-2008 09:49 AM - edited 03-03-2019 08:33 PM
Hi,
can someone provide a sample config to connect 2 routers via basic GRE tunnel using /32 loopback0 src/dst IP addresses and static routing. I want to use this technique to avoid recursive routing loops in future.
I've configured 2 routers to do this using /32 loopback0's for tunnel src/dst addressing and used static routes pointing to the others loopback0 via MPLS. The tunnels on each side are both UP/UP but loopbacks won't route to each other?
Tunnel routes fine when using MPLS IP addressing for tunnel src/dst.
Any help is greatly appreciated.
Many thanks,
D
02-04-2008 10:27 AM
D
Assume this topology for the example:
R1 with loopback 192.168.1.1/32 with interface outbound 1.1.1.1 and next hop of 1.1.1.2. We will create tunnel 0 with ip address 192.168.12.1/30. and then route to the remote loopback over the tunnel.
R2 with loopback 192.168.2.2/32 with interface outbound 2.2.2.1 and next hop of 2.2.2.2. We will create tunnel 0 with ip address 192.168.12.2/30. and then route to the remote loopback over the tunnel.
R1
interface loopback 0
ip address 192.168.1.1 255.255.255.255
interface tunnel 0
ip address 192.168.12.1 255.255.255.252
tunnel source 1.1.1.1
tunnel destination 2.2.2.1
ip route 2.2.2.1 255.255.255.255 1.1.1.2
ip route 192.168.2.2 255.255.255.255 192.168.12.2
R2
interface loopback 0
ip address 192.168.2.2 255.255.255.255
interface tunnel 0
ip address 192.168.12.2 255.255.255.252
tunnel source 2.2.2.1
tunnel destination 1.1.1.1
ip route 1.1.1.1 255.255.255.255 2.2.2.2
ip route 192.168.1.1 255.255.255.255 192.168.12.1
[edit] after posting my response and then re-reading your message I see that I have not answered the question that you are really asking since my tunnel source and destination are not the loopbacks themselves. While I think about creating an example with loopbacks as source and destination, perhaps you can clarify how these routers are connected? I believe that the key difficulty here is that the routers must know how to reach each others loopback interfaces (as tunnel source and destination) without going through the tunnel.
HTH
Rick
02-04-2008 11:19 AM
D
ok, here is my next iteration of an answer. This config will create 2 tunnels using loopbacks as source and destination. It will work if one important assumption is true - and I suspect that the assumption is frequently not true and that is the reason that your attempt to configure this was having problems.
The topology is similar to the previous answer: R1 has loopback 192.168.1.1/32, it will have tunnel 192.168.12.1/30 with loopbacks as source and destination, and will have MPLS next hop address of 1.1.1.2.
R2 has loopback 192.168.2.2/32, it will have tunnel 192.168.12.2/30 with loopbacks as source and destination, and will have MPLS next hop address of 2.2.2.2
Here is the config:
R1
interface loopback 0
ip address 192.168.1.1 255.255.255.255
interface tunnel 0
ip address 192.168.12.1 255.255.255.252
tunnel source 192.168.1.1
tunnel destination 192.168.2.2
ip route 192.168.2.2 255.255.255.255 1.1.1.2
R2
interface loopback 0
ip address 192.168.2.2 255.255.255.255
interface tunnel 0
ip address 192.168.12.2 255.255.255.252
tunnel source 192.168.2.2
tunnel destination 192.168.1.1
ip route 192.168.1.1 255.255.255.255 2.2.2.2
The assumption that must be true is that the loopback interface of the remote router must be known and reachable through the MPLS network. You can not go through the tunnel to reach the loopback if the loopback is the source or destination address. So one significant difference between this answer and the previous answer is that the previous answer included a static route to the loopback through the tunnel. If you want you could add an additional loopback on each router and could then route to the additional loopback through the tunnel.
R1
interface loopback1
ip address 192.168.1.101 255.255.255.255
ip route 192.168.2.202 255.255.255.255 192.168.12.2
R2
interface loopback1
ip address 192.168.2.202 255.255.255.255
ip route 192.168.1.101 255.255.255.255 192.168.12.1
HTH
Rick
02-04-2008 11:30 AM
D
So one way to understand this is to realize that having loopbacks as tunnel source and destination and having loopbacks reachable through the tunnel are mutually exclusive. And to realize that if you configure a static route for the tunnel destination pointing to the MPLS cloud then the tunnel destination (loopback in this case) must be known and reachable through the MPLS cloud.
A good quick check on this (and a very useful part of troubleshooting GRE tunnels) is to do a ping on each router with the ping source specified as the tunnel source on that router and the ping destination specified as the tunnel destination on the other router.
HTH
Rick
02-06-2008 06:22 AM
Rick, thanks very much for your response.
I think this is the interesting point:
"having loopbacks as tunnel source and destination and having loopbacks reachable through the tunnel are mutually."
So if I understand what you're saying. I need secondary loopbacks on both routers to communicate over a tunnel which are using their primary loopbacks for tunnel src/dst addressing.
Thanks,
D
02-06-2008 07:51 PM
D
I believe that is a correct interpretation. The tunnel destination should not be an address that is advertised as reachable through the tunnel.
HTH
Rick
02-07-2008 06:07 AM
Rick,
I will test this out at this weekend on a test rig and report back findings.
Thanks,
D
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: