Bước 5:mode trunk

Một phần của tài liệu Tim Hiểu Về Switch cisco (Trang 26 - 28)

Sau bước 4 đã cấu hình switch và các máy tính trong cùng VLAN đã thấy được nhau, nhưng không thế thấy được các máy tính trong các vlan khác. Bước sẽ cấu hình Default gateway cho các VLAN và cấu hình định tuyến cho các VLAN trên Router.“Trong mô hình thực tế triến khai, thường dùng switch layer 3 để thay thế cho Router làm việc này”.

Access(config)#interface f0/7

Access(config-if)#switchport mode trunk Access(config-if)#no shutdown

Access(config-if)#exit +Cấu hình trên Router.

B1: Router(config)#int f0/0 Router(config-if)#no shu Router(config-if)#no shutdown Router(config-if)# exit Router(config)# B2: Router(config)#int f0/0.4 Router(config-subif)#encapsulation dot1Q 4 Router(config-subif)#ip address 192.168.4.1 255.255.255.0 Router(config-subif)#exit Router(config)# B3: Router(config)#int f0/0.2 Router(config-subif)#encapsulation dot1Q 2 Router(config-subif)#ip address 192.168.2.1 255.255.255.0 Router(config-subif)#exit Router(config)# B4: Router(config)#int f0/0.3 Router(config-subif)#encapsulation dot1Q 3 Router(config-subif)#ip address 192.168.3.1 255.255.255.0 Router(config-subif)#exit Router(config)#

B5: kiểm tra xem các interface:

Router#sh ip int brief

FastEthernet0/0 unassigned YES unset up up

FastEthernet0/0.2 192.168.2.1 YES manual up up FastEthernet0/0.3 192.168.3.1 YES manual up up FastEthernet0/0.4 192.168.4.1 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down Vlan1 unassigned YES unset administratively down down cấu hình địa chỉ gateway cho các máy tính theo những VLAN tương ứng. Pc1,pc2: 192.168.2.1

Pc3,pc4:192.168.3.1 Pc5,pc6:192.168.4.1

khi hoàn thành các bước trên các bạn thử ping từ pc1 tới pc3,4 và pc5,6 xem kết quả.

PC2>ping 192.168.3.11

Pinging 192.168.3.11 with 32 bytes of data:

Reply from 192.168.3.11: bytes=32 time=18ms TTL=127 Reply from 192.168.3.11: bytes=32 time=16ms TTL=127 Reply from 192.168.3.11: bytes=32 time=10ms TTL=127 Reply from 192.168.3.11: bytes=32 time=10ms TTL=127 Ping statistics for 192.168.3.11:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

Một phần của tài liệu Tim Hiểu Về Switch cisco (Trang 26 - 28)