Professional Documents
Culture Documents
Lets try to configure GRE tunnel between labnario_1 and labnario_3. All packets sent from
PC_1 to PC_2 and vice versa will be transmitted through the GRE tunnel.
Create a tunnel interface with tunnel-protocol as GRE on both labnario_1 and labnario_3
routers. Assign IP address of tunnel interface and IP addresses of tunnels source and
destination:
Configure static routing on labnario_1 and labnario_3 to PC_2 and PC_1 respectively, with
GRE tunnel as outbound interface. This ensures that all traffic directed to those PCs will be
going through GRE tunnel interface.
[labnario_1]display ip routing-table
Route Flags: R - relay, D - download to fib
---------------------------------------------------------------------------
---
Routing Tables: Public
Destinations : 10 Routes : 10
[labnario_3]display ip routing-table
Route Flags: R - relay, D - download to fib
---------------------------------------------------------------------------
---
Routing Tables: Public
Destinations : 10 Routes : 10
PC_1>ping 172.16.10.1 -t
<labnario_1>debugging tunnel ?
all All debugging functions
control Control debugging function
error Error debugging function
keepalive GRE keepalive debugging function
packet Packet debugging function
timer Timer debugging function
Final configs:
sysname labnario_1
#
interface Ethernet0/0/0
ip address 172.16.0.2 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 150.0.0.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 10.0.0.1 255.255.255.0
tunnel-protocol gre
source 150.0.0.1
destination 160.0.0.1
#
ospf 1
area 0.0.0.0
network 150.0.0.0 0.0.0.255
#
ip route-static 172.16.10.0 255.255.255.0 Tunnel0/0/0
sysname labnario_2
#
interface GigabitEthernet0/0/0
ip address 150.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 160.0.0.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 150.0.0.0 0.0.0.255
network 160.0.0.0 0.0.0.255
sysname labnario_3
#
interface Ethernet0/0/0
ip address 172.16.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 160.0.0.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 10.0.0.2 255.255.255.0
tunnel-protocol gre
source 160.0.0.1
destination 150.0.0.1
#
ospf 1
area 0.0.0.0
network 160.0.0.0 0.0.0.255
#
ip route-static 172.16.0.0 255.255.255.0 Tunnel0/0/0