Showing posts with label tunneling. Show all posts
Showing posts with label tunneling. Show all posts

Sunday, February 2, 2014

Answer to Puzzle #1

Previously, I had posted a puzzle:
http://ephemeralportal.blogspot.jp/2014/02/tunnel-puzzle-find-what-is-broken.html

First the easier part, what is happening? what can you do to fix the issue?

In this example, the network administrator who configured used several bad practices.  The big one that hit him was that he included the tunnel endpoints in the routing process.  The network statement "network 12.0.0.0 0.255.255.255 area 0" allowed OSPF to advertise the loopback address to the router on the other side.  If you would have had access to the logs in R1.  You would have seen:

%OSPF-5-ADJCHG: Process 1, Nbr 12.43.78.141 on Tunnel0 from LOADING to FULL, Loading Done
%TUN-5-RECURDOWN: Tunnel0 temporarily disabled due to recursive routing
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to down
%OSPF-5-ADJCHG: Process 1, Nbr 12.43.78.141 on Tunnel0 from FULL to DOWN, Neighbor Down: Interface down or detached

So as soon as the tunnel came up, OSPF formed an adjacency to the router on the other side of the tunnel.  It then advertised the loopback address to the other router.  This is a problem, because it is recursive routing.  The route for the other side of the tunnel must go over the transport network and not the tunnel or it will have no way to route the tunnel packets.  The router discovered this error and disabled the tunnel interface.

So our fix is to remove the network statement for the 12.0.0.0 network.

router ospf 1
  no network 12.0.0.0 0.255.255.255 area 0


In addition changing the static routes from a /30 to the /32 for the loopbacks would also fix the issue. This is a recommended practice along with the removal of the unnecessary network statement for the 12 network shown above.

The other part is a little more difficult, and is probably the question his boss will ask, why did this problem start when OSPF was introduced and not with EIGRP?  The answer lies in the mask used for the loopback.  Rather than using a /32, the network administrator used a /30, and made similar static routes over the transport network.  When EIGRP was implemented, EIGRP advertised the /30 network; the administrative distance of EIGRP, 90, was higher than the static routes created of 1 and 2 so the EIGRP advertisement was not put into the routing table.  With OSPF, all advertisements for loopback interfaces are always a /32, even if /30 is configured on the interface.  So it did not matter if the administrative distance of the static was lower, the OSPF route was most specific and the process would try to add the route to the routing table, creating a recursive routing error.

Additional:

OSPF loopback behavior can be changed:
http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a0080094704.shtml#qone

I have written a follow on article outlining a better way to configure the routers in this scenario.
http://ephemeralportal.blogspot.jp/2014/02/scenario-from-puzzle-1-configured-in.html

Saturday, February 1, 2014

Puzzle #1 - Find what is broken - Dealing with tunnels

It seems like everyone likes puzzles, so I thought I would make one.

The diagram below indicates a network where users on router 1 connect to the servers on router 2 via a transport network.


Router 1 and Router 2 had an EIGRP neighbor adjacency using EIGRP and everything was working fine, however, in an effort to move to open standards a similar configuration with OSPF was implemented.  Now, tunnel 0 will not stay up.

The current configurations for R1 and R2 are below.


!!!R1
!
hostname R1
!
!
logging buffered 4096 informational
!
interface Tunnel0
 description ***TUNNEL TO R2***
 ip address 172.18.1.1 255.255.255.252
 tunnel source Loopback0
 tunnel destination 12.43.78.141
!
interface Loopback0
 ip address 12.43.78.129 255.255.255.252
!
interface FastEthernet0/0
 description ***USER NETWORK***
 ip address 172.17.51.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 description ***TRANSPORT LINK1***
 ip address 12.43.78.122 255.255.255.252
 clock rate 2000000
!
!
interface Serial0/1
 description ***TRANSPORT LINK2***
 ip address 12.43.78.126 255.255.255.252
 clock rate 2000000
!
router ospf 1
 log-adjacency-changes
 passive-interface default
 no passive-interface Tunnel0
 network 12.0.0.0 0.255.255.255 area 0
 network 172.16.0.0 0.15.255.255 area 0
!
ip route 12.43.78.140 255.255.255.252 12.43.78.121 name R2_LOOPBACK_NETWORK
ip route 12.43.78.140 255.255.255.252 12.43.78.125 2 name R2_LOOPBACK_NETWORK



!!R2
!
hostname R2
!
!
logging buffered 4096 informational
!
interface Tunnel0
 description ***TUNNEL TO R1***
 ip address 172.18.1.2 255.255.255.252
 tunnel source Loopback0
 tunnel destination 12.43.78.129
!
interface Loopback0
 ip address 12.43.78.141 255.255.255.252
!
interface FastEthernet0/0
 description ***SERVER NETWORK***
 ip address 172.17.100.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 description ***TRANSPORT LINK1***
 ip address 12.43.78.134 255.255.255.252
 clock rate 2000000
!
!
interface Serial0/1
 description ***TRANSPORT LINK2***
 ip address 12.43.78.138 255.255.255.252
 clock rate 2000000
!
router ospf 1
 log-adjacency-changes
 passive-interface default
 no passive-interface Tunnel0
 network 12.0.0.0 0.255.255.255 area 0
 network 172.16.0.0 0.15.255.255 area 0
!
ip route 12.43.78.128 255.255.255.252 12.43.78.133 name R1_LOOPBACK_NETWORK
ip route 12.43.78.128 255.255.255.252 12.43.78.137 2 name R1_LOOPBACK_NETWORK

The EIGRP configuration that was working is below.

!old eigrp section
router eigrp 1
 passive-interface default
 no passive-interface Tunnel0
 network 12.0.0.0
 network 172.16.0.0 255.240.0.0
 no auto-summary

Additionally, the routers can easily ping each other via their loopback addresses that are used for the tunnels.


R1#ping 12.43.78.141 source 12.43.78.129

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.43.78.141, timeout is 2 seconds:
Packet sent with a source address of 12.43.78.129
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/43/76 ms

Why did this tunnel start failing when OSPF was introduced?  What can be done to fix the issue?