Search Posts

Tunnel and OSPF

Here an example of 1 corporate router with connections to 3 branche routers. Each connection is with a serial interface. The routing is done with OSPF.
The example is created with Cisco Packet Tracer.

Partial running-config of CORP

CORP#
!
OUTPUT OMITTED
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Tunnel0
 ip address 10.0.10.1 255.255.255.252
 mtu 1476
 tunnel source Serial1/0
 tunnel destination 194.178.28.2
!
interface Tunnel1
 ip address 10.0.10.5 255.255.255.252
 mtu 1476
 tunnel source Serial1/1
 tunnel destination 194.178.28.6
!
interface Tunnel2
 ip address 10.0.10.9 255.255.255.252
 mtu 1476
 tunnel source Serial1/2
 tunnel destination 194.178.28.10
!
interface FastEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
OUTPUT OMITTED
!
interface Serial1/0
 ip address 194.178.28.1 255.255.255.252
 clock rate 2000000
!
interface Serial1/1
 ip address 194.178.28.5 255.255.255.252
 clock rate 2000000
!
interface Serial1/2
 ip address 194.178.28.9 255.255.255.252
 clock rate 2000000
!
OUTPUT OMITTED
!
router ospf 1
 network 192.168.10.0 0.0.0.255 area 0
 network 10.0.0.0 0.255.255.255 area 0
 network 192.168.20.0 0.0.0.255 area 0
 network 192.168.30.0 0.0.0.255 area 0
!
OUTPUT OMITTED
!
CORP#

Partial running-config of BR1

BR1#
!
OUTPUT OMITTED
!
interface Loopback0
 ip address 2.1.1.1 255.255.255.0
!
interface Tunnel0
 ip address 10.0.10.2 255.255.255.252
 mtu 1476
 tunnel source Serial1/0
 tunnel destination 194.178.28.1
!
interface FastEthernet0/0
 ip address 192.168.20.1 255.255.255.0
 duplex auto
 speed auto
!
OUTPUT OMITTED
!
interface Serial1/0
 ip address 194.178.28.2 255.255.255.252
!
OUTPUT OMITTED
!
router ospf 1
 network 10.0.0.0 0.255.255.255 area 0
 network 192.168.20.0 0.0.0.255 area 0
!
OUTPUT OMITTED
!
BR1#

Partial running-config of BR2

BR2#
!
interface Loopback0
 ip address 2.1.1.2 255.255.255.0
!
interface Tunnel1
 ip address 10.0.10.6 255.255.255.252
 mtu 1476
 tunnel source Serial1/0
 tunnel destination 194.178.28.5
!
interface FastEthernet0/0
 ip address 192.168.30.1 255.255.255.0
 duplex auto
 speed auto
!
OUTPUT OMITTED
!
interface Serial1/0
 ip address 194.178.28.6 255.255.255.252
!
OUTPUT OMITTED
!
router ospf 1
 network 192.168.30.0 0.0.0.255 area 0
 network 10.0.0.0 0.255.255.255 area 0
!
OUTPUT OMITTED
!
BR2#

Partial running-config of BR3

BR3#
!
OUTPUT OMITTED
!
interface Loopback0
 ip address 2.1.1.3 255.255.255.0
!
interface Tunnel2
 ip address 10.0.10.10 255.255.255.252
 mtu 1476
 tunnel source Serial1/0
 tunnel destination 194.178.28.9
!
interface FastEthernet0/0
 ip address 192.168.40.1 255.255.255.0
 duplex auto
 speed auto
!
OUTPUT OMITTED
!
interface Serial1/0
 ip address 194.178.28.10 255.255.255.252
!
OUTPUT OMITTED
!
router ospf 1
 network 192.168.40.0 0.0.0.255 area 0
 network 10.0.0.0 0.255.255.255 area 0
!
OUTPUT OMITTED
!
BR3#

show ip ospf neighbor (all 4 routers)

CORP#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.1.1.1           0   FULL/  -        00:00:36    10.0.10.2       Tunnel0
2.1.1.2           0   FULL/  -        00:00:32    10.0.10.6       Tunnel1
2.1.1.3           0   FULL/  -        00:00:34    10.0.10.10      Tunnel2

BR1#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:00:35    10.0.10.1       Tunnel0

BR2#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:00:34    10.0.10.5       Tunnel1

BR3#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:00:32    10.0.10.9       Tunnel2

show ip route (corp router)

CORP#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     10.0.0.0/30 is subnetted, 3 subnets
C       10.0.10.0 is directly connected, Tunnel0
C       10.0.10.4 is directly connected, Tunnel1
C       10.0.10.8 is directly connected, Tunnel2
C    192.168.10.0/24 is directly connected, FastEthernet0/0
O    192.168.20.0/24 [110/1001] via 10.0.10.2, 00:02:23, Tunnel0
O    192.168.30.0/24 [110/1001] via 10.0.10.6, 00:02:23, Tunnel1
O    192.168.40.0/24 [110/1001] via 10.0.10.10, 00:02:23, Tunnel2
     194.178.28.0/30 is subnetted, 3 subnets
C       194.178.28.0 is directly connected, Serial1/0
C       194.178.28.4 is directly connected, Serial1/1
C       194.178.28.8 is directly connected, Serial1/2