...
...
...
...
...
...
Info | ||
---|---|---|
| ||
GRE tunnel is a logical interface created by Linux kernel on software side. Once created, GRE tunnel stays in "UP" state unless it is shut down by CLI command "set l3-interface tunnel xxx disable". For example, as shown in Figure 1, if physical port ge-1/1/1 is down, the underlay routing of the associate GRE tunnel is broken. It is not necessary that tunnel interface (tnl0) should be down. In this case, the state of GRE tunnel is "UP" in the display of show command run show l3-interface tunnel.
|
...
Code Block |
---|
admin@R1# set vlans vlan-id 20 l3-interface "vlan20" admin@R1# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 20 admin@R1# set l3-interface vlan-interface vlan20 address 100.168.3.1 prefix-length 24 |
...
Code Block |
---|
admin@R1# set vlans vlan-id 10 l3-interface "vlan10" admin@R1# set l3-interface vlan-interface vlan10 vrf "vrf1" admin@R1# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 10 admin@R1# set l3-interface vlan-interface vlan10 address 192.168.5.2 prefix-length 24 |
...
Code Block |
---|
admin@R1# set ip routing enable true admin@R1# set ip vrf vrf1 description "orange" |
Step 4. Configure GRE tunnel name, IP, source IP, destination IP etc.
Code Block |
---|
admin@R1# set l3-interface tunnel tnl0 address 100.168.4.1 prefix-length 24 admin@R1# set l3-interface tunnel tnl0 tunnel-mode "gre-ip" admin@R1# set l3-interface tunnel tnl0 source 100.168.3.1 admin@R1# set l3-interface tunnel tnl0 destination 100.168.10.2 admin@R1# set l3-interface tunnel tnl0 vrf "vrf1" |
Step 5: Create static routes for the GRE tunnel.
...
Code Block |
---|
admin@R2# set vlans vlan-id 20 l3-interface "vlan20" admin@R2# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 20 admin@R2# set l3-interface vlan-interface vlan20 address 100.168.10.2 prefix-length 24 |
...
Code Block |
---|
admin@R2# set vlans vlan-id 10 l3-interface "vlan10" admin@R2# set l3-interface vlan-interface vlan10 vrf "vrf1" admin@R2# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 10 admin@R2# set l3-interface vlan-interface vlan10 address 192.168.6.2 prefix-length 24 |
...
Code Block |
---|
admin@R2# set ip routing enable true admin@R2# set ip vrf vrf1 description "orange" |
Step 4. Configure GRE tunnel name, IP, source IP, destination IP etc.
Code Block |
---|
admin@R2# set l3-interface tunnel tnl0 address 100.168.4.2 prefix-length 24 admin@R2# set l3-interface tunnel tnl0 tunnel-mode "gre-ip" admin@R2# set l3-interface tunnel tnl0 source 100.168.10.2 admin@R2# set l3-interface tunnel tnl0 destination 100.168.3.1 admin@R2# set l3-interface tunnel tnl0 vrf "vrf1" |
Step 5: Create static routes for the GRE tunnel.
...
Code Block |
---|
admin@R1# show l3-interface tunnel tnl0 vrf: "vrf1" address 100.168.4.1 { prefix-length: 24 } tunnel-mode: "gre-ip" source: 100.168.3.1 destination: 100.168.10.2 vrf: "vrf1" |
- Similarly on R2, run the same command.
Code Block |
---|
admin@R2# show l3-interface tunnel tnl0 vrf: "vrf1" address 100.168.4.2 { prefix-length: 24 } tunnel-mode: "gre-ip" source: 100.168.10.2 destination: 100.168.3.1 vrf: "vrf1" |
- Check to see if PC1 can reach PC2.
...