05-07-2018 03:45 PM - edited 03-05-2019 10:24 AM
Hello,
I have a question on dynamic GRE Tunnel Setup that I hope someone can help. The issue is in my tunnel setup, I need the local tunnel's destination on R1 to be whatever IP address that the remote tunnel's source on R4 acquires from its IP DHCP assignment. Refer to the diagram below:
When I configure R1's tunnel destination to be the known IP address assigned to the e0/1 of R4, I can ping R4 Loopback IP address as well as the remote Tunnel's IP address without any issue. My question is if the remote tunnel's source on R4 acquires its IP address from DHCP, is there a way to configure the local tunnel's destination to be that DHCP IP address without knowing it in advance?
Below are the routers' configurations along with the outputs of show commands:
-----------------------------------------------------------------------------------
+ R1
!
hostname R1
!
interface Loopback0
ip address 10.209.147.100 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Tunnel208
description GRE Tunnel between R1 & R4
ip address 10.209.139.206 255.255.255.252
no ip redirects
no ip proxy-arp
ip mtu 1372
ip pim dense-mode
ip tcp adjust-mss 1332
ip ospf 1 area 0
tunnel source Ethernet1/1
tunnel destination 172.16.2.3
!
interface Ethernet1/1
description WAN Connection
ip address 192.168.6.2 255.255.255.252
no ip redirects
no ip proxy-arp
!
router ospf 1
router-id 10.209.147.100
log-adjacency-changes detail
!
ip route 0.0.0.0 0.0.0.0 192.168.6.1
!
R1#
-------------------------------------------------------------------------------------
+ R2
!
hostname R2
!
interface Ethernet0/0
description "Link to R1"
ip address 192.168.6.1 255.255.255.252
no ip redirects
no ip proxy-arp
!
interface Ethernet1/1
description "Link to R3"
ip address 172.16.1.1 255.255.255.0
!
ip route 172.16.2.0 255.255.255.0 172.16.1.2
ip route 192.168.6.0 255.255.255.252 192.168.6.2
!
R2#
---------------------------------------------------------------------------------------
+ R3
!
hostname R3
!
no ip dhcp conflict logging
ip dhcp excluded-address 172.16.2.1 172.16.2.2
!
ip dhcp pool R4
network 172.16.2.0 255.255.255.0
default-router 172.16.2.2
lease 7
!
interface Ethernet0/0
description "Link to R4"
ip address 172.16.2.1 255.255.255.0
!
interface Ethernet1/1
description "Link to R2"
ip address 172.16.1.2 255.255.255.0
!
ip route 192.168.6.0 255.255.255.252 172.16.1.1
!
R3#
-------------------------------------------------------------------------------------
+ R4
!
hostname R4
!
interface Loopback0
ip address 10.209.147.11 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Tunnel208
description GRE Tunnel Between R4 & R1
ip address 10.209.139.205 255.255.255.252
no ip redirects
no ip proxy-arp
ip mtu 1372
ip pim dense-mode
ip tcp adjust-mss 1332
ip ospf 1 area 0
tunnel source Ethernet0/1
tunnel destination 192.168.6.2
tunnel key 208
!
interface Ethernet0/1
description WAN Connection
ip address dhcp
no ip redirects
no ip proxy-arp
!
router ospf 1
router-id 10.209.147.11
log-adjacency-changes detail
!
ip route 0.0.0.0 0.0.0.0 Ethernet0/1
!
R4#
----------------------------------------------------------------------------------------
* R1
R1#sho ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet1/1 192.168.6.2 YES manual up up
Loopback0 10.209.147.100 YES manual up up
Tunnel208 10.209.139.206 YES manual up up
R1#sho int tunnel 208
Tunnel208 is up, line protocol is up
Hardware is Tunnel
Description: GRE Tunnel between R1 & R4
Internet address is 10.209.139.206/30
MTU 17912 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 192.168.6.2 (Ethernet1/1), destination 172.16.2.3
Tunnel Subblocks:
src-track:
Tunnel208 source tracking subblock associated with Ethernet1/1
Set of tunnels with source Ethernet1/1, 1 member (includes iterators), on interface <OK>
Tunnel protocol/transport GRE/IP
Key 0xD0, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255, Fast tunneling enabled
Tunnel transport MTU 1472 bytes
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:01, output 00:00:01, output hang never
Last clearing of "show interface" counters 04:28:41
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
533 packets input, 55734 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
543 packets output, 56634 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
R1#sho ip route
Gateway of last resort is 192.168.6.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.6.1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.209.139.204/30 is directly connected, Tunnel208
L 10.209.139.206/32 is directly connected, Tunnel208
O 10.209.147.11/32 [110/1001] via 10.209.139.205, 00:16:09, Tunnel208
C 10.209.147.100/32 is directly connected, Loopback0
192.168.6.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.6.0/30 is directly connected, Ethernet1/1
L 192.168.6.2/32 is directly connected, Ethernet1/1
R1#sho ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
10.209.147.11 0 FULL/ - 00:00:36 10.209.139.205 Tunnel208
R1#ping 10.209.147.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.209.147.11, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 5/5/7 ms
-----------------------------------------------------------------------------------------------------
R3#sho ip dhcp bind
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
172.16.2.3 0063.6973.636f.2d61. May 14 2018 06:06 PM Automatic
6162.622e.6363.3030.
2e30.3131.302d.4574.
302f.31
------------------------------------------------------------------------------------------------
R4#sho ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/1 172.16.2.3 YES DHCP up up
Loopback0 10.209.147.11 YES manual up up
Tunnel208 10.209.139.205 YES manual up up
R4#sho interfaces tunnel 208
Tunnel208 is up, line protocol is up
Hardware is Tunnel
Description: GRE Tunnel Between R4 & R1
Internet address is 10.209.139.205/30
MTU 17912 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 172.16.2.3 (Ethernet0/1), destination 192.168.6.2
Tunnel Subblocks:
src-track:
Tunnel208 source tracking subblock associated with Ethernet0/1
Set of tunnels with source Ethernet0/1, 1 member (includes iterators), on interface <OK>
Tunnel protocol/transport GRE/IP
Key 0xD0, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255, Fast tunneling enabled
Tunnel transport MTU 1472 bytes
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 04:17:11
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
561 packets input, 58620 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
1852 packets output, 162466 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
R4#sho ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
10.209.147.100 0 FULL/ - 00:00:32 10.209.139.206 Tunnel208
R4#sho ip route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
S* 0.0.0.0/0 is directly connected, Ethernet0/1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.209.139.204/30 is directly connected, Tunnel208
L 10.209.139.205/32 is directly connected, Tunnel208
C 10.209.147.11/32 is directly connected, Loopback0
O 10.209.147.100/32 [110/1001] via 10.209.139.206, 00:18:39, Tunnel208
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.2.0/24 is directly connected, Ethernet0/1
L 172.16.2.3/32 is directly connected, Ethernet0/1
R4#ping 10.209.147.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.209.147.11, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide