(Junos) GRE Configuration Example
(Junos) GRE Configuration Example
Description
Solution
This section contains the following:
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 1 of 6
[Junos] GRE Configuration Example 05/06/24, 9:35 PM
Topology
[edit interfaces]
root@SRX-1# show
ge-0/0/0 {
unit 0 {
family inet {
address 10.10.11.1/24;
}
}
}
gr-0/0/0 {
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 2 of 6
[Junos] GRE Configuration Example 05/06/24, 9:35 PM
unit 0 {
tunnel {
source 192.168.1.2;
destination 192.168.1.1;
}
family inet {
address 172.16.0.9/30;
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 172.16.0.2/30;
}
}
}
root@SRX-1# show
zones {
security-zone trust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
gr-0/0/0.0; <<< Add the interface to the appropriate security zone.
}
}
}
If you do not want to define a static route, OSPF or any routing protocol
can be configured between the interfaces.
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 3 of 6
[Junos] GRE Configuration Example 05/06/24, 9:35 PM
[edit protocols]
root@SRX-1# show
ospf {
area 0.0.0.0 {
interface ge-0/0/0.0;
interface gr-0/0/0.0 {
passive;
}
}
}
[edit]
root@SRX-1> show route 10.10.10.0/24
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.0/24 *[Static/5] 00:22:32
> via gr-0/0/0.
[edit]
[edit]
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 4 of 6
[Junos] GRE Configuration Example 05/06/24, 9:35 PM
Logical interface gr-0/0/0.0 (Index 72) (SNMP ifIndex 28) (Generation 17)
Flags: Point-To-Point SNMP-Traps 16384
IP-Header 10.1.1.2:10.1.1.1:47:df:64:0000000000000000
Encapsulation: GRE-NULL
Traffic statistics:
Input bytes : 8400
Output bytes : 8400
Input packets: 100
Output packets: 100
Local statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Transit statistics:
Input bytes : 8400 0 bps
Output bytes : 8400 0 bps
Input packets: 100 0 pps
Output packets: 100 0 pps
Protocol inet, MTU: 1476, Generation: 25, Route table: 0
Flags: None
Addresses, Flags: Is-Primary
Destination: Unspecified, Local: 100.1.1.1, Broadcast: Unspecified,
Generation: 30
Modification History
Related Information
Sometimes GRE Tunnel does not pass any traffic after a reboot .The
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 5 of 6
[Junos] GRE Configuration Example 05/06/24, 9:35 PM
https://supportportal.juniper.net/s/article/Junos-GRE-Configuration-Example?language=en_US Page 6 of 6