Overview

VETH (Virtual Ethernet) is a special type of virtual network interface primarily used to provide network connectivity for containers.
It acts as a virtual Ethernet port that connects RouterOS to a container, allowing the container to communicate with other interfaces and networks.

VETH interfaces behave like standard Ethernet interfaces — they can be assigned static IPv4 and IPv6 addresses, obtain addresses via DHCP client. VETH interfaces also support SLAAC.
They can also participate in bridges or routing configurations, just like physical interfaces.

Basic Configuration Example

There are multiple ways to configure VETH. Below are simple examples. 

# VETH with DHCP-client
/interface/veth add dhcp=yes

# VETH with static address
/interface/veth add address=10.1.1.10/24 gateway=10.1.1.1 

After configuring the interface, you can assign it to a container.
The container should obtain either the IP assigned by the DHCP server or the static address.

Properties

VETH

Sub-menu: /interface/veth/add

Configuration settings for the VETH interface.

address (address; Default: None)IPv4 or IPv6 address the interface will be assigned
gateway (IPv4 address; Default: None)IPv4 gateway address
gateway6 (IPv6 address; Default: None)IPv6 gateway address
mac-address (MAC address; Default: None)Interface MAC address
container-mac-address (MAC address; Default: None)MAC address that will be assigned to the container
dhcp (yes / no; Default: no)Enables DHCP client on the interface
name (string; Default: None)Interface name
  • No labels