/interface/veth

veth

将容器连接到 RouterOS 的虚拟以太网接口。veth 的一端是此 RouterOS 接口;另一端是使用它的容器的网络接口,具有 veth 的名称和 container-mac-address。地址、网关和 DHCP 设置会在容器内部应用。veth 仅在使用它的容器运行时运行。请参阅 VETH。


interface/veth

Conditions: !smips Syscap: container Type: Directory

将容器连接到 RouterOS 的虚拟以太网接口。veth 的一端是此 RouterOS 接口;另一端是使用它的容器的网络接口,具有 veth 的名称和 container-mac-address。地址、网关和 DHCP 设置会在容器内部应用。veth 仅在使用它的容器运行时运行。请参阅 VETH。

标志名称描述
Xdisabled已禁用:未使用该 veth。
Rrunning运行中:使用该 veth 的容器正在运行。否则,MAC 地址会显示为 00:00:00:00:00:00,并且 veth 上的路由器地址无效。
参数类型描述
namestringveth 的名称。在容器内部,接口具有相同的名称。
mac-addressmacAddrveth 路由器端的 MAC 地址。对于设置 dhcp=yes 的 veth,DHCP 服务器会看到此地址,因此容器的静态租约使用该地址。如果为空,则在容器启动时自动设置。
container-mac-addressmacAddrveth 容器端的 MAC 地址,即容器内部接口的地址。如果为空,则在容器启动时自动设置。
addressmulti { address: address (flags=46/) }容器接口的 IPv4 和 IPv6 地址,多个地址用逗号分隔,例如 172.17.0.2/24,2001:db8:17::2/64。路由器需要在 veth(或 veth 作为端口的桥接)上具有同一子网中的自己的地址,才能访问容器。
gatewayaddress (flags=4)容器内部的 IPv4 默认网关,通常是路由器在 veth 上的地址。
gateway6address (flags=6)容器内部的 IPv6 默认网关。
dhcpboolWith yes, RouterOS runs a DHCP client for the container on the veth and applies the lease inside the container (address and default route). The DHCP server sees the veth's mac-address and the host name <identity>-<veth name>. The container's DNS server comes from the container settings, not from DHCP. Default: no.
只读参数类型描述
dhcp-addressaddress (flags=46/)当 dhcp=yes 时,DHCP 客户端为容器租用的地址。