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

Implementation of interworking across VLAN networks using single-arm routing technology

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

1. Experimental requirements

PC1 belongs to vlan10, PC2 belongs to vlan20,PC3, belongs to vlan30,PC4, belongs to vlan10.

Use dhcp to obtain the IP address automatically.

Single-arm routing technology is used to realize the interworking of the whole network.

two。 Experimental procedure

R1:

R1#conf t

Enterconfiguration commands, one per line. End with CNTL/Z.

R1 (config) # intfa0/0

R1 (config-if) # noshutdown turns interface fa0/0 on

R1 (config-if) # intfa0/0.10 into the subinterface

R1 (config-subif) # encapsulationdot1Q 10 changes the encapsulation type of the interface to be the gateway for vlan10

R1 (config-subif) # ipadd 192.168.10.1 255.255.255.0 configure IP address

R1 (config-subif) # noshut

R1 (config-subif) # intfa0/0.20

R1 (config-subif) # encapsulationdot1Q 20

R1 (config-subif) # ipadd 192.168.20.1 255.255.255.0

R1 (config-subif) # noshut

R1 (config-subif) # intfa0/0.30

R1 (config-subif) # encapsulationdot1Q 30

R1 (config-subif) # ipadd 192.168.30.1 255.255.255.0

R1 (config-subif) # noshut

R1 (config-subif) # exit

R1 (config) # ipdhcp pool V10 establishes a pool of dhcp addresses

R1 (dhcp-config) # network192.168.10.0 / 24

R1 (dhcp-config) # default-router192.168.10.1

R1 (dhcp-config) # dns-server1.1.1.1

R1 (dhcp-config) # exit

R1 (config) # ipdhcp pool v20 establishes a pool of dhcp addresses

R1 (dhcp-config) # network192.168.20.0 / 24

R1 (dhcp-config) # default-router192.168.20.1

R1 (dhcp-config) # dns-server2.2.2.2

R1 (dhcp-config) # exit

R1 (config) # ipdhcp pool V30 establishes a pool of dhcp addresses

R1 (dhcp-config) # network192.168.30.0 / 24

R1 (dhcp-config) # default-router192.168.30.1

R1 (dhcp-config) # dns-server3.3.3.3

R1 (dhcp-config) # exit

Sw1:

Sw1#conft

Sw1 (config) # no ip routing turns off routing

Sw1 (config) # vlan10,20,30 to establish vlan10,20,30

Sw1 (config-vlan) # int fa1/0

Sw1 (config-if) # switchport access vlan 10 adds the interface to VLAN

Sw1 (config-if) # int fa1/1

Sw1 (config-if) # switchport access vlan 20

Sw1 (config-if) # int fa1/15

Sw1 (config-if) # switchport mode trunk changes the interface to a trunk port

Sw1 (config-if) # int fa1/4

Sw1 (config-if) # switchport mode trunk changes the interface to a trunk port

Sw2:

Sw2#conft

Sw2 (config) # no ip routing turns off routing

Sw2 (config-vlan) # vlan10,20,30 to establish vlan10,20,30

Sw2 (config-vlan) # int fa1/2

Sw2 (config-if) # switchport access vlan 30 adds the interface to VLAN

Sw2 (config-if) # int fa1/3

Sw2 (config-if) # switchport access vlan 10

Sw2 (config-if) # int fa1/15

Sw2 (config-if) # switchport mode trunk changes the interface to a trunk port

3. The experimental results are verified.

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