Need help? Send Email To Us daisy.dai@ccitel.com

Cisco routers use one-arm routing to implement inter-VLAN routing between switches

Using one-arm routing for inter-VLAN routing.

 

Purpose: Divide sub-interfaces on the router port and encapsulate the Dot1q (IEEE 802.1q) protocol to implement routing between VLANs.

 

Background description:

Assume that an enterprise has two main departments: the sales department and the technical department. The employees are connected to one Layer 2 switch, and one router in the network is used to connect to the Internet. Now do the proper configuration on the router to achieve this goal.

 

Requirements Analysis:

You need to configure a VLAN on the switch, then divide the sub-interface on the port where the router is connected to the switch, and set the IP address to the corresponding VLAN to implement routing between VLANs.

 

Experimental equipment:Router Layer 2 Switch

 

Preliminary knowledge:

Basic configuration method of the switch, working principle and configuration method of the VLAN, working principle and configuration method of the trunk, working principle and configuration method of the one-arm routing.

 

Experimental principle:

In a switched network, a physical network is logically divided by VLANs. Different VLANs cannot be directly accessed. You must connect through Layer 3 routing devices. Generally, routers or Layer 3 switches are used to implement mutual access between different VLANs.

Connect the router to the switch and use IEEE 802.1q to start the sub-interface on the router to become the trunk mode. You can use the router to implement communication between VLANs.

A router can receive a packet from a certain VLAN and forward the packet to another VLAN. To implement inter-VLAN routing, the sub-interface must be enabled on the physical interface of a router, that is, the physical network of one network. The interface is divided into multiple logical, addressable interfaces and configured in trunk mode. Each VLAN corresponds to one such interface so that the router can know how to reach these interconnected VLANs.

 

Steps:

Step 1: Configure the host name of the switch, assign VLANs and add ports, and set up trunks.

Switch#configure terminal

switch(config)#hostname s1

s1(config)#vlan 10

s1(config-vlan)#name xiaoshou

s1(config-vlan)#vlan 20

s1(config-vlan)#name jishu

s1(config-vlan)#exit

s1(config)#interface range fastEthernet 0/6-10

s1(config-if-range)#switchport mode access

s1(config-if-range)#switchport access vlan 10

s1(config-if-range)#exit

s1(config)#interface range fastEthernet 0/11-15

s1(config-if-range)#switchport mode access

s1(config-if-range)#switchport access vlan 20

s1(config-if-range)#exit

s1(config)#interface fastEthernet 0/1

s1(config-if)#switchport mode trunk

s1(config-if)#end

 

Step 2: Set the name, sub-interface, and ip address on the router.

cisco#configure terminal

cisco(config)#hostname r1

r1(config)#interface fastEthernet 0/0

r1(config-if)#no ip address

r1(config-if)#no shutdown

r1(config-if)#exit

r1(config)#interface fastEthernet 0/0.10

r1(config-subif)#encapsulation dot1Q 10

r1(config-subif)#ip address 192.168.10.1 255.255.255.0

r1(config-subif)#exit

r1(config)#interface fastEthernet 0/0.20

r1(config-subif)#encapsulation dot1Q 20

r1(config-subif)#ip address 192.168.20.1 255.255.255.0

r1(config-subif)#end

 

Tips:

(1) Before configuring the ip address for the subinterface of the router, you must first encapsulate the doutl1 protocol.

(2) The host in each VLAN should use the IP address of the corresponding VLAN sub-interface as the gateway.

Related FAQ

The difference between Cisco and Huawei router access control lists (ACLs)

The difference between Cisco and Huawei router access control lists (ACLs)

The difference between the two layer converging switch and the three layer core switch

The difference between the two layer converging switch and the three layer core switch

What is the use of ONU's PON port and PoE port?

What is the use of ONU's PON port and PoE port?

PRODUCT NAVIGATION

INQUIRY

CCIT offers around the clock, seven days availability to serve you,Call us and leave message.