云原生路由器接口概述
本主题提供有关 JCNR-Controller 提供的网络通信接口的信息。结构接口是从多个接口接收流量的聚合接口。不同工作负载连接到的接口称为工作负载接口。
阅读本主题可了解 JCNR-Controller 提供的网络通信接口。我们将介绍接口名称、接口连接到的内容以及接口的通信方式。以及他们提供的服务。
瞻博网络云原生路由器接口类型
瞻博网络云原生路由器支持两种类型的接口:
-
结构接口 — 从多个接口接收流量的聚合接口。结构接口始终是物理接口。它们可以是物理函数 (PF) 或虚拟函数 (VF)。这些接口的吞吐量要求较高,因此会为其分配多个硬件队列。每个硬件队列都分配了一个专用的 CPU 内核。这些接口是使用 Deployer Helmcharts 中的相应
values.yaml
文件为云原生路由器配置的。您可以使用dpdkinfo -c
命令查看接口映射。查看《部署指南》中的“通过 vRouter CLI 进行故障排除”主题,了解更多详细信息。您还可以使用吞吐量要求较低的交换矩阵工作负载接口。系统只会为接口分配一个硬件队列,从而节省宝贵的 CPU 资源。可以使用 Deployer Helmchart 中的相应values.yaml
文件来配置这些接口。 -
工作负载接口 — 不同工作负载连接到的接口。它们可以是基于软件的接口,也可以是基于硬件的接口。基于软件的接口可以是使用数据平面开发工具包 (DPDK) 轮询模式驱动程序 (PMD) 的高性能接口,也可以是使用内核驱动程序的低性能接口。通常,DPDK 接口用于数据流量,例如用于用户数据 (GTP-U) 流量的 GPRS 隧道协议,而基于内核的接口则用于控制平面数据流量,例如 TCP。内核 Pod 接口通常用于作、管理和维护 (OAM) 流量。接口配置为 veth-pair,接口的一端位于 pod 中,另一端位于主机上的 Linux 内核中。云原生路由器还通过链路绑定 PMD 支持绑定接口。可以使用 Deployer Helmchart 中的相应
values.yaml
文件来配置这些接口。云原生路由器支持不同类型的 VLAN 接口,包括跨交换矩阵和工作负载接口的中继接口、接入接口和子接口。
云原生路由器接口详细信息
下面详细介绍了不同的云原生路由器接口:
-
代理接口
vRouter 只有一个代理接口。代理界面支持 vRouter-agent 和 vRouter 之间的通信。发出
vif --list
命令时,在 vRouter CLI 上,代理界面如下所示:vif0/0 Socket: unix Type:Agent HWaddr:00:00:5e:00:01:00 Vrf:65535 Flags:L2 QOS:-1 Ref:3 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:650 bytes:99307 errors:0 Drops:0
-
DPDK VF 工作负载接口
这些接口连接到无线电单元 (RU) 或毫米波分布单元 (毫米波-DU)。发出
vif --list
命令时,在 vRouter CLI 上,DPDK VF 工作负载界面如下所示:vif0/5 PCI: 0000:ca:19.1 (Speed 10000, Duplex 1) Type:Workload HWaddr:9e:52:29:9e:97:9b Vrf:0 Flags:L2Vof QOS:-1 Ref:9 RX queue packets:29087 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: 0000:ca:19.1 Status: UP Driver: net_iavf Vlan Mode: Access Vlan Id: 1250 OVlan Id: 1250 RX packets:29082 bytes:6766212 errors:5 TX packets:0 bytes:0 errors:0 Drops:29896
-
DPDK VF 交换矩阵接口(物理中继)
DPDK VF 交换矩阵接口与主机服务器上的物理网络接口卡 (NIC) 相关联,可接受来自多个 VLAN 的流量。
使用
show configuration
命令的 cRPD 接口配置如下所示(为简洁起见,对输出进行了修剪):interfaces { ens786f0v0 { unit 0 { family bridge { interface-mode trunk; vlan-id-list 1001-1100; } } } }
发出
vif --list
命令时,在 vRouter CLI 上,DPDK VF 交换矩阵接口如下所示:vif0/1 PCI: 0000:31:01.0 (Speed 10000, Duplex 1) Type:Physical HWaddr:d6:22:c5:42:de:c3 Vrf:65535 Flags:L2Vof QOS:-1 Ref:12 RX queue packets:11813 errors:1 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Fabric Interface: 0000:31:01.0 Status: UP Driver: net_iavf Vlan Mode: Trunk Vlan: 1001-1100 RX packets:0 bytes:0 errors:49962 TX packets:18188356 bytes:2037400554 errors:0 Drops:49963
-
活动或备用绑定接口(绑定中继)
绑定接口接受来自多个 VLAN 的流量。绑定接口在主动或备用模式(模式 0)下运行。您可以在 helm chart 配置中定义 bond 接口,如下所示:
bondInterfaceConfigs: - name: "bond0" mode: 1 # ACTIVE_BACKUP MODE slaveInterfaces: - "ens2f0v1" - "ens2f1v1"
- bond0: ddp: "auto" interface_mode: trunk vlan-id-list: [1001-1100] storm-control-profile: rate_limit_pf1 native-vlan-id: 1001 no-local-switching: true
使用
show configuration
命令的 cRPD 接口配置如下所示(为简洁起见,对输出进行了修剪):interfaces { bond0 { unit 0 { family bridge interface-mode trunk; vlan-id-list 1001-1100; } } }
发出
vif --list
命令时,在 vRouter CLI 上,绑定界面如下所示:vif0/2 PCI: 0000:00:00.0 (Speed 10000, Duplex 1) Type:Physical HWaddr:32:f8:ad:8c:d3:bc Vrf:65535 Flags:L2Vof QOS:-1 Ref:8 RX queue packets:1882 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: eth_bond_bond0 Status: UP Driver: net_bonding Slave Interface(0): 0000:81:01.0 Status: UP Driver: net_iavf Slave Interface(1): 0000:81:03.0 Status: UP Driver: net_iavf Vlan Mode: Trunk Vlan: 1001-1100 RX packets:8108366000 bytes:486501960000 errors:4234 TX packets:65083776 bytes:4949969408 errors:0 Drops:8108370394
- 使用 DPDK 数据平面的 Pod 接口(Virtio 中继) virtio
中继接口仅接受已标记的数据包。任何未标记的数据包都会被丢弃。这些接口可以接受 VLAN 过滤器,以仅允许特定的 VLAN 数据包。中继接口可以是多个桥接域 (BD) 的一部分。桥接域是一组具有相同泛洪或广播特性的逻辑端口。与 VLAN 一样,桥接域跨越多个设备的一个或多个端口。Virtio 接口与在 DPDK 数据平面上使用 virtio 的 pod 接口相关联。
使用
show configuration
命令的 cRPD 接口配置如下所示(为简洁起见,对输出进行了修剪):interfaces { vhost242ip-93883f16-9ebb-4acf-b { unit 0 { family bridge { interface-mode trunk; vlan-id-list 1001-1003; } } } }
发出
vif --list
命令时,在 vRouter CLI 上,带有 DPDK 数据平面接口的 virtio 如下所示:vif0/3 PMD: vhost242ip-93883f16-9ebb-4acf-b Type:Virtual HWaddr:00:16:3e:7e:84:a3 Vrf:65535 Flags:L2 QOS:-1 Ref:13 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Vlan Mode: Trunk Vlan: 1001-1003 RX packets:0 bytes:0 errors:0 TX packets:10604432 bytes:1314930908 errors:0 Drops:0 TX port packets:0 errors:10604432
- 使用内核接口的 Pod 接口
接入接口接受已标记和未标记的数据包。未标记的数据包使用接入 VLAN 或接入 BD 进行标记。除具有访问 VLAN 的数据包外,任何已标记的数据包都会被丢弃。接入接口是单个网桥域的一部分。它没有任何父接口。
使用
show configuration
命令的 cRPD 接口配置如下所示(为简洁起见,对输出进行了修剪):routing-instances { switch { instance-type virtual-switch; bridge-domains { bd1001 { vlan-id 1001; interface jvknet1-eed79ff; } } } }
发出
vif --list
命令时,在 vRouter CLI 上,veth 对接口如下所示:vif0/4 Ethernet: jvknet1-88c44c3 Type:Virtual HWaddr:02:00:00:3a:8f:73 Vrf:0 Flags:L2Vof QOS:-1 Ref:10 RX queue packets:524 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Vlan Mode: Access Vlan Id: 1001 OVlan Id: 1001 RX packets:9 bytes:802 errors:515 TX packets:0 bytes:0 errors:0 Drops: 525
- L2 VLAN 子接口
您可以为用户 Pod 配置第 2 层 VLAN 子接口,并将其附加到云原生路由器实例。VLAN 子接口类似于物理交换机或路由器上的逻辑接口。它们仅访问与配置的 VLAN 标记匹配的标记数据包。子接口有一个父接口。父接口可以有多个子接口,每个子接口都有一个 VLAN ID。运行云原生路由器时,您必须将每个子接口与特定的 VLAN 进行关联。
使用
show configuration
命令查看的 cRPD 接口配置如下所示(为简洁起见,对输出进行了修剪)。对于 L2:
routing-instances { switch { instance-type virtual-switch; bridge-domains { bd100 { vlan-id 100; interface vhostnet1-1e555ee1-7d93-40.100; } } } }
虚拟路由器上的 VLAN 子接口配置如下所示:
vif0/5 Virtual: vhostnet1-71cd7db1-1a5e-49.3003 Vlan(o/i)(,S): 3003/3003 Parent:vif0/4 Type:Virtual(Vlan) HWaddr:00:99:99:99:33:09 Vrf:0 Flags:L2 QOS:-1 Ref:3 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:0 bytes:0 errors:0 Drops:0
注意:要查看 vRouter 上的 VLAN 子接口,请执行命令
kubectl exec -it -n contrail contrail-vrouter-<agent container> -- bash
命令连接到 vRouter 代理,然后运行命令vif --get
。 L3 物理接口
vif0/1 PCI: 0000:17:01.1 (Speed 25000, Duplex 1) NH: 7 MTU: 9000 <- PCI Address Type:Physical HWaddr:d6:93:87:91:45:6c IPaddr: 192.21.2.4 <- Physical interface IP6addr:2001:192:21:2::4 <- IPv6 address DDP: OFF SwLB: ON Vrf:2 Mcast Vrf:2 Flags:L3L2Vof QOS:0 Ref:16 <- L3 (only) interface RX port packets:423168341 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: 0000:17:01.1 Status: UP Driver: net_iavf RX packets:423168341 bytes:29123418594 errors:0 TX packets:417508247 bytes:417226216530 errors:0 Drops:8 TX port packets:417508247 errors:0
vif0/2 PMD: ens2f2 NH: 12 MTU: 9000 <- Tap interface name as seen by cRPD Type:Host HWaddr:d6:93:87:91:45:6c IPaddr: 192.21.2.4 <- Tap interface type IP6addr:2001:192:21:2::4 DDP: OFF SwLB: ON Vrf:2 Mcast Vrf:65535 Flags:L3DProxyEr QOS:-1 Ref:15 TxXVif:1 <-cross-connected to vif 1 RX device packets:306995 bytes:25719830 errors:0 RX queue packets:306995 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:306995 bytes:25719830 errors:0 TX packets:307489 bytes:25880250 errors:0 Drops:0 TX queue packets:307489 errors:0 TX device packets:307489 bytes:25880250 errors:0
cRPD 中的对应接口状态:
show interfaces routing ens2f2 Interface State Addresses ens2f2 Up MPLS enabled ISO enabled INET 192.21.2.4 INET6 2001:192:21:2::4 INET6 fe80::c5da:7e9c:e168:56d7 INET6 fe80::a0be:69ff:fe59:8b58
L3 Bond 接口
vif0/3 PCI: 0000:00:00.0 (Speed 25000, Duplex 1) NH: 6 MTU: 1514 <- Bond interface (PCI id 0) Type:Physical HWaddr:50:7c:6f:48:75:74 IPaddr:192.7.7.4 <- Physical interface IP6addr:2001:192:7:7::4 DDP: OFF SwLB: ON Vrf:1 Mcast Vrf:1 Flags:TcL3L2Vof QOS:0 Ref:18 RX port packets:402183888 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: eth_bond_bond34 Status: UP Driver: net_bonding <- Bonded master Slave Interface(0): 0000:5e:00.0 Status: UP Driver: net_ice <- Bond slave - 1 Slave Interface(1): 0000:af:00.0 Status: UP Driver: net_ice <- Bond slave - 2 RX packets:402183888 bytes:49519387070 errors:0 TX packets:79226 bytes:7330912 errors:0 Drops:1393 TX port packets:79226 errors:0
vif0/4 PMD: bond34 NH: 11 MTU: 9000 Type:Host HWaddr:50:7c:6f:48:75:74 IPaddr:192.7.7.4 <- Tap interface IP6addr:2001:192:7:7::4 DDP: OFF SwLB: ON Vrf:1 Mcast Vrf:65535 Flags:L3DProxyEr QOS:-1 Ref:15 TxXVif:3 <- Tap interface for bond RX device packets:76357 bytes:7101918 errors:0 RX queue packets:76357 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:76357 bytes:7101918 errors:0 TX packets:75349 bytes:6946908 errors:0 Drops:0 TX queue packets:75349 errors:0 TX device packets:75349 bytes:6946908 errors:0
show interfaces routing bond34 Interface State Addresses bond34 Up INET6 2001:192:7:7::4 ISO enabled INET 192.7.7.4 INET6 fe80::527c:6fff:fe48:7574
-
L3 Pod 虚拟主机-用户界面
vif0/8 PMD: vhostnet1-aa0984c7-0c1d-40a4-87 NH: 35 MTU: 9160 <- vhost-user interface of CNF Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:2.51.1.3 <- pod/ workload IP6addr:abcd:2:51:1::3 <- IPv6 address of the pod DDP: OFF SwLB: ON Vrf:3 Mcast Vrf:3 Flags:PL3DProxyEr QOS:-1 Ref:14 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:0 bytes:0 errors:0 Drops:0
cRPD 中的对应接口状态:
show interfaces routing vhostnet1-aa0984c7-0c1d-40a4-87 Interface State Addresses vhostnet1-aa0984c7-0c1d-40a4-87 Up INET6 enabled INET6 abcd:2:51:1::3 ISO enabled INET enabled INET 2.51.1.3
L3 内核接口
vif0/13 Ethernet: jvknet1-0af476e NH: 35 MTU: 9160 <- Kernel interface (jvk) of CNF Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:2.51.1.4 <- pod/ workload IP6addr:abcd:2:51:1::4 DDP: OFF SwLB: ON Vrf:1 Mcast Vrf:1 Flags:PL3DVofProxyEr QOS:-1 Ref:11 RX port packets:47 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:47 bytes:13012 errors:0 TX packets:0 bytes:0 errors:0 Drops:47
show interfaces routing jvknet1-0af476e Interface State Addresses jvknet1-0af476e Up INET6 enabled INET6 abcd:2:51:1::4 ISO enabled INET enabled INET 2.51.1.4
-
L3 VLAN 子接口
从瞻博网络云原生路由器 23.2 版开始,云原生路由器支持在 L3 模式下使用 VLAN 子接口。
vif0/2 PCI: 0000:17:01.1 (Speed 25000, Duplex 1) NH: 7 MTU: 9000 Type:Physical HWaddr:d6:93:87:91:45:6c IPaddr:0.0.0.0 IP6addr:fe80::d493:87ff:fe91:456c <- IPv6 address DDP: OFF SwLB: ON Vrf:2 Mcast Vrf:2 Flags:L3L2Vof QOS:0 Ref:16 <- L3 (only) interface RX port packets:423168341 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: 0000:17:01.1 Status: UP Driver: net_iavf RX packets:423168341 bytes:29123418594 errors:0 TX packets:417508247 bytes:417226216530 errors:0 Drops:8 TX port packets:417508247 errors:0
vif0/5 PMD: ens1f0v1 NH: 12 MTU: 9000 Type:Host HWaddr:d6:93:87:91:45:6c IPaddr:0.0.0.0 IP6addr:fe80::d493:87ff:fe91:456c DDP: OFF SwLB: ON Vrf:2 Mcast Vrf:65535 Flags:L3DProxyEr QOS:-1 Ref:15 TxXVif:2 <- L3 (only) tap interface RX device packets:306995 bytes:25719830 errors:0 RX queue packets:306995 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:306995 bytes:25719830 errors:0 TX packets:307489 bytes:25880250 errors:0 Drops:0 TX queue packets:307489 errors:0 TX device packets:307489 bytes:25880250 errors:0
vif0/9 Virtual: ens1f0v1.201 Vlan(o/i)(,S): 201/201 Parent:vif0/2 NH: 36 MTU: 1514 <- VLAN fabric sub-intf with parent as vif 2 and VLAN tag as 201 Type:Virtual(Vlan) HWaddr:d6:93:87:91:45:6c IPaddr:103.1.1.2 IP6addr:fe80::d493:87ff:fe91:456c DDP: OFF SwLB: ON Vrf:1 Mcast Vrf:1 Flags:L3DProxyEr QOS:-1 Ref:4 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:0 bytes:0 errors:0 Drops:0
vif0/10 Virtual: ens1f0v1.201 Vlan(o/i)(,S): 201/201 Parent:vif0/5 NH: 21 MTU: 9000 Type:Virtual(Vlan) HWaddr:d6:93:87:91:45:6c IPaddr:103.1.1.2 IP6addr:fe80::d493:87ff:fe91:456c DDP: OFF SwLB: ON Vrf:1 Mcast Vrf:65535 Flags:L3DProxyEr QOS:-1 Ref:4 TxXVif:9 <- VLAN tap sub-intf cross connected to fabric sub-intf vif 9 and parent as tap intf vif 5 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:0 bytes:0 errors:0 Drops:0
cRPD 中的对应接口状态:
show interfaces routing ens1f0v1.201 Interface State Addresses ens1f0v1.201 Up MPLS enabled ISO enabled INET6 fe80::b89c:fff:feab:e2c9