Yêu cầu:
Gợi ý:
2: Để cấu hình định tuyến các VLAN dùng Multilayer Switch (MSW), việc đầu tiên là tạo các interface VLAN tương ứng với các VLAN cần định tuyến, thứ 2 là dùng lệnh ip routing trong chế độ config để bật tính năng định tuyến trên MSW.
SW(config-if)# ip routing
SW(config)# interface vlan 10
SW(config-if)# ip add 192.168.1.1 255.255.255.0
SW(config)# interface vlan 20
SW(config-if)# ip add 192.168.2.1 255.255.255.0
SW(config)# interface vlan 30
SW(config-if)# ip add 192.168.3.1 255.255.255.0
SW(config)# interface vlan 40
SW(config-if)# ip add 192.168.4.1 255.255.255.0
Cấu hình đầy đủ:
!MSW:
!
configure terminal
!
interface range fastEthernet 0/7 - 9
switchport trunk encapsulation dot1q
switchport mode trunk
!
vlan 10,20,30,40
!
vtp domain BCMSN
vtp pass 123abc
!
ip routing
!
interface vlan 10
ip address 192.168.1.1 255.255.255.0
!
interface vlan 20
ip address 192.168.2.1 255.255.255.0
!
interface vlan 30
ip address 192.168.3.1 255.255.255.0
!
interface vlan 40
ip address 192.168.4.1 255.255.255.0
!
end
!SW1:
!
configure terminal
!
interface fastEthernet0/8
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface fastEthernet0/24
switchport mode access
switchport access vlan 10
!
vtp mode client
vtp domain BCMSN
vtp pass 123abc
!
end
!SW2:
!
configure terminal
!
interface fastEthernet0/8
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface fastEthernet0/23
switchport mode access
switchport access vlan 20
!
interface fastEthernet0/24
switchport mode access
switchport access vlan 30
!
vtp mode client
vtp domain BCMSN
vtp pass 123abc
!
end
!SW3:
!
configure terminal
!
interface fastEthernet0/8
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface fastEthernet0/24
switchport mode access
switchport access vlan 40
!
vtp mode client
vtp domain BCMSN
vtp pass 123abc
!
end
!kiem tra trunking
#show interface trunk
!kiem tra vtp
#show vtp status
#show vlan brief
!kiem tra routing table
#show ip route