1. 程式人生 > >MLS-多層交換

MLS-多層交換

<VLAN間路由>
VLAN之間在二層是分隔開的,如果要實現VLAN之間的通訊,必須要藉助到三層路由功能。

·支援VLAN間路由的裝置:
 1.任意的3層交換機
 2.支援以太口起子介面的路由器(2600以上)

<單臂路由(Router on a Stick)>
通過使用路由器完成VLAN之間的路由,路由器上要起子介面,並且要和交換機之間形成trunk。

 例如:                          R

                             (f1/0)

                               |

                               |

                             (f1/5)

                               SW

                          (f1/6)(f1/7)

                             /   

                           /       

                        (f1/0)     (f1/0)

                          PC1        PC2

R的配置:

R#sh run
Building configuration...
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet1/0.1
 encapsulation dot1Q 10
 ip address 172.16.1.1 255.255.255.0
!
interface FastEthernet1/0.2
 encapsulation dot1Q 20
 ip address 172.16.2.1 255.255.255.0

SW的配置:

SW#sh run int f1/5
Building configuration...

Current configuration : 71 bytes
!
interface FastEthernet1/5
 switchport mode trunk
 no ip address
end

SW#sh run int f1/6
Building configuration...

Current configuration : 75 bytes
!
interface FastEthernet1/6
 switchport access vlan 10
 no ip address
end

SW#sh run int f1/7
Building configuration...

Current configuration : 75 bytes
!
interface FastEthernet1/7
 switchport access vlan 20
 no ip address
end

SW#sh vlan bri

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/1, Fa1/2, Fa1/3
                                                Fa1/4, Fa1/8, Fa1/9, Fa1/10
                                                Fa1/11, Fa1/12, Fa1/13, Fa1/14
                                                Fa1/15
10   VLAN0010                         active    Fa1/6
20   VLAN0020