Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

Requirements

This example uses the following hardware and software components:

  • Trident-II Series switch
  • PICOS OS Release 2.6 version and higher
  • Openvswitch vtep-ctl

Overview

In this example, VTEP OVSDB is configured to run on a VXLAN domain. VTEP interface sources are configured to the loopback address. Interfaces are configured for VLAN tagging and encapsulation. Static route protocols are configured to facilitate unicast routing.

 

Topology 

 

 

The VXLAN that comprise the networks include:

  • SW1 VNI 1000: VTEP 10.10.10.1: VLAN 10
  • SW2 VNI 1000: VTEP 20.20.20.1: VLAN 10
  • SW1 IP Adress: 100.10.1.1 and IP Address: 100.20.1.1
  • SW2 IP Adress: 100.10.2.1 and IP Address: 100.20.2.1

 

 

Configuring OVSDB on Trident-II Series switches

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and copy and paste the commands into the CLI. 

SW1 Configure:

set vlans vlan-id 10
set vlans vlan-id 1000 l3-interface 1000
set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 1000
set interface gigabit-ethernet te-1/1/10 family ethernet-switching port-mode "trunk"
set interface gigabit-ethernet te-1/1/10 family ethernet-switching vlan members 10
set vlan-interface loopback address 10.10.10.1 prefix-length 32
set vlan-interface interface 1000 vif 1000 address 100.10.1.1 prefix-length 24
set protocols static route 20.20.20.1/32 next-hop 100.10.1.2 
set protocols ovsdb controller ovsdb protocol ptcp
set protocols ovsdb controller ovsdb address 10.10.50.157
set protocols ovsdb controller ovsdb port 6632
set protocols ovsdb interface te-1/1/10
set vxlan ovsdb-managed true
set vxlans source-interface loopback address 10.10.10.1

 

SW2 Configure:

set vlans vlan-id 10
set vlans vlan-id 1000 l3-interface 1000
set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 1000
set interface gigabit-ethernet te-1/1/10 family ethernet-switching port-mode "trunk"
set interface gigabit-ethernet te-1/1/10 family ethernet-switching vlan members 10
set vlan-interface loopback address 20.20.20.1 prefix-length 32
set vlan-interface interface 1000 vif 1000 address 100.10.2.1 prefix-length 24
set protocols static route 10.10.10.1/32 next-hop 100.10.2.2
set protocols ovsdb controller ovsdb protocol ptcp
set protocols ovsdb controller ovsdb address 10.10.50.159
set protocols ovsdb controller ovsdb port 6632
set protocols ovsdb interface te-1/1/10
set vxlan ovsdb-managed true
set vxlans source-interface loopback address 20.20.20.1

 

Configuring OVSDB Step-by-Step Procedure

The following example shows how to set up a basic VTEP OVSDB configuration with VXLAN domain. To configure VXLAN on an Trident-II Series switchs, follow these steps: 

Configure OVSDB Step-by-Step for SW1

1. Configure the VLAN ID to 10 for vxlan domain. 
set vlans vlan-id 10
2. Configure the VLAN ID to 1000 and 2000 for ip routing.
set vlans vlan-id 1000 l3-interface 1000
3. Configure the te-1/1/1 interface VLAN ID to 1000.
set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 1000
4. Configure VLAN trunk for te-1/1/10.
set interface gigabit-ethernet te-1/1/10 family ethernet-switching port-mode "trunk"
5. Configure the te-1/1/10 interfaceVLAN ID to 10.
set interface gigabit-ethernet te-1/1/10 family ethernet-switching vlan members 10
6. Configure ip address for the loopback interface.
set vlan-interface loopback address 10.10.10.1 prefix-length 32
7. Configure ip address for the vlan-interface 1000.
set vlan-interface interface 1000 vif 1000 address 100.10.1.1 prefix-length 24
8. Configure static route for the VXLAN ECMP.
set protocols static route 20.20.20.1/32 next-hop 100.10.1.2
9. Configure VTEP interface sources ip address.
set vxlans source-interface loopback address 10.10.10.1
10. Enable VXLAN managed by ovsdb
set vxlan ovsdb-managed true
11. Configure ovsdb controller protocol
set protocols ovsdb controller ovsdb protocol tcp
12. Configure ovsdb controller ip address
set protocols ovsdb controller ovsdb address 10.10.50.212
13. Configure ovsdb controller port
set protocols ovsdb controller ovsdb port 6632
14. Configure ovsdb controller interface
set protocols ovsdb interface te-1/1/10

 

Configure OVSDB Step-by-Step for SW2


1. Configure the VLAN ID to 10 for vxlan domain. 
set vlans vlan-id 10
2. Configure the VLAN ID to 1000 and 2000 for ip routing.
set vlans vlan-id 1000 l3-interface 1000
3. Configure the te-1/1/1 interface VLAN ID to 1000.
set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 1000
4. Configure VLAN trunk for te-1/1/10.
set interface gigabit-ethernet te-1/1/10 family ethernet-switching port-mode "trunk"
5. Configure the te-1/1/10 interfaceVLAN ID to 10.
set interface gigabit-ethernet te-1/1/10 family ethernet-switching vlan members 10
6. Configure ip address for the loopback interface.
set vlan-interface loopback address 20.20.20.1 prefix-length 32
7. Configure ip address for the vlan-interface 1000.
set vlan-interface interface 1000 vif 1000 address 100.10.2.1 prefix-length 24
8. Configure static route for the VXLAN ECMP.
set protocols static route 10.10.10.1/32 next-hop 100.10.2.2
9. Configure VTEP interface sources ip address.
set vxlans source-interface loopback address 20.20.20.1
10. Enable VXLAN managed by ovsdb
set vxlan ovsdb-managed true
11. Configure ovsdb controller protocol
set protocols ovsdb controller ovsdb protocol tcp
12. Configure ovsdb controller ip address
set protocols ovsdb controller ovsdb address 10.10.50.212
13. Configure ovsdb controller port
set protocols ovsdb controller ovsdb port 6632
14. Configure ovsdb controller interface
set protocols ovsdb interface te-1/1/10

 

Manual configuration of the Switch as a VTEP Gateway by vtep-ctl

Configuring the ovsdb by vtep-ctl for SW1

1. Create a logical switch
vtep-ctl --db=tcp:10.10.51.157:6632 add-ls ls0
2. Bind the logical switch to a port
vtep-ctl --db=tcp:10.10.51.157:6632 bind-ls br0 te-1/1/10 10 ls0
vtep-ctl --db=tcp:10.10.51.157:6632 set Logical_Switch ls0 tunnel_key=10010
3. Configure Direct unicast destinations out a different tunnel
vtep-ctl --db=tcp:10.10.51.157:6632 add-ucast-remote ls0 00:e0:0a:0b:78:9a 20.20.20.1

Configuring the ovsdb by vtep-ctl for SW2

1. Create a logical switch
vtep-ctl --db=tcp:10.10.51.159:6632 add-ls ls0
2. Bind the logical switch to a port
vtep-ctl --db=tcp:10.10.51.159:6632 bind-ls br0 te-1/1/10 10 ls0
vtep-ctl --db=tcp:10.10.51.159:6632 set Logical_Switch ls0 tunnel_key=10010
3. Configure Direct unicast destinations out a different tunnel
vtep-ctl --db=tcp:10.10.51.159:6632 add-ucast-remote ls0 00:e0:0a:0b:78:9b 10.10.10.1

 

View the VXLAN table of SW1: 

admin@XorPlus# run show vxlan

Egress map:

         egress_id 100007 MAC 0:0:1:8a:1a:90, port_id 1/1/33, vif_index 6 unicast

L3 tunnel mac map:

         vlan id 1000, ref_count 1

Port vlan map mode map & Termination admin state map:

         port id 1/1/10, ref_count 1

Tunnel Map:

         tunnel id 0X4C000200, dst_vtep 20.20.20.1, nexthops (172.168.1.2 ), ecmp_id 100007, ref_count 1

         tunnel id 0X4C000001, dst_vtep 224.0.0.1, nexthops (), ecmp_id 0, ref_count 1

Access ports:

         id 0X80000002, vpn id 0X7000, port_id 1/1/10, vlan_id 10, egress id 100006

Network ports:

         id 0X80000003, vpn_id 0X7000, port_id 1/1/33, egress_id 100007, tunnel_id 0X4C000200, unicast

         id 0X80000004, vpn_id 0X7000, port_id 1/1/33, egress_id 100008, tunnel_id 0X4C000200, multicast

         id 0X80000001, vpn_id 0XFFFFFFFF, port_id 1/1/0, egress_id 100004, tunnel_id 0X4C000001, multicast

BFD sessions:

admin@XorPlus#

 

The show vxlan to displays information about VXLAN endpoint configuration. Display VXLAN to the remote vxlan tunnel vtep has two nexthops(100.10.1.2). 

 

View the VXLAN mac table of SW1: 

admin@XorPlus# run show vxlan ? 

Possible completions:

  <[Enter]>                     Execute this command

  address-table                 Show vxlan MAC address table

  |                             Pipe through a command

admin@XorPlus# run show vxlan address-table

VNID           MAC address          Type       Interface          VTEP

-----------    -----------------    -------    ----------------   ---------------

10010          00:e0:0a:0b:70:00    Static                         20.20.20.1   

 


  • No labels