Detailed tutorial of one-arm routing configuration experiment

1. Detailed explanation of one-arm routing.

1. Overview of one-arm routing

One-arm routing refers to the way of configuring sub-interfaces (or "logical interfaces", there is no real physical interface) on an interface of the router to realize the interconnection between different VLANs that were originally isolated from each other.

1.1 One-arm routing realizes communication between different VLANs

1.1.1 Link status

  • The port connecting the switch to the host is an access link
  • The port connecting the switch to the router is a trunk link

1.1.2 Sub-interface

  • A router's physical interface can be divided into multiple logical interfaces
  • Each sub-interface corresponds to a VLAN network segment gateway
    insert image description here

1.2 Configuration of one-arm routing

  • First check whether your host IP address is configured
  • Second, configure the link type of the link switch and router
  • Configure the encapsulation structure of the VLAN tag
  • Configure the router's subnet interface

1.3 Check, check and check again, make sure you have no configuration errors

2.1 One-arm routing configuration experiment

insert image description here

2.1.1 PC configuration

insert image description here
insert image description here

2.1.2 Switch configuration

  • The configuration commands I typed are all abbreviations for each command. You may not understand it. You can tab it out to understand it yourself.
!Switch>en //进入全局配置模式
Switch#conf t //特权模式进入全局模式
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10 //创建VLAN
Switch(config-vlan)#vlan 20
Switch(config-vlan)#int f0/3 
Switch(config-if)#sw m a //将链路模式设为access
Switch(config-if)#sw a vlan 10  
Switch(config-if)#int f0/2 
Switch(config-if)#sw m a
Switch(config-if)#sw a vlan 20
Switch(config-if)#int f0/1
Switch(config-if)#sw m t
Switch(config-if)#end
Switch#w //保存配置

2.1.3 Router configuration

Router#en 
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0.1
Router(config-subif)#en d 10 //接口封装dot1q协议,后面加上vlan ID
Router(config-subif)#ip add 192.168.10.254 255.255.255.0  配置子接口IP地址
Router(config-subif)#no sh
Router(config-subif)#int f0/0.2
Router(config-subif)#ip add 192.168.20.254 255.255.255.0
Router(config-subif)#no sh
Router(config-subif)#int f0/0
Router(config-if)#no sh
Router(config-if)#end
Router#w
%SYS-5-CONFIG_I: Configured from console by console
w
Building configuration...
[OK]

2.1.4 The configuration has been completed, test whether the communication between PC1 and PC2 is successful

insert image description here
insert image description here

3.1 Disadvantages of one-arm routing

1. Advantages: Realize multi-vlan communication and solve communication problems between different vlans.
2. Disadvantages: A single point of failure in a single arm has a great impact on the network, and the load of a single arm routing link is too heavy, which is prone to traffic bottlenecks

perception

This is the first time I write an article, so I want to write as much as possible, I hope everyone will like it!

Guess you like

Origin blog.csdn.net/2201_75288693/article/details/129142374