作者:木色雪魂K | 来源:互联网 | 2023-05-17 10:17
DBGvpp#shinteraddrUnknownEthernet500(up):L3192.168.1.22924host-ns1_tap(up):local0(dn):DB
DBGvpp# sh inter addr
UnknownEthernet5/0/0 (up):
L3 192.168.1.229/24
host-ns1_tap (up):
local0 (dn):
DBGvpp# nat44 add interface address UnknownEthernet5/0/0
DBGvpp#
DBGvpp# create bridge-domain 1
bridge-domain 1
DBGvpp# set interface l2 bridge host-ns1_tap 1
DBGvpp# set interface l2 bridge UnknownEthernet5/0/0 1
DBGvpp#
DBGvpp# ip route add 192.168.1.0/24 via UnknownEthernet5/0/0
DBGvpp#
[root@localhost vpp2]# ./extras/vpp_config/scripts/dpdk-devbind.py --status
Network devices using DPDK-compatible driver
============================================
Network devices using kernel driver
===================================
0000:05:00.0 'Hi1822 Family (2*25GE)' if= drv=vfio-pci unused=hinic
0000:06:00.0 'Hi1822 Family (2*25GE)' if= drv=vfio-pci unused=hinic
0000:7d:00.0 'HNS GE/10GE/25GE RDMA Network Controller' if=enp125s0f0 drv=hns3 unused=hns_roce_hw_v2
0000:7d:00.1 'HNS GE/10GE/25GE Network Controller' if=enp125s0f1 drv=hns3 unused=
0000:7d:00.2 'HNS GE/10GE/25GE RDMA Network Controller' if=enp125s0f2 drv=hns3 unused=hns_roce_hw_v2
0000:7d:00.3 'HNS GE/10GE/25GE Network Controller' if=enp125s0f3 drv=hns3 unused=
Other network devices
=====================
Crypto devices using DPDK-compatible driver
===========================================
Crypto devices using kernel driver
==================================
Other crypto devices
====================
delete loopback interface intfc .
Example Usage
Example of how to configure a Layer 2 bridge-domain with three interfaces (where 200 is the bridge-domain-id):
vpp# set interface l2 bridge GigabitEthernet0/8/0.200 200
This interface is added a BVI interface:
vpp# set interface l2 bridge GigabitEthernet0/9/0.200 200 bvi
This interface also has a split-horizon group of 1 specified:
vpp# set interface l2 bridge GigabitEthernet0/a/0.200 200 1
Example of how to remove an interface from a Layer2 bridge-domain:
vpp# set interface l3 GigabitEthernet0/a/0.200
DBGvpp# set int ip address del loop0 192.168.1.229/24
DBGvpp# set int ip address UnknownEthernet5/0/0 192.168.1.229/24
DBGvpp#
https://peiyake.com.cn/part1/vpp/l2_bridge