< Home

mac-address static vni

Function

The mac-address static vni command creates a static MAC address entry for a VXLAN tunnel.

The undo mac-address static vni command deletes the static MAC address entry of the VXLAN tunnel.

Format

mac-address static mac-address vni vni-id peer ip-address

undo mac-address static [ mac-address ] vni { vni-id [ peer ip-address ] | all | peer ip-address }

Parameters

Parameter Description Value
static mac-address Specifies a static MAC address entry, which is not aged. After static entries are configured and saved, the entries will not be lost after the system resets or the LPU is hot-swapped. The value is in the H-H-H format. Each H is a 4-digit hexadecimal number, such as 00e0 or fc01. If you enter fewer than four digits, 0s are added before the digits you enter. For example, if you enter e0, two 0s are added before e0. That is e0 equals to 00e0.
vni vni-id

Specifies the VNI of a VXLAN. A VNI is similar to a VLAN ID. Each VNI identifies a VXLAN segment. VMs in different VXLANs cannot directly communicate at Layer 2.

The specified VNI must already exist.
peer ip-address Specifies the IP address of the peer VTEP. The IP address is in dotted decimal notation.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Application Scenarios

The MAC address table is a port-based Layer-2 forwarding table that stores MAC address information learned from other devices. The information includes the MAC address, VNI of the port, and IP address of the peer VTEP. When forwarding a packet, the device searches the MAC address table based on the destination MAC address in the packet to identify the outbound interface, reducing broadcast packets.

MAC address entries are classified as follows:
  • Static MAC address entries: manually configured and not aged.
  • Dynamic MAC address entries: configured and learned based on source MAC addresses. Dynamic MAC address entries can be aged based on a specified aging time.

Example

# Configure a static MAC address in the system view.

<sysname> system-view
[sysname] mac-address static 1234-5678-9abf vni 4097 peer 192.168.1.2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >