<?xml version="1.0" encoding="UTF-8" ?><!-- generator=Zoho Sites --><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.daihockhonggiay.com/blogs/tag/switch-cisco/feed" rel="self" type="application/rss+xml"/><title>Đại học Không Giấy - Blog #Switch Cisco</title><description>Đại học Không Giấy - Blog #Switch Cisco</description><link>https://www.daihockhonggiay.com/blogs/tag/switch-cisco</link><lastBuildDate>Wed, 10 Sep 2025 19:15:21 -0700</lastBuildDate><generator>http://zoho.com/sites/</generator><item><title><![CDATA[Tổng hợp cấu hình Switch Cisco]]></title><link>https://www.daihockhonggiay.com/blogs/post/tong-hop-cau-hinh-switch-cisco</link><description><![CDATA[<img align="left" hspace="5" src="https://www.daihockhonggiay.com/sw.jpg"/>Bài viết này sẽ giúp các bạn có góc nhìn về cấu hình tổng hợp Switch Cisco một cách chi tiết nhất]]></description><content:encoded><![CDATA[<div class="zpcontent-container blogpost-container "><div data-element-id="elm_d-Mza1ERQJm-JELAg9SSyg" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer-fluid zpcontainer"><div data-element-id="elm_A_f7S5zfSbmxxDdnGdb3_g" data-element-type="row" class="zprow zprow-container zpalign-items- zpjustify-content- " data-equal-column=""><style type="text/css"></style><div data-element-id="elm_5J1dhZbmT1m4JHkkTg_5HQ" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"> [data-element-id="elm_5J1dhZbmT1m4JHkkTg_5HQ"].zpelem-col{ border-style:none; } </style><div data-element-id="elm_pHvHiYsmS86F0HA1xiKA7g" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_pHvHiYsmS86F0HA1xiKA7g"].zpelem-text { border-style:none; border-radius:1px; } </style><div class="zptext zptext-align-left " data-editor="true"><p style="margin-bottom:20px;"><span style="font-weight:bold;color:rgb(0, 8, 13);">I. Tổng quan về lý thuyết</span></p><p style="margin-bottom:20px;"><span style="font-weight:bold;color:rgb(0, 8, 13);">1. Chuẩn bị trang thiết bị</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch Cisco 2960</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">IOS Switch Cisco 2960</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Dây Console, dây cáp thẳng</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">PC có cổng COM để cắm dây Console</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Phần mềm PUTY để kết nối Router</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Phần mềm TFTP Server</span></p><p style="margin-bottom:20px;"><span style="font-weight:bold;color:rgb(0, 8, 13);">2. Nạp IOS cho Switch bằng&nbsp;TFTP Server</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Trên máy PC hoặc Server</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Cài đặt TFTP Server</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Copy IOS của Switch vào thư mục của TFTP</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Trên Switch</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Khởi động lại bằng tắt rồi bật nguồn và nhấn Ctrl + Break</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Trong Rommon ta thiết lập như sau:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 1 &gt; set&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; Xem thông tin</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 2 &gt; IP_ADDRESS=10.10.3.100&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; Địa chỉ IP cho port</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 3 &gt; IP_SUBNET_MASK=255.255.255.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; Subnet mask</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 4 &gt; DEFAULT_GATEWAY=10.10.3.1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; Default gateway</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 5 &gt; TFTP_SERVER=10.10.3.1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; Địa chỉ TFTP server</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 6 &gt; TFTP_FILE=c2600-is-mz.113-2.0.2.Q&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; tên file cần nạp</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 7 &gt; sync&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; để lưu giá trị vào NVRAM</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">rommon 8 &gt; tftpdnld&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; Bắt đầu quá trình nạp</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">3. Cấu hình VLAN</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">a. Cấu hình cơ bản</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch#configure terminal</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config)#----------------=&gt; Mode config | Mode global (Mode cấu hình)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config)#hostname SW1 =&gt; Đặt tên cho Switch</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#enable password cisco =&gt; Đặt pass enable là cisco (khi chuyển từ Mode người dùng sang Mode quản trị sẽ yêu cầu mật khẩu).</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#enable secret cisco =&gt; Đặt pass enable secret là cisco (pass này sẽ được dùng khi câu lệnh này được thực hiện. Cao hơn pass của enable)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#line console 0</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#password cisco =&gt; Đặt pass khi truy nhập vào Switch bằng đường Console.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#login</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#line vty 0 4</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#password cisco =&gt; Đặt pass khi truy nhập vào Switch bằng đường telnet</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#login</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config-line)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#banner motd !Hello! =&gt; Đặt lời chào cho Switch, lưu ý ký tự bắt đầu và ký tự kết thúc của lời chào phải giống nhau.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW1(config)#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">b. Cấu hình VLAN</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+&nbsp; Đặt tên cho VLAN:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Vlan 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-vlan)# name IT</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-vlan)# exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Gán cổng cho VLAN:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# interface&nbsp; range&nbsp; f0/1-5</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if-range)#switchport access&nbsp; vlan 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Gán Trunking cho cổng:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Đối với dòng 2900 nó hỗ trợ sẵn dot1Q nên không cần bật. Chỉ cần vào cổng bật Trunk lên là xong</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# interface f0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport mode trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Đối với dòng 3500 trở lên phải vào bật dot1Q hay ISL nó mới chạy. Nếu không bật sẽ báo lỗi:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# interface f0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport trunk encapsulation [dot1Q hay ISL]</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport mode trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Chú ý: thường gán cổng trunk chạy sang Switch khác hoặc về Router.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Gán Native VLAN vào VLAN quản lý:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Vlan 99</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-vlan)# name Managerment</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-vlan)# exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# interface f0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport mode trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport trunk native vlan 99</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">4. Cấu hình VTP</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">a. Câu lệnh cấu hình tổng quan</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; mode [Server | Client | Transparent ]</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; domain&nbsp; domain-name</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pasword&nbsp; abc</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp version number</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pruning</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">b. Câu lệnh chi tiết</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Trên Switch Server:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Khởi tạo VTP Server:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; mode Server</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; domain&nbsp; cisco</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pasword&nbsp; abc</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp version 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pruning (Packet tracer không hỗ trợ).</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Bật đường Trunking của cổng kết nối tới các SW Client:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#interface f0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if)#switchport mode trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Khởi tạo tên VLAN:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vlan 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#name IT</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vlan 3</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#name Sale</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Trên Switch Transparent:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; mode transparent</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; domain&nbsp; cisco</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pasword&nbsp; abc</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pruning&nbsp; (Packet tracer không hỗ trợ).</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Trên Switch VTP Client:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Khởi tạo VTP Client:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; mode client</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp&nbsp; domain&nbsp; cisco</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pasword&nbsp; abc</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#vtp pruning&nbsp; (Packet tracer không hỗ trợ).</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">- Gán cổng cho SW: Phải gán cổng cho SW vì VTP Server không gửi thông tin gán cổng cho Client.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#interface range f0/1-10</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if-range)#switchport access vlan 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if-range)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)#interface range f0/11-20</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if-range)#switchport access vlan 3</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-if-range)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">5. Cấu hình STP</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">a. Một số điểm cần lưu ý khi cấu hình Switch Cisco</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Mặc định Switch Cisco là bật mặc định STP.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Mode default là PVST+ là mỗi VLAN chạy một cây STP</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch Cisco không hỗ trợ SPT truyền thống là 802.1D mà phải PVST+</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">b. Các lệnh hiệu chỉnh STP</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Cấu hình Root SW: phải chỉ ra vì nó cần có cấu hình mạnh</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Tùy chọn 1 trong 2 trường hợp: SW(config)#spanning-tree vlan&nbsp; n&nbsp; root [primary | secondary]</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">vd: SW(config)#spanning-tree vlan&nbsp; 3&nbsp; root primary (chỉ ra Switch nào làm Root).</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Chỉ cố định luôn: SW(config)#spanning-tree vlan&nbsp; n&nbsp; priority gt (giá trị priority mong muốn phải chia hết cho 4096)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">vd: SW(config)#spanning-tree vlan&nbsp; 3&nbsp; priority 8192</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Cấu hình Port Fast:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# int f0/10</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-ip)# switchport mode access</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config-ip)# Spanning-tree portfast</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">c. Lệnh chống bão Broadcast trên cổng cho STP:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">storm-control broadcast level pps 1500 1000</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ upper =1500 (gói giới hạn được đi qua)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Low = 1000 (cảnh báo)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">storm-control {broadcast|multicast|unicast} level {level [level-low] | bps bps [bps-low] | pps pps [pps-low]}</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">for example:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">block at 80% utilization, unblock at 50%</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">storm-control broadcast level 80 50</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">or</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">block at 100 pps, unblock at 70 pps</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">storm-control broadcast pps 100 70</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">storm-control action {shutdown | trap}</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">d. Block Unicast và Multicast Flooding:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch# configure terminal</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config)# interface gigabitethernet0/1</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config-if)# switchport block multicast</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config-if)# switchport block unicast</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Switch(config-if)# end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">6. Cấu hình Inter-VLAN</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Chia thành 3 VLAN là: 2, 3, 4 tương ứng như sau:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">VLAN 2: IT đường địa chỉ: 192.168.1.0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">VLAN 3: Sale đường địa chỉ: 192.168.2.0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">VLAN 4: Mar đường địa chỉ: 192.168.3.0/24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Cấu hình VTP Server, Client</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">+ Cấu hình định tuyến VLAN để các dải ping thông nhau</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Cấu hình định tuyến VLAN:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config)#int f0/0</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-if)#no shut</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config)#int f0/0.2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#encapsulation dot1Q 2</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#ip add 192.168.1.1 255.255.255.0</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config)#int f0/0.3</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#encapsulation dot1Q 3</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#ip add 192.168.2.1 255.255.255.0</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#exit</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config)#int f0/0.4</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#encapsulation dot1Q 4</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#ip add 192.168.3.1 255.255.255.0</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">R1(config-subif)#end</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">7. Các lệnh kiểm tra trên Switch</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">a. Các lệnh kiểm tra VLAN:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Show vlan</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Show vlan brief</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Show interfaces trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">chú ý: file cấu hình VLAN đặt trong bộ nhớ flash là: vlan.dad. Không lưu trong file Running config</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">b. Các lệnh kiểm tra VTP:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# show vtp status</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# show vtp pasword</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# show vlan</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">SW(config)# Show interfaces trunk</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">c. Các lệnh kiểm tra STP:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Show Spanning-tree vlan&nbsp; n</span></p><p style="margin-bottom:20px;"><span style="font-weight:bold;color:rgb(0, 8, 13);">8. Reset Password switch Cisco</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Trường hợp 1: Nếu bạn muốn cấu hình lại thiết bị Switch từ một sw đã có cấu hình rồi, nhưng lại không có mật khẩu để vào switch; &nbsp;ta muốn xóa cả file config<br>Trường hợp 2: Quyên mật khẩu switch ta muốn đặt lại pass nhưng không muốn mất cấu hình cũ trong switch.<br>Không như router, đặt lại mật khẩu cho switch khác hẳn. Sau đây Lab sẽ hướng dẫn các bước để giải quyết các trường hợp trên.<br>Nguyên lý:<br>– Khi ta boot switch vào chế độ ROM bằng cách giữ nút MODE<br>– Thay đổi tên file lưu trữ cấu hình trong flash là config.text sang tên khác ví dụ như config.cu<br>– Boot switch vào chế độ bình thường, vào chế độ Privilige và copy nội dung file cấu hình config.cu sang RAM<br>– Thay đổi Password rồi ghi lại vào nvram<br>(nếu là áp dụng cho trường hợp 1 thì không cần 2 bước sau)</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Yêu cầu:<br>B1:- Bạn kết nối Switch với PC qua cổng Console hoặc qua USB<br>– Trên PC có cài đặt phần mềm để kết nối dòng lệnh giống như Putty hoặc SecureCRT…<br>B2: Bạn bật nguồn, trong khi đó, ta nhấn giữ nút MODE</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Thực hiện lab:<br>Bước 1 – Tay nhấn vào nút MODE và tiến hành bật nguồn switch, giữ nút trong vòng khoảng 15s và thả ra</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Bước 2 –Ta sẽ nhìn thấy Switch hiển thị các thông tin trong chế độ ROM như sau:<br>Boot Sector Filesystem (bs) installed, fsid: 2<br>Base ethernet MAC Address: 00:14:f2:d2:41:80<br>Xmodem file system is available.<br>The password-recovery mechanism is enabled.</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">The system has been interrupted prior to initializing the<br>flash filesystem. The following commands will initialize<br>the flash filesystem, and finish loading the operating<br>system software:</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">flash_init<br>load_helper<br>boot</span></p><p style="margin-bottom:20px;"><span><span style="color:rgb(0, 8, 13);">switch:</span><br><span style="color:rgb(0, 8, 13);">Bước 3 – ta nhập lệnh flash_init để nhận thiết bị flash</span><br><span style="color:rgb(234, 119, 4);">switch:flash_init</span><br><span style="color:rgb(0, 8, 13);">Initializing Flash…</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: 5 files, 1 directories</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: 0 orphaned files, 0 orphaned directories</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: Total bytes: 15998976</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: Bytes used: 12282368</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: Bytes available: 3716608</span><br><span style="color:rgb(0, 8, 13);">flashfs[0]: flashfs fsck took 10 seconds.</span><br><span style="color:rgb(0, 8, 13);">…done Initializing Flash.</span></span></p><p style="margin-bottom:20px;"><span><span style="color:rgb(0, 8, 13);">switch:</span><br><span style="color:rgb(0, 8, 13);">Bước 4 – Xem nội dung flash, mặc định file cấu hình của switch được lưu với tên config.text;</span><br><span style="color:rgb(234, 119, 4);">switch:dir flash:</span><br><span style="color:rgb(0, 8, 13);">Directory of flash:/</span><br><span style="color:rgb(0, 8, 13);">1 -rwx 10573494 c3560-advipservicesk9-mz.122-44.SE6.bin</span><br><span style="color:rgb(0, 8, 13);">2 -rwx 684 vlan.dat</span><br><span style="color:rgb(0, 8, 13);">3 -rwx 1938 private-config.text</span><br><span style="color:rgb(0, 8, 13);">4 -rwx 1654 config.text</span><br><span style="color:rgb(0, 8, 13);">5 -rwx 3096 multiple-fs</span></span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">3716608 bytes available (10508886 bytes used)</span></p><p style="margin-bottom:20px;"><span><span style="color:rgb(0, 8, 13);">switch:</span><br><span style="color:rgb(0, 8, 13);">Bước 5: Nếu ta muốn xóa cả file cấu hình config.text này luôn thì bạn gõ lệnh</span><br><span style="color:rgb(234, 119, 4);">delete flash:config.text</span><br><span style="color:rgb(0, 8, 13);">Còn nếu muốn chỉ thay mật khẩu mà giữ lại các cấu hình khác thì ta cần đổi tên file config.text sang tên khác</span><br><span style="color:rgb(0, 8, 13);">switch:rename flash:config.text flash:config.cu</span><br><span style="color:rgb(0, 8, 13);">Bước 6 – Sau khi bạn đổi tên tệp config.text file sang config.cu ta xem lại nội dung flash bằng lệnh dir flash:</span></span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Sau khi đã đổi tên thành công ta boot vào switch bằng lệnh boot</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Bước 7<br>— System Configuration Dialog —</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);"></span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Would you like to enter the initial configuration dialog? [yes/no]: n<br>Switch&gt;<br>Bước 8 vào chế độ 2 và copy nội dung file bạn đã đổi tên vào RAM bằng lệnh copy flash:config.cu run<br>Switch&gt;enable<br>Switch#copy flash:config.cu run<br>Destination filename [running-config]?<br>1654 bytes copied in 9.647 secs (171 bytes/sec)<br>NEWEPOCH#<br>Bước 10 – Sau khi ta copy nội dung file có chứa cấu hình vào running, ta cần đổi lại Password mới, nhớ rằng bạn nên đặt password cả 2 loại mã hóa (nếu cần) và ghi lại vào Nvram với lệnh copy run start .<br>Switch#configure terminal<br>Switch(config)#enable password NEWENABLEPASSWORD<br>Switch(config)#line con0<br>Switch(config-line)#password NEWCONSOLELINEPASSWORD<br>Switch(config-line)#end<br>Switch#copy run start<br>Destination filename [startup-config]?<br>Building configuration…<br>[OK]<br>0 bytes copied in 1.309 secs (0 bytes/sec)<br>Switch#</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">II. Thực hành</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">a.Yêu cầu chuẩn bị&nbsp;</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">1 Switch 2950-24</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">1 PC</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Dây cáp FastEthernet,Console</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">b.Yêu cầu nội dung&nbsp;</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Đấu nối thiết bị như sơ đồ</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Cấu hình cơ bản cho Switch</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Cấu hình trên các Interface</span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);">Kiểm tra kết nối giữa các thiết bị trong mạng</span></p><p style="text-align:center;"></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);"></span></p><p style="margin-bottom:20px;"><span style="color:rgb(0, 8, 13);font-weight:bold;">c. Video hướng dẫn</span></p></div>
</div><div data-element-id="elm_tqMiAID7jjM9mUVJwR6a7w" data-element-type="video" class="zpelement zpelem-video "><style type="text/css"> [data-element-id="elm_tqMiAID7jjM9mUVJwR6a7w"].zpelem-video{ border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } </style><div class="zpvideo-container zpiframe-align-center zpiframe-mobile-align- zpiframe-tablet-align-"><iframe class="zpvideo " width="560" height="315" src="//www.youtube.com/embed/DNtNl9nXNks" frameborder="0" allowfullscreen></iframe></div>
</div><div data-element-id="elm_SgfumZXgl0f3O6TIVzJdlA" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_SgfumZXgl0f3O6TIVzJdlA"].zpelem-text { text-transform:none; border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } [data-element-id="elm_SgfumZXgl0f3O6TIVzJdlA"].zpelem-text :is(h1,h2,h3,h4,h5,h6){ text-transform:none; } </style><div class="zptext zptext-align-left " data-editor="true"><p><span><br></span></p><p><span><br></span></p><p><span>-----&amp;-----&amp;-----</span><br></p><p><span style="font-weight:bold;">Để quay về danh sách các bài phần Network các bạn chọn link sau</span></p><p><span style="color:inherit;"></span></p><p><a href="https://www.quantrimangdn.com/blogs/post/tong-hop-cac-bai-phan-network" style="color:rgb(74, 43, 212);">https://www.quantrimangdn.com/blogs/post/tong-hop-cac-bai-phan-network</a></p></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Fri, 03 May 2019 00:49:57 +0700</pubDate></item></channel></rss>