encapsulation eth out-interface

Function

The encapsulation eth out-interface command is used to configure the Layer 2 forwarding interface to support the SFF to the SF.

The undo encapsulation eth out-interface command is used to disable the configuration of Layer 2 forwarding from SFF to SF.

By default, Layer 2 forwarding with SFF to SF is not configured.

Format

encapsulation eth out-interface { outInterfaceName | outInterfaceType outInterfaceNum } [ out-vlan out-vlan-id [ ce-vid out-cevid ] ] in-interface { inInterfaceName | inInterfaceType inInterfaceNum } [ in-vlan in-vlan-id [ ce-vid in-cevid ] ] [ dest-mac destMac ]

undo encapsulation eth out-interface { outInterfaceName | outInterfaceType outInterfaceNum } [ out-vlan out-vlan-id [ ce-vid out-cevid ] ] in-interface { inInterfaceName | inInterfaceType inInterfaceNum } [ in-vlan in-vlan-id [ ce-vid in-cevid ] ] [ dest-mac destMac ]

Parameters

Parameter Description Value
outInterfaceName

Specifies the type of an outbound interface.

-

outInterfaceType

Specifies the name of an outbound interface.

-

outInterfaceNum

Specifies the number of an outbound interface.

-

out-vlan out-vlan-id

Specifies the outer VLAN ID of an outbound interface.

The value is an integer ranging from 1 to 4094.

ce-vid out-cevid

Specifies the inner VLAN ID of an outbound interface.

The value is an integer ranging from 1 to 4094.

ce-vid in-cevid

Specifies the inner VLAN ID of an inbound interface.

The value is an integer ranging from 1 to 4094.

in-interface inInterfaceName

Specifies the name of an inbound interface.

-

inInterfaceType

Specifies the type of an inbound interface.

-

inInterfaceNum

Specifies the number of an inbound interface.

-

in-vlan in-vlan-id

Specifies the outer VLAN ID of aninbound interface.

The value is an integer ranging from 1 to 4094.

dest-mac destMac

Specifies a MAC address.

The value is a hexadecimal number in the format of H-H-H. H is a 4-bit hexadecimal number, such as 00e0 or fc01. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is equal to 00e0. A MAC address cannot be set to all Fs, all 0s, or any multicast MAC address.

Views

SRv6 locator End-AS view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
segr write

Usage Guidelines

Usage Scenario

Supports Layer 2 forwarding from the SFF to the SF. Only one type of forwarding can be configured. out-interface and in-interface can be set to the same sub-interface or different sub-interfaces.

Destination MAC address to be encapsulated in the packets forwarded to the SF. The MAC address of the in-interface is used by default. In the scenario where SF is dual-homed to SFF, SFF1 does not know the MAC address of SFF2 in-interface. Therefore, you need to run the dest-mac command to configure the static configuration.

Precautions

To ensure correct forwarding,set the interface type to EVC Layer 2 sub-interface. An interface must be exclusively used by a service chain. If a service chain is configured on an interface, the interface cannot be configured to other services. Otherwise, forwarding problems may occur.

Example

# Configure the Layer 2 forwarding function from SFF to SF. The outbound interface is GigabitEthernet 0/1/0.1, the inbound interface is GigabitEthernet 0/1/8.2, the outbound VLAN ID is 2, the inbound VLAN ID is 4, the outbound CE VLAN ID is 3, the inbound CE VLAN ID is 5, and the destination MAC address is abc-de-89.
<HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] locator test1 ipv6-prefix 2001:DB8:100:: 64 static 32
[*HUAWEI-segment-routing-ipv6-locator] opcode ::12 end-as
[*HUAWEI-segment-routing-ipv6-locator-endas-::12] encapsulation eth out-interface GigabitEthernet 0/1/0.1 out-vlan 2 ce-vid 3 in-interface GigabitEthernet 0/1/8.2 in-vlan 4 ce-vid 5 dest-mac abc-de-89
# Configure the Layer 2 forwarding function from SFF to SF. The outbound interface is GigabitEthernet 0/1/0.1, the inbound interface is GigabitEthernet 0/1/8.2, the outbound VLAN ID is 2, the inbound VLAN ID is 4, the outbound CE VLAN ID is 3, and the inbound CE VLAN ID is 5.
<HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] locator test1 ipv6-prefix 2001:DB8:100:: 64 static 32
[*HUAWEI-segment-routing-ipv6-locator] opcode ::12 end-as
[*HUAWEI-segment-routing-ipv6-locator-endas-::12] encapsulation eth out-interface GigabitEthernet 0/1/0.1 out-vlan 2 ce-vid 3 in-interface GigabitEthernet 0/1/8.2 in-vlan 4 ce-vid 5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >