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

Using layer 3 switch to realize Inter-VLAN routing

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Step 1: configure the hostname of the layer 3 switch

Ruijie#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Ruijie (config) # hostname switch

Step 2: divide the VLAN add ports on the layer 3 switch and set up Trunk

Switch (config) # vlan 10

Switch (config-vlan) # name xiaoshou

Switch (config-vlan) # vlan 20

Switch (config-vlan) # name jishu

Switch (config-vlan) # exit

Switch (config) # int range fa0/6-10

Switch (config-if-range) # sw mode acc

Switch (config-if-range) # sw acc vlan 10

Switch (config-if-range) # exit

Switch (config) # int range fa0/11-15

Switch (config-if-range) # sw acc vlan 20

Switch (config-if-range) # exit add

Switch (config) # int fa 0amp 1

Switch (config-if-FastEthernet 0bat 1) # sw mode trunk

Switch (config-if-FastEthernet 0bat 1) # exit

Switch (config) # exit

Step 3: view VLAN

Switch#show vlan

Step 4: configure the SVI port on the layer 3 switch

Switch#conf t

Enter configuration commands, one perline. End with CNTL/Z.

Switch (config) # interface vlan 10

Switch (config-if-VLAN 10) # Dec

% Unknown command.

Switch (config-if-VLAN 10) # ip add192.168.10.1 255.255.255.0

Switch (config-if-VLAN 10) # no shutdown

Switch (config-if-VLAN 10) # exit

Switch (config) # int vlan 20

Switch (config-if-VLAN 20) # ip add192.168.20.1 255.255.255.0

Switch (config-if-VLAN 20) # no shutdown

Switch (config-if-VLAN 20) # exit

Switch (config) # exit

Switch#*Sep 27 17:27:07:% SYS-5-CONFIG_I:Configured from console by conso

Step 5: verify the configuration

Configure PC1 and PC2 with IP addresses in the network segments 192.168.10.1 and 192.168.20.0, respectively, and use 192.168.10.1 and 192.168.20.1 as gateways, for example, the IP address of PC1 is configured as shown in the figure.

At this point, the host PC2 of different VLAN can be connected from PC1 to ping, as shown in the figure

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

Network Security

Wechat

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

12
Report