How to create a VLANIF interface and configure an IP address for the interface on an AR router

2

1. In the system view, run the vlan vlan-id command to create a VLAN, and run the quit command to return to the system view.
2. In the system view, run the interface vlanif vlan-id command to create a VLANIF interface.
3. In the VLANIF view, run the ip address command to configure an IP address for the VLANIF interface.

Other related questions:
IP address configuration on S series switch
An S series switch, except S1700, supports primary and sub IP addresses on interfaces. Each Layer 3 interface can have multiple IP addresses, including one primary IP addresses and multiple sub IP addresses. (Note: Sub IP addresses become invalid when the primary address is deleted.)Each interface on the modular switch supports 255 sub IP addresses, and each interface on the fixed switch supports 8 sub IP addresses. For example, configure a primary IP address 10.1.0.1 and a sub IP address 10.2.0.1 for VLANIF10, with subnet mask 255.255.255.0. [HUAWEI] interface vlanif 10 [HUAWEI-Vlanif10] ip address 10.1.0.1 255.255.255.0 [HUAWEI-Vlanif10] ip address 10.2.0.1 255.255.255.0 sub (Note: After IP addresses are configured for a VLANIF interface, the clients connected to the switch use one of the IP addresses as gateway address. After sub IP addresses are configured, users can change them as required, but the new IP addresses must be on the same subnet as the primary or one sub IP address; otherwise, the subnets cannot communicate with each other.)For most models in V200R005C00 and later versions, run the undo portswitch command to switch a Layer 2 interface to a Layer 3 interface, and then configure an IP address for the interface. For example, configure a primary IP address 10.1.0.1 and a sub IP address 10.2.0.1 for GE1/0/1, with subnet mask 255.255.255.0. [HUAWEI] interface gigabitethernet 1/0/1 [HUAWEI-GigabitEthernet1/0/1] undo portswitch [HUAWEI-GigabitEthernet1/0/1] ip address 10.1.0.1 255.255.255.0 [HUAWEI-GigabitEthernet1/0/1] ip address 10.2.0.1 255.255.255.0 sub

Configure the IP address of the management interface on AR routers
The procedure of changing the management IP addresses on the AR router is as follows: 1. You can configure a management IP address on the CLI using either of the following methods: a. Configure a management IP address on the management interface of the AR router. For example, the management interface is GE0/0/0. Set the management IP address to 192.168.1.10 and the mask length to 24. 2. On the VLANIF interface, configure the management IP address. Note: In the factory settings, all LAN interfaces on the AR150&AR160&AR200&AR120&-S&AR150-S&AR160-S&AR200-S are added to VLAN 1 by default. The default IP address 192.168.1.1/24 is configured for VLAN 1. Any LAN interface can use this IP address as the management IP address. The procedure for changing the IP address of VLAN 1 is as follows: For example, when LAN ports of the AR150 are added to VLAN 1, configure the management IP address as 192.168.1.10 and set the mask length to 24. system-view [Huawei] vlan 1 [Huawei-vlan1] quit [Huawei] interface vlanif 1 [Huawei-Vlanif1] ip address 192.168.1.10 24 [Huawei-Vlanif1] quit 2. Configure the management IP address through the web platform. Log in to the web platform, access WAN Access, and find the corresponding management interface in Ethernet Interface. Click the Modify under Operation on the right of the interface to configure an IP address for the corresponding interface.

Can the IP address used to log in to an AR router through the web NMS be an IP address of a VLANIF interface
For AR120 & AR150 series, Eth0/0/0 to Eth0/0/3 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the Eth0/0/0 to Eth0/0/3 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS. For AR160 series and AR509G-L-D-H, GE0/0/0 to GE0/0/3 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the GE0/0/0 to GE0/0/3 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS. For AR200 series, AR1220, AR1220V, AR1220W, AR1220VW, and AR1220F, Eth0/0/0 to Eth0/0/7 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the Eth0/0/0 to Eth0/0/7 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS. For AR2201-48FE and AR2202-48FE, Eth0/0/0 to Eth0/0/47 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the Eth0/0/0 to Eth0/0/47 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS. For AR2204-51GE-P and AR2204-51GE, GE0/0/3 to GE0/0/50 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the GE0/0/3 to GE0/0/50 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS. For AR2204-27GE-P and AR2204-27GE, GE0/0/3 to GE0/0/26 are Layer 2 Ethernet interfaces by default, added to VLANIF 1, and configured with a default management IP address 192.168.1.1/24. The AR routers support web NMS access through any interface of the VLANIF based on this IP address. Run the undo portswitch command to change the mode of the GE0/0/3 to GE0/0/26 from Layer 2 to Layer 3. After the management network interface is switched over to the Layer 3 mode, configure the management IP address for the management network interface, and then log in to the web NMS

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

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top