当前位置:网站首页>Simple configuration of single arm routing and layer 3 switching

Simple configuration of single arm routing and layer 3 switching

2022-07-07 18:32:00 Chen chacha__

First, configure the switch

take f0/1 Ports only allow vlan 10,f0/11 Ports only allow vlan 20, take f0/24 The port is set to truck Pattern

int f0/1

switchport mode access

switchport access vlan 10

exi

int f0/11

switchport mode access

switchport access vlan 20

exit

int f0/24

switchport mode trunk

switchport trunk allowed vlan all

Configure single arm routing on the router

int f0/0

int f0/0.10                               # Enter sub interface

encapsulation dot1Q 10        # encapsulate 802.1q agreement , In the play vlan 10 The label of

ip add 192.168.10.254 255.255.255.0    # To configure valn 10 Gateway for

int f0/0.20

encapsulation dot1Q 20        # encapsulate 802.1q agreement , In the play vlan 20 The label of

ip add 192.168.20.254 255.255.255.0   # To configure vlan 20 Gateway for

At this time, the two hosts successfully communicate .

Configure layer 3 switching

  First, configure the layer-2 switch

take f0/1 Ports only allow vlan 10,f0/11 Ports only allow vlan 20, take f0/24 Port is enabled trunk Pattern

int f0/1

switchport mode access 

switch access vlan 10

int f0/11

switchport mode access 

switch access vlan 20

int f0/24

switchport mode trunk

switch trunk allowed vlan all

Then configure the layer 3 switch

ip routing                                                   # Turn on the routing function

int f0/1

switchport trunk encapsulation dot1q       # encapsulation dot1q agreement , It's not specified here vlan Number

switchport trunk allowed vlan all              # Allow all vlan adopt

exit

int vlan 10

ip add 192.168.10.254 255.255.255.0    # Set up vlan 10 Gateway for

int vlan 20

ip add 192.168.20.254 255.255.255.0   # Set up vlan 20 Gateway for

The above basic command configuration is completed .

原网站

版权声明
本文为[Chen chacha__]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071635465996.html