文档库 最新最全的文档下载
当前位置:文档库 › 思科模拟器基本命令(交换机)

思科模拟器基本命令(交换机)

思科模拟器基本命令(交换机)
思科模拟器基本命令(交换机)

知识归纳

思科模拟器命令:

设置交换机名字为yzh

Switch> 进入超级终端控制台

Switch>enable 进入交换机特权模式

Switch#

Switch#configure terminal 进入交换机全局配置模式

Switch(configure)#hostname yzh 改变名字为XXX

yzh(configure)# 显示改名成功

yzh(configure)#exit 退回上级操作模式,即返回特权模式

yzh#

yzh#exit 返回到用户模式

yzh>

参看交换机有关信息

yzh#

yzh#configure terminal 进入交换机全局配置模式

yzh#show version 查看交换机的版本信息

yzh#show vlan 查看交换机的VLAN信息,默认情况下所有借口均属于VLAN yzh#show running-config 查看交换机当前生效的配置信息

配置交换机接口f0/2

yzh>

yzh>enable

yzh#

yzh#configure terminal 进入交换机配置模式

yzh(config)#interface fastEthernet 0/2 进入交换机接口fa0/2

yzh(config-if)# 进入接口配置模式

yzh(config-if)#speed 100 设置接口F0/2速率为100M

yzh(config-if)#duplex half 配置接口的双工模式是半双工

yzh(config-if)#no shutdown 开启接口,使得处于工作状态,等待转发数据。yzh(config-if)#exit 输入exit返回全局模式

yzh(config)#exit 返回特权模式

yzh# 位于特权模式

yzh#show interfaces fastEthernet 0/2 查看刚才对接口f0/2配置情况

设置交换机Enable特权密码为admin

yzh> 进入超级终端控制台

yzh>enable 进入交换机特权模式

yzh#configure terminal 进入交换机配置模式

yzh(config)#enable secret admin 设置Enable密码为admin

注:验证密码自己思考。

查看设备配置信息

yzh#show running-config

保存配置信息

yzh#write 保存设置配置,把配置指令写入对到系统文件夹中yzh#dir 查看系统文件

删除配置,恢复初始配置

yzh#

yzh#dir 查看系统文件

yzh#delete? 输入“?”号,获得帮助

yzh#delete flash:config.txt 删除配置文件

系统就恢复了出厂配置

三层交换机与二层交换机的大多数都相同。

配置三层交换机的名称为SW3,enable密码为admin,并且配置与远程登陆相关的选项。Switch>enable 进入交换机特权模式

Switch#configure terminal 进入交换机全局模式

Swirch(config)#hostname yzh 修改交换机名称

Yzh(config)#enable password admin 设置交换机enable密码为admin

Yzh(config)#interface vlan1 进入vlan1

Yzh(config-if-VLAN1)#ip address 192.168.1.1 255.255.255.0 配置IP地址

yzh(config-if-VLAN1)#exit 退出配置vlan1

yzh(config)#username admin password admin 配置登陆交换机的用户名与密码

yzh(config)#line vty 0 4 进入vty端口配置

yzh(config-line)#login local 配置vty端口使用本地数据库验证

yzh(config-line)#exit 退出vty端口配置

yzh(config)# 配置OK

保存三层交换机配置。

SW3#write

配置三层交换机名称与VLAN

yzh>enable 进入交换机特权模式

yzh#configure terminal 进入交换机全局模式

yzh(config)#hostname YZH 修改交换机名称为YZH

YZH(config)#vlan10 创建vlan10

YZH(config-vlan)#vlan20 创建vlan20

YZH(config-vlan)#exit

YZH(config)#interface range fastEthernet 0/1-10 进入fa/1-10端口

YZH(config-if-range)#switchport access vlan10 划分fa/1-10端口为vlan10 YZH(config-if-range)exit

YZH(config)#interface range fastEthernet 0/11-20 进入fa/11-20端口

YZH(config-if-range)#switchport access vlan20 划分fa/11-20端口为vlan20 YZH(config-if-range)#exit

查看vlan配置信息

YZH(config)#exit

YZH#show vlan 查看交换机vlan信息

配置vlan10与vlan20的IP地址,使vlan10与vlan20之间能相互通讯。

YZH(config)#interface vlan10 进入vlan10

YZH(config-vlan10)#ip address 192.168.1.1 255.255.255.0 配置vlan10的IP地址

YZH(config-vlan10)#exit

YZH(config)#interface vlan20 进入vlan20

YZH(config-vlan20)#ip address 192.168.2.1 255.255.255.0 配置vlan20的IP地址

YZH(config)#exit

YZH#show running-config 查看交换机配置信息

在三层交换机上配置vlan10与20的IP地址后,PC1与PC2可以相互通讯

YZH>enable 进入特权模式

YZH#configure terminal 进入全局模式

YZH(config)#hostname yzh 修改名称

yzh(config)#interface range fasrEthernet 0/1-2 进入fa0/1、fa0/2端口

yzh(config-if-range)#port-group 1 把fa0/1、fa0/2端口聚合为端口组1 yzh(config-if-range)#exit

yzh(config)#exit 注:验证测试:查看交换机配置

yzh#show running-config

配置三层交换机SW1的生成树协议

yzh>enable

yzh#configure

yzh(config)#hostname YZH

YZH(config)#spanning-tree 配置生成树

YZH(config)#exit

验证配置:

YZH#show vlan 查看VLAN划分信息

配置二层交换机SWB的VLAN划分

YZH>enable

YZH #configure terminal

YZH(config)#hostname SWB 配置交换机名称

YZH (config)#vlan20 创建VLAN20

YZH (config-vlan)#exit

YZH (config)#int fa0/1

YZH (config-if)#swit

YZH (config-if)#switchport access vlan20 将端口Fa0/1划分为VLAN20

YZH (config-if)#exit

YZH (config)#int fa0/24

YZH (config-if)#switchport access vlan20 将端口Fa0/24划分为VLAN20

YZH (config-if)#exit

配置三层交换机SW1不同VLAN之间的通信

YZH>enable

YZH #configure terminal

YZH (config)#hostname yzh !配置交换机名称

yzh (config)#vlan10 !创建VLAN10

yzh (config-vlan)#vlan20 !创建VLAN20

yzh (config-vlan)#vlan 30 !创建VLAN30

yzh (config-vlan)#exit

yzh (config)#interface vlan10 !配置VLAN10的IP地址

yzh (config-VLAN10)#ip address 192.168.1.1 255.255.255.0

yzh (config-VLAN10)#exit

yzh config)#interface vlan20 !配置VLAN20的IP地址

yzh (config-VLAN20)#ip address 192.168.2.1 255.255.255.0

yzh config-VLAN20)#exit

yzh (config)#interface vlan 30 !配置VLAN30的IP地址

yzh (config-VLAN 30)#ip address 192.168.3.1 255.255.255.0

yzh (config-VLAN 30)#exit

yzh (config)#interface range fastEthernet 0/1-7

yzh (config-if-range)#switchport access vlan10 !划分VLAN10

yzh (config-if-range)#exit

yzh (config)#interface range fastEthernet 0/8-14

yzh (config-if-range)#switchport access vlan20 !划分VLAN20

yzh (config-if-range)#exit

yzh (config)#interface range fastEthernet 0/15-21

yzh (config-if-range)#switchport access vlan 30 !划分VLAN30

yzh (config-if-range)#exit

配置风暴控制。

在交换机配置F0/1端口(连接PC1 的端口)对广播报文进行风暴控制,限制其端口收到

的报文速率(pps)

yzh#configure

yzh(config)#interface fastEthernet 0/1

yzh(config-if)#storm-control broadcast pps 100 配置报文速率阈每秒100个报文

yzh(config-if)#exit

配置交换机端口安全的最大连接数和端口违背模式,绑定PC机IP地址和MAC地址到端口

yzh>enable

yzh#configure

yzh(config)#interface fastEthernet 0/1

yzh(config-FastEthernet 0/1)#switchport port-security 打开端口安全功能

yzh(config-FastEthernet 0/1)#switchport port-security mac address 0023.7d51.72ad

ip-addreess 192.168.1.1

yzh(config-if-range)#switchport port-security violation shutdown 配置安全违背关闭模式

验证交换机端口的最大连接数和端口违背模式

yzh(config)#show port-secruity

验证端口绑定的MAC地址和IP地址

yzh(config)#show port-security

验证端口绑定的MAC地址和IP地址

yzh(config)#show port-security address

配置镜像源端口0/1-2的进出流量映射到目的端口F0/20

yzh>enable

yzh#configure

yzh(config)#monitor session 1 source interface fasrEthernet 0/1-2 both

yzh(config)#monitor session 1 destination interface fastEthernet 0/20

yzh(config)#exit

查看配置信息

yzh(config)#show monitor session 1

交换机地址绑定(address-bind)功能

yzh>

yzh>enable

yzh#configure terminal

yzh(config)#address-bind install 使用address-bind功能

yzh(config)#address-bind 192.168.1.1 0016.d390.6cc5

绑定IP地址为192.168.1.1 MAC地址为0016.d390.6cc5的主机让其使用网络

yzh(config)#address-bind 192.168.1.2 0016.d390.6cc4

绑定IP地址为192.168.1.2 MAC地址为0016.d390.6cc4的主机让其使用网络

yzh(config)#address-bind iplink GigabitEthernet 0/24

设置F0/24为例外端口,对于绑定地址策略不生效!

查看配置信息

yzh#show address-bind

创建ACL,定义需要限速的主机范围

yzh>enable

yzh#configure

yzh(config)#ip access-list standard gc 创建标准访问控制列表gc

yzh(config-std-ipacl)#permit host 192.168.1.0 定义限速的数据流

yzh(config)#ip access-list standard yg 创建标准访问控制列表yg

yzh(config-std-ipacl)#permit host 192.168.2.0 定义限速的数据流

定义分类表

Yzh(config)#class-map yg 创建名为yg的分类表

yzh(config-cmap)#match access-group yg 关联匹配的列表地址

yzh(config-cmap)#exit

yzh(config)#class-map gc 创建名为yg的分类表

yzh(config-cmap)#match access-group gc 关联匹配的列表地址

yzh(config-cmap)#exit

创建策略列表,关联对应的分类表,配置限速大小

yzh(config)#policy-map qos1 创建名为qos1的策略列表

yzh(config-pmap)#class yg 关联分类表yg

yzh(config-pmap-c)#police 20000 2000 exceed-action drop

将满足yg分类规则的报文的带宽设置为20M比特/秒,突发值为2M字节,超出此带宽的报文一律丢弃

yzh(config-pmap)#class gc 关联分类表gc

yzh(config-pmap-c)#bandwidth 20 percent 设置cg占取20%带宽

yzh(config-pmap-c)#exit

将带宽限制策略应用到相应的端口

yzh#configure

yzh(config)#interface range fastEthernet 0/1-2 进入端口1-2

yzh(config-if)#service-policy input qos1 应用策略列表

小贴士

验证分类表和策略列表的配置命令

Switch#show class-map

Switch#show policy-map

yzh#config

yzh(config)#time-range schooltime 创建时间表schooltime

yzh(config-time-range)#periodic Daily 23:00 to 23:59

定义时间范围为23:00到23:59

yzh(config-time-range)#periodic Daily 0:00 to 7:00

定义时间范围为0:00 到 7:00

yzh(config)#exit

:创建扩展ACL并命名为schoolACl,配置禁止172.20.83.0该网段在每天晚上23:00至凌晨7:00禁止访问外网IP地址172.20.82.100。

yzh(config)#ip access-list extended schoolACL 创建ACL,命名为schoolACL

yzh(config-ext-nacl)#deny ip 172.20.83.0 0.0.0.255 172.20.82.100 time-range schooltime

禁止 172.20.83.0该网段在Schooltime 的时间段内访问外网IP地址172.20.82.100 yzh(config-ext-nacl)#permit ip any any 允许其他所有IP通过

yzh(config-ext-nacl)#exit

进入端口F0/1,配置PC的网关地址,将名为schoolACL的ACL绑定到该端口的入口处。yzh(config)#interface range fastEthernet 0/1

yzh(config-if-range)#ip address 172.20.83.1 255.255.255.0 设置PC网关地址

yzh(config-if-range)#ip access-group schoolACL in 将名为schoolACL的ACL绑定到该端口的入口处

yzh(config-if-range)#exit

把交换机的系统时间设置到ACL所允许通信的时间范围内

yzh(config)#clock set 9:00:00 10 19 2010 设置交换机系统时间为9点

把交换机的系统时间设置到ACL所禁止通信的时间范围内

yzh(config)#clock set 2:00:00 10 19 2010 设置交换机系统时间为2点

配置三层交换机S1,按照以下命令配置网关地址,并配置VRRP

yzh>enable

yzh#configure

yzh(config)#interface fastEthernet 0/23

yzh(config-FastEthernet 0/23)#no switchport

yzh(config-FastEthernet 0/23)#ip address 192.168.1.1 255.255.255.0

yzh(config-FastEthernet 0/23)vrrp 1 192.168.1.254

创建VRRP组为1,并设置虚拟网关

yzh(config-FastEthernet 0/23)#vrrp 1 priority 180 设置组号为1的优先级为180 yzh(config-FastEthernet 0/23)#exit

yzh(config)#interface fastEthernet 0/24

yzh(config-FastEthernet 0/24)#no switchport

yzh(config-FastEthernet 0/24)#ip address 10.0.0.1 255.255.255.240

yzh(config-FastEthernet 0/24)exit

配置三层交换机S2,按照以下命令配置网关地址,并配置VRRP。

S2>enable

S2(config)#interface fastEthernet 0/23

S2(config-FastEthernet 0/23)#no switchport

S2(config-FastEthernet 0/23)ip address 192.168.1.2 255.255.255.0

S2(config-FastEthernet 0/23)#vrrp 1 ip 192.168.1.254

创建VRRP组为1,并设置虚拟网关

S2(config-FastEthernet 0/23)#vrry 1 priority 150 设置组号为1的优先级为150

S2(config-FastEthernet 0/23)#exit

S2(config)#interface fastEthernet 0/24

S2(config-FastEthernet 0/24)#no switchport

S2(config-FastEthernet 0/24)#ip address 20.0.0.1 255.255.255.240

S2(config-FastEthernet 0/24)#exit

配置路由器R1,按照以下命令设置各端口IP地址

R1>

R1>enable

R1#configure

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 10.0.0.5 255.255.255.240

R1(config-if)#exit

R1(config)#interface fastEthernet 0/1

R1(config-if)#ip address 20.0.0.4 255.255.255.240

R1(config-if)#exit

R1(config)#interface loopback 1

R1(config-if)#ip address 10.0.0.100 255.255.255.240

R1(config-if)#exit

配置三层交换机S1

S1(config)#route ospf 1

S1(config-router)#network 192.168.1.0 255.255.255.0 area 0

S1(config-router)#network 10.0.0.0 255.255.255.240 area 0

S1(config-router)#exit

配置路由器R1。

R1(config)#route ospf 1

R1(config-router)#network 10.0.0.96 255.255.255.240 area 0

R1(config-router)#network 10.0.0.0 255.255.255.240 area 0

R1(config-router)#network 20.0.0.0 255.255.255.240 area 0

R1(config-router)#exit

在三层交换机S1配置VRRP协议

S1(config)#interface vlan 10 !进入Vlan10

S1(config-VLAN 10)#vrrp 1 ip 192.168.1.10 !创建VRRP组为1,并设置虚拟网关S1(config-VLAN 10)#vrrp 1 priority 180 !设置组号为1的优先级为180

S1(config-VLAN 10)#exit

在三层交换机S1配置VRRP协议

S2(config)#interface vlan 10 !进入Vlan10

S1(config-VLAN 10)#vrrp 1 ip 192.168.1.10 !创建VRRP组为1,并设置虚拟网关S1(config-VLAN 10)#vrrp 1 priority 150 !设置组号为1的优先级为150

S1(config-VLAN 10)#exit

CISCO命令全集

CISCO命令全集-思科命令汇总 视图模式介绍: 普通视图router> 特权视图router# /在普通模式下输入enable 全局视图router(config)# /在特权模式下输入config t 接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密 router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码

cisco模拟器应用实例讲解

第一篇、熟悉界面 一、设备的选择与连接 在界面的左下角一块区域,这里有许多种类的硬件设备,从左至右,从上到下依次为路由器、交换机、集线器、无线设备、设备之间的连线(Connections)、终端设备、仿真广域网、Custom Made Devices(自定义设备)下面着重讲一下“Connections”,用鼠标点一下它之后,在右边你会看到各种类型的线,依次为Automatically Choose Connection Type(自动选线,万能的,一般不建议使用,除非你真的不知道设备之间该用什么线)、控制线、直通线、交叉线、光纤、电话线、同轴电缆、DCE、DTE。其中DCE和DTE是用于路由器之间的连线,实际当中,你需要把DCE和一台路由器相连,DTE和另一台设备相连。而在这里,你只需选一根就是了,若你选了DCE这一根线,则和这根线先连的路由器为DCE,配置该路由器时需配置时钟哦。交叉线只在路由器和电脑直接相连,或交换机和交换机之间相连时才会用到。 注释:那么Custom Made Devices设备是做什么的呢?通过实验发现当我们用鼠标单击不放开左键把位于第一行的第一个设备也就是Router中的任意一个拖到工作区,然后再拖一个然后我们尝试用串行线Serial DTE连接两个路由器时发现,他们之间是不会正常连接的,原因是这两个设备初始化对然虽然都是模块化的,但是没有添加,比如多个串口等等。那么,这个Custom Made Devices设备就比较好了,他会自动添加一些“必须设备的”,在实验环境下每次选择设备就不用手动添加所需设备了,使用起来很方便,除非你想添加“用户自定义设备”里没有的设备再添加也不迟。 当你需要用哪个设备的时候,先用鼠标单击一下它,然后在中央的工作区域点一下就OK了,或者直接用鼠标摁住这个设备把它拖上去。连线你就选中一种线,然后就在要连接的线的设备上点一下,选接口,再点另一设备,选接口就OK了。注意,接口可不能乱选哦。连接好线后,你可以把鼠标指针移到该连线上,你就会线两端的接口类型和名称哦,配置的时候要用到它。 二、对设备进行编辑在右边有一个区域,如图1.2所示,从上到下依次为选定/取消、移动(总体移动,移动某一设备,直接拖动它就可以了)、Place Note(先选中)、删除、Inspect (选中后,在路由器、PC机上可看到各种表,如路由表等)、simple PPD、complex。

思科交换机命令大全

思科交换机常用命令大全 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

思科路由模拟器命令大全

命令要在一行内打完,窗体可以自动拉大。Aux口这个版本暂不支持。 支持三级Switch网络,需要路由时支持两级Switch。 设置的主机名中不要含有空格。F2、F3键清屏(为了方便而加) Ctrl+P 历史命令,建议使用方向键。 Ctrl+z 回根, 建议使用end命令 Ctrl+Break 路由器进入ROM监控状态。交换机清除特权密码。 双击设备进入终端操作 单击设备的接口可以实现画线 单击画有线的接口可以删除连线 在指定的设备按下鼠标右键可以删除设备。 在指定的设备按下鼠标左键可以实现移动。 按Tab键,可以得到命令全称。 键入"?"可以得到当前状态下的命令帮助。 接收的作业名固定为当前目录下的sim.txt。 系统的配置文件是:sim.ini。 计算测验得分中,ping PCA->PCB;5 表示ping通得5分, SWAf6=2;5表示交换机SwitchA的f0/6在vlan 2时得5分。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PCA login: root ;使用root用户password: linux ;口令是linux # shutdown -h now ;同init 0 关机 # logout # login # ifconfig ;显示IP地址 # ifconfig eth0 netmask ;设置IP地址 # ifconfig eht0 netmask down ;删除IP地址 # route add 0.0.0.0 gw # route del 0.0.0.0 gw # route add default gw ;设置网关 # route del default gw ;删除网关 # route ;显示网关 # ping # telnet 交换机基本状态: switch: ;交换机的ROM状态

Cisco的命令大全

Cisco的命令大全 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名 switch(config)# hostname "hostname" switch(enable) set sys tem name name-string 2.设置登录口令 switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass 3.设置远程访问 switch(config)# inte***ce vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce s c0 ip-address netmask broadcast-address switch(enable) set inte***ce sc0 vlan switch(enable) set ip route default gateway 4.启用和浏览CDP信息 switch(config-if)# cdp enable switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module /port 5.查看Cisco邻接设备的CDP通告 switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 switch(config-if)#description escription-string switch(enable)set p ort name module/number description-string 7.设置端口速度 switch(config-if)# speed{10|100|auto} switch(enable) set port s peed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式 switch(config-if)# duplex {auto|full|half} switch(enabl e) set port duplex module/number {full|half 9.配置静态VLAN switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)#inte***ce inte***ce module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 10.配置VLAN中继线 switch(config)# inte***ce inte***ce mod/port

Cisco路由器模拟器配置

Cisco路由器配置 *注意事项: 1.需要将镜像文件放到Gns3安装文件同一目录下 2.注意路由器用户名后面的模式(Ra>、Ra#、Ra、Ra、Ra 等),只有在特定的模式下才能进行相应的设置。 一、在Cisco上配置telnet的相关命令和说明: Ra>enable <进入特权模式> Ra#config terminal <进入全局模式> Ra#interface f0/0 <进入接口模式> Ra#ip address 192.168.0.22 (ip地址) 255.255.255.0 (子网掩码) (设置路由器f0/0接口的ip地址和子网掩码) Ra#no shutdown <生效之前的配置操作> Ra#exit Ra#line vty 0 4 (VTY是路由器的远程登陆的虚拟端口,0 4表示可以同时打开5个会话) Ra#login local Ra#username Cisco password hkgt123 Ra#enable secret hkgt123 <登入特权模式需要的口令> 验证telnet登陆路由器: Ra#telnet 192.168.0.22

二、在Cisco上配置SSH的相关命令和说明: Ra#config terminal Ra(config)#ip domain-name https://www.wendangku.net/doc/634842344.html, <配置一个域名> Ra(config)#crypto key generate rsa general-keys modulus 1024<生成一个rsa算法的密钥,密钥为1024位> (提示:在Cisoc中rsa支持360-2048位,该算法的原理是:主机将自己的公用密钥分发给相关的客户机,客户机在访问主机时则使用该主机的公开密钥来加密数据,主机则使用自己的私有的密钥来解密数据,从而实现主机密钥认证,确定客户机的可靠身份。) Ra(config)#ip ssh time 120 <设置ssh时间为120秒> Ra(config)#ip ssh authentication 4<设置ssh认证重复次数为4,可以在0-5之间选择> Ra(config)#line vty 0 4 <进入vty模式> Ra(config-line)#transport input ssh telnet <设置vty的登录模式为ssh、telnet,默认情况下是all即允许所有登录> Ra(config-line)#login Ra(config-line)#exit Ra(config)#aaa new-model Ra(config)#aaa authentication login default local <启用aaa认证,设置在本地服务器上进行认证> Ra(config)#username cisco privilege 15 secret hkgt123 <创建一个用户cisco级别为15并设置其加密密码为hkgt123用于SSH客户端登录> 修改登陆超时限制时间和登陆重复次数可以不修改 如果要把超时限定改为180秒,则应该用:Ra(config)# ip ssh time-out 180 如果要把重试次数改成5次,则应该用:Ra(config)# ip ssh authentication-retries 5 这样SSH的CISCO设置就完成了。 登陆: Ra#ssh -l登陆ssh用户名 IP地址

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

思科交换机路由器命令 大全 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地址: 交换机显示命令:

1思科模拟器基本操作hao

三层交换机基日常本操作和维护 1、设置系统名称 ZXR10>-----普通用户模式 ZXR10#------特权模式 ZXR10(config)#--------全局模式 ZXR10(config)#interface fastethernet 0/1 //进入交换机fei_0/1口 ZXR10(config-if)#-------------子接口模式 ZXR10>enable //进入特权模式 ZXR10#configure terminal //进入全局配置模式 ZXR10(config)#hostname ZTE //对系统性命名为ZTE ZTE(config) #exit //退出用exit命令 2、设置系统日期和时间 ZXR10#clock set 15:52:35 apr 18 2011 //特权模式下 验证方法:-----注:思科模拟器上没有月份显示,用???代替 ZXR10#show clock-------显示设备当前的系统时间 3、设置设备特权模式密码 ZXR10(config)#enable secret zte //密文enable密码 ZXR10(config)#enable password zte //明文 验证方法: ZXR10(config)#exit ZXR10#exit 按回车键 ZXR10>输入enable Password:输入你的enable 密码。 4、设置登录标志 banner motd c //Set Message of the Day banner Enter TEXT message. End with the character 'c'. Hello world!! c ) 验证: ZXR10(config)#exit ZXR10#exit 按回车键 出现: Hello world!!--------欢迎语 ZXR10> 5、设置telnet登陆模拟器交换路由设备 拓扑图 远程登录时所端口连接设备及Telnet ??switch(config-line)可以设置通过console

思科路由器命令大全详解

一 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 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 设置网关地址 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)# 8:查看命令show switch> enable

最新整理怎么在思科模拟器配置交换机VTP

怎么在思科模拟器配置交换机V T P 交换机除了能够连接同种类型的网络之外,还可以在不同类型的网络(如以太网和快速以太网)之间起到 互连作用。在思科模拟器上怎么配置交换机V T P?V T P被组织成管理域(V T P D o m a i n),V T P可以分为三种模式:服务器模式(S e r v e r),客户机模式(C l i e n t),透明模式,下面我们来看看配置方法 方法步骤 1、首先,打开思科模拟器软件,连接三台交换机的连接线,将所有交换机互相连接起来,一台当服务器,一台当客户机,另外一台当透明模式。 2、把三台交换机的配置清除干净,重启交换机,配置命令为: S1#d e l e t e f l a s h:v l a n.d a t S1#e r a s e s t a r t u p-c o n f i g S1#r e l o a d 配置S1为V T P s e r v e r,配置命令为: 复制内容到剪贴板 S1(c o n f i g)#v t p m o d e s e r v e r 3、配置S3为V T P t r a n s p a r e n t,配置命令是:

S3#v l a n d a t a b a s e S3(v l a n)#v t p t r a n s p a r e n t S3(v l a n)#v t p p a s s w o r d c i s c o(配置交换机的密码) S e t t i n g d e v i c e V L A N d a t a b a s e p a s s w o r d t o c i s c o 4、配置S2为V T P c l i e n t,配置命令是: S2(c o n f i g)#v t p m o d e c l i e n t S e t t i n g d e v i c e t o V T P C L I E N T m o d e. S2(c o n f i g)#v t p d o m a i n V T P-T E S T D o m a i n n a m e a l r e a d y s e t t o V T P-T E S T. S2(c o n f i g)#v t p p a s s w o r d c i s c o 5、在S1上创建V L A N,检查S2、S3上的V L A N信息,配置命令是: S1(c o n f i g)#v l a n2 S1(c o n f i g)#v l a n3 查看s1,s2,s3的V L A N配置信息。命令是: S1#s h o w v l a n S2#s h o w v l a n S3#s h o w v l a n 6、查看V T P信息,查看交换机的v t p详细信息和版本等信息:

思科基本配置命令详解

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

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

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

思科模拟器配置命令

Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#ex Switch(config)#int rang f0/1-5 Switch(config-if-range)#sw acc vlan 10 Switch(config-if-range)#ex Switch(config)#int f0/24 Switch(config-if)#sw mode trunk Switch(config)#int rang f0/23-24 Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#ex Switch(config)#int port-channel 1 Switch(config-if)#sw mode trunk 远程登陆交换机:

Switch(config-if)#ip add 1.1.1.1 255.255.255.0(IP地址要和远程登陆的客户机在同一个网段) Switch(config-if)#no sh Switch(config-if)#ex Switch(config)#line vty 0 Switch(config-line)#password zlr Switch(config-line)#exit Switch(config)#enable secret 123 Switch(config)#ex Switch(config)#vlan 10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#ex Switch(config)#int rang f0/23-24 Switch(config-if-range)#sw trunk encapsulation dot1q

思科 模拟器路由器操作命令

?配置用户user1,密码为digitalchina,使用此用户名的用户群为普通用户,不可以进入特权模式 –Router#config Router_config#username user1 password digitalchina –Router_config#aaa authentication for_login login local –Router_config#line console 0 –Router_config_line#login authentication for_login –Router_config_line# –Router_config#enable password digitalchina level 15 实训五十八HDLC封装 ?RouterA配置 ?指定封装协议为HDLC协议 –RouterA_config#interface serial 2/0 –RouterA_config_s2/0#encapsulation hdlc ?指定接口的IP地址以及子网掩码 –RouterA_config_s2/0#ip address 11.1.1.1 255.255.255.0 –RouterA_config_s2/0#no shut ?RouterB配置 –Router_config#interface serial 1/0

–Router_config_s1/0#encapsulation hdlc –Router_config_s1/0#ip address 11.1.1.2 255.255.255.0 –指定此端口(DCE端)的内时钟信号频率 –Router_config_s1/0#physical-layer speed 64000 端口状态察看 ?Router#show interface serial 2/0 ?Serial2/0 is up, line protocol is up ?。。。。 ?Encapsulation prototol HDLC, link check interval is 10 sec 使用PAP验证的配置 ?RouterA配置 –RouterA#config –RouterA_config#username RouterB_pap password digitallchinaB –RouterA_config#interface serial 2/0 –RouterA_config_s2/0#encapsulation ppp –RouterA_config_s2/0#ppp authentication pap –RouterA_config_s2/0#ppp pap sent-username RouterA_pap digitalchinaA –RouterA_config_s2/0#ip address 192.168.2.1 255.255.255.0

学习网络实验设备和网络命令以及思科模拟器基本操作

武汉理工大学 学生实验报告书 实验课程名称《计算机网络C》 开课学院计算机科学与技术学院 指导老师姓名 学生姓名 学生专业班级 2014 —2015 学年第2 学期

实验课程名称:计算机网络C

第二部分:实验调试与结果分析(可加页) 一、调试过程(包括调试方法描述、实验数据记录,实验现象记录,实验过程发现的问题等) (1).使用ipconfig的结果: (2).使用ipconfig /all的结果: (3).结果如图所示: 如图所示:当ping一个不通的IP或是域名时,会发送请求,但是返回的结果都是显示—请求超时,最后显示此次ping的结果,即发送4次,接受为0,丢失为0; (4).结果如图所示:

由图可以看出,当ping一个可以联通得到IP或是域名时,会显示所ping域名的IP,然后显示请求的结果:字节长度、所需时间和TTL的值,最后的统计信息表示发送的数据包等于接受的数据包,丢失为0,以及往返行程的最短、最长、平均时间。 二、实验结果及分析(包括结果描述、实验现象分析、影响因素讨论、综合分析和结论等) 从上面的结果可以看出,当用ping命令时,如果所ping的域名或是IP不存在时,会返回请求超时的结果;当ping的域名或是IP存在时,会返回具体的数据包的信息和响应时间信息。此外,利用ipconfig可以查看本机的IP、子网掩码、默认网关等信息。当然,使用ping和ipconfig可以获取和进行不同类型的操作。 三、实验小结、建议及体会 通过本次实验,基本掌握了ping命令和ipconfig命令的一些基本用法,当然掌握这些还远远不够,通过查找资料可以更加深入的了解这些命令的一些更加强大的用法。比如:在默认的情况下windows的ping发送的数据包大小为32byt,我们也可以自己定义它的大小,但有一个大小的限制,就是最大只能发送65500byt,因为Windows系列的系统都有一个安全漏洞(也许还包括其他系统)就是当向对方一次发送的数据包大于或等于65532时,对方就很有可能挡机,所以微软公司为了解决这一安全漏洞于是限制了ping的数据包大小。虽然微软公司已经做了此限制,但这个参数配合其他参数以后危害依然非常强大,比如我们就可以通过配合-t参数来实现一个带有攻击性的命令: C:\>ping -l 65500 -t 192.168.1.21 当多台机器同时向一个IP发送数据时,会使机器瘫痪,网络堵塞,HTTP和FTP服务完全停止。因此,可以看出,ping命令也是双刃剑,需要明确使用的目的,不能用于非法目的。

思科路由器命令大全(完整版)

思科交换机路由器命令大全 交换机命令: switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab aptech2950(conf)#no ip domain-lookup -----设置禁用IP 地址解析特性 aptech2950(conf)#logging synchronous -----设置启用消息同步特性 aptech2950(conf)#interface range fastethernet0/1-20

思科模拟器配置命令

思科模拟器配置命令 Document number:PBGCG-0857-BTDO-0089-PTT1998

相同VLAN间的通信: Switch0与Switch1配置命令相同: Switch#conf t Switch(config)#vlan 10 Switch(config-vlan)#ex Switch(config)#int rang f0/1-5 Switch(config-if-range)#sw acc vlan 10 Switch(config-if-range)#ex Switch(config)#int f0/24 Switch(config-if)#sw mode trunk 配置聚合口:(聚合口的成员口类型要一致) Switch0与Switch1配置命令相同: Switch(config)#int rang f0/23-24 Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#ex Switch(config)#int port-channel 1 Switch(config-if)#sw mode trunk 远程登陆交换机:

Switch(config)#int vlan 1 Switch(config-if)#ip add (IP地址要和远程登陆的客户机在同一个网段) Switch(config-if)#no sh Switch(config-if)#ex Switch(config)#line vty 0 Switch(config-line)#password zlr Switch(config-line)#exit Switch(config)#enable secret 123 Switch(config)#ex 三层交换机不同VLAN间的通信: 三层交换机配置: Switch(config)#vlan 10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#ex Switch(config)#int rang f0/23-24 Switch(config-if-range)#sw trunk encapsulation dot1q

(完整版)cisco命令大全解释、注释

cisco命令大全解释、注释 Dynamips作为一款十分优秀的Cisco路由器模拟软件,实验模拟效果远比Boson NetSim更加真实可信。Boson NetSim是对IOS命令行的模拟,而Dynamips是通过在计算机中构建运行IOS的虚拟机来真正运行IOS实现对Cisco路由器的模拟。 收录最常用的Cisco命令分类如下: cisco命令大全 1. switch配置命令 (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的密码

相关文档
相关文档 最新文档