vEth create#
Description#
The create
sub-command under the tools veth
command creates a vEth interface between the following combination of nodes:
- container <-> container
- container <-> linux bridge
- container <-> ovs bridge
- container <-> host
To specify the both endpoints of the veth interface pair the following two notations are used:
- two elements notation:
<node-name>:<interface-name>
this notation is used forcontainer <-> container
orcontainer <-> host
attachments. - three elements notation:
<kind>:<node-name>:<interface-name>
this notation is used forcontainer <-> bridge
andcontainer <-> ovs-bridge
attachments
Check out examples to see how these notations are used.
Usage#
containerlab tools veth create [local-flags]
Flags#
a-endpoint#
vEth interface endpoint A is set with --a-endpoint | -a
flag.
b-endpoint#
vEth interface endpoint B is set with --b-endpoint | -b
flag.
mtu#
vEth interface MTU is set to 9500
by default, and can be changed with --mtu | -m
flag.
Examples#
# create veth interface between containers clab-demo-node1 and clab-demo-node2
# both ends of veth pair will be named `eth1`
containerlab tools veth create -a clab-demo-node1:eth1 -b clab-demo-node2:eth1
# create veth interface between container clab-demo-node1 and linux bridge br-1
containerlab tools veth create -a clab-demo-node1:eth1 -b bridge:br-1:br-eth1
# create veth interface between container clab-demo-node1 and OVS bridge ovsbr-1
containerlab tools veth create -a clab-demo-node1:eth1 -b ovs-bridge:ovsbr-1:br-eth1
# create veth interface between container clab-demo-node1 and host
# note that a special node-name `host` is reserved to indicate that attachment is destined for container host system
containerlab tools veth create -a clab-demo-node1:eth1 -b host:veth-eth1