交换机的基本配置---3

实验要求:

1、配置CISCO二层交换机的管理IP地址和默认网关
2、设置Telnet访问
3、设置端口的速度和三种访问模式
 
实验环境:
交换机的基本配置---3 - ibm.chick - MingKang.Zhou
 
操作步骤
路由器4设置:
配置CISCO二层交换机的管理IP地址和默认网关
Switch>enable
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip add 192.168.1.1 255.255.255.0               (设置管理VLAN 1 的IP地址)
Switch(config-if)#no shutdown
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#exit
Switch(config)#ip default-gateway 192.168.1.254                      (设置交换机默认网关)
Switch(config)#end

 Switch#show interface vlan 1                         (查看VLAN 1 状态)

Vlan1 is up, line protocol is up
  Hardware is CPU Interface, address is 00e0.a3a5.cc4b (bia 00e0.a3a5.cc4b)
  Internet address is 192.168.1.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 21:40:21, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1682 packets input, 530955 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     563859 packets output, 0 bytes, 0 underruns
     0 output errors, 23 interface resets
     0 output buffer failures, 0 output buffers swapped out

设置Telnet访问:
Switch>enable
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#line vty 0 4
Switch(config-line)#password VtyPassword
Switch(config-line)#login
Switch(config-line)#exit
 
PC>ipconfig
IP Address......................: 192.168.1.3
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0
PC>telnet 192.168.1.1
Trying 192.168.1.1 ...Open
User Access Verification
Password: 
Switch>enable
Password: 
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#

 

设置端口的速度和三种访问模式
SW1(config)#interface fa0/1
SW1(config-if)#speed {10 | 100 | auto} //10M/100M/自适应 
SW1(config-if)#duplex {auto | full | half} 
 
SW1(config)#int fastEthernet 0/1 
SW1(config-if)#switchport mode access //设置 FA0/1 为 ACCESS 模式 
SW1(config-if)#switchport mode trunk //设置 FA0/1 为 TRUNK 模式 
SW1(config-if)#switchport mode dynamic auto 
//设置 FA0/1 为自动直协商模式(默认) 交换机 TRUNK 端口配置: 1)一般交换机与交换机相连接的端口要设置为 trunk 模式 2 )如果是梳心交换机与非网管的交换机相连,梳心交换机端口设置为 access 模式
posted @ 2016-06-01 17:43  亦非台  阅读(236)  评论(0)    收藏  举报