思科基本实验及其配置

思科基本实验及其配置
思科基本实验及其配置

实验一、配置STP与VTP

环境:三台交换机,形成一个全互连结构,sw3为2950,sw1和sw2为2900xl;

要求:设置sw3为VTP server,设置sw1和sw2为VTP client,域名为cisco,密码为:cisco,在server创建vlan 10(name:aa)和vlan20(name:bb);设置sw3为vlan1的根桥,sw1为vlan10的根桥,sw2为vlan20的根桥;

初始化配置:

Sw#show vlan ?查看vlan信息

Sw#Delete vlan.dat ?用此命令将vlan删除

Sw#show startup-config ?查看一下NVRAM是否保存了配置

Sw#erase startup-config ?清空配置文件

Sw#reload ?重新启动交换机

sw>enable

sw#config terminal

sw(config)#hostname sw1

sw1(config)#no ip domain-lookup ?关闭域名查找

sw1(config)#line console 0

sw1(config-line)#logging synchronous ?命令输入达到同步

sw1(config-line)#exec-timeout 0 0 ?设置永不超时

sw1(config-line)#exit

步骤一、配置VTP

sw3的配置:

sw3(config)#vtp mode server ?在sw3上启用vtp server

Device mode already VTP SERVER.

sw3(config)#vtp domain cisco ?设置域名

Changing VTP domain name from NULL to cisco

sw3(config)#vtp password cisco ?设置密码

Setting device VLAN database password to cisco

sw1的配置:

sw1#vlan database ?进入vlan数据库

sw1(vlan)#vtp client ?启用VTP client模式

Setting device to VTP CLIENT mode.

sw1(vlan)#vtp domain cisco ?作用到cisco域中

Changing VTP domain name from NULL to cisco

sw1(vlan)#vtp password cisco ?设置密码与server端相同

Setting device VLAN database password to cisco.

sw1(vlan)#exit ?使配置生效

In CLIENT state, no apply attempted.

Exiting....

sw2的配置:

sw2#vlan database

sw2(vlan)#vtp client

Setting device to VTP CLIENT mode.

sw2(vlan)#vtp domain cisco

Changing VTP domain name from NULL to cisco

sw2(vlan)#vtp password cisco

Setting device VLAN database password to cisco.

sw2(vlan)#exit

sw2#

步骤二、启用干道端口

sw3的配置:

sw3(config)#interface fa0/23

sw3(config-if)#switchport mode trunk ?启用trunk端口

sw3(config-if)#interface fa0/24

sw3(config-if)#switchport mode trunk

sw1的配置:

sw1(config)#interface fa0/23

sw1(config-if)#switchport trunk encapsulation dot1q ?封装干道协议sw1(config-if)#switchport mode trunk ?启用trunk模式

sw1(config-if)#

sw1(config)#interface fa0/24

sw1(config-if)#switchport trunk encapsulation dot1q

sw1(config-if)#switchport mode trunk

sw2的配置:

sw2(config)#interface fa0/23

sw2(config-if)#switchport trunk encapsulation dot1q

sw2(config-if)#switchport mode trunk

sw2(config)#interface fa0/24

sw2(config-if)#switchport trunk encapsulation dot1q

sw2(config-if)#switchport mode trunk

步骤三、测试vtp状态及创建vlan

sw3的状态:

sw3#show vtp status ?显示vtp状态

VTP Version : 2

Configuration Revision : 0 ?配置修订号

Maximum VLANs supported locally : 254

Number of existing VLANs : 5

VTP Operating Mode : server ?vtp模式

VTP Domain Name : cisco ?vtp域名

VTP Pruning Mode : Disabled

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 digest : 0x3F 0x17 0xC8 0xB8 0x5A 0xE3 0x01 0x66 Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00 创建vlan:

sw3(config)#vlan 10 ?创建VLAN10

sw3(config-vlan)#name aa ?命名为aa

sw3(config-vlan)#exit ?应用配置

sw3(config)#vlan 20 ?创建VLAN20

sw3(config-vlan)#name bb ?命名为bb

sw3(config-vlan)#exit

sw3(config)#

sw3的状态:

sw3#show vtp status ?在sw3显示vtp的状态

VTP Version : 2

Configuration Revision : 2 ?server的修订号

Maximum VLANs supported locally : 254

Number of existing VLANs : 7 ?vlan也已经增加

VTP Operating Mode : server

VTP Domain Name : cisco

VTP Pruning Mode : Disabled

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 digest : 0x98 0x31 0xCF 0xA0 0xA7 0x17 0x73 0x66

Configuration last modified by 0.0.0.0 at 3-1-93 00:52:05

sw2的状态:

sw2#show vtp status

VTP Version : 2

Configuration Revision : 2 ?已经同步了server

Maximum VLANs supported locally : 254

Number of existing VLANs : 7

VTP Operating Mode : Client

VTP Domain Name : cisco

VTP Pruning Mode : Disabled

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 digest : 0x98 0x31 0xCF 0xA0 0xA7 0x17 0x73 0x66

Configuration last modified by 0.0.0.0 at 3-1-93 00:52:05

sw1的vlan信息:

sw1#show vlan ?显示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

10 aa active ?已经同步了vlan的信息

20 bb active

步骤四、配置PVST

sw3(config)#spanning-tree vlan 1 root primary ?设置为vlan1的根桥Sw1(config)#spanning-tree vlan 10 priority 4096 ?设置为vlan10的根桥Sw2(config)#spanning-tree vlan 20 priority 4096 ?设置为vlan20的根桥步骤五、显示STP的信息

sw1的生成树信息:

sw1#show spanning-tree brief ?显示每VLAN生成树信息

VLAN1

Spanning tree enabled protocol IEEE

ROOT ID Priority 24577

Address 0007.eb06.1740 ?非vlan1的根桥

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 0030.803d.f640

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

VLAN10

Spanning tree enabled protocol IEEE

ROOT ID Priority 4096

Address 0030.803d.f641 ?为vlan10的根桥

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4096

Address 0030.803d.f641

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

VLAN20

Spanning tree enabled protocol IEEE

ROOT ID Priority 4096

Address 00b0.645f.34c2 ?非vlan20的根桥

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 0030.803d.f642

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

sw2的生成树信息:

sw2#show spanning-tree brief

VLAN1

Spanning tree enabled protocol IEEE ?非vlan1的根桥ROOT ID Priority 24577

Address 0007.eb06.1740

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768

Address 00b0.645f.34c0

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec VLAN10

Spanning tree enabled protocol IEEE

ROOT ID Priority 4096 ?非vlan10的根桥

Address 0030.803d.f641

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768

Address 00b0.645f.34c1

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec VLAN20

Spanning tree enabled protocol IEEE

ROOT ID Priority 4096 ?为vlan20的根桥

Address 00b0.645f.34c2

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 4096

Address 00b0.645f.34c2

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec sw3的生成树信息:

sw3#show spanning-tree

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 24577 ?为vlan1的根桥

Address 0007.eb06.1740

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)

Address 0007.eb06.1740

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 4096 ?非vlan10的根桥

Address 0030.803d.f641

Cost 19

Port 24 (FastEthernet0/24)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32779 (priority 32768 sys-id-ext 11)

Address 0007.eb06.1740

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

VLAN0020

Spanning tree enabled protocol ieee

Root ID Priority 4096 ?非vlan20的根桥

Address 00b0.645f.34c2

Cost 19

Port 23 (FastEthernet0/23)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32780 (priority 32768 sys-id-ext 12)

Address 0007.eb06.1740

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- -------------------------------- Fa0/23 Root FWD 19 128.23 P2p

Fa0/24 Altn BLK 19 128.24 P2p

步骤六、显示当前配置结果

Sw1的配置结果:

sw1#show running-config

!

hostname sw1

!

spanning-tree vlan 10 priority 4096 !

no ip domain-lookup

!

interface FastEthernet0/23 switchport trunk encapsulation dot1q switchport mode trunk

!

interface FastEthernet0/24 switchport trunk encapsulation dot1q switchport mode trunk

!

end

sw2的配置结果:

sw2#show running-config

hostname sw2

spanning-tree vlan 20 priority 4096 !

no ip domain-lookup

!

interface FastEthernet0/23 switchport trunk encapsulation dot1q switchport mode trunk

!

interface FastEthernet0/24

switchport trunk encapsulation dot1q switchport mode trunk

!

end

sw3的配置结果:

sw3#show running-config

!

hostname sw3

!

no ip domain-lookup

!

spanning-tree vlan 1 priority 24576 !

interface FastEthernet0/23 switchport mode trunk

!

interface FastEthernet0/24 switchport mode trunk

!

End

二.静态路由

环境:两台2500系列路由器通过串口相连。

要求:在R1和R2上启用静态路由,使两端网络能够互通。

步骤一、基本配置

Router>

Router>enable

Router#config terminal

Router(config)#hostname R1

R1(config)#no ip domain-lookup

R1(config)#line console 0

R1(config-line)# logging synchronous

R1(config-line)#exec-timeout 0 0

R1(config-line)#exit

步骤二:接口配置

R1的配置:

R1(config)#interface s0

R1(config-if)#ip address 30.1.1.1 255.255.255.0

R1(config-if)#clock rate 64000 ?时钟速率端

R1(config-if)#no shutdown

R1(config-if)#interface loopback 0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#

R2的配置:

Router(config)#hostname R2

R2(config)#interface s1

R2(config-if)#ip address 30.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#interface loopback 0

R2(config-if)#ip address 20.1.1.1 255.255.255.0

R2(config-if)#exit

R2(config)#

步骤三、指定静态路由

R1(config)#

R1(config)#ip route 20.1.1.0 255.255.255.0 serial 0 ?指定静态路由

R2(config)#

R2(config)#ip route 10.1.1.0 255.255.255.0 30.1.1.1 ?指定静态路由

步骤四、作ping 测试

R1#ping

Protocol [ip]:

Target IP address: 20.1.1.1 ?目的地址

Extended commands [n]: y ?是否用扩展命令

Source address or interface: 10.1.1.1 ?源地址

!!!!! ?显示已通

步骤五、显示静态路由条目

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

20.0.0.0/24 is subnetted, 1 subnets

S 20.1.1.0 is directly connected, Serial0 ?静态路由条目

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Loopback0

30.0.0.0/24 is subnetted, 1 subnets

C 30.1.1.0 is directly connected, Serial0

步骤六、显示当前配置

R1的配置结果:

R1#show running-config

!

hostname R1

!

no ip domain-lookup

!

interface Loopback0

ip address 10.1.1.1 255.255.255.0

!

interface Serial0

ip address 30.1.1.1 255.255.255.0 clockrate 64000

!

ip route 20.1.1.0 255.255.255.0 Serial0 !

line con 0

exec-timeout 0 0

logging synchronous

transport input none

end

R2的配置结果:

R2#show running-config

!

hostname R2

!

no ip domain-lookup

!

interface Loopback0

ip address 20.1.1.1 255.255.255.0

!

interface Serial1

ip address 30.1.1.2 255.255.255.0

!

ip route 10.1.1.0 255.255.255.0 30.1.1.1 !

line con 0

exec-timeout 0 0

logging synchronous

!

end

实验3、RIPv1的配置

环境:两台2500系列路由器由串口相连。

要求:如下图所示,在R1和R2上运行RIPv1,让两端能够学习到对端的路由以达到通信的目的。

步骤一、基本配置

Router>

Router>enable

Router#config terminal

Router(config)#hostname R1

R1(config)#no ip domain-lookup ?关闭域名查找

R1(config)#line console 0

R1(config-line)# logging synchronous ?命令输入达到同步

R1(config-line)#exec-timeout 0 0 ?设置永不超时

R1(config-line)#exit

步骤二、接口IP配置

R1的配置:

R1(config)#interface s0

R1(config-if)#ip address 30.1.1.1 255.255.255.0

R1(config-if)#clock rate 64000 ?注意时钟速率端

R1(config-if)#no shutdown

R1(config-if)#interface loopback 0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#

R2的配置:

Router(config)#hostname R2

R2(config)#interface s1

R2(config-if)#ip address 30.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#interface loopback 0

R2(config-if)#ip address 20.1.1.1 255.255.255.0

R2(config-if)#exit

R2(config)#

步骤三、启用RIP路由选择协议

R1的配置:

R1(config)#router rip ?启用RIP

R1(config-router)#network 30.0.0.0 ?发布直连网段

R1(config-router)#network 10.0.0.0

R1(config-router)#exit

R1(config)#

R2的配置:

R2(config)#router rip ?启用RIP

R2(config-router)#network 20.0.0.0 ?发布直连网段

R2(config-router)#network 30.0.0.0

R2(config-router)#exit

R2(config)#end

步骤四、显示路由表,查看路由条目

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

R 20.0.0.0/8 [120/1] via 30.1.1.2, 00:00:03, Serial0 ?学习来的路由条目

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Loopback0

30.0.0.0/24 is subnetted, 1 subnets

C 30.1.1.0 is directly connected, Serial0

步骤五、用扩展ping命令测试连通性

R2#ping

Protocol [ip]:

Target IP address: 10.1.1.1

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface: 20.1.1.1

!!!!!

步骤六、显示你当前路由协议

R2#show ip protocols ?显示你当前路由协议配置情况和运行状态Routing Protocol is "rip"

Sending updates every 30 seconds, next due in 24 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is

Incoming update filter list for all interfaces is Redistributing: rip

Default version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain

Loopback0 1 1 2

Serial1 1 1 2

Automatic network summarization is in effect

Routing for Networks:

10.0.0.0

20.0.0.0

Routing Information Sources:

Gateway Distance Last Update

30.1.1.1 120 00:14:05

Distance: (default is 120)

步骤七、显示当前配置

r1的当前配置:

r1#show running-config

!

hostname R1

!

no ip domain-lookup

!

interface Loopback0

ip address 10.1.1.1 255.255.255.0 !

interface Serial0

ip address 30.1.1.1 255.255.255.0 clockrate 64000

!

router rip

network 30.0.0.0

network 10.0.0.0

!

line con 0

exec-timeout 0 0

logging synchronous

transport input none

end

r2的当前配置:

R2#sh run

!

hostname R2

!

no ip domain-lookup

!

interface Loopback0

ip address 20.1.1.1 255.255.255.0 !

interface Serial1

ip address 30.1.1.2 255.255.255.0 !

router rip

network 30.0.0.0

network 20.0.0.0

!

line con 0

exec-timeout 0 0 logging synchronous !

End

实验四、RIPv1与EIGRP在不连续网络下的比较

环境:两台2500系列路由器,由串口相连。

要求:在RIPv1和EIGRP中将两个相同主类网络的不同子网由另一个主类网络分割,如何能学到对端网络。

RIP配置:

步骤一、基本配置

Router>

Router>enable

Router#config terminal

Router(config)#hostname R1

R1(config)#no ip domain-lookup

R1(config)#line console 0

R1(config-line)#logging synchronous

R1(config-line)#exec-timeout 0 0

R1(config-line)#exit

步骤二、接口配置

R1的配置:

R1(config)#interface s0

R1(config-if)#ip address 172.16.1.1 255.255.255.0

R1(config-if)#clock rate 64000

R1(config-if)#no shutdown

R1(config-if)#interface loopback 0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#

R2的配置:

R2(config)#interface s1

R2(config-if)#ip add 172.16.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#interface loopback 0

R2(config-if)#ip address 10.1.2.1 255.255.255.0

R2(config-if)#exit

R2(config)#

步骤三、启用RIP路由选择协议

R1的配置:

R1(config)#router rip ?启用RIP

R1(config-router)#network 10.0.0.0 ?发布直连网段

R1(config-router)#network 172.16.0.0

R1(config-router)#exit

R1(config)#

R2的配置:

R2(config)#router rip ?启用RIP

R2(config-router)#network 10.0.0.0 ?发布直连网段

R2(config-router)#network 172.16.0.0

R2(config-router)#exit

R2(config)#end

显示路由信息

R1#show ip route ?显示路由信息

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets

C 172.16.1.0 is directly connected, Serial0 ?没有学习到任何路由条目

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.3.0 is directly connected, Serial0

C 10.1.1.0 is directly connected, Loopback0

步骤四、配置辅助IP

R1(config)#interface s0

R1(config-if)#ip address 10.1.3.1 255.255.255.0 secondary?配置辅助IP

R2(config)#interface s1

R2(config-if)#ip address 10.1.3.2 255.255.255.0 secondary?配置辅助IP

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

Cisco设备的基本配置命令

switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

思科交换机-常用命令及配置

思科交换机-常用命令及配置 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名hostname name 以cisco001 为例 switch> enable switch#c onfigure terminal switch(conf)#hostname cisco001 cisco001(conf)# 4:配置使能口令(未加密)enable password cisco 以cisco 为例switch> enable switch#configure terminal cisco001(conf)# enable password cisco 5:配置使能密码(加密)enable secret ciscolab 以cicsolab 为例switch> enable switch#configure terminal switch(conf)# enable secret ciscolab

6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)# interface vlan 1 switch(conf)# ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 switch (conf-if)#no shut 激活端口 switch (conf-if)#exit switch (conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17 端口为例 switch> enable switch#configure terminal switch(conf)# interface fastehernet 0/17 switch(conf-if)# 8:查看命令show switch> enable switch# show version 察看系统中的所有版本信息 show interface vlan 1 查看交换机有关ip 协议的配置信息 show running-configure 查看交换机当前起作用的配置信息 show interface fastethernet 0/1 察看交换机1 接口具体配置和统计信息 show mac-address-table 查看mac 地址表

CiscoDHCP配置实验

Cisco DHCP配置实验 ?一、PC动态获取IP地址(路由器做DHCP服务器) o 1. 拓扑图 o 2. 配置步骤(有些顺序不重要) o 3. 命令配置(之后的命令解析参考该实验) ?二、路由器端口动态获取IP地址(路由器做DHCP服务器)o 1. 拓扑图 o 2. 配置步骤(有些顺序不重要) o 3. 配置命令 ?三、跨网段的动态获取IP地址(路由器做DHCP服务器)即分配不同网段o 1. 拓扑图 o 2. 配置步骤(有些顺序不重要) o 3. 配置命令 ?四、跨网段的动态获取IP地址(计算机做DHCP服务器) o 1. 拓扑图 o 2. 配置步骤 o 3. 配置命令 ?五、无线自动获取IP ?六、DHCP知识点 o 1. 关于ip helper-address命令 o2.DHCP服务器分配地址原理 o3.DHCP请求过程 o 4. ip helper-address 命令的注意事项 o 5. DHCP好处: 一、PC动态获取IP地址(路由器做DHCP服务器) 1. 拓扑图

2. 配置步骤(有些顺序不重要) 1.创建地址池 2.分配的地址池范围 3.配置网关 4.配置dns 5.给路由器端口配置IP 6.如有需要则配置不自动分配的地址段或某个地址 3. 命令配置(之后的命令解析参考该实验) Router>en Router#config t Router(config)#ip dhcp pool LAN (创建地址池,名字(LAN)自定义)Router(dhcp-config)#network 192.168.1.0 255.255.255.0 (地址池范围)Router(dhcp-config)#default-router 192.168.1.1 (默认网关)

cisco交换机(Switch)配置命令大全

1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable

为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number {full|half}

Cisco路由器的基本配置命令

Cisco路由器的基本配置命令 Cisco 路由器的基本配置命令 一(实训目的 1(掌握路由器的连接方式和使用基本规则。 2(掌握路由器的基本配置命令。 二(实训器材及环境 1(安装 Windows 2000 Server 系统的计算机一台。 2(安装模拟软件 Boson Netsim 5.31。 3(模拟环境如下: 图 11-1 实验拓扑环境 三(实训理论基础 1(路由器的基本配置语句 (1)配置路由器名字和特权密码: Router1> enable Router1# conf t Router1(config)# hostname R1 R1(config)# enable secret 123456
b5E2RGbCAP
(2)配置路由器的 Ethernet 端口:
R1(config)# interface e0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 p1EanqFDPw R1(config-if)# no shutdown (3)配置路由器的 Serial 端口(DTE 端):DXDiTa9E3d R1(config)# interface s0 R1(config-if)# ip address 10.0.0.1 255.0.0.0 R1(config-if)# no shutdown (4)配置路由器的 Serial 端口(DCE 端):
RTCrpUDGiT
R2(config)# interface s0 R2(config-if)# ip address 10.0.0.2 255.0.0.0 R2(config-if)# clock rate 64000 R2(config-if)# no shutdown 2(路由器可以有多种类型的端口,用于连接 不同的网络,常用的有以太网端口(Ethernet)、快速以太网端口 (FastEthernet)、高速同步串口(Serial)等。有的端口是固定端口,有的端
5PCzVD7HxA
- 1 -

1-cisco路由器基本配置及远程登录

实训目的: (1)学习和掌握科路由器的配置方式和要求。 (2)学习和掌握科路由器的工作模式分类、提示符、进入方式。1、路由器的配置方式 ①超级终端方式。该方式主要用于路由器的初始配置,路由器不需要IP地址。基本方法是:计算机通过COM1/COM2口和路由器的Console口连接,在计算机上启用“超级终端”程序,设置“波特率:9600 ,数据位:8,停止位:1,奇偶校验: 无,校验:无”即可。常用 ②Telnet方式。该方式配置要求路由器必须配置了IP地址。基本方法是:计算机通过网卡和路由器的以太网接口相连,计算机的网卡和路由器的以太网接口的IP地址必须在同一网段。常用 ③其他方式:AUX口接MODEM,通过电话线与远方运行终端仿真软件的微机;通过Ethernet上的TFTP服务器;通过Ethernet上的SNMP网管工作站。 2、路由器的工作模式 在命令行状态下,主要有以下几种工作模式: ①一般用户模式。主要用于查看路由器的基本信息,只能执行少数命令,不能对路由 器进行配置。提示符为:Router>;进入方式为:Telnet或Console ②使能(特权)模式。主要用于查看、测试、检查路由器或网络,不能对接口、路由 协议进行配置。提示符为:Router#;进入方式为:Router>enable。 ③全局配置模式。主要用于配置路由器的全局性参数。提示符为:Router(config)#; 进入方式为:Router#config ter。 ④全局模式下的子模式。包括:接口、路由协议、线路等。其进入方式和提示符如下: Router(config)#ineterface e0 //进入接口模式 Router(config-if)#//接口模式提示符 Router(config)#rip //进入路由协议模式 Router(config-router)# //路由协议模式 Router(config)#line con 0 //进入线路模式

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍 (2) 2、密码、登陆等基本配置 (2) 3、C ISCO 设备端口配置详解 (8) 4、V LAN的规划及配置 (13) 4.1核心交换机的相关配置 (13) 4.2接入交换机的相关配置 (25) 5、配置交换机的路由功能 (30) 6、配置交换机的DHCP功能 (31) 7、常用排错命令 (32)

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统 VLAN: 虚拟Ian VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL :访问控制列表 三层交换机:具有三层路由转发能力的交换机本教程中“ #”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或 路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显 示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revisi on OxFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2 2 Ether net in terfaces 8 Serial in terfaces DRAM configuration is 64 bits wide with parity enabled. 125K bytes of NVRAM. 8192K bytes of processor board System flash (Read/Write) ---System Configuration Dialog -- Would you like to enter the initial configuration dialog? [yes/no]: n #此处我们选择no,不进入他的初始化配置向导 Press RETURN to get started! #选择no以后,提示你按回车键开始,此处我们需要按回车键 *Mar 1 00:43:56.591: %IP-5-WEBINST_KILL: Term in ati ng DNS process *Mar 1 00:43:58.379: %SYS-5-RESTART: System restarted - Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.3(14)T7, RELEASE SOFTWARE (fc2) Tech ni cal Support: https://www.360docs.net/doc/fc6135351.html,/techsupport

思科实验总结

实验名称: VLAN创建和管理以及TRUNK链路的配置。 实验目的: 学习VLAN的创建命令及管理方法 学习交换机端口模式——trunk模式 学习trunk链路的配置和管理方法。 实验步骤: 1、首先正确连接PC与交换机 a.PC1与交换机1端口连接,PC2与交换机2端口连接。 b.交换机1与交换机2连接用10端口连接。 2、给交换机配置IP地址(192.168.1.*/24)和做标记。 实验拓扑图: 3、打开交换机1点击命令栏进行VLAN的配置。 a.命令栏中输入enable进入特权视图。 b.现在由特权视图进入全局视图输入conf t再次按Tab键回车即可进入全局视图。 c.在全局视图下创建一个VLAN 10输入命令VLAN 10并给这个vlan命名为student,输 入命令name student,输入exit退出VLAN 10模式。 d.在全局视图下创建一个VLAN 20输入命令VLAN 20并给这个vlan命名为teacher,输 入命令name teacher,输入exit退出VLAN20模式。 e.在全局视图下进入交换机接口f0/1输入int按Tab再输入f0/1回车,在接口视图下 将该接口划入VLAN 20输入switchport access vlan 20。 f.在全局视图下进入交换机接口f0/2输入int按Tab再输入f0/2回车,在接口视图下 将该接口划入VLAN 10输入switchport access vlan 10。 g.由全局视图进入接口f0/10输入命令interface f0/10,在接口视图下设置该接口工 作模式为TRUNK模式输入命令switchport mode trunk,在接口视图下设置该TRUNK端口允许全部VLAN通过。

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口 令switch(config)#enable password xxa ;设置特权非 密口令switch(config)#line console 0 ;进入控制台 口switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:

switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

Removed_思科设备telnet登陆方式配置实验

一 telnet 你的路由器地址然后输入密码,一般为CISCO,然后ENA,输入密码CISCO 这样就进到了特权模式了,CONF T 回车进入配置模式,想配置什么就在这里配置好了。顺便给你点命令吧思科命令大全Access-enable 允许路由器在动态访问列表中创建临时访问列表入口Access-group 把访问控制列表(ACL)应用到接口上Access-list 定义一个标准的IP ACL Access-template 在连接的路由器上手动替换临时访问列表入口Appn 向APPN 子系统发送命令Atmsig 执行ATM 信令命令 B 手动引导操作系统Bandwidth 设置接口的带宽Banner motd 指定日期信息标语Bfe 设置突发事件手册模式Boot system 指定路由器启动时加载的系统映像Calendar 设置硬件日历Cd 更改路径Cdp enable 允许接口运行CDP 协议Clear 复位功能Clear counters 清除接口计数器Clear interface 重新启动接口上的件逻辑Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI 连接管理功能Config-register 修改配置寄存器设置Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息Configure memory 从NVRAM 加载配置信息Configure terminal 从终端进行手动配置Connect 打开一个终端连接Copy 复制配置或映像数据Copy flash tftp 备份系统映像文件到TFTP 服务器Copy running-config startup-config 将RAM 中的当前配置存储到NVRAM Copy running-config tftp 将RAM 中的当前配置存储到网络TFTP 服务器上Copy tftp flash 从TFTP 服务器上下载新映像到Flash Copy tftp running-config 从TFTP 服务器上下载配置文件Debug 使用调试功能Debug dialer 显示接口在拨什么号及诸如此类的信息Debug ip rip 显示RIP 路由选择更新数据 Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息Debug isdn q921 显示在路由器 D 通道ISDN 接口上发生的数据链路层(第 2 层)的访问过程Debug ppp 显示在实施PPP 中发生的业务和交换信息Delete 删除文件Deny 为一个已命名的IP ACL 设置条件Dialer idle-timeout 规定线路断开前的空闲时间的长度Dialer map 设置一个串行接口来呼叫一个或多个地点Dialer wait-for-carrier-time 规定花多长时间等待一个载体Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL 与协议的组合来控制控制拨号Dir 显示给定设备上的文件Disable 关闭特许模式Disconnect 断开已建立的连接Enable 打开特许模式Enable password 确定一个密码以防止对路由器非授权的访问Enable password 设置本地口令控制不同特权级别的访问Enable secret 为enable password 命令定义额外一层安全性(强制安全,密码非明文显示) Encapsulation frame-relay 启动帧中继封装Encapsulation novell-ether 规定在网络段上使用的Novell 独一无二的格式Encapsulation PPP 把PPP 设置为由串口或ISDN 接口使用的封装方法Encapsulation sap 规定在网络段上使用的以太网802.2 格式Cisco 的密码是sap End 退出配置模式Erase 删除闪存或配置缓存Erase startup-config 删除NVRAM 中的内容Exec-timeout 配置EXEC 命令解释器在检测到用户输入前所等待的时间Exit 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXEC Exit 终止任何配置模式或关闭一个活动的对话和结束EXEC format 格式化设备Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)Help 获得交互式帮助系统History 查看历史记录Hostname 使用一个主机名来配置路由器,该主机名以提示符或者缺省文件名的方式使用Interface 设置接口类型并且输入接口配置模式Interface 配置接口类型和进入接口配置模式Interface serial 选择接口并且输入接口配置模式Ip access-group 控制对一个接口的访问Ip address 设定接口的网络逻辑地址Ip address 设置

cisco配置命令大全

933a LMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。 # fram-relay intf-typ ABC ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。# frame_relay interface_dlci 110 br 配置DLCI(数据链路连接标识符)。 # frame-relay map ip ABCD XXXX broadcast 建立帧中继映射。ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。 # no shutdown 激活本端口. # exit ---- 5 .帧中继子接口的配置: # conf t # int s0.1 point-to-point

对应S0的子接口1,点对点方式。 # ip addr ABCD XXXX ABCD为子口1的IP地址,XXXX为子网掩码。# frame-relay intreface-dlci 100 br 6.配置拨号备份 (1).配置备份主口 # conf t # int s0 S0为主口. # backup int asy 1 A1口为备份口. # backup delay 0 1 延时1秒. (2).配置虚拟接口 # conf t # ip addr ABCD XXXX

ABCD为虚拟接口IP地址,XXXX为子网掩码。 # encap ppp 封装ppp协议. # dialer in-band 激活随叫随拨功能. # dialer idle-timeout 7200 # dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.ABCD为对方拨号口的ip地址,6225481为对应的电话号码。 # dialer_group 1 定义拨号组成员. (3).配置防火墙 # dialer_list 1 pro ip permit 允许ip协议通过。 (4).配置连接口令 # user name ABCD pass XXXX ABCD为对方主机名,XXXX为连接口令. (5).配置拨号字符串

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

思科路由器基本配置与常用配置命令

思科路由器基本配置与常用配置命令(simple for CCNA) 启动接口,分配IP地址: router> router> enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# ^z 配置RIP路由协议:30秒更新一次 router(config)# router rip router(config-if)# network Network-Number router(config-if)# ^z 配置IGRP路由协议:90秒更新一次 router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z配置Novell IPX路由协议:Novell RIP 60秒更新一次 router(config)# ipx routing [node address] router(config)# ipx maximum-paths Paths router(config)# interface Type Port router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] router(config-if)# ^z配置DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if)# ^z配置ISDN: router(config)# isdn swith-type Swith-Type router(config-if)# ^z 配置Frame Relay: router(config-if)# encapsulation frame-relay [cisco | ietf ] router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ] router(config-if)# ^z配置标准ACL: router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number [ in | out ] router(config-if)# ^z配置扩展ACL: router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]

思科网络设备配置命令

思科网络设备常用配置命令 一、VLAN配置 1、添加VLAN vlan database //VLAN数据库模式 vlan name 真实设备还可以采用全局模式添加VLAN: config terminal vlan name 2、分配接口 interface range f0/m – n switchport mode access switchport access vlan 3、查看配置 show vlan brief show vlan id 二、中继配置 1、配置Trunk interface f0/m switchport mode trunk switchport trunk encapsulation { isl | dot1q | negotiate } //配封装方式,可不配2、查看接口模式 show interface f0/m switchport 三、VTP配置 vtp domain <域名> //创建VTP域 vtp mode { server | client | transparent } //配VTP模式 vtp password <密码> //配VTP口令 show vtp status //查看配置 四、以太网通道配置 interface range f0/m – n channel-protocol {pagp | lacp} //可以不配 channel-group mode on 五、STP配置 spanning-tree vlan root { primary | secondary } //配为主或次根网桥spanning-tree vlan priority <0~655535> //配优先级,越小越优先show spanning-tree //查看STP 六、三层交换机配置,实现VLAN互通 ip routing //启动路由 interface vlan //配置VLAN的IP地址 ip address no shutdown interface f0/m //配f0/m为路由接口 no switchport

思科设备命令及实验大全

一:基本操作命令 一:加密命令 1. Enable secret 123 (用户进入特权模式时,需要输密码,密文加密形式) 2. Enable password 123 (同理,不过密码是明文) 3.line console 0 login password 123 (给用户登录加密) 4. service password-encryption (将所有密码加密成密文形式) 5. line vty 0 4 (回车)login password 123 (给远程登录加密) 二:查看命令 1.show running-config (查看当前设置) 2.show history (查看过去使用过的命令) 3.show version (查看寄存器的值,版本等) 4.show interface (查看接口信息) 5.show ip interface (显示接口是否开启) 6.show interface serial 0 (显示串口的信息) 7.show vlan-switch (查看关于vlan的配置) 8.show controllers s0/0 (查看本串口是dte还是dce) 9.show vtp status (查看vtp的信息) 10.show vlan (查看是否学习到vlan) 11.show frame-relay map (查看祯中继的值) 12.show sparming-tree (查看生存树的信息) 三:一些必备的设置 1.line console 0 (回车)logging synchronous (日志同步) 2.exec-timeout 0 0 (永不超时) 3.no ip domain lookup (关闭dns查找) 4.hostname 123 (为设备改名字) 5.copy running-config startup-config (将当前配置保存到内存中,防止突然断电使用)四:路由和网关 1.ip route 0.0.0.0 0.0.0.0 (为设备设置默认路由) 2.ip default-gateway 192.168.1.1 (设置网关) 3.bandwidth 64(KB)(设置带宽) 4.ip name-server 202.102.152.3 (设定DNS,最多可指定6个DNS) 二:具体重要试验 一:vlan (交换机) 1.vlan database 2.vlan 2(2—1001的任何数字) 3.interface fastethere 1 (进入接口模式) 4.swithport mode access

相关文档
最新文档