GRE Tunnel
In the following topology, the GRE tunnel between Switches A and B needs to be configured. The IP address of the GRE tunnel is 10.10.61.10/24 and 10.10.60.10/24.
Â
Figure 4-2. GRE tunnel configuration
Configure Switch-A
In Switch-A, user needs to configure a GRE tunnel and two flows as follows:
root@PicOS-OVS# ovs-vsctl  add-br br0 -- set bridge br0 datapath_type=pica8 root@PicOS-OVS# ovs-vsctl  add-port br0 ge-1/1/1 vlan_mode=trunk tag=1 -- set Interface ge-1/1/1 type=pica8 root@PicOS-OVS# ovs-vsctl  add-port br0 ge-1/1/5 vlan_mode=trunk tag=1 -- set Interface ge-1/1/5 type=pica8 root@PicOS-OVS# root@PicOS-OVS# ovs-vsctl add-port br0 gre1 -- set Interface gre1 type=pica8_gre options:remote_ip=10.10.60.10 options:local_ip=10.10.61.10 options:vlan=1 options:src_mac=00:11:11:11:11:11 options:dst_mac=00:22:22:22:22:22 options:egress_port=ge-1/1/5 root@PicOS-OVS# root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=1,actions=output:3073 root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=5,actions=mod_dl_src:00:11:11:11:11:11,mod_dl_dst:00:33:33:33:33:33,output:1
Configure Switch-B
In Switch-A, user also needs to configure a GRE tunnel and two flows as follows:
root@PicOS-OVS# ovs-vsctl  add-br br0 -- set bridge br0 datapath_type=pica8 root@PicOS-OVS# ovs-vsctl  add-port br0 ge-1/1/1 vlan_mode=trunk tag=1 -- set Interface ge-1/1/1 type=pica8 root@PicOS-OVS# ovs-vsctl  add-port br0 ge-1/1/5 vlan_mode=trunk tag=1 -- set Interface ge-1/1/5 type=pica8 root@PicOS-OVS# root@PicOS-OVS# ovs-vsctl  add-port br0 gre1 -- set Interface gre1 type=pica8_gre options:remote_ip=10.10.61.10 options:local_ip=10.10.60.10 options:vlan=1 options:src_mac=00:22:22:22:22:22 options:dst_mac=00:11:11:11:11:11 options:egress_port=ge-1/1/5 root@PicOS-OVS# root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=1,actions=output:3073 root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=5,actions=mod_dl_src:00:22:22:22:22:22,mod_dl_dst:00:66:66:66:66:66,output:1
Copyright © 2024 Pica8 Inc. All Rights Reserved.