(+84) 236.3827111 ex. 402

Cấu hình Inter-VLAN dùng SVI trên Switch L3


Cho sơ đồ:

 

Trên các PC:

set pcname PC10

ip 192.168.10.10/24 192.168.10.1

ip dns 8.8.8.8

save

show ip all

 

set pcname PC11

ip 192.168.10.11/24 192.168.10.1

ip dns 8.8.8.8

save

show ip all

 

set pcname PC20

ip 192.168.20.20/24 192.168.10.1

ip dns 8.8.8.8

save

show ip all

 

set pcname PC21

ip 192.168.20.21/24 192.168.10.1

ip dns 8.8.8.8

save

show ip all

 

i86bi_linux_l2-adventerprisek9-ms.SSA.high_iron_20190423int f0/0.10

 encapsulation dot1q 10

 ip add 192.168.10.1 255.255.255.0

 ip nat inside

 ex

 

int f0/0.20

 encapsulation dot1q 20

 ip add 192.168.20.1 255.255.255.0

 ip nat inside

 ex

 

access-list 1 permit 192.168.1.0 0.0.0.255

access-list 1 permit 192.168.10.0 0.0.0.255

access-list 1 permit 192.168.20.0 0.0.0.255

 

ip nat inside source list 1 interface F0/1 overload

 

ip domain-lookup

ip name-server 8.8.8.8

no ip cef

 

show running-config

show ip interface brief

show ip nat translations

 

en

conf t

hostname SWCore

vtp mode server

vtp domain dtu.vn

vtp password dtu@123

 

vlan 10

 name TaiChinh

 exit

vlan 20

 name KeToan

 exit

 

interface range e3/0 - 3

 switchport trunk encapsulation dot1q

 switchport mode trunk

 exit

 

interface VLAN 1

 no shutdown

 ip address 192.168.1.254 255.255.255.0

 exit

 

show vlan

show vtp status

show vtp password

show interface e3/1 trunk

 

SWCore(config)#spanning-tree vlan 1 priority 4096

SWCore(config)#spanning-tree vlan 10 priority 4096

 

en

conf t

hostname Switch1

vtp mode client

vtp domain dtu.vn

vtp password dtu@123

 

interface e3/1

 switchport trunk encapsulation dot1q

 switchport mode trunk

 exit

 

interface VLAN 1

 no shutdown

 ip address 192.168.1.11 255.255.255.0

 exit

 

interface range e0/0 - 3

 switchport mode access

 switchport access vlan 10

 exit

 

interface range e1/0 - 3

 switchport mode access

 switchport access vlan 20

 exit

 

show vlan

show vtp status

show vtp password

show interface e3/1 trunk

 

Switch1(config)#spanning-tree vlan 20 priority 4096

 

en

conf t

hostname Switch2

vtp mode client

vtp domain dtu.vn

vtp password dtu@123

 

interface e3/2

 switchport trunk encapsulation dot1q

 switchport mode trunk

 exit

 

interface VLAN 1

 no shutdown

 ip address 192.168.1.22 255.255.255.0

 exit

 

interface range e0/0 - 3

 switchport mode access

 switchport access vlan 10

 exit

 

interface range e1/0 - 3

 switchport mode access

 switchport access vlan 20

 exit

 

show vlan

show vtp status

show vtp password

show interface e3/2 trunk


 

Switch2(config)#spanning-tree vlan 20 priority 4096