How is an IP address configured for an AR interface

You can configure one primary IP address and multiple secondary IP addresses for an interface. The IP address followed by sub is a secondary IP address. If an interface of an AR router is connected to networks in different network segments, you can configure IP addresses of the multiple network segments on the interface as secondary IP addresses.
- The commands are as follows:
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] ip address 1.1.1.1 255.255.255.0 //Configure a primary IP address 1.1.1.1/24.
[Huawei-GigabitEthernet1/0/0] ip address 2.2.2.1 255.255.255.0 sub //Configure a secondary IP address 2.2.2.1/24.
Note:
You can configure IP addresses for Layer 3 interfaces only. Some Ethernet interfaces can switch between Layer 2 and Layer 3 modes. For example, Ethernet0/0/0 on AR150&AR200 works in Layer 2 mode by default. Run the undo portswitch command to switch from Layer 2 mode to Layer 3 mode. After an interface is switched to Layer 3 mode, you can configure IP addresses for the interface. The commands are as follows:
[Huawei] interface ethernet 0/0/0
[Huawei-Ethernet0/0/0] undo portswitch
[Huawei-Ethernet0/0/0] ip address 1.1.1.1 255.255.255.0
[Huawei-Ethernet0/0/0] ip address 1.1.2.1 255.255.255.0 sub

Scroll to top