Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Contrail] How to enable packet mode on VMI and verify the configuration

0

0

Article ID: KB35976 KB Last Updated: 26 Jun 2020Version: 1.0
Summary:

By default, Contrail compute nodes use flow mode for packet forwarding. However, there are instances when you need to switch from flow mode to packet mode either to achieve higher traffic forwarding performance or to get around certain design limitations of flow mode.

For differences between flow mode and packet mode, refer to Contrail Cookbook.

This article details the differences as well as common aspects of packet mode ​configuration in various Contrail releases, while describing how to switch from flow mode to packet mode and vice versa.

 

Symptoms:

In Contrail release 5.0 and later, under VMI Advanced options, you can enable packet mode by selecting a check box as highlighted below. However, this option is not seen in Contrail 3.x or 4.x releases.

 

Cause:

In Contrail 3.x/4.x releases, to enable packet mode on VMI (at the port level), we need to select the "Disable Policy" check box as highlighted below. Starting from Contrail release 5.0, the same UI option has been renamed to "Packet Mode" for better user understanding. 

 

Solution:

The API reference to the virtual_machine_interface_disable_policy parameter, which corresponds to the “Disable Policy” option in Contrail 3.x/4.x release WebUI, is available here.

Even in Contrail 5.0+ where “Disable Policy” is renamed to “Packet Mode,” the same API parameter is still referred to.

To verify whether a VMI is indeed running in packet mode, use vif --get <tap-index> on a compute node to confirm whether “P”(policy) displays or not.

For example, by default, an active VMI is programmed in flow mode, which has the network policy attached and enabled. The "P" flag is displayed and highlighted below in blue:

root@comp104:~# vif --get 21
Vrouter Interface Table
 
Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
       Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
       D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
       Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload, Mon=Interface is Monitored
       Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New Flows, Proxy=MAC Requests Proxied Always
       Mn=Mirror without Vlan Tag
 
vif0/21     OS: tap7f8da123-47
            Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:10.10.10.6
            Vrf:7 Flags:PL3L2D QOS:-1 Ref:5
            RX packets:302327  bytes:12697734 errors:0
            TX packets:302456  bytes:12703380 errors:0
            Drops:2

After we enable packet mode by disabling the network policy, the “P” flag is removed and no longer shows up on port.

root@comp104:~# vif --get 21
Vrouter Interface Table
 
Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
       Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
       D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
       Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload, Mon=Interface is Monitored
       Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New Flows, Proxy=MAC Requests Proxied Always
       Mn=Mirror without Vlan Tag
 
vif0/21     OS: tap7f8da123-47
            Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:10.10.10.6
            Vrf:7 Flags:L3L2D QOS:-1 Ref:5   <==”P” is no longer there.
            RX packets:302339  bytes:12698238 errors:0
            TX packets:302474  bytes:12704136 errors:0
            Drops:2

After we deselect the “Disable Policy” check box to re-enable flow mode, the "P" flag will be re-programmed on the port as shown below:

root@comp104:~# vif --get 21
Vrouter Interface Table
 
Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
       Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
       D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
       Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload, Mon=Interface is Monitored
       Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New Flows, Proxy=MAC Requests Proxied Always
       Mn=Mirror without Vlan Tag
 
vif0/21     OS: tap7f8da123-47
            Type:Virtual HWaddr:00:00:5e:00:01:00 IPaddr:10.10.10.6
            Vrf:7 Flags:PL3L2D QOS:-1 Ref:5
            RX packets:302349  bytes:12698658 errors:0
            TX packets:302498  bytes:12705144 errors:0
            Drops:2

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search