Cisco-arm routing

First, we look at what is the single-arm routing: route is a single arm interoperability between interfaces on a router configuration by way of sub-interfaces, originally isolated from each other achieve different vlan (virtual local area network).

———————————————————————————————————————————————

The sub-arm routing interfaces:

The physical interface of the router may be divided into a plurality of logical interfaces, which are divided after the logical interface is called the image of the sub-interfaces. It is noted that these individual logical sub-interface can not be turned on or off, i.e., when the physical interface is turned on or off, all of the sub-interfaces of the interface will also be turned on or off.

Single-arm routing advantages and disadvantages:

vlan effectively split the LAN, between the access control area network. But in reality, often you need to configure the interconnection between certain vlan. Such as, for example: your company is divided into leadership, sales, finance, Ministry of Personnel, Technology and configure different vlan different departments, between departments can not access each other, effectively ensuring the information security departments. But leaders often need to cross Vvlan access to various other sectors, this function can be implemented by a single-arm routing.

Advantages: communication between different vlan, help to understand and learn the principles and sub-vlan interface concept.

Disadvantages: easy to become a single point of failure, setup is a little complicated, little practical significance.

Demo:

Here Insert Picture Description

sw:

sw#conf t 
sw(config)#no ip routing
sw(config)#vlan 10,20
sw(config-vlan)#ex      
sw(config)#int f1/1
sw(config-if)#sw mo acc
sw(config-if)#sw acc vlan 10
sw(config-if)#int f1/2
sw(config-if)#sw mo acc 
sw(config-if)#sw acc vlan 20
sw(config-if)#do show vlan-sw b

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/3, Fa1/4, Fa1/5
                                                Fa1/6, Fa1/7, Fa1/8, Fa1/9
                                                Fa1/10, Fa1/11, Fa1/12, Fa1/13
                                                Fa1/14, Fa1/15
10   VLAN0010                         active    Fa1/1
20   VLAN0020                         active    Fa1/2
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 
sw(config-if)#ex  
sw(config)#int f1/0
sw(config-if)#sw mo t
sw(config-if)#sw t en dot
sw(config-if)#do show int f1/0 switchport
Name: Fa1/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1,10,20
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none 
Appliance trust: none

R1-arm configuration route:

R1#conf t
R1(config)#int f0/0.1       //配置子接口1
R1(config-subif)#encapsulation dot1Q 10         //在vlan10中封装协议
R1(config-subif)#ip add 192.168.10.1 255.255.255.0          //划分IP地址和子网
R1(config-subif)#no shut        //激活端口
R1(config-subif)#ex
R1(config)#int f0/0.2       //配置子接口2
R1(config-subif)#encapsulation dot1Q 20         //在vlan20中封装协议
R1(config-subif)#ip add 192.168.20.1 255.255.255.0          //划分IP地址和子网
R1(config-subif)#no shut        //激活端口
R1(config-subif)#ex
R1(config)#int f0/0 
R1(config-if)#no shut
R1(config-if)#end
R1#show ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  up                    up      
FastEthernet0/0.1          192.168.10.1    YES manual up                    up      
FastEthernet0/0.2          192.168.20.1    YES manual up                    up      
FastEthernet0/1            unassigned      YES unset  administratively down down    
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.10.0/24 is directly connected, FastEthernet0/0.1
C    192.168.20.0/24 is directly connected, FastEthernet0/0.2
//两个直连网段在这里

Host Configuration IP address:

PC1> ip 192.168.10.10 192.168.10.1
Checking for duplicate address...
PC1 : 192.168.10.10 255.255.255.0 gateway 192.168.10.1

PC2> ip 192.168.20.20 192.168.20.1
Checking for duplicate address...
PC1 : 192.168.20.20 255.255.255.0 gateway 192.168.20.1

Testing and interoperability with Wireshark packet capture:

PC1> ping 192.168.20.20                                   
192.168.20.20 icmp_seq=1 timeout
84 bytes from 192.168.20.20 icmp_seq=2 ttl=63 time=23.683 ms
84 bytes from 192.168.20.20 icmp_seq=3 ttl=63 time=17.958 ms
84 bytes from 192.168.20.20 icmp_seq=4 ttl=63 time=18.883 ms
84 bytes from 192.168.20.20 icmp_seq=5 ttl=63 time=20.704 ms
//此时是能够ping通的,说明单臂路由配置成功
10.10 is the source IP, destination IP is 20.20, this time after the switch port information vlan10 judgment is passed over, it will give branded ID: tag 10, we will see at this time packet capture

Here Insert Picture Description

R1 know after transmission section 20 to the routing table, label conversion at this time will do, the original ID: 10 become ID: 20

Here Insert Picture Description

Guess you like

Origin blog.51cto.com/14464303/2443948