Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Định tuyến VLAN – Router on the stick

 Bước 1: Tạo các VLAN

SW(config)#vlan 2

SW(config-vlan)#ex

SW(config)#vlan 3

SW(config)#int e0/1

SW(config-if)#switchport access VLAN 1

SW(config)#int e0/2

SW(config-if)#switchport access VLAN 2

SW(config)#int e0/3

SW(config-if)#switchport access VLAN 3

 Bước 2 : Thực hiện cấu hình TRUNKING trên Switch


SW(config)#int e0/0

SW(config-if)#switchport trunk encapsulation dot1q

SW(config-if)#switchport mode trunk

 Bước 3: Tiến hành cấu hình định tuyến “Router on a stick” trên Router

R1(config)#int e0/0

R1(config-subif)#no shut

R1(config)#int e0/0.1

R1(config-subif)#encapsulation dot1q 1

R1(config-subif)#ip add 192.168.1.1 255.255.255.0

R1(config-subif)#ex

R1(config)#int e0/0.2

R1(config-subif)#encapsulation dot1q 2

R1(config-subif)#ip add 192.168.2.1 255.255.255.0

R1(config-subif)#ex

R1(config)#int e0/0.3

R1(config-subif)#encapsulation dot1q 3

R1(config-subif)#ip add 192.168.3.1 255.255.255.0

R1(config-subif)#ex
 Bước 4: Cấu hình trên SW

SW(config)#no ip cef (lưu ý khi sử dụng eve-ng)

Cấu hình địa chỉ quản lý cho SW

SW(config)#int vlan 1

SW(config-if)#ip add 192.168.1.251 255.255.255.0

SW(config-if)#no shut

 Bước 5: Đặt IP cho PC


VPC1:

IP: 192.168.1.2/24, gw: 192.168.1.1

VPC2:

IP : 192.168.2.2/24, gw: 192.168.2.1

VPC3:

IP : 192.168.3.2/24, gw: 192.168.3.1

 Bước 6: Ping kiểm tra giữa các PC

You might also like