文中三种协议类型,都通过建立veth pair打通Linux和VPP环境。


1.1. 创建Linux veth pair对进行配置

1.2. linux kernel创建vlan

1.3. vpp创建truck子接口

VPP中创建子接口默认携带VLAN TAG,其中tag号为子接口ID,也可以分别设置。

  • VPP 创建子接口

This command is used to add VLAN IDs to interfaces, also known as subinterfaces. The primary input to this command is the interface and subId (subinterface Id) parameters. If no additional VLAN ID is provide, the VLAN ID is assumed to be the subId. The VLAN ID and subId can be different, but this is not recommended.
create sub-interfaces - Create a subinterface to process packets with a given 802.1q VLAN ID (same value as the subId).
create sub-interfaces default - Adding the default parameter indicates that packets with VLAN IDs that do not match any other subinterfaces should be sent to this subinterface.
create sub-interfaces untagged - Adding the untagged parameter indicates that packets no VLAN IDs should be sent to this subinterface.
create sub-interfaces - - Create a range of subinterfaces to handle a range of VLAN IDs.
create sub-interfaces dot1q|dot1ad |any [exact-match] - Use this command to specify the outer VLAN ID, to either be explicit or to make the VLAN ID different from the subId.
create sub-interfaces dot1q|dot1ad |any inner-dot1q |any [exact-match] - Use this command to specify the outer VLAN ID and the inner VLAN ID.
When dot1q or dot1ad is explicitly entered, subinterfaces can be configured as either exact-match or non-exact match. Non-exact match is the CLI default. If exact-match is specified, packets must have the same number of VLAN tags as the configuration. For non-exact-match, packets must at least that number of tags. L3 (routed) interfaces must be configured as exact-match. L2 interfaces are typically configured as non-exact-match. If dot1q or dot1ad is NOT entered, then the default behavior is exact-match.

2. GRE

2.1. 创建veth pair对进行配置

2.2. 创建linux vxlan隧道

2.3. 创建vnf gre隧道


3.1. 创建veth pair对进行配置

3.2. 创建linux vxlan隧道

3.3. 创建vpp vxlan隧道





邮箱地址不会被公开。 必填项已用*标注