Scheme:
We have two end points and three ISP’s (R2,R3, R4) in between the router R1 and R5. We need to move traffic between R1 and R5 in such away so that traffic from R1 to R5 should not be monitored when passing through ISP’s in between. To achieve this purpose we need tunneling concept through which we can easily move packets back and forth in an efficient and private manner without being noticed by the providers in between the two end points. Today we will use GRE tunnel which is very simple to create and yet very efficient. To create GRE tunnel decide the source and destination points in such way so that the source ip address or interface from R1 should be destination interface from R5 perspective and vice versa. For Source and destination we can either use loopback interfaces or the real physical interfaces. One important point to note that we will also create a virtual Tunnel interface on both tunnel ends and assign them with IP addresses both the IP addresses assigned to the tunnel interfaces should be on the same subnet so that when traffic will pass through in between R2, R3 and R4 then it will consider it as only one hop away from R1 to R5. Also we need to create the ip route for specific tunnel traffic to forward from both R1 and R5. OK, no worries as the process will be much simpler once I will show you the configuration and then we will verify our traffic transport as well.
Bullets
- Establish connectivity between all routers by routing protocol (we used EIGRP).
- Create Tunnel interface R1 and R5 and should be on same subnet.
- Create Tunnel source on each desired router to be in the tunnel.
- Create Tunnel destination on each desired router to be in the tunnel.
- Create IP route to forward tunnel traffic immediately to the outside interface of tunneling routers.
Configuration:
R1
interface Tunnel15
ip address 192.168.1.1 255.255.255.0
tunnel source FastEthernet0/0
tunnel destination 172.16.2.1
!
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
network 172.16.0.0
network 192.168.1.0
no auto-summary
!
ip route 172.16.2.0 255.255.255.0 FastEthernet0/0
!
R2
interface FastEthernet0/0
ip address 172.16.1.2 255.255.255.0
!
interface FastEthernet1/0
ip address 1.1.1.1 255.255.255.0
!
router eigrp 100
network 1.0.0.0
network 172.16.0.0
no auto-summary
!
R3
interface FastEthernet0/0
ip address 2.2.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 1.1.1.2 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
network 1.0.0.0
network 2.0.0.0
no auto-summary
!
R4
interface FastEthernet0/0
ip address 172.16.2.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 2.2.2.2 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
network 2.0.0.0
network 172.16.0.0
no auto-summary
!
R5
!
interface Tunnel 15
ip address 192.168.1.2 255.255.255.0
tunnel source FastEthernet0/0
tunnel destination 172.16.1.1
!
interface FastEthernet0/0
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
!
router eigrp 100
network 172.16.0.0
network 192.168.1.0
no auto-summary
!
ip route 172.16.1.0 255.255.255.0 FastEthernet0/0
!
Verification:
Verify the tunnel source and destination IP addresses.
R1#show interface tunnel 15
Tunnel15 is up, line protocol is up
Hardware is Tunnel
Internet address is 192.168.1.1/24
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 172.16.1.1 (FastEthernet0/0), destination 172.16.2.1
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:02, output 00:00:02, output hang never
Last clearing of “show interface” counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
66 packets input, 5688 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
68 packets output, 5876 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
Verify how many hops in between the Tunnel to reach the other end and you will see it is only one hop away and will not show the in between routers (R2, R3, R4)
R1#trace 192.168.1.2
Type escape sequence to abort.
Tracing the route to 192.168.1.2
1 192.168.1.2 468 msec 492 msec *
Check how many routes are directly connected.
(Note that 172.16.2.0 is not directly connected at this time but later we will create the static route.)
R1#show ip route
Codes: C – connected, S – static, 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
i – IS-IS, su – IS-IS summary, 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/24 is subnetted, 1 subnets
D 1.1.1.0 [90/30720] via 172.16.1.2, 00:06:31, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/33280] via 172.16.1.2, 00:06:31, FastEthernet0/0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
D 172.16.2.0 [90/35840] via 172.16.1.2, 00:06:31, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Tunnel15
R1#
Add more security by creating static route to immediately forward packets destined for tunnel (172.16.2.0 network) to the f0/0 interface of R1 Tunnel router.
R1#conf t
R1(config)#ip route 172.16.2.0 255.255.255.0 f0/0
R1(config)#end
R1#
We can see 172.16.2.0 after creating static route to forward tunnel packets it is now directly connected in our ip route.
R1#show ip route
Codes: C – connected, S – static, 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
i – IS-IS, su – IS-IS summary, 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/24 is subnetted, 1 subnets
D 1.1.1.0 [90/30720] via 172.16.1.2, 00:08:17, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/33280] via 172.16.1.2, 00:08:17, FastEthernet0/0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
S 172.16.2.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Tunnel15
R1#
Repeat the same process to the other end of Tunnel which is R5 and create an static route to forward 172.16.1.0 tunnel destined traffic to the exit interface of R5 tunnel router.
R5(config)#ip route 172.16.1.0 255.255.255.0 f0/0
R5(config)#end
R5#
We can see below the ip route where 172.16.1.0 is now directly connected in our R5 ip route. (Tunnel router)
R5#show ip route
Codes: C – connected, S – static, 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
i – IS-IS, su – IS-IS summary, 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/24 is subnetted, 1 subnets
D 1.1.1.0 [90/33280] via 172.16.2.2, 00:11:50, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/30720] via 172.16.2.2, 00:11:50, FastEthernet0/0
172.16.0.0/24 is subnetted, 2 subnets
S 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Tunnel15
R5#




