1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Cấu hình Switch cơ bản

17 957 8
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Cấu Hình Switch Cơ Bản
Tác giả Trương Quang Dũng
Trường học Not Available
Chuyên ngành Công Nghệ Thông Tin
Thể loại Bài Lab
Năm xuất bản Not Available
Thành phố Not Available
Định dạng
Số trang 17
Dung lượng 122,7 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Mô tả cách thức cấu hình các thông số cơ bản cho Catalys Switch với giao diện comman prompt (cách cấu hình này giống nhau đối với nhiều Series Catalys Switch).

Trang 1

Tr l i danh sách các bài vi tở ạ ế

C u hình Switch c b n ấ ơ ả

Tác gi :Tr ả ươ ng Quang Dũng

M c tiêu bài Lab ụ : Mô t cách th c c u hình các thông s ả ứ ấ ố

c b n cho Catalys Switch v i giao di n comman prompt ơ ả ớ ệ

(cách c u hình này gi ng nhau đ i v i nhi u Series Catalys ấ ố ố ớ ề

Switch)

Dùng máy tr m k t n i v i Catalys Switch qua giao di n ạ ế ố ớ ệ

console, giao di n t ệ ươ nmg tác ng ườ i dùng s d ng trình ử ụ

Hiper Terminal (m t công c đu c Windows h tr ) ộ ụ ợ ỗ ợ

B ướ c 1 : kh i đ ng ngu n trên giao di n Hiper Terminal ở ộ ồ ệ

hi 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]: no

Press RETURN to get started!

00:04:13: %LINK-5-CHANGED: Interface Vlan1,

changed state to administratively down

00:04:14: %LINEPROTO-5-UPDOWN: Line protocol

on Interface Vlan1, changed state to down

Switch>

Trang 2

*Ng ườ i dùng s đ ẽ ượ c h i n u mu n vào Config box đ c u ỏ ế ố ể ấ hình t đ ng, tr l i ự ộ ả ờ NO

(vì m c đích c a ng ụ ủ ườ i dùng là mu n vào ch đ Config ố ế ộ prompt

B ướ c 2: vào privilidge mode xem c u hình m c đ nh c a ấ ặ ị ủ switch

Switch>enable

Switch#show running-config

Building configuration

Current configuration : 1473 bytes

!

version 12.1

no service pad

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

Trang 3

hostname Switch

!

!

ip subnet-zero

!

!

spanning-tree mode pvst spanning-tree extend system-id

!

!

!

interface FastEthernet0/1

no ip address

!

interface FastEthernet0/2

no ip address

!

interface FastEthernet0/3

no ip address

!

interface FastEthernet0/4

Trang 4

no ip address

!

interface FastEthernet0/5

no ip address

!

interface FastEthernet0/6

no ip address

!

interface FastEthernet0/7

no ip address

!

interface FastEthernet0/8

no ip address

!

interface FastEthernet0/9

no ip address

!

interface FastEthernet0/10

no ip address

!

interface FastEthernet0/11

Trang 5

no ip address

!

interface FastEthernet0/12

no ip address

!

interface GigabitEthernet0/1

no ip address

!

interface GigabitEthernet0/2

no ip address

!

interface Vlan1

no ip address

shutdown

!

ip classless

ip http server

!

!

line con 0

line vty 5 15

!

Trang 6

Switch#

B ướ c 3 : thi t l p thông s :hostname, enable password, console password, và ế ậ ố virtual terminal password

*Chú ý: các lo i password s d ng mang tính ch t Case Sensitive Do đó ạ ử ụ ấ

ng ườ i dùng c n phân bi t các ký t s d ng:ch vi t hoa khác v i ch viêt ầ ế ự ử ụ ữ ế ớ ữ

th ườ ng

VD: password Cisco khác v i ớ cisco

Switch#config terminal

Enter configuration commands, one per line End with

CNTL/Z

Switch(config)#hostname Vnpro

Vnpro(config)#enable password cisco

Vnpro(config)#enable secret class

Vnpro(config)#line console 0

Vnpro(config-line)#password console

Vnpro(config-line)#login

Vnpro(config-line)#^Z

Vnpro#

00:07:30: %SYS-5-CONFIG_I: Configured from console by

console

Vnpro#

Trang 7

Switch h tr các Virtual Line dùng cho các phiên telnet, C n c u hình ỗ ợ ầ ấ password cho các line này m i có th telnet vào Switch (trình t 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 line

Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise

Overruns Int

* 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

Trang 8

-C u hình password cho các line vty ấ

*Ki m tra c u hình ể ấ

Vnpro#show running-config

Building configuration

Vnpro#config terminal

Enter configuration commands, one per line End with CNTL/Z

Vnpro(config)#line vty 0 4

Vnpro(config-line)#password cisco

Vnpro(config-line)#login

Vnpro(config-line)#^Z

Vnpro#

00:11:02: %SYS-5-CONFIG_I: Configured from console

by console

Trang 9

Current configuration : 1625 bytes

!

version 12.1

no service pad

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname Vnpro

!

enable secret 5 $1$7G8x$sH4X2m4gt7I.7MdGHMZmw0 enable password cisco

!

ip subnet-zero

!

!

spanning-tree mode pvst

spanning-tree extend system-id

!

!

interface FastEthernet0/1

no ip address

Trang 10

interface FastEthernet0/2

no ip address

!

interface FastEthernet0/3

no ip address

interface Vlan1

no ip address

shutdown

!

ip classless

ip http server

!

!

!

line con 0

password console login

line vty 0 4

password cisco

login

Trang 11

end

Vnpro#

C 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 “enter” c uấ hình h th ng s l p t c thay đ i.Vì v y, đ i v i các h th ng online, c n ph i h t s cệ ố ẽ ậ ứ ổ ậ ố ớ ệ ố ầ ả ế ứ

c n th n, 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 uổ ộ ố ủ ế ị ầ ả ư ạ ấ hì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 Switch ế ấ ặ ị

Vnpro#show vlan

show vlan

VLAN Name Status Ports

- -

-1 default active Fa0/ -1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12

Fa0/13, Fa0/14, Fa0/15, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22, Fa0/23, Fa0/24

Gi0/1, Gi0/2

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp

BrdgMode Trans1 Trans2

- -

-1 enet -10000 -1 -1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs

-Primary Secondary Type Ports

- - -

Trang 13

-M c đ nh trên Switch ch có Vlan 1 v i t t c các port đ u n m trong Vlan ặ ị ỉ ớ ấ ả ề ằ này, Vlan 1002 dành riêng cho FDDI, Vlan 1003 dành riêng cho TOKEN-RING…

Có hai cách t o thêm Vlan ạ

- Cách 1:Thao tác trên Vlan database

- Cách 2:T ong tác tr c ti p đ n Vlan c n t o ra ư ự ế ế ầ ạ

Vnpro#vlan database

Vnpro(vlan)#vtp domain Chuyenviet

Changing VTP domain name from NULL to

Chuyenviet

Vnpro(vlan)#vtp server

Setting device to VTP SERVER mode

Vnpro(vlan)#vlan 10 name Admin

VLAN 10 added:

Name: Admin

Vnpro(vlan)#vlan 20 name User

Trang 14

Đ gán các port vào các Vlan, th c hi n các b ể ự ệ ướ c sau:

Vd: gán các port fastethernet 2 vào Vlan 10, port fastetehnet 3 vào Vlan 20

Ki m tra l i c u hình Vlan ể ạ ấ

Vnpro(config)#interface vlan 10

Vnpro(config-if)#exit

Vnpro(config)#

Vnpro(config)#interface vlan 20

Vnpro(config-if)#exit

Vnpro(config)#

Vnpro(config)#interface fastethernet0/2

Vnpro(config-if-range)#switchport access

vlan 10

Vnpro(config-if-range)#exit

Vnpro(config)#interface fastethernet0/3

Vnpro(config-if-range)#switchport access

vlan 20

Vnpro(config-if-range)#exit

Trang 15

Vnpro#show vlan

VLAN Name Status Ports

- -

-1 default active Fa0/ -1, Fa0/4, Fa0/5, Fa0/6

Fa0/7, Fa0/8, Fa0/9, Fa0/10

Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21, Fa0/22

Fa0/23, Fa0/24, Gi0/1, Gi0/2

10 Admin active Fa0/2

20 User active Fa0/3

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

- -

-1 enet -10000 -1 -1500 - - - - - 0 0

10 enet 100010 1500 - - - - - 0 0

20 enet 100020 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0

0

1005 trnet 101005 1500 - - - ibm - 0

0

Trang 16

C u hình IP cho Vlan: cácVlan đ ấ ượ ấ c c u hình IP ch mang tính ch t lu n lý, ỉ ấ ậ

IP này ph c v cho vi c qu n lý, đ a ch IP lu n lý này còn có th dùng đ ụ ụ ệ ả ị ỉ ậ ể ể revert telnet vào Switch t xa ừ

Vnpro#config terminal

Enter configuration commands, one per line End with

CNTL/Z

Vnpro(config)#interface vlan 10

Vnpro(config-if)#ip address 10.0.0.1 255.255.255.0

Vnpro(config-if)#no shutdown

Vnpro(config-if)#^Z

Vnpro#

00:14:43: %LINEPROTO-5-UPDOWN: Line protocol on

Interface Vlan10, changed state to down

00:14:43: %SYS-5-CONFIG_I: Configured from console by

console

Vnpro#

Trang 17

L u c u hình vào NVRAM ư ấ

Vnpro#copy running-config starup-config Destination filename [startup-config]? Building configuration

[OK]

Vnpro#

Ngày đăng: 09/10/2012, 15:14

TỪ KHÓA LIÊN QUAN

w