Danh mục

Cấu hình Switch

Số trang: 8      Loại file: doc      Dung lượng: 45.50 KB      Lượt xem: 2      Lượt tải: 0    
10.10.2023

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Cấu hình các thông số cơ bản cho Catalys Switch với giao diệndòng lệnh CLI. Các tác vụ cần thực hiện bao gồm đặt tên choswitch, cấu hình các interface vlan, cấu hình để telnet vàoswitch….Dùng máy trạm kết nối với switch qua kết nối console,giao diện tương tác người dùng sử dụng trình HyperTerminal.Đây là một công cụ đuợc MS Windows hỗ trợ.
Nội dung trích xuất từ tài liệu:
Cấu hình Switch Cấu hình switch cơ bảnMô tảCấu hình các thông số cơ bản cho Catalys Switch với giao diệndòng lệnh CLI. Các tác vụ cần thực hiện bao gồm đặt tên choswitch, cấu hình các interface vlan, cấu hình để telnet vàoswitch….Dùng máy trạm kết nối với switch qua kết nối console,giao diện tương tác người dùng sử dụng trình HyperTerminal.Đây là một công cụ đuợc MS Windows hỗ trợ.Thực hiện1. Khởi động nguồn của switch. Trên giao diện Hyper Terminalhiện ra các thông số khởi tạo trong quá trình khởi động Switch.% Please answer yes or no.Would you like to enter the initial configuration dialog? [yes/no]:noPress RETURN to get started!00:04:13: %LINK-5-CHANGED: Interface Vlan1, changed stateto administratively down00:04:14: %LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to downNgười dùng sẽ được hỏi nếu muốn vào các hộp thoại để cấuhình tự động, trả lời NO (vì mục đích của người dùng là muốnvào chế độ CLI (command line interface).2. Vào enable mode xem cấu hình mặc định của switchSwitch>enableSwitch#show running-configBuilding configuration...Current configuration : 1473 bytes!version 12.1!hostname Switch!ip subnet-zero!spanning-tree mode pvstspanning-tree extend system-id!interface FastEthernet0/1no ip address!interface FastEthernet0/2no ip address!interface FastEthernet0/3no ip address!interface FastEthernet0/4no ip address!interface FastEthernet0/5no ip address!interface FastEthernet0/6no ip address!interface FastEthernet0/7no ip address!interface FastEthernet0/8no ip address!interface FastEthernet0/9no ip address!interface FastEthernet0/10no ip address!interface FastEthernet0/11no ip address!interface FastEthernet0/12no ip address!interface GigabitEthernet0/1no ip address!interface GigabitEthernet0/2no ip address!interface Vlan1no ip addressshutdown!ip classlessip http server!line con 0line vty 5 15!end3. Thiết lập các thông số cho switch như hostname, enablepassword, console password và virtual terminal password. Các loạipassword sử dụng có phân biệt chữ thường và chữ hoa. Do đóngười dùng cần phân biết các ký tự sử dụng chữ viết hoa khácvới chữ viêt thường. Ví dụ Cisco khác với cisco.Switch#config terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname VnproVnpro(config)#enable password ciscoVnpro(config)#enable secret classVnpro(config)#line console 0Vnpro(config-line)#password consoleVnpro(config-line)#loginVnpro(config-line)#^ZSwitch hỗ trợ các Virtual Line dùng cho các phiên telnet. Cần cấuhình password cho các line này mới có thể telnet vào Switch (trìnhtự cấu hình hỗ trợ telnet sẽ trình bày sau). Để xem thông tin vềcác Virtual Line trên Switch: dùng lệnh “show line”.Vnpro#show lineTty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise OverrunsInt* 0 CTY - - - - - 0 0 0/0 -1 VTY - - - - - 0 0 0/0 -2 VTY - - - - - 0 0 0/0 -3 VTY - - - - - 0 0 0/0 -4 VTY - - - - - 0 0 0/0 -5 VTY - - - - - 0 0 0/0 -6 VTY - - - - - 0 0 0/0 -7 VTY - - - - - 0 0 0/0 -8 VTY - - - - - 0 0 0/0 -9 VTY - - - - - 0 0 0/0 -10 VTY - - - - - 0 0 0/0 -11 VTY - - - - - 0 0 0/0 -12 VTY - - - - - 0 0 0/0 -13 VTY - - - - - 0 0 0/0 -14 VTY - - - - - 0 0 0/0 -15 VTY - - - - - 0 0 0/0 -16 VTY - - - - - 0 0 0/0 -Cấu hình password cho các line vtyVnpro#config terminalEnter configuration commands, one per line. End with CNTL/Z.Vnpro(config)#line vty 0 4Vnpro(config-line)#password ciscoVnpro(config-line)#loginCấu hình trên thiết bị Cisco, mỗi dòng lệnh do người dùng gõvào. Sau khi nhấn phím “enter” cấu hình hệ thống sẽ lập tứcthay đổi. Vì vậy, đối với các hệ thống mạng thật, trước khi thayđổi một thông số nào đó của thiết bị, cần phải sao lưu lại cấuhình ban đầu để có thể khôi phục lại khi cần thiết.Bước 4: cấu hình Vlan.Kiếm tra cấu hình Vlan mặc định trên SwitchVnpro#show vlanVLAN Name Status Ports1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/10, Fa0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16Fa0/17, Fa0/18, Fa0/19, Fa0/20Fa0/21, Fa0/22, Fa0/23, Fa0/24Gi0/1, Gi0/21002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgModeTrans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0Remote SPAN VLANs------------------------------------------------------------------------------Primary Secondary Type Ports------- --------- ----------------- ------------------------------------------Mặc định trên Switch chỉ có Vlan 1 với tất cả các port đều nằmtrong Vlan này, Vlan 1002 dành riêng cho FDDI, Vlan 1003 dànhriêng cho TOKEN-RING…Có hai cách tạo thêm VlanCách 1:Thao tác trên Vlan databaseVnpro#vlan databaseVnpro(vlan)#vtp domain ChuyenvietChanging VTP domain name from NULL to ChuyenvietVnpro(vlan)#vtp serverSetting device to VTP SERVER mode.Vnpro(vlan)#vlan 10 name AdminVLAN 10 added:Name: AdminVnpro(vlan)#vlan 20 name UserVLAN 20 added:Name: UserVnpro(vlan)#applyAPPLY completed.Vnpro(vlan)#exitAPPLY completed.Exiting....Cách 2: Tưong tác trực tiếp đến Vlan cần tạo raVnpro(config)#interface vlan 10Vnpro(config-if)#exitVnpro(config)#Vnpro(config)#interface vlan 20Vnpro(config-if)#exitVnpro(config)#Để gán các port vào các Vlan, thực hiện các bước sau:Ví dụ ta cần gán các port fastethernet 2 vào Vlan 10, portfastetehnet 3 vào Vlan 20Vnpro(config)#interface fastethernet0/2Vnpro(config-if-range)#switchport access vlan 10Vnpro(config-if-range)#exitVnpro(config)#interface fastethernet0/3Vnpro(config-if-range)#switchport access vlan 20Vnpro(config-if-range)#exitKiểm tra lại cấu h ...

Tài liệu được xem nhiều: