搜档网
当前位置:搜档网 › 思科交换机的基本配置

思科交换机的基本配置

思科交换机的基本配置

思科交换机的基本配置

H3C每年将销售额的15%以上用于研发投入,在中国的北京、杭州和深圳设有研发机构,在北京和杭州设有可靠性试验室以及产品鉴定测试中心。下面店铺整理一些思科交换机的基本配置,希望大家认真阅读!

CISCO交换机基本配置:Console端口连接

用户模式hostname# ;

特权模式hostname(config)# ;

全局配置模式hostname(config-if)# ;

交换机口令设置:

switch>enable ;进入特权模式

switch#config terminal ;进入全局配置模式

switch(config)#hostname csico ;设置交换机的主机名

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#exit ;返回命令

交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:

switch#vlan database ;进入VLAN设置

switch(vlan)#vlan 2 ;建VLAN 2

switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3

switch(vlan)#no vlan 2 ;删vlan 2

switch(config)#int f0/1 ;进入端口1

switch(config)#speed ? 查看speed命令的子命令

switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)

switch(config)#duplex ? 查看duplex的子命令

switch(config)#duplex full 设置该端口为全双工(auto/half)

switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2

switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)

switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan

switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继

switch(config)#vtp domain vtpserver ;设置vtp域名相同

switch(config)#vtp password ;设置发vtp密码

switch(config)#vtp server ;设置vtp服务器模式

switch(config)#vtp client ;设置vtp客户机模式

交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:

switch(config)#interface vlan 1 ;进入vlan 1

switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址

switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关switch(config)#ip domain-name https://www.sodocs.net/doc/8319175666.html, 设置域名

switch(config)#ip name-server 192.168.1.18 设置域名服务器switch(config)#mac-address-table? 查看mac-address-table 的子命令

switch(config)#mac-address-table aging-time 100 设置超时时间为100ms

switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口

switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#end

switch#show mac-address-table 查看整个MAC地址表

switch#clear mac-address-table restricted static 清除限制性静态地址

交换机显示命令:

switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息

switch#show run ;查看当前配置信息

switch#show vlan ;查看vlan配置信息

switch#show interface ;查看端口信息

switch#show int f0/0 ;查看指定端口信息

switch#show int f0/0 status;查看指定端口状态

switch#dir flash: ;查看闪存

Cisco路由器配置命令大全网络2010-06-26 06:43:44 阅读657 评论0 字号:大中小订阅 .

(1)模式转换命令

用户模式----特权模式,使用命令"enable"

特权模式----全局配置模式,使用命令"config t"

全局配置模式----接口模式,使用命令"interface+接口类型+接口号"

全局配置模式----线控模式,使用命令"line+接口类型+接口号"

注:

用户模式:查看初始化的信息.

特权模式:查看所有信息、调试、保存配置信息

全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置

线控模式:对路由器进行控制的接口配置

(2)配置命令

show running config 显示所有的配置

show versin 显示版本号和寄存器值

shut down 关闭接口

no shutdown 打开接口

ip add +ip地址配置IP地址

secondary+IP地址为接口配置第二个IP地址

show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录

show terminal 查看终端记录大小

hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0

service password-encryptin 手工加密所有密码enable password +密码配置明文密码

ena sec +密码配置密文密码

line vty 0 4/15 进入telnet接口

password +密码配置telnet密码

line aux 0 进入AUX接口

password +密码配置密码

line con 0 进入CON接口

password +密码配置密码

bandwidth+数字配置带宽

no ip address 删除已配置的IP地址

show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAM

erase startup-config 清除NVRAM中的配置信息

show ip interface brief 查看接口的谪要信息

banner motd # +信息 + # 配置路由器或交换机的描素信息

description+信息配置接口听描素信息

vlan database 进入VLAN数据库模式

vlan +vlan号+ 名称创建VLAN

switchport access vlan +vlan号为VLAN为配接口

interface vlan +vlan号进入VLAN接口模式

ip add +ip地址为VLAN配置管理IP地址

vtp+service/tracsparent/client 配置SW的VTP工作模式

vtp +domain+域名配置SW的VTP域名

vtp +password +密码配置SW的密码

switchport mode trunk 启用中继

no vlan +vlan号删除VLAN

show spamming-tree vlan +vlan号查看VLA怕生成树议

2. 路由器配置命令

ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表

show protocols 显示出所有的被动路由协议和接口上哪些协议被设置

show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用

的定时器

等信息

router rip 激活RIP协议

network +直连网段发布直连网段

interface lookback 0 激活逻辑接口

passive-interface +接口类型+接口号配置接口为被动模式

debug ip +协议动态查看路由更新信息

undebug all 关闭所有DEBUG信息

router eigrp +as号激活EIGRP路由协议

network +网段+子网掩码发布直连网段

show ip eigrp neighbors 查看邻居表

show ip eigrp topology 查看拓扑表

show ip eigrp traffic 查看发送包数量

router ospf +process-ID 激活OSPF协议

network+直连网段+area+区域号发布直连网段

show ip ospf 显示OSPF的进程号和ROUTER-ID

encapsulation+封装格式更改封装格式

no ip admain-lookup 关闭路由器的域名查找

ip routing 在三层交换机上启用路由功能

show user 查看SW的在线用户

clear line +线路号清除线路

3. 三层交换机配置命令

配置一组二层端口

configure terminal 进入配置状态

nterface range {port-range} 进入组配置状态

配置三层端口

configure terminal 进入配置状态

interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-

channel port-channel-number} 进入端口配置状态

no switchport 把物理端口变成三层口

ip address ip_address subnet_mask 配置IP地址和掩码

no shutdown 激活端口

例:

Switch(config)# interface gigabitethernet0/2

Switch(config-if)# no switchport

Switch(config-if)# ip address 192.20.135.21 255.255.255.0

Switch(config-if)# no shutdown

配置VLAN

configure terminal 进入配置状态

vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改

name vlan-name 可选)输入一个VLAN名,如果没有配置VLAN 名,缺省的名字是VLAN号前面用0填满

的4位数,如VLAN0004是VLAN4的缺省名字

mtu mtu-size (可选) 改变MTU大小

Switch# configure terminal

Switch(config)# vlan 20

Switch(config-vlan)# name test20

Switch(config-vlan)# end

Switch# vlan database

Switch(vlan)# vlan 20 name test20

Switch(vlan)# exit

将端口分配给一个VLAN

configure terminal 进入配置状态

interface interface-id 进入要分配的端口

switchport mode access 定义二层口

switchport access vlan vlan-id 把端口分配给某一VLAN

Switch# configure terminal

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

Switch(config)# interface fastethernet0/1

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 2

Switch(config-if)# end

Switch#

配置VLAN trunk

configure terminal 进入配置状态

interface interface-Id 进入端口配置状态

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装ISL 或 802.1Q 或

自动协商

switchport mode {dynamic {auto | desirable} | trunk} 配置二层trunk模式。

dynamic auto—自动协商是否成为trunk

dynamic desirable—把端口设置为trunk如果对方端口是trunk, desirable, 配置Native VLAN

(802.1q)

或自动模式,trunk—设置端口为强制的trunk方式,而不理会对方端口是否为trunk

switchport access vlan vlan-id 可选) 指定一个缺省VLAN, 如果此端口不再是trunk

switchport trunk native vlan vlan-id 指定802.1Q native VLAN 号

例:

Switch# configure terminal

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

Switch(config)# interface fastethernet0/4

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk encapsulation dot1q

Switch(config-if)# end

定义TRUNK允许的VLAN

configure terminal子进入配置状态

interface interface-id 进入端口配置

switchport mode trunk 配置二层口为trunk

switchport trunk allowed vlan {add | all | except | remove} vlan-list可选) 配置trunk允

许的VLAN.使用add, all, except, remove关健字

no switchport trunk allowed vlan 允许所有VLAN通过

Switch(config)# interface fastethernet0/1

Switch(config-if)# switchport trunk allowed vlan remove 2 Switch(config-if)# end

配置Native VLAN(802.1q)

configure terminal 进入配置状态

interface interface-id 进入配置成802.1qtrunk的端口

switchport trunk native vlan vlan-Id 配置native VLAN号

no switchport trunk native vlan 端口配置命令回到缺省的状态配置基于端口权值的负载均衡

configure terminal 进入Switch 1配置状态

vtp domain domain-name 配置VTP域

vtp mode server 将Switch 1配置成VTP server.

show vtp status 验证VTP的配置

show vlan 验证VLAN

configure terminal 进入配置状态

interface fastethernet 0/1 进入F0/1端口

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装

switchport mode trunk 配置成trunk

show interfaces fastethernet0/1 switchport 验证VLAN配置按以上步骤对想要负载均衡的接口进行配置

在另一个交换机上进行此配置

show vlan 当trunk已经起来,在switch2上验证已经学到相的vlan配置

configure terminal 在Switch 1上进入配置状态

interface fastethernet0/1 进入要配置的端口

spanning-tree vlan 8 port-priority 10 将端口权值10赋与VLAN 8.

spanning-tree vlan 9 port-priority 10 将端口权值10赋与VLAN 9.

spanning-tree vlan 10 port-priority 10 将端口权值10赋与VLAN 10.

interface fastethernet0/2 进入F0/2

spanning-tree vlan 3 port-priority 10 将端口权值10赋与VLAN 3.

spanning-tree vlan 4 port-priority 10 将端口权值10赋与VLAN 4

spanning-tree vlan 5 port-priority 10 将端口权值10赋与VLAN 5

spanning-tree vlan 6 port-priority 10 将端口权值10赋与VLAN 10

end 退出

show running-config 验证配置

copy running-config startup-config 保存配置

配置STP路径值的负载均衡

Trunk1走VLAN8-10,Trunk2走VLAN2-4

configure terminal 进入 Switch 1配置状态

interface fastethernet 0/1 进入F0/1

switchport trunk encapsulation {isl | dot1q | negotiate}配置封装

switchport mode trunk 配置Trunk,缺省是ISL封装

exit 退回

在F0/2口上重复2-4步骤

exit 退回

show running-config 验证配置

show vlan验证switch1 已经学到Vlan

configure terminal 进入配置状态

interface fastethernet 0/1 进入F0/1

spanning-tree vlan 2 cost 30 设置Vlan2生成树路径值为30

spanning-tree vlan 3 cost 30 设置Vlan3生成树路径值为30

spanning-tree vlan 4 cost 30 设置Vlan4生成树路径值为30

end 退出

在switch1的F0/2上重复9-11步骤设置VLAN8,9,10生成树路径值为30

end 退出

show running-config 验证配置

copy running-config startup-config 保存配置

补充:CISCO命令集——路由选择协议及排障

*ip route命令

Router(config)# ip route <目录网络或子网号> [子网掩码] <下一路由器IP地址 | 从本地出口

的地址> [管理距离0~255,默认为1]

(注:静态地址配置)

*ip default-network命令

Router(config)# ip default-network <目标网络号>

(注:配合路由协使用,用其中的一个动态路由号作默认路由配置) Router(config)# ip route 0.0.0.0 0.0.0.0 <下一路由器IP地址 | 从本地出口的地址>

(注:只有一个公网地址时,在出口路由器上的配置)

*内部路由选择协议

*使用router和network命令

Router(config)# router <路由协议rip | igrp | eigrp | ospf | is-is等> [自主系统号]

Router(config-router)# network <直接相连的要用此路由协议

的网络号>

Router(config-router)# network <直接相连的要用此路由协议的网络号>

*路由信息协议RIP

Router(config)# router rip

Router(config-router)# network <直接相连的要用rip协议的有类别网络号>

Router# show ip protocols

Router# show ip route

Router# debug ip rip

*内部网关路由协议IGRP

Router(config)# router igrp <自主系统号>

Router(config-router)# network <直接相连的要用igrp协议的有类别网络号>

Router# show ip interface

Router# show ip protocols

Router# show ip route

Router# debug ip rip

*排除网络故障

排除网络故障的一个总体模型

Router# ping <有故障的主机 | 有故障的IP地址>

Router# show ip route

Router# show interface <有故障的接口>

Router# show run

*IP的故故障排除

检查可用的路由

Router# show ip route <有故障的IP地址>

27.4.4 跟踪路由(Tracing the Route)

SUN-A> traceroute <有故障的主机 | 有故障的IP地址>

C:/windows/> winipcfg

C:/windows/> ipconfig

C:/windows/> ipconfig / all

C:/windows/> tracert <有故障的'主机 | 有故障的IP地址>

使用扩展的ping来跟踪连接性

Router# ping

*其它可能的故障

一个地址解析(ARP)的故障

Router# show arp

Router# show interface <有故障的接口>

C:/windows/> arp -a

SUN-A> arp –a

验证终端系统的路由表

C:/windows/> netstat –rn

C:/windows/> route –f add 0.0.0.0 mask 0.0.0.0 <需要添加入的网关地址>

C:/windows/> route [–f ] [[print | add | delete | change] [destination] [mask

netmask] [gateway]]

C:/windows/> route add mask <网络掩码> <网关ip地址>

C:/windows/> route delete mask <网络掩码> <网关ip地址> C:/windows/> nbtstat <相应的参数>

SUN-A> netstat -rn路由器

CISCO交换机配置命令大全2009-08-13 21:131.在基于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}

8.在基于IOS的交换机上配置静态VLAN:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)# interface interface module/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end

在基于CLI的交换机上配置静态VLAN:

switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

9. 在基于IOS的交换机上配置VLAN中继线:

switch(config)# interface interface mod/port

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list

switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线:

switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]

Vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基于IOS的交换机上配置VTP管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基于CLI的交换机上配置VTP管理域:

switch(enable) set vtp [domain domain-name]

11.在基于IOS的交换机上配置VTP 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp {sever|cilent|transparent}

switch(vlan)# vtp password password

在基于CLI的交换机上配置VTP 模式:

switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

12. 在基于IOS的交换机上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交换机上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基于IOS的交换机上启动VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基于CL I 的交换机上启动VTP剪裁:

switch(enable) set vtp pruning enable

14.在基于IOS的交换机上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}]

在基于CLI的交换机上配置以太信道:

switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

15.在基于IOS的交换机上调整根路径成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基于CLI的交换机上调整根路径成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基于IOS的交换机上调整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基于CLI的交换机上调整端口ID:

switch(enable) set spantree portpri {mldule/port}priority

switch(enable) set spantree portvlanpri {module/port}priority [vlans]

17. 在基于IOS的交换机上修改STP时钟:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

` switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基于CLI的交换机上修改STP时钟:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:

switch(config-if)#spanning-tree portfast

在基于CLI的交换机端口上启用或禁用Port Fast 特征:

switch(enable) set spantree portfast {module/port}{enable|disable}

19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基于CLI的交换机端口上启用或禁用UplinkFast 特征:

switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name

21. 为了从一条中继链路上删除VLAN,可使用下列命令:

switch(enable) clear trunk module/port vlan-range

22. 用show vtp domain 显示管理域的VTP参数.

23. 用show vtp statistics显示管理域的VTP参数.

24. 在Catalyst交换机上定义TrBRF的命令如下:

switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]

25. 在Catalyst交换机上定义TrCRF的命令如下:

switch (enable) set vlan vlan-num [name name] type trcrf

{ring hex-ring-num|decring decimal-ring-num} parent vlan-num

26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:

switch(enable) set vlan vlan-num mod-num/port-num

27. 命令show spantree显示一个交换机端口的STP状态.

28. 配置一个ELAN的LES和BUS,可以使用下列命令:

ATM (config)# interface atm number.subint multioint

ATM(config-subif)# lane serber-bus ethernet elan-name

29. 配置LECS:

ATM(config)# lane database database-name

ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address

ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address

ATM(lane-config-databade)# name …

30. 创建完数据库后,必须在主接口上启动LECS.命令如下:

ATM(config)# interface atm number

ATM(config-if)# lane config database database-name

ATM(config-if)# lane config auto-config-atm-address

31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:

ATM(config)# interface atm number.subint multipoint

ATM(config)# lane client ethernet vlan-num elan-num

32. 用show lane server 显示LES的状态.

33. 用show lane bus显示bus的状态.

34. 用show lane database显示LECS数据库可内容.

35. 用show lane client显示LEC的状态.

36. 用show module显示已安装的模块列表.

37. 用物理接口建立与VLAN的连接:

router# configure terminal

router(config)# interface media module/port

router(config-if)# description description-string

router(config-if)# ip address ip-addr subnet-mask

router(config-if)# no shutdown

38. 用中继链路来建立与VLAN的连接:

router(config)# interface module/port.subinterface

router(config-ig)# encapsulation[isl|dotlq] vlan-number

router(config-if)# ip address ip-address subnet-mask

39. 用LANE 来建立与VLAN的连接:

router(config)# interface atm module/port

router(config-if)# no ip address

router(config-if)# atm pvc 1 0 5 qsaal

router(config-if)# atm pvc 2 0 16 ilni

router(config-if)# interface atm module/port.subinterface multipoint

router(config-if)# ip address ip-address subnet-mask

router(config-if)# lane client ethernet elan-num

router(config-if)# interface atm module/port.subinterface multipoint

router(config-if)# ip address ip-address subnet-name

router(config-if)# lane client ethernet elan-name

router(config-if)# …

40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:

router(config)# ip routing

router(config)# router ip-routing-protocol

router(config-router)# network ip-network-number

router(config-router)# network ip-network-number

41. 配置默认路由:

switch(enable) set ip route default gateway

42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:

router(config)# interface interface number

router(config-if)# mls rp vlan-id vlan-id-num

43. 在路由处理器启用MLSP:

router(config)# mls rp ip

44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP 域中:

router(config)# interface interface number

router(config-if)# mls rp vtp-domain domain-name

45. 查看指定的VTP域的信息:

router# show mls rp vtp-domain vtp domain name

46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:

router(config-if)#mls rp management-interface

47. 要检验MLS-RP的配置情况:

Cisco交换机配置新手篇

Cisco交换机配置新手篇:正确连接和初级配置 Cisco交换机在网络届处于绝对领先地位,高端冗余设备(如:冗余超级引擎,冗余负载均衡电源,冗余风扇,冗余系统时钟,冗余上连,冗余的交换背板),高背板带宽,高多层交换速率等都为企业网络系统的高速稳定运行提供良好解决方案。这就是为什么大型企业都选择Cisco交换机做核心层和分布层等主要网络设备。 Cisco分为高中低端交换机,分别面向不同层次。但是多数Cisco交换机都基于Cisco自家的IOS( Internet Operating System )系统。所以设置都是大同小异。 让我们从零开始,一步一步教大家学会用Cisco交换机。 第一步:利用电脑超级终端与交换机建立连接 可进行网络管理的交换机上有一个“Console”端口,它是专门用于对交换机进行配置和管理的。可以通过Console端口连接和配置交换机。用Cisco自带的Console线,RJ-45端接入Cisco交换机Console 口,Com口端接入电脑Com1或Com2口,必须注意的是要记清楚接入的是那个Com口。 按照步骤开启超级终端:开始-程序-附件-通讯-超级终端(图2)

(图2) 点击文件-新建连接(图3) (图3) 输入超级终端名称,选择数据线所连端口(注意选择Com口时候要对应Console线接入电脑的Com口):图4

(图4) 确定-点击还原为默认值(图5) (图5) 确定后开启交换机 此时交换机开始载入IOS,可以从载入IOS界面上看到诸如IOS版本号,交换机型号,内存大小等数据

当屏幕显示Press RETURN to get started的时候按回车就能直接进入交换机。 第二步:学习交换机的一些初级命令 首先我们要知道Cisco配置界面分两种,一种是基于CLI(Command-line Interface 命令行界面),一种是基于IOS(Internetwork Operting System 互联网操作系统)。暂时我们先探讨基于IOS的Cisco交换机。 基于IOS的交换机有三种模式,“>”用户模式,“#”特权模式,“(CONFIG)#”全局模式,在用户模式输入enable进入特权模式,在特权模式下输入disable回到用户模式,在特权模式下输入configure terminal进入全局模式。在特权模式下输入disable回到特权模式下。 刚进入交换机的时候,我们处于用户模式,如:switch>。在用户模式我们可以查询交换机配置以及一些简单测试命令。在用户模式输入?号可以查询可以运行的命令。出现命令过多不能全部显示可以用Enter键逐行显示,空格键整页翻动。 对于一个默认未配置的交换机来说,我们必须对一些命名,密码和远程连接等进行设置,这样可以方便以后维护。 hostname /*设置交换机名 如:switch(config)#hostname switch ip address

Cisco交换机配置手册

2950交换机 简明配置维护手册

目录 说明 (3) 产品特性 (3) 配置端口 (4) 配置一组端口 (4) 配置二层端口 (6) 配置端口速率及双工模式 (6) 端口描述 (7) 监控及维护端口 (8) 监控端口和控制器的状态 (8) 刷新、重置端口及计数器 (10) 关闭和打开端口 (10) 配置VLAN (11) 理解VLAN (11) 可支持的VLAN (12) 配置正常范围的VLAN (12) 生成、修改以太网VLAN (13) 删除VLAN (14) 将端口分配给一个VLAN (15) 配置VLAN Trunks (16) 使用STP实现负载均衡 (19) 配置Cluster (23)

说明 本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。 产品特性 2950是只支持二层的交换机 支持VLAN ?到250 个VLAN ?支持VLAN ID从1到4094(IEEE 802.1Q 标准) ?支持ISL及IEEE 802.1Q封装 安全 ?支持IOS标准的密码保护 ?支持标准及扩展的访问列表来定义安全策略 ?支持基于VLAN的访问列表 监视 ?交换机LED指示端口状态 ?SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量 ?内置支持四组的RMON监控功能(历史、统计、告警及事件)

配置端口 配置一组端口 当使用interface range命令时有如下的规则: ?有效的组范围: o vlan从1 到4094 o fastethernet槽位/{first port} - {last port}, 槽位为0 o gigabitethernet槽位/{first port} - {last port},槽位为0 o port-channel port-channel-number - port-channel-number, port-channel号从1到64 ?端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的. ?interface range命令只能配置已经存在的interface vlan ?所有在同一组的端口必须是相同类别的。

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

思科模拟器交换机配置思科交换机基本配置实 例讲解 你还在为不知道思科交换机基本配置实例讲解而烦恼么?接下来是WTT为大家收集的思科交换机基本配置实例讲解教程,希望能帮到大家。 思科交换机基本配置实例讲解的方法 目录 1、基本概念介绍.... 2 2、密码、登陆等基本配置.... 2 3、cisco设备端口配置详解.... 8 4、vlan的规划及配置.... 13 4.1 核心交换机的相关配置 (13) 4. 2接入交换机的相关配置 (25) 5、配置交换机的路由功能.... 30

6、配置交换机的DHCP功能.... 3 1 7、常用排错命令.... 3 2 友情链接: 杭州大金空调售后 ://hzdj.naitea./ 杭州大金空调售后电话 杭州西门子洗衣机售后维修电话 ://hzxmz.naitea./ 杭州西门子洗衣机售后服务电话 上海夜总会招聘 ://.yshktv./ 上海*** 上海夜总会 ://.zhongguoseo./ 上海夜场 上海*** ://.j-maxshop./ 上海招聘 杭州ktv招聘 ://hz.naitea./ ktv招聘 1、基本概念介绍IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN:

虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1. 2 2 Ether interfaces 8 Serial interfaces

思科交换机的基本配置

思科交换机的基本配置 随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。接下来是小编为大家收集的思科交换机的基本配置方法,希望能帮到大家。 思科交换机的基本配置的方法 一、交换机的基本配置 Author:chenchao in ZJNU 从本篇文章开始,将连载大概8-9篇自己学习交换与路由的实验报告,但是怕自己能力不行,会出现错误,所以,先载两篇文章,依次为:交换机的基本配置;路由器基本配置。本篇为交换机的基本配置,使用的仿真软件是Cisco的一款免费软件:Cisco Packet Tracer。想学习的可以在百度自行下载。 下面开始附上实验过程: 实验环境: Cisco 2950交换机1台,Console电缆1根,PC机一台,网线1根。连接如下图所示: 实验步骤: 一、交换机的带外配置; 1、在用户模式、特权模式、全局模式、接口模式之间转换; Switch>enable Switch#configure terminal Enter configuration commands, one perline. End with CNTL/Z. Switch(config)#interface FastEthernet 0/1 Switch(config-if)#exit Switch(config)#exit Switch# %SYS-5-CONFIG_I: Configured from console byconsole Switch#exit

Switch con0 is now available Press RETURN to get started. Switch> 2、将交换机的名称改为“student”; Switch(config)#hostname student student(config)# 3、为交换机各个模式设置密码“cisco”; 特权模式下的密码保护 student#enable student#configure t Enter configuration commands, one perline. End with CNTL/Z. student(config)#enable password cisco student(config)#enable secret cisco1 远程登录口令设置 student#configure t Enter configuration commands, one perline. End with CNTL/Z. student(config)#line console 0 student(config-line)#line vty 0 4 student(config-line)#password cisco2 student(config-line)#login student(config-line)# student# 4、为交换机制定一个IP地址10.10.10.X/24; student#config Configuring from terminal, memory, ornetwork [terminal]? Enter configuration commands, one perline. End with CNTL/Z. student(config)#interface vlan 1

思科交换机的基本配置

思科交换机的基本配置 思科交换机的基本配置 H3C每年将销售额的15%以上用于研发投入,在中国的北京、杭州和深圳设有研发机构,在北京和杭州设有可靠性试验室以及产品鉴定测试中心。下面店铺整理一些思科交换机的基本配置,希望大家认真阅读! CISCO交换机基本配置:Console端口连接 用户模式hostname# ; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname csico ;设置交换机的主机名 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#exit ;返回命令 交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1

思科交换机配置教程详解.doc

思科交换机配置教程详解 思科交换机配置教程详解的方法 1、基本概念介绍 IOS: 互联网操作系统,也是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 3、cisco设备端口配置详解 4、vlan的规划及配置

在本节中我们讲解vlan的规划及具体的配置命令。在此例中我们用的是vtp(VLAN Trunking Protocol)server的模式,在这种模式中我们需要配置核心交换机的vtp模式为server,各接入交换机的vtp模式为cilent,那么配置完成后接入交换机会通过trunk 口自动从核心交换机学习到所有的vlan配置信息。在接入交换机中只需要添加相应的端口即可,这样易于管理与部署。具体的配置命令我们通过两小节来演示: 4.1 核心交换机的相关配置 4.2 接入交换机的相关配置 5、配置交换机的路由功能 说明:只有在三层交换机上才有路由功能,其他的二层接入交换机要想在不同的vlan之间传送数据需要通过trunk口到核心交换机上进行完路由交换后才可以。 6、配置交换机的DHCP功能 7、常用排错命令 看了思科交换机配置教程详解还看了: 1.思科交换机的基本配置详解 2.思科交换机配置命令教程

思科交换机配置

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 broadc ast-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|duple x|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-stri ng 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}

思科交换机实用配置步骤详解

1. 交换机支持的命令: 交换机基本状态: switch: ;ROM 状态,路由器是rommon> hostname> ; 用户模式 hostname# ; 特权模式 hostname(config)# ; 全局配置模式 hostname(config-if)# ; 接口状态交换机口令设置: 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 ; 设置登录口令xx switch#exit ; 返回命令

精选文库 vla n switch#vla n database ; switch(vla n)#vla n 2 ; switch(vla n)#no via n 2 ; switch(co nfig)# int fO/1 ; 进入VLAN设置 建VLAN 2 删vlan 2 进入端口 1 switch(co nfig-if)#switch portaccess vla n 2 ; switch(co nfig-if)#switch port mode trunk ; switch(co nfig-if)#switch port trunk allowed vla n 1 switch(c on fig-if)#switch port trunk encap dot1q ; switch(co nfig)#vt p domai n ; switch(c on fig)#vt p p assword ; switch(c on fig)#vt p mode server ; switch(co nfig)#vt p mode clie nt ; 交换机设置IP地址: switch(co nfig)#i nterface vla n 1 ; switch(c on fig-if)# ip address ; switch(c on fig)# ip default-gateway ; 当前端口加入vlan 2 设置为干线 设置发vtp域名 设置发vtp密码 设置发vtp模式 设置发vtp模式 进入vlan 1 设置IP地址 设置默认网关 ,2;设置允许的 设置vlan中继 交换机VLAN设置:

思科交换机基本配置(非常详细)

cisco交换机基本配置 1.Cisco IOS简介 Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS (Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。 IOS的优点在于命令体系比较易用。利用操作系统所提供的命令,可实现对交换机的配置和管理。Cisco IOS操作系统具有以下特点: (1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。 (2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。 (3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。 (4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。特权模式允许运行提供的所有命令。 (5)IOS命令不区分大小写。 (6)在不引起混淆的情况下,支持命令简写。比如enable通常可简约表达为en。 (7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。 1.搭建交换机配置环境 在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。 (1)通过Console口连接交换机 对于首次配置交换机,必须采用该方式。对交换机设置管理IP地址后,就可采用Telnet登录方式来配置交换机。 对于可管理的交换机一般都提供有一个名为Console的控制台端口(或称配置口),该端口采用RJ-45接口,是一个符合EIA/TIA-232异步串行规范的配置口,通过该控制端口,可实现对交换机的本地配置。 交换机一般都随机配送了一根控制线,它的一端是RJ-45水晶头,用于连接交换机的控制台端口,另一端提供了DB-9(针)和DB-25(针)串行接口插头,用于连接PC机的COM1或COM2串行接口。Cisco的控制线两端均是RJ-45水晶头接口,但配送有RJ-45到DB-9和RJ-45到DB-25的转接头。 通过该控制线将交换机与PC机相连,并在PC上运行超级终端仿真程序,即可实现将PC机仿真成交换机的一个终端,从而实现对交换机的访问和配置。 Windows系统一般都默认安装了超级终端程序,对于Windows 2000 Server系统,该程序位于【开始】菜单下【程序】中【附件】的【通讯】群组下面,若没有,可利用控制面板中的【添加/删除程序】来安装。单击【通讯】群组下面的【超级终端】,即可启动超级终端。 首次启动超级终端时,会要求输入所在地区的电话区号,输入后将显示下图所示的连接创建对话框,在【名称】输入框中输入该连接的名称,并选择所使用的示意图标,然后单击确定按钮。 图9-2 超级终端连接创建对话框

思科交换机初始化配置

思科交换机初始化配置 思科交换机初始化配置 在交换机初始化的时候一定要配置SNMP工具,这是为了后续维护的方便,让其能够帮助管理员来维护企业复杂多变的网络环境,因为SNMP是一个比较复杂、功能比较强大的管理工具。具体的来说,主要涉及到以下四大参数。 一、交换机设置系统名字 为了能够有效的管理交换机,最好能够为交换机设置一个有意义的系统名字这是一个最基本的要求。如果不进行配置,当使用telnet 或者ssh协议登陆到交换机进行会话的时候,CLI界面所显示的是交换机等网络设备的默认名称。这个默认名称不便于进行区分。特别是在比较复杂的企业网络中,为各台交换机等网络设备配置有意义的并且是唯一的系统名字是一项非常有用的工作。 如现在有一家办公大楼,其在各个楼层都配有一台交换机。此时就可以根据楼层的名字给交换机命名,如SWF4。其中SW表示这个设备是交换机,而F4则表示其放置在第四楼。看到这个名字之后,管理员就可以一目了然的知道这台交换机的位置、用途等等。如果有必要的话,笔者认为,可以将交换机的位置信息、用途等等都加入到名字中去。当然为了名字过于长,可以采用简写或者代码的方式进行记录。这个名字的目的只有一个,就是当管理员看到这个名字的时候,就能够知道这个交换机所处的位置以及作用。如果能够达到这个目的,那么命名规则就是成功的。 在思科系列的交换机中,可以使用hostname命令或者setsystemname来对系统进行命名。两者的区别主要在于所使用的系统不同。前者主要在IOS系统中使用,而后者的话主要在CatOS中采用。 二、交换机设置时钟和NTP 在企业网络排错和监控的过程中,维护准确的时钟设置并且显示正确的时间和日期是非常重要的,而且也是最基本的要求。当某个故

Cisco交换机详细配置及命令说明

Cisco交换机的概述 交换机根据OSI层次通常可分为第2层交换机和多层交换机。通常所说的交换机指第2层交换机也叫LAN交换机(第二层MAC地址进行交换);多层交换机与第2层交换机工作方式类似,除了使用第二层MAC地址进行交换之外,还使用第3层网络地址。 交换机的基本配置 3、电缆连接及终端配置 如图11-8所示,接好PC机和交换机各自的电源线,在未开机的条件下,把PC机的串口1 (COM1)通过控制台电缆线与交换机的Console端口相连,即完成设备连接工作。 交换机Console端口的默认参数如下: 端口速率:9600b/s; 数据位:8; 奇偶校验:无; 停止位:1; 流控:无。 3、交换机的启动 启动过程未用户提供了丰富的信息,我们可以对交换机的硬件结构和软件加载过程有直观的认识,这些信息对我们了解该交换机以及对她做相应的配置很有帮助,另外部件号、序列号、版本号等信息再产品验货时都是非常重要的信息。 3、交换机的基本配置 在默认情况下,所有接口处于可用状态并且都属于VLAN1,这种情况下交换机就可用正常工作了,为了方便管理和使用,首先应对交换机做基本的配置,最基本的配置可以通过启动时的对话框配置模式完成,也可以在交换机启动后再进行配置。 (1)配置Enable口令和主机名。在交换机中可以配置使能口令(Enable password)和使能密码(Enable secret),一般情况下只需配置一个就可以,当两者同时配置时,后者生效。这两者的区别是使能口令 以明文显示而使能密码以密文形式显示。 Switch> (用户执行模式提示符) Switch>enable (进入特权模式) Switch # (特权模式提示符) Switch # config termianal (进入配置模式) Switch (config) # (配置模式提示符) Switch (config) # enable password cisco 设置enable password 为cisco) Switch (config) # enable secret cisco1 (设置enable secret 为cisco1) Switch (config) # hostname C2950 (设置主机名为C2950) C2950 (config) # end (退回到特权模式) C2950 # (2)配置交换机IP地址、默认网关、域名、域名服务器。应该注意的时这里所设置的Ip地址、网关、域名等信息,是为交换机本身所设置用来管理交换机的,与连接在该交换机上的计算机或其它网络设 备无关。也就是说所有与交换机连接的主机都应该设置自身的域名、网关等信息。 C2950(config) # ip address 192.168.1.1 255.255.255.0 (设置交换机IP地址)

Cisco 交换机配置

Cisco交换机配置入门 机型:Cisco 3750 想对交换机警醒配置。一般有两种方法: 1 、控制台端口(Console ):可以直接对交换机进行配置 2 、远程登录(Telnet):通过TELNET程序对已经设置了IP的交换机进行远程配置,一般等控制台端口配置好交换机的IP后才可以进行。 除了以上的两种方法外,其实还有两种方法: 1 、WEB 的配置方式。此方法只能配置一般的简单设置 2 、硬件自带的应用程序。专用的程序,一般很少用 建立控制台连接到交换机 一般交换机自带一根Console 线,一端连接到交换机的Comsole 口,一端连接到电脑的串行口。打开超级终端,一般就可以连接到交换机。具体的参数设置如下

这样就可以连接到交换机了 连接到交换机后,如果是第一次启动会要执行初始化操作,一般是设置交换机的名称,密码等一般的信息。 由于交换机已经初始化,如果要进行初始化操作,那就要进入特权EXEC模式,在命令提示符号下输入:setup,就会启动初始化操作。 刚才讲到了特权EXEC模式,这理就要讲一下觉换机的几种模式,不同的模式可以执行不同的操作命令,首先来说两种基本的模式。

一般为了安全考虑,CISCO将操作会话分为两个不同的访问级别:用户EXEC级别和特权EXEC级别。用户EXEC级别只能使用有限的命令,且交换机显示Switch>提示符,不能对交换机进行配置。看例子,处于用户EXEC级别下的状态:AITG_FrontekCoreSW> 特权EXEC级别下交换机显示Switch#提示符,能对交换机进行各种配置。看例子,处于特权EXEC级别下的状态:输入en,进入特权EXEC级别,接着输入密码,进入特权EXEC 级别 AITG_FrontekCoreSW>en Password: AITG_FrontekCoreSW# 看看,提示符变了,用户在用户EXEC级别输入enable(或en),然后输入密码,就可以进入特权EXEC级别 在交换机提示符下输入“?”,可以列出相应模式下交换机所支持的所有命令。 退出特权EXEC级别模式:disable 再用户EXEC级别输入?可以获得帮助信息:

思科交换机和路由器的基本配置

思科交换机和路由器的基本配置 思科交换机和路由器的基本配置 思科认证考试已经在紧张的备考中了,下文yjbys店铺为大家分享的是有关思科交换机和路由器的基本配置命令详细内容,希望对大家学习思科有所帮助! 1.IOS(Intermetwork Operating System)的优点: 特性、连通性、可扩展性、可靠性和安全性 特性是针对那些为任何规模的网络提供连通性、连通性、可扩展性、可靠性和安全性解决方案的协议和功能的。 连通性 IOS为LAN和WAN环境,包括铜线和光纤布线以及无线支持多种数据链路层技术。 可扩展性IOS同时支持固定和模块化的机架平台,从而使用户能够为自己的需求购买合适的硬件,却仍然允许利用同一IOS CLI以减少用户的管理费用。 可靠性为了确保用户的关键资源始终是可达的,cisco已经开发了许多产品和IOS特性以提供网络冗余。 安全性利用IOS,用户可以依照内部安全策略严格地控制对网络和连网设备的访问。 2.Cisco设备启动时所经历的3个步骤: 进行硬件测试、定位和加载IOS、定位并且执行这个设备的配置文件。 3.访问IOS CLI的方式:控制台、辅助端口、VTY(telnet)、TFTP、SNMP和网络浏览器。 4.配置交换机、路由器 命令输出: %Invlid input detected at ‘^’ 表明在这个命令行的哪个位置上存在错误 %Incomplete command 表明用户没有为这条命令输入任何必要的参数,语法正确,需要更多的参数

%Ambiguous command command:”show I” 没有键入足够的字符以使一条命令或参数是唯一的 %Unkown command or computer name,or unable to find computer address 输入了一条IOS不知道的命令 5.1900系列交换机: >enable 进入特权模式 #disable 退出特权模式 #configure terminal 进入配置模式 (config)#exit 或ctrl+Z 退出配置模式 (config)#hostname 1900 为交换机命名 1900(config)#no hostname 1900 取消命名 (config)#enable password level level_# password 设定用户和特权EXEC口令;用户级别数是1,特权级别数是15 (config)#interface type slot_#/port_# 进入接口 (config)#ip address IP_address subnet_mask 配置IP地址 (config)#ip default-gateway router’s_IP_address 配置网关 (config)#interface Ethernet|fastethernet 0/port_# (config-if)#duplex auto |full |half |full-flow-control 配置接的双工模式 (config)#mac-address-table permanent MAC_address interface 在CAM表中创建静态条目 (config)#mac-address-table restricted static MAC_address source_port list_of_allowed_interfaces 设置静态端口安全措施用静态端口安全措施 (config-if)#port secure 进入接口启用静态端口安全措施 (config-if)#port secure max-mac-count value 其默认值为132可在1~132范围内改动 (config)#address-violation suspend | ignore | disable 改变其安全选项 安全违规命令有3个:保护、限制、关闭

CISCO交换机和路由器基本配置

一CISCO交换机和路由器基本配置 交换机的配置 1用户模式 switch > 2进入特权模式 switch > enable 3 进入全局配置模式,全局模式的配置对整个交换机生效. switch config terminal switch config 4进入接口模式,配置只对当前的接口生效 switchconfig interface f0/1 switchconfig-if 进入line 模式,这个模式主要用来对控制台做相应的配置5 switchconfig line console 0 switchconfig-line 6配置主机名 switchconfig hostname 主机名 7配置使能口令 switchconfig enable password 密码 8 配置加密使能口令 switchconfig enable secret 密码 9配置ip地址 switchconfig interface vlan 1

switchconfig ip add ip地址子网掩码switchconfig no shutdown 10配置交换机的网关 switchconfig ip default-gateway ip地址 11 保存配置 switch copy runing-config startup-config switch write 12清空配置 switch erase startup-config 13 清空接口配置 switch config interface f0/1 switch config-if default interface f0/1 14清空交换机密码 1 关闭电源. 2 开启电源, 并且按住交换机的mode键,当交换机进入................................ ................................ flash_init load_helper boot switch: 3 在switch 后执行 flash_init命令 switch: flash-init 4 在查看flash中的文件

思科交换机安全很全的详细配置讲解

cisco全部局域网缓解技术 交换机安全 802.1X, port-security, DHCP SNOOP, DAI, VACL, SPAN RSPAN 端口和MAC绑定:port-security 基于DHCP的端口和IP,MAC绑定:ip source guard 基于DHCP的防止ARP攻击:DAI 防止DHCP攻击:DHCP Snooping 常用的方式: 1, 802.1X,端口认证,dot1x,也称为IBNS(注:IBNS包括port-security):基于身份的网络安全;许多名字,有些烦当流量来到某个端口,须要和ACS交互,认证之后得到授权,才可以访问网络,前提是CLIENT必需支持802.1X方式,如安装某个软件Extensible Authentication Protocol Over Lan(EAPOL)运用这个协议来传递认证授权信息 示例配置: Router#configure terminal Router(config)#aaa new-model Router(config)#aaa authentication dot1x default group radius Router(config)#radius-server host 10.200.200.1 auth-port 1633 key radkey Router(config)#dot1x system-auth-control 起用DOT1X功能

Router(config)#interface fa0/0 Router(config-if)#dot1x port-control auto AUTO是常用的方式,正常的通过认证和授权过程 强制授权方式:不通过认证,总是可用状态 强制不授权方式:实质上类似关闭了该接口,总是不可用 可选配置: Switch(config)#interface fa0/3 Switch(config-if)#dot1x reauthentication Switch(config-if)#dot1x timeout reauth-period 7200 //2小时后重新认证 Switch#dot1x re-authenticate interface fa0/3 //现在重新认证,留意:假如会话已经建立,此方式不断开会话Switch#dot1x initialize interface fa0/3 //初始化认证,此时断开会话 Switch(config)#interface fa0/3 Switch(config-if)#dot1x timeout quiet-period 45 //45秒之后才能发起下一次认证恳求 Switch(config)#interface fa0/3 Switch(config-if)#dot1x timeout tx-period 90 //默认是30S Switch(config-if)#dot1x max-req count 4 //客户端须要输入认证信息,通过该端口应答AAA服务器,假如

干货!思科交换机配置命令大全,附配置案例

干货!思科交换机配置命令大全,附配置案例 一、思科交换机基本配置命令 1 switch> enable switch# 2 switch> enable switch#configure terminal switch(conf)# 3 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5

switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6 1、创建多个VLAN Switch>enable (进入特权模式) Switch#vlan data (进入vlan配置模式) Switch(vlan)#vlan 10 name IT (划分vlan10,名称为IT) Switch(vlan)#vlan 20 name HR (划分vlan20,名称为HR) Switch(vlan)#vlan 30 name FIN (划分vlan30,名称为FIN) Switch(vlan)#vlan 40 name LOG (划分vlan40,名称为LOG) Switch(vlan)#exit 7 switch> enable switch#configure 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 设置网关地址 8 17 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

相关主题