Select Page

GRE TunneL

GRE Tunnel Configuration in JunOS

In this lab, no special configuration beyond device initialization is required.

LAB:

** GRE Tunnel b/w R1 & R2 and LAN PC4/5 communication using OSPF.

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R1
set system root-authentication encrypted-password “$1$rTWehPx5$nPL42fpA35Hbj0OeUeVoX0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.1/24
set interfaces ge-0/0/1 unit 0 family inet address 203.0.11.2/30
set interfaces gr-0/0/10 unit 0 description GRE-Tunnel
set interfaces gr-0/0/10 unit 0 tunnel source 203.0.11.2
set interfaces gr-0/0/10 unit 0 tunnel destination 203.0.11.6
set interfaces gr-0/0/10 unit 0 family inet address 10.1.1.1/30
set routing-options static route 0.0.0.0/0 next-hop 203.0.11.1
set protocols ospf area 0.0.0.0 interface gr-0/0/10.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R2
set system root-authentication encrypted-password “$1$rTWehPx5$nPL42fpA35Hbj0OeUeVoX0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
set interfaces ge-0/0/2 unit 0 family inet address 203.0.11.6/30
set interfaces gr-0/0/10 unit 0 description GRE-Tunnel
set interfaces gr-0/0/10 unit 0 tunnel source 203.0.11.6
set interfaces gr-0/0/10 unit 0 tunnel destination 203.0.11.2
set interfaces gr-0/0/10 unit 0 family inet address 10.1.1.2/30
set routing-options static route 0.0.0.0/0 next-hop 203.0.11.5
set protocols ospf area 0.0.0.0 interface gr-0/0/10.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name ISP
set system root-authentication encrypted-password “$1$rTWehPx5$nPL42fpA35Hbj0OeUeVoX0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/1 unit 0 family inet address 203.0.11.1/30
set interfaces ge-0/0/2 unit 0 family inet address 203.0.11.5/30

— R1:

set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.1/24
set interfaces ge-0/0/1 unit 0 family inet address 203.0.11.2/30
set interfaces gr-0/0/10 unit 0 description GRE-Tunnel
set interfaces gr-0/0/10 unit 0 tunnel source 203.0.11.2
set interfaces gr-0/0/10 unit 0 tunnel destination 203.0.11.6
set interfaces gr-0/0/10 unit 0 family inet address 10.1.1.1/30
set routing-options static route 0.0.0.0/0 next-hop 203.0.11.1
set protocols ospf area 0.0.0.0 interface gr-0/0/10.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0

— R2:

set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
set interfaces ge-0/0/2 unit 0 family inet address 203.0.11.6/30
set interfaces gr-0/0/10 unit 0 description GRE-Tunnel
set interfaces gr-0/0/10 unit 0 tunnel source 203.0.11.6
set interfaces gr-0/0/10 unit 0 tunnel destination 203.0.11.2
set interfaces gr-0/0/10 unit 0 family inet address 10.1.1.2/30
set routing-options static route 0.0.0.0/0 next-hop 203.0.11.5
set protocols ospf area 0.0.0.0 interface gr-0/0/10.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0

PC4> ping 192.168.1.2

84 bytes from 192.168.1.2 icmp_seq=1 ttl=62 time=6.279 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=62 time=4.062 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=62 time=3.544 ms
^C
PC4> trace 192.168.1.2
trace to 192.168.1.2, 8 hops max, press Ctrl+C to stop
1 172.16.1.1 1.371 ms 0.696 ms 0.924 ms
2 10.1.1.2 5.620 ms 3.640 ms 2.851 ms
3 *192.168.1.2 3.155 ms (ICMP type:3, code:3, Destination port unreachable)

PC4> ping 10.1.1.2

84 bytes from 10.1.1.2 icmp_seq=1 ttl=63 time=3.841 ms
84 bytes from 10.1.1.2 icmp_seq=2 ttl=63 time=3.947 ms
84 bytes from 10.1.1.2 icmp_seq=3 ttl=63 time=3.930 ms
84 bytes from 10.1.1.2 icmp_seq=4 ttl=63 time=3.897 ms
^C
PC4> trace 10.1.1.2
trace to 10.1.1.2, 8 hops max, press Ctrl+C to stop
1 172.16.1.1 0.969 ms 0.819 ms 0.678 ms
2 *10.1.1.2 3.456 ms (ICMP type:3, code:3, Destination port unreachable)

Share on print
Print
Share on google
Google+
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

The Juniper All-Access | Reading List

Leave a reply

Your email address will not be published. Required fields are marked *

ADENTECH guides

We love to help.

Get our newsletter, join the community: