What is a One-Armed Router?
One-arm routing (router-on-a-stick) refers to the configuration of sub-interfaces (or "logical interfaces" on which no real physical interface exists) on one interface of the router to realize the different VLANs (virtual Local area network).
One-arm routing
- One-arm routing (router-on-a-stick) refers to the configuration on an interface of a router.
- The physical interface of the router can be divided into multiple logical interfaces. These divided logical interfaces are called sub-interfaces. It is worth noting that these logical sub-interfaces cannot be opened or closed individually, that is, when a physical interface is opened or closed, all sub-interfaces of the interface are also opened or closed accordingly.
- VLAN can effectively divide the local area network and achieve access control between various network areas. However, in reality, it is often necessary to configure interconnection between certain VLANs. For example, your company is divided into the leadership , sales, finance, manpower, technology, and audit departments, and different VLANs are configured for different departments. . However, it often appears that the leadership needs to access other departments across VLANs, and this function is implemented by one-arm routing.
- Advantages: Implementing communication between different VLANs helps to understand and learn VLAN principles and sub-interface concepts.
- Disadvantages: It is easy to become a single point of network failure, the configuration is slightly complicated, and the practical significance is not significant.
- Experimental equipment: a CISCO router (R1), a three-layer switch (S1), two PCs (pc2 and pc3)
- Requirements: In the local area network,
- In a vlan, you can set the secondary IP of the routing interface in a vlan.
- Sometimes after the configuration is complete, the remote PC cannot be accessed normally. Follow the troubleshooting procedure to troubleshoot the problem.
- 1. First check the client's address and gateway through the command ipconfig / all. The results are as follows:
- IP Address .: 192.168.1.10
- Subnet Mask ... : 255.255.255.0
- Default Gateway ... ..: 192.168.1.1
- PC2> ipconfig
- IP Address .: 192.168.2.10
- Subnet Mask ... : 255.255.255.0
- Default Gateway ... ..: 192.168.2.1
- After confirming, first ping the respective gateways:
- PC1> ping 192.168.1.1
- Pinging 192.168.1.1 with 32 bytes of data:
- Reply from 192.168.1.1: byte = 32 time = 2ms TTL = 255
- Reply from 192.168.1.1: byte = 32 time = 2ms TTL = 255
- Reply from 192.168.1.1: byte = 32 time = 2ms TTL = 255
- Reply from 192.168.1.1: byte = 32 time = 3ms TTL = 255
- Ping statistics for 192.168.1.1:
- Data packets: Sent = 4, Received = 4, Lost = 0 (0% lost),
- Estimated round trip time (in milliseconds):
- Shortest = 2ms, longest = 3ms, average = 2ms
- 2. If the first operation fails, you need to check the VLAN configuration of the switch and the status of the trunk link to the router. as follows:
- Switch # show vlan brief // View switch VLAN information
- VLAN Name Status Ports
- -
- 1 default active Fa0 / 3, Fa0 / 4, Fa0 / 5, Fa0 / 6
- Fa0 / 7, Fa0 / 8, Fa0 / 9, Fa0 / 10
- Fa0 / 11, Fa0 / 12, Fa0 / 13, Fa0 / 14
- Fa0 / 15, Fa0 / 16, Fa0 / 17, Fa0 / 18
- Fa0 / 19, Fa0 / 20, Fa0 / 21, Fa0 / 22
- Fa0 / 23, Gig1 / 1, Gig1 / 2
- 10 RED active Fa0 / 1 // Confirm that the interface is connected to PC1 and is in VLAN 10.
- 20 BLACK active Fa0 / 2 // Confirm that the interface is connected to PC2 and is in VLAN 20
- 1002 fddi-default active
- 1003 token-ring-default active
- 1004 fddinet-default active
- 1005 trnet-default active
- Switch # show int trunk
- Port Mode Encapsulation Status Native vlan
- Fa0 / 24 on 802.1q trunking 1 // Fa0 / 24 connected between the switch and the router is in the trunk state with an encapsulation mode of 802.1q
- Port Vlans allowed on trunk
- Fa0 / 24 1-1005
- Port Vlans allowed and active in management domain
- Fa0 / 24 1,10,20 // Confirm that F0 / 24 port allows the data of VLAN10 and VLAN20 to pass
- Port Vlans in spanning tree forwarding state and not pruned
- Fa0 / 24 1,10,20
- 3. Finally check the configuration on the router. as follows:
- Router # show ip int br
- Interface IP-Address OK? Method Status Protocol
- FastEthernet0 / 0 unassigned YES unset up up // Confirm that the physical interface status is up, otherwise enter this interface and execute no shutdown
- FastEthernet0 / 0.1 192.168.1.1 YES manual up up // Check if the gateway address is configured correctly
- FastEthernet0 / 0.2 192.168.2.1 YES manual up up
- Router # show int | in is up | Vlan ID // Use the include command to select the result of show int for quick verification of configuration information
- FastEthernet0 / 0 is up, line protocol is up
- FastEthernet0 / 0.1 is up, line protocol is up // Confirm that the corresponding sub-interface is encapsulated into the corresponding VLAN ID
- Encapsulation 802.1Q Virtual LAN, Vlan ID 10
- FastEthernet0 / 0.2 is up , line protocol is up
- Encapsulation 802.1Q Virtual LAN, Vlan ID 20
- At this point, troubleshooting of one-armed routing between VLANs can be completed.