100% found this document useful (1 vote)
408 views

How To Configure Trunk Between Huawei Router and Switch PDF

The document provides instructions for configuring a trunk between a Huawei router and switch to allow hosts on VLAN 100 to communicate. It describes configuring the router interface and a subinterface for VLAN 100. It also describes configuring the switch interface as a trunk, allowing VLAN 100, and adding two host ports to VLAN 100. Finally, it checks that the hosts can ping the router and switch IP addresses, verifying connectivity.

Uploaded by

Hussein Dhafan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
408 views

How To Configure Trunk Between Huawei Router and Switch PDF

The document provides instructions for configuring a trunk between a Huawei router and switch to allow hosts on VLAN 100 to communicate. It describes configuring the router interface and a subinterface for VLAN 100. It also describes configuring the switch interface as a trunk, allowing VLAN 100, and adding two host ports to VLAN 100. Finally, it checks that the hosts can ping the router and switch IP addresses, verifying connectivity.

Uploaded by

Hussein Dhafan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

how to configure trunk between Huawei

router and switch


What we want to do is to configure 802.1q trunk between labnario1 router and labnarioSW1
switch, so that hosts from VLAN 100 will be able to ping the routers interface.

Lets look at the simple topology:

First we want to configure labnario1 router. To configure Ge0/0/1 interface to operate as a


802.1q trunk, we need to configure it as follows:

<labnario1>system-view
[labnario1]
[labnario1]interface GigabitEthernet 0/0/1
[labnario1-GigabitEthernet0/0/1]portswitch
[labnario1-GigabitEthernet0/0/1]port link-type trunk

Now we need to configure subinterface in VLAN 100 and define IP address. Of course our
subinterface should be in the same VLAN as our hosts.

[labnario1]interface GigabitEthernet0/0/1.100
[labnario1-GigabitEthernet0/0/1.100]vlan-type dot1q 100
[labnario1-GigabitEthernet0/0/1.100]ip address 150.100.0.1 255.255.255.0

Labnario1 router configuration is finished. Now we can start configuring labnarioSW1 switch.
Lets start with 802.1q trunk configuration:

<labnario1>sys
[LabnarioSW1]
[LabnarioSW1]int GigabitEthernet 0/0/1
[LabnarioSW1-GigabitEthernet0/0/1]port link-type trunk
[LabnarioSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100

Now we can add our hosts to VLAN 100:

[LabnarioSW1]interface Ethernet0/0/1
[LabnarioSW1-Ethernet0/0/1]port link-type access
[LabnarioSW1-Ethernet0/0/1] port default vlan 100
[LabnarioSW1]interface Ethernet0/0/2
[LabnarioSW1-Ethernet0/0/1]port link-type access
[LabnarioSW1-Ethernet0/0/1] port default vlan 100

As a last part of this configuration we need to add VLANIF interface on labnarioSW1:

[LabnarioSW1-Ethernet0/0/1]int vlanif100
[LabnarioSW1-Vlanif100]ip add 150.100.0.2 255.255.255.0

Both devices are configured. Lets check if our hosts are able to ping routers interface:

PC1>ping 150.100.0.2
Ping 150.100.0.2: 32 data bytes, Press Ctrl_C to break
From 150.100.0.2: bytes=32 seq=1 ttl=255 time=16 ms
From 150.100.0.2: bytes=32 seq=2 ttl=255 time=15 ms
From 150.100.0.2: bytes=32 seq=3 ttl=255 time=16 ms
From 150.100.0.2: bytes=32 seq=4 ttl=255 time=16 ms
From 150.100.0.2: bytes=32 seq=5 ttl=255 time=15 ms

--- 150.100.0.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 0/12/16 ms

PC2>ping 150.100.0.1

Ping 150.100.0.1: 32 data bytes, Press Ctrl_C to break


From 150.100.0.1: bytes=32 seq=1 ttl=255 time=16 ms
From 150.100.0.1: bytes=32 seq=2 ttl=255 time=78 ms
From 150.100.0.1: bytes=32 seq=3 ttl=255 time=47 ms
From 150.100.0.1: bytes=32 seq=4 ttl=255 time=16 ms
From 150.100.0.1: bytes=32 seq=5 ttl=255 time=47 ms

--- 150.100.0.1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 16/40/78 ms

You might also like