Networks and Bridges Commands

networks network

To add a bridge to a network, use the networks network command, in global configuration mode. To remove the bridge from a network, use the no form of the command.

networks network networkname { bridge | bridgename | | sriov | true | | trunk true | | trunk false | | vlan | vlannumber | | vlan-range | range }

no networks network networkname

Syntax Description

network networkname

Specifies the name of the network.

bridge bridgename

Specifies the name of the bridge.

sriov true

Specifies the SRIOV network.

trunk true

Adds the network to trunk mode.

Note

 

The trunk mode is applicable only to the interfaces attached to a network, for example, a VNF or anvNIC. The trunk mode is not applicable for Physical NICs (pNICs).

trunk false

Removes the network from trunk mode and puts it in access mode.

vlan vlannumber

Specifies the VLAN number to be associated with the network.

vlan-range range

Specifies the VLAN range.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification

3.5.1

This command was introduced.

4.8.1

The vlan-range keyword was added.

Examples

The following example shows how to add a bridge to a network:

nfvis(config)# bridges bridge eth2-1-br
nfvis(config-bridge-eth2-1-br)# port eth2-1
nfvis(config-port-eth2-1)# commit

nfvis(config)# networks network eth2-1-net bridge eth2-1-br
nfvis (config-network-eth2-1-net)# commit
The following example shows how to create a SRIOV network:

nfvis(config)# networks network eth2-1-SRIOV-1 sriov true
nfvis(config-network-eth2-1-SRIOV-1)# commit
The following example shows how to add a network into trunk mode:

nfvis(config)# networks network eth2-1-net trunk true
nfvis(config-network-eth2-1-net)# commit
The following example shows how to remove a network from trunk mode:

nfvis(config)# networks network eth2-1-net trunk false
nfvis(config-network-eth2-1-net)# commit
The following example shows how to associate a VLAN with a network:

nfvis(config)# networks network eth2-1-net vlan 100 trunk true 
nfvis(config-network-eth2-1-net)# commit
nfvis# show running-config networks network eth2-1-net
networks network eth2-1-net
 vlan   [ 100 ]
 trunk  true
 bridge eth2-1-br
The following example shows how to configure a VLAN range:

nfvis(config)# networks network eth2-1-net bridge eth2-1-br vlan-range [ 100-103 200 205-207 ]
nfvis(config-network-eth2-1-net)# commit

nfvis# show running-config networks network eth2-1-net
networks network eth2-1-net
 vlan-range [ 100-103 200 205-207 ]
 bridge eth2-1-br

nfvis# show system networks network eth2-1-net
system networks network eth2-1-net
 bridge              eth2-1-br
 ports               eth2-1
 type                openvswitch
 vlan                100,101,102,103,200,205,206,207,1

Note


  • A SRIOV network in trunk mode does not support VLAN tagging.
    
    nfvis(config)# networks network eth2-1-net sriov true 
    nfvis(config-network-eth2-1-net)# trunk true 
    nfvis(config-network-eth2-1-net)# vlan 100
    nfvis(config-network-eth2-1-net)# commit
    Aborted: SRIOV network in trunk mode does not support vlan tagging
    
  • In access mode, only one VLAN tag is supported.
    
    nfvis(config)# networks network eth2-1-net
    nfvis(config-network-eth2-1-net)# vlan [ 100 200 300 ]
    nfvis(config-network-eth2-1-net)# trunk false 
    nfvis(config-network-eth2-1-net)# commit
    Aborted: Network eth2-1-net: Access mode supports 1 vlan tag only
    

bridge

To attach a SPAN session to a bridge, use the bridge command in session configuration mode. To remove the SPAN session association, use the no form of the command.

bridge {lan-br | wan-br}

no bridge {lan-br | wan-br}

Syntax Description

lan-br

Specifies the LAN bridge.

wan-br

Specifies the WAN bridge.

Command Default

None

Command Modes

Session configuration (config-session-2)#

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

For VLAN mirroring, the bridge must be configured. Configuration is rejected if a SPAN session is not applied to a bridge. The bridge configuration is optional if the source or destination interface is configured for the SPAN session.

Examples

The following example shows how to attach a SPAN session to a bridge:


nfvis(config)# monitor session 2
nfvis(config-session-2)# bridge lan-br

bridges bridge

To add a port or port channel to a bridge, use the bridges bridge command. To remove a port or port channel from a bridge, use the no form of the command.

bridges bridge bridgename port portname

no bridges bridge bridgename port portname

Syntax Description

bridgename

Specifies the name of the bridge.

portname

Specifies the name of the port or port channel.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.7.1

This command was introduced.

Examples

nfvis# config
nfvis(config)# bridges bridge test-br port pc
nfvis(config-bridge-test-br)# commit
nfvis(config-bridge-test-br) # end

show running-config bridges

To display the currently running bridge configuration, use the show running-config bridges command in privileged EXEC mode.

show running-config bridges

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.5.1

This command was introduced.

Examples


nfvis# show running-config bridges
bridges bridge wan-br
 port GE0-0
 !
!
bridges bridge lan-br
 port int-LAN
 !
!

show system networks

To display the information of the networks in the system, use the show system networks command in privileged EXEC mode.

show system networks [ network network-name [ bridge | ports | type] ]

Syntax Description

network network-name

(Optional) Name of the network.

bridge

(Optional) The bridge for the network.

port

(Optional) The port for the network.

type

(Optional) The type of network.

Command Default

All the networks in the system are displayed.

Command Modes

Privileged EXEC (#)

Command History

Release Modification

3.5.1

This command was introduced.

Examples


nfvis# show system networks
NETWORK      BRIDGE          PORTS       TYPE         
------------------------------------------------------
default      virbr0          N/A                      
lan-net      lan-br          eth1,vnet4  openvswitch  
service-net  service-net-br  N/A         openvswitch  
wan-net      wan-br          eth0        openvswitch  

show system packages

To display information on the packages in the system, use the show system packages command in privileged EXEC mode.

show system packages [ package package-name [ owner | version] ]

Syntax Description

package package-name

(Optional) Name of the package.

owner

(Optional) Owner of the package.

version

(Optional) Version of the package.

Command Default

Display information on all the packages in the system.

Command Modes

Privileged EXEC (#)

Command History

Release Modification

3.5.1

This command was introduced.

Examples


nfvis# show system packages
NAME                               VERSION               OWNER      
--------------------------------------------------------------------
GeoIP.x86_64                       1.5.0-9.el7           @anaconda  
NetworkManager.x86_64              1:1.0.6-27.el7        @anaconda  
NetworkManager-libnm.x86_64        1:1.0.6-27.el7        @anaconda  
NetworkManager-team.x86_64         1:1.0.6-27.el7        @anaconda  
NetworkManager-tui.x86_64          1:1.0.6-27.el7        @anaconda  
Twisted.x86_64                     13.1.0-1              @esc-lite  
abrt.x86_64                        2.1.11-36.el7.centos  @anaconda  
abrt-addon-ccpp.x86_64             2.1.11-36.el7.centos  @anaconda  
abrt-addon-kerneloops.x86_64       2.1.11-36.el7.centos  @anaconda  

ping

To diagnose basic network connectivity to an IPv4 host, use the ping command in privileged EXEC mode.

ping {host-ip-address | host-name} [ count count] [ pktsize pktsize] [ interval interval] [ ttl ttl]

Syntax Description

host-ip-address

Specifies the address of the IPv4 host.

host-name

Specifies the name of the IPv4 host.

count count

Specifies the number of ping packets to be sent.

pktsize pktsize

Specifies the packet size. The default is 64 bytes.

interval interval

Specifies the number of seconds to wait between requests.

ttl ttl

Specifies the hop limit.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.7.1

This command was introduced.

Examples


nfvis(config)# ping count 5 interval 2 pktsize 64 ttl 64 192.0.2.252
PING 192.0.2.252 (192.0.2.252) 64(92) bytes of data.
72 bytes from 192.0.2.252: icmp_seq=1 ttl=64 time=0.050 ms
72 bytes from 192.0.2.252: icmp_seq=2 ttl=64 time=0.041 ms
72 bytes from 192.0.2.252: icmp_seq=3 ttl=64 time=0.042 ms
72 bytes from 192.0.2.252: icmp_seq=4 ttl=64 time=0.033 ms
72 bytes from 192.0.2.252: icmp_seq=5 ttl=64 time=0.033 ms

--- 192.0.2.252 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 8000ms
rtt min/avg/max/mdev = 0.033/0.039/0.050/0.010 ms

ping-ipv6

To diagnose basic network connectivity to an IPv6 host, use the ping-ipv6 command in privileged EXEC mode.

ping-ipv6 {host-ip-address | host-name} [ count count] [ pktsize pktsize] [ interval interval] [ ttl ttl]

Syntax Description

host-ip-address

Specifies the address of the IPv6 host.

host-name

Specifies the name of the IPv6 host.

count count

Specifies the number of ping packets to be sent.

pktsize pktsize

Specifies the packet size. The default is 64 bytes.

interval interval

Specifies the number of seconds to wait between requests.

ttl ttl

Specifies the hop limit.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.7.1

This command was introduced.

Examples


nfvis(config)# ping-ipv6 count 6 interval 2 pktsize 64 ttl 64 fe80::9c76:87ff:feba:5d40
PING fe80::9c76:87ff:feba:5d40(fe80::9c76:87ff:feba:5d40) 64 data bytes
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=1 ttl=64 time=0.060 ms
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=2 ttl=64 time=0.045 ms
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=3 ttl=64 time=0.045 ms
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=4 ttl=64 time=0.069 ms
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=5 ttl=64 time=0.051 ms
72 bytes from fe80::9c76:87ff:feba:5d40%lan-br: icmp_seq=6 ttl=64 time=0.039 ms

--- fe80::9c76:87ff:feba:5d40 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 10000ms
rtt min/avg/max/mdev = 0.039/0.051/0.069/0.012 ms

traceroute

To discover the routes that packets take when traveling to a destination, use the traceroute command in privileged EXEC mode.

traceroute {ip-address | host-name} interface interface-name [ source source-ip-address] [ max max] [ min min] [ probes probes] [ waittime waittime]

Syntax Description

ip-address

Specifies the destination IP address.

host-name

Specifies the destination host name.

interface interface-name

Specifies a source network interface.

source source-ip-address

(Optional) Specifies a source IP address.

max max

(Optional) Specifies the maximum time-to-live (TTL) used in the outgoing probe packets. The default value is 30.

min min

(Optional) Specifies the minimum TTL used in the first outgoing probe packet. The default value is 1.

probes probes

(Optional) Specifies the number of probes to be sent at each TTL level. The default value is 3.

waittime waittime

(Optional) Specifies the probe timeout in seconds. The default value is 1.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.7.1

This command was introduced.

Examples


nfvis# traceroute min 5 198.51.100.1
traceroute to 198.51.100.1 (198.51.100.1), 30 hops max, 60 byte packets
 5  198.51.100.1 (198.51.100.1)  1.263 ms !X  1.157 ms !X  0.929 ms !X