Lab 4.3: (2) Cấu hình InterVLAN trên Switch Layer 3

By , 0 View

Mục tiêu thực hành:
- Kích hoạt chức năng định tuyến trên Switch Layer 3.
- Thiết lập địa chỉ IP trên các Vlan như thể hiện trên sơ đồ mạng của Switch Layer 3.
- Kiểm tra bảng định tuyến trên Switch Layer 3.
- Cấu hình định tuyến tĩnh Static Route trên Switch Layer 3.
- Cấu hình DHCP Server trên Switch Layer 3 cấp phát địa chỉ IP cho LAN1 & LAN2.

Truy cập vào "Lab 4-3 - Cau hinh InterVLAN tren Switch Layer 3 v1" tại Public Unetlab Server 24/7 để thực hành.

Kích hoạt chức năng định tuyến trên Switch Layer 3.
Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip routing

Thiết lập địa chỉ IP trên các Vlan như thể hiện trên sơ đồ mạng của Switch Layer 3.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 172.16.1.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#
 
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#interface vlan 2
Switch(config-if)#ip address 172.16.2.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#

Switch(config)#vlan 10          
Switch(config-vlan)#exit
Switch(config)#interface vlan 10
Switch(config-if)#ip address 172.16.10.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#

Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#interface vlan 20
Switch(config-if)#ip address 172.16.20.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#end
Switch#

Switch#show ip interface brief 
Interface              IP-Address      OK? Method Status                Protocol
Ethernet0/0            unassigned      YES unset  up                    up      
Ethernet0/1            unassigned      YES unset  up                    up      
Ethernet0/2            unassigned      YES unset  up                    up      
Ethernet0/3            unassigned      YES unset  up                    up      
Vlan1                  172.16.1.254    YES manual up                    up      
Vlan2                  172.16.2.254    YES manual up                    up      
Vlan10                 172.16.10.254   YES manual up                    up      
Vlan20                 172.16.20.254   YES manual up                    up      
Switch#

Kiểm tra bảng định tuyến trên Switch Layer 3.
Switch#show ip route connected 
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
C        172.16.1.0/24 is directly connected, Vlan1
L        172.16.1.254/32 is directly connected, Vlan1
C        172.16.2.0/24 is directly connected, Vlan2
L        172.16.2.254/32 is directly connected, Vlan2
C        172.16.10.0/24 is directly connected, Vlan10
L        172.16.10.254/32 is directly connected, Vlan10
C        172.16.20.0/24 is directly connected, Vlan20
L        172.16.20.254/32 is directly connected, Vlan20
Switch#

Cấu hình định tuyến tĩnh Static Route trên Switch Layer 3.
- Cấu hình Default Route trên Switch Layer 3 trỏ tới R1 để các mạng Local LAN và Server có thể truy cập Internet.
Switch#configure terminal
Switch(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.1

- Cấu hình Static Route trên R1.
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.254
R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.2.254
R1(config)#ip route 172.16.20.0 255.255.255.0 172.16.2.254


Cấu hình DHCP Server trên Switch Layer 3 cấp phát địa chỉ IP cho LAN1 & LAN2.
R1(config)#ip dhcp excluded-address 172.16.10.254
R1(config)#ip dhcp pool LAN1
R1(dhcp-config)#network 172.16.10.0 255.255.255.0
R1(dhcp-config)#default-router 172.16.10.254
R1(dhcp-config)#dns-server 8.8.4.4
R1(dhcp-config)#exit
R1(config)#

R1(config)#ip dhcp excluded-address 172.16.20.254
R1(config)#ip dhcp pool LAN2
R1(dhcp-config)#network 172.16.20.0 255.255.255.0
R1(dhcp-config)#default-router 172.16.20.254
R1(dhcp-config)#dns-server 8.8.4.4
R1(dhcp-config)#exit
R1(config)#

Tham khảo các videos lý thuyết Hướng dẫn thực hành CCNA R&S để biết thêm thông tin chi tiết. 


You Might Also Like

0 comments