在 NFX250 下一代设备上载入虚拟网络功能的先决条件
您可以通过 Junos 控制平面 (JCP) 在 NFX 设备上载入和管理瞻博网络虚拟网络功能 (VNF) 和第三方 VNF。
本主题提供在 NFX250 NextGen 设备上鉴定 VNF 的一般准则。在加载 VNF 之前,您必须根据您的用例场景测试 VNF。
NFX250 下一代设备:加载 VNF 的先决条件
要在 NFX250 NextGen 上载入 VNF,设备必须处于混合模式或计算模式。可在设备上载入的 VNF 数量取决于设备运行模式下可用的系统资源,如 CPU 和系统内存。有关性能模式的更多信息,请参阅 NFX250 NextGen 概述。
在加入 VNF 之前,请检查以下 NFX250 NextGen 设备功能:
使用
show vmhost mode命令检查设备的当前性能模式。运行show vmhost mode命令时,NFX250 NextGen 设备必须处于计算模式或混合模式。使用
show system visibility memory命令检查可用的系统内存。表 1 列出了 NFX250 NextGen 型号使用 VNF 的可能内存可用性。
表 1:VNF 使用的内存可用性 型
VNF 使用的内存可用性(Junos OS 19.1R1 版)
NFX250-S1
6 千兆字节
NFX250-S1E
6 千兆字节
NFX250-S2
22 千兆字节
NFX250-LS1
6 千兆字节
使用
show system visibility cpu命令检查可用 CPU 及其状态。show vmhost mode使用命令检查设备当前性能模式下的可用 CPU。表 2 列出了 NFX250 NextGen 型号可用于 VNF 的 CPU。
表 2:可用于 VNF 使用的 CPU(Junos OS 19.1R1 版) 型
可用于 VNF 的 CPU
吞吐量模式
混合模式
计算模式
NFX250-S1
0
4
8
NFX250-S2
0
4
8
NFX250-S1E
0
4
8
NFX250-LS1
0
2
4
注意:更改设备的性能模式时,建议检查 VNF 的 CPU 可用性。
有关更多信息,请参阅 在 NFX250 下一代设备上配置 VNF。
在 NFX250 NextGen 设备上加入 VNF 的先决条件
要在 NFX250 NextGen 设备上加载 VNF,应满足以下 VNF 属性:
基于 KVM 的虚拟机管理程序部署
OVS 或 Virtio 接口驱动程序
raw 或 qcow2 VNF 文件类型
最多支持 8 个用户界面
以下是加入 VNF 的可选先决条件:
(选答)SR-IOV
(选答)CD-ROM 和 USB 配置驱动器
(选答)如果 VNF 想要访问 OVS,则满足内存要求的 Hugepages。
验证 VNF
要验证和鉴定 VNF,您必须确保以下几点:
VNF 的配置提交成功。
show virtual-network-functions命令输出将显示 VNF 条目。show system visibility vnf命令输出将显示已配置的 VNF 属性和接口。该
show vmhost network nfv-back-plane命令显示连接到状态为up/upOVS 网桥的所有接口。命令show system visibility network显示所有 VNF 接口。连接到 VNF 控制台成功,并显示 VNF 启动或登录提示。
登录到 VNF 时,请
request virtual-network-function console使用 VNF 命令来显示已配置的所有接口。show virtual-network-functions当内部管理接口在 VNF 中配置了 DHCP 客户端时,命令将列出处于活动状态的 VNF。当流量从 VNF 入口或出口时,OVS 网桥上的 VNF 接口会显示
tx/rx统计信息。从 VNF 内部或使用
request virtual-network-functions restart vnf-name命令重新启动时,VNF 应能成功重新启动。
示例输出
显示虚拟网络功能
root@host> show virtual-network-functions ID Name State Liveliness - 5 vsrx Running down 1 vjunos0 Running alive
当与 VNF 建立管理连接时,该
Liveliness接口处于活动状态。应该StateRunning表明 VNF 已启动。显示系统可见性 VNF
root@host> show system visibility vnf List of VNFs - ID Name State - - - 5 vsrx Running VNF Memory Usage - Name Maximum Memory (KiB) Used Memory (KiB) Used 1G Hugepages Used 2M Hugepages - - - - - vsrx 4194304 49715 4 0 VNF CPU Statistics (Time in ms) - Name CPU Time System Time User Time - - - - vsrx 164425446 3214840 197880 VNF MAC Addresses - VNF MAC - - centos1_ethdef0 9C:CC:83:BD:8C:40 centos1_ethdef1 9C:CC:83:BD:8C:46 centos1_eth2 9C:CC:83:BD:8C:41 vsrx_ethdef0 9C:CC:83:BD:8C:42 vsrx_ethdef1 9C:CC:83:BD:8C:43 vsrx_eth2 9C:CC:83:BD:8C:45 vsrx_eth3 9C:CC:83:BD:8C:44 VNF Internal IP Addresses - VNF IP - - vsrx 192.0.2.100 VNF Interfaces - VNF Interface Type Source Model MAC IPv4-address - - - - - - - vsrx vnet6 network default virtio 9c:cc:83:bd:8c:42 - vsrx vnet7 bridge eth0br virtio 9c:cc:83:bd:8c:43 - vsrx vsrx_eth2 vhostuser - virtio 9c:cc:83:bd:8c:45 - VNF Disk Information - VNF Disk File - - - vsrx vda /var/public/junos-vsrx3-x86-64-19.4R1.12.qcow2 VNF Disk Usage - VNF Disk Read Req Read Bytes Write Req Write Bytes - - - - - - vsrx vda 220376 1951876096 24927 185393152 VNF Port Statistics - VNF Port Rcvd Bytes Rcvd Packets Rcvd Error Rcvd Drop Trxd Bytes Trxd Packets Trxd Error Trxd Drop - - - - - - - - - - vsrx vnet6 4113582 79122 0 0 0 0 0 0 vsrx vnet7 3399770129 47653525 0 34631 0 0 0 0 vsrx vsrx_eth2 3724 65 0 0 4372 73 0 0
请求虚拟网络功能 vSRX 虚拟防火墙控制台
root@host> request virtual-network-functions vsrx console Internal instance: vsrx Connected to domain vsrx Escape character is ^] FreeBSD/amd64 (Amnesiac) (ttyu0) login: root Password: Last login: Tue Mar 17 16:10:40 on ttyu0 - JUNOS 19.4R1.12 Kernel 64-bit XEN JNPR-11.0-20191115.14c2ad5_buil root@:~ # root@:~ # cli hroot> show interfaces terse Interface Admin Link Proto Local Remote ge-0/0/0 up up gr-0/0/0 up up ip-0/0/0 up up lsq-0/0/0 up up lt-0/0/0 up up mt-0/0/0 up up sp-0/0/0 up up sp-0/0/0.0 up up inet inet6 sp-0/0/0.16383 up up inet ge-0/0/1 up up ge-0/0/1.0 up up inet 10.10.10.1/24 root> show configuration | display set |match fxp0 set system services web-management http interface fxp0.0 set system services web-management https interface fxp0.0 set interfaces fxp0 unit 0 family inet dhcp root> show interfaces terse | match fxp0 fxp0 up up fxp0.0 up up inet 192.0.2.100/24显示系统可见性内存
root@host> show system visibility memory | no-more Memory Information ------------------ Virtual Memory: --------------- Total (KiB): 15914872 Used (KiB): 8242468 Available (KiB): 8265920 Free (KiB): 7672404 Percent Used : 48.1 Huge Pages: ------------ Total 1GiB Huge Pages: 2 Free 1GiB Huge Pages: 0 Configured 1GiB Huge Pages: 0 Total 2MiB Huge Pages: 1376 Free 2MiB Huge Pages: 1 Configured 2MiB Huge Pages: 0 Hugepages Usage: ---------------------------------------------------------------------------------------------------------- Name Type Used 1G Hugepages Used 2M Hugepages --------------------------------- ---------------------------------- ------------------ ------------------ srxpfe other process 1 1375 ovs-vswitchd other process 2 0
在输出消息中,选中
Free和Huge Pages部分下的Virtual Memory和Configured字段以获取内存可用性。显示 VMhost 模式
root@host> show vmhost mode | no-more Mode: -------- Current Mode: compute CPU Allocations: Name Configured Used ---------------------------------------------------------------------------------------------------------------------- Junos Control Plane 0 0,2 Juniper Device Manager 1 1 LTE 0 - NFV Backplane Control Path 0 0 NFV Backplane Data Path 4 4 Layer 2 Control Path - - Layer 2 Data Path - - Layer 3 Control Path 1 1 Layer 3 Data Path 5 5 CPUs available for VNFs 2,3,6,7 - CPUs turned off - - Memory Allocations: Name Configured Used ---------------------------------------------------------------------------------------------------------------------- Junos Control Plane (mB) 2048 1994 NFV Backplane 1G hugepages 1 2 NFV Backplane 2M hugepages - 0 Layer 2 1G hugepages - - Layer 2 2M hugepages - - Layer 3 1G hugepages 1 1 Layer 3 2M hugepages 1376 1375
在输出消息中,检查
Current Mode设备当前性能模式部分Mode下的字段。CPUs available for VNFs检查该部分下的CPU Allocations字段,了解 CPU 可用性。