Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

One-arm routing under Huawei

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Experimental requirements: communication between two different VLAN

The process is as follows:

[SW1] vlan 10

[SW1-vlan10] q

[SW1-vlan20]

[SW1-vlan20] q

[SW1]

[SW1] int g0/0/2

[SW1-GigabitEthernet0/0/2] port link-type access (link type of port)

[SW1-GigabitEthernet0/0/2] port default vlan 10 (divide this interface into vlan 10)

[SW1-GigabitEthernet0/0/2] q

[SW1] int g0/0/3

[SW1-GigabitEthernet0/0/3] port link-type access

[SW1-GigabitEthernet0/0/3] port default vlan 20

[SW1-GigabitEthernet0/0/3] q

[SW1] int g0/0/1

[SW1-GigabitEthernet0/0/1] port link-type trunk (interface link type changed to trunk)

[SW1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 (the TRUNK link releases data for all VLAN 10 and 20)

Two subinterfaces need to be configured on the router of R1, corresponding to VLAN 10 and VLAN 20 on the PC side.

[R1] int e0/0/0.10

[R1-Ethernet0/0/0.10]

[R1-Ethernet0/0/0.10] control-vid 10 dot1q-termination (identify the data sent from the PC

Under this excuse to enable 802.1Q protocol to VID10, on more advanced routers, this command can not be written)

[R1-Ethernet0/0/0.10] dot1q termination vid 10 (tagged to encapsulate 802.1q protocol to vlan 10)

[R1-Ethernet0/0/0.10] arp broadcast en (to find the PC of the destination side and open ARP)

[R1-Ethernet0/0/0.10] ip address 192.168.1.254 24 (configure Gateway)

[R1-Ethernet0/0/0.10] q

[R1]

[R1] int e0/0/0.20

[R1-Ethernet0/0/0.20] control-vid 20 dot1q-termination

[R1-Ethernet0/0/0.20] dot1q termination vid 20

[R1-Ethernet0/0/0.20] arp broadcast en

[R1-Ethernet0/0/0.20] ip address 192.168.2.254 24

It's over! Different VLAN can communicate with each other, the purpose is complete!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report