导航:首页 > 器材知识 > 怎么在Cisco设备上配置代码

怎么在Cisco设备上配置代码

发布时间:2022-12-09 02:54:20

⑴ 求思科交换机的配置命令

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 mole/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} mole/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name mole/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)# plex {auto|full|half} 在基于CLI的交换机上设置以太网的链路模式: switch(enable) set port plex mole/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 mole/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num sw

⑵ cisco基本配置命令

Cisco 的交换机产品以“Catalyst ”为商标,包含1900 、2800 、2900 、3500 、4000 、5000 、5500 、6000 、8500 等十多个系列。

基本配置命令如下:

1、Switch>enable 进入特权模式

2、Switch #config terminal 进入全局配置模式

3、Switch(config)#hostname 设置交换机的主机名

4、Switch(config)#enable password 进入特权模式的密码(明文形式保存)

5、Switch(config)#enablesecret 加密密码(加密形式保存) (优先)

6、Switch(config)#ipdefault-gateway 配置交换机网关

7、Switch(config)#showmac-address-table 查看MAC地址

8、Switch(config)loggingsynchronous 阻止控制台信息覆盖命令行上的输入

9、Switch(config)no ipdomain-lookup 关闭DNS查找功能

10、Switch(config)exec-timeout 00 阻止会话退出

(2)怎么在Cisco设备上配置代码扩展阅读

cisco常用配置命令:

一、使用Telnet远程式管理

1、Switch(config)#line vty 0 4 进入虚拟终端

2、Switch (config-line)# password 设置登录口令

3、Switch(config-line)# login 要求口令验证

二、控制台口令

1、switch(config)#lineconsole 0 进入控制台口

2、switch(config-line)# password xx

3、switch(config-line)#设置登录口令login 允许登录

三、恢复出厂配置

Switch(config)#erasestartup-config

Switch(config)delete vlan.dat

⑶ Cisco这个怎么去配置,不是client不能创建vlan吗,求具体代码

人家只是给你需求,你只要在SW0 VTP server上创建VLAN就可以了,但是需要注意的是在SW1上的物理接口下需要将接口划入需求的vlan中。
VTP可以同步vlan信息在同一个VTP域中,但也只是vlan信息,具体到vtp client的交换机上虽然同步到了vlan信息,但是具体的接口要划分到哪个vlan下还是要你手动配置的。

⑷ 在思科模拟器上如何进行交换机的基本配置

楼主,你好

在模拟器上添加思科交换机

进行CLI输入

用户模式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)#plex ? 查看plex的子命令
switch(config)#plex 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 cisco.com 设置域名
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 交换机如何设置,设置步骤有哪些

1 , 设置交换机名称
(config)#hostname hostname
2,设置log存放路径
(config)#logging 10.7.68.68 //将log档文件存在10.7.68.68
(config)#spanning-tree mode rapid-pvst // 设定 spanning-tree 的模式是 rapid-pvst
3,设置errdisable
(config)#errdisable recovery cause all //开启errdiable 恢复的原因
(config)#errdisable recovery interval 300 //errdisable后300秒恢复
4,设置snmp-server
(config)#snmp-server community askeymis RO //设置简单网络管理协议字符串为只读
5, 设置vtp
(config)#vtp domain askey // 设定VTP domain 名称
(config)vtp mode transparent // 设定 VTP 模式为透明模式

Vlan
1,创建Vlan
(config)#vlan 180 //创建Vlan ID号为180
(config-vlan)#name askey //Vlan 名称为askey
2,删除Vlan
(config)#no vlan 180
#show vlan brief //查看交换机当前Vlan 号及Vlan 下有哪些端口
3,配置管理IP
(config)#int vlan 180
(config-if)#ip address 192.168.1.251 255.255.255.0 //设置管理IP地址
(config)#ip default-gateway 192.168.1.254 //设置默认路由,供其他网段访问
4,将端口划至Vlan 180
4.1单一端口划分
(config)#int f0/1 //进入端口f0/1
(config-if)#sw mode access //设置访问模式
(cofnig-if)#sw ac vlan 180 //将其端口划入Vlan 180
4.2多端口划分
(config)#int range f0/1 – 24 //端口范围为1-24
(config-if-range)#sw mode access
(config-if-range)#sw ac vlan 180
端口配置
1,端口配置
(cofnig)#interface FastEthernet0/1
(config-if)#switchport access vlan 33 // 划分VLAN
(config-if)# switchport mode access
(config-if)# switchport port-security maximum 2 //设定端口只允许接入2个PC
(config-if)# switchport port-security // 启用端口安全
(config-if)# switchport port-security violation restrict // 发生违例 端口进errdisable,并记录
(config-if)# storm-control broadcast level 0.80 //控制广播包的突发百分比
(config-if)# storm-control action shutdown //暴风控制的违例时端口进入errdisable
(config-if)# storm-control action trap //产生snmp trap(抑制)消息来通告发生过量流量的情况
(config-if)# spanning-tree portfast // 配置接口为portfast模式
(config-if)# spanning-tree bpguard enable // 启用bpuguard 防护
(config-if)# spanning-tree guard root // 启用根桥防护
设置时间与同步
1 , 开启debug与log记录时间的服务
(config)#Service timestamps debug datetime localtime //开启debug记录时显示的时间
(config)#Service timestamps log datetime localtime //开启log记录时显示的时间
2,设置时间与时区
(config)# Clock timezone TAIWAN 8 //设置时区
(config)# Clock set 12:16:50 nov 27 2008 //设置时间(月,日,年)
#Show clock //查看交换机当前的时间
3,设置ntp server 实现时间同步
(config)# ntp server 10.1.71.249 //设置交换机与ntp server 实现时间同步
#show ntp stauts //查看交换机是否同步
Clock is synchronized, stratum 3, reference is 10.1.71.249(同步)
nominal freq is 119.2092 Hz, actual freq is 119.2093 Hz, precision is 2**17
reference time is CCD89F21.ECA0C247 (12:22:57.924 TAIWAN Thu Nov 27 2008)
clock offset is 8.4785 msec, root delay is 399.51 msec
root dispersion is 937.29 msec, peer dispersion is 885.30 msec
Password
1,开启明文密码加密服务
(config)#service password-encryption //将明文密码加密
2,设置控制台密码
(config)#line consloe 0 //进入控制台
(config-line)#login //登录
(config-line)#password cisco //设置密码
3,设置enable密码
(config)#enable password cisco
(config)#enable secret password cisco //给密码加密码 ,优先级高于enable password
4,设置Telnet 密码
(config)#line vty 0 4 //进入vty模式
(config-line)#login
(config-line)#password cisco //设置密码
(config-line)#exec-timeout 5 0 //telnet 5分钟超时
Show
1,开启明文密码加密服务
1,show run //查看交换机配置
2,show ip int brief //查看所有端口状况
3, show int des //查看所有端口的描述
4,show int f0/1 //查看f0/1接口状态
5,show run int f0/1 //查看f0/1配置状况
6,show run int valn 180 //查看Vlan 的配置状态
7,show vtp stauts //查看vtp 的状态
8,show clock //查看交换机当前的时间
9,show ntp stauts //查看ntp 是否同步

⑹ Cisco路由器配置

无线路由器的配置方法:

1.路由器连入网络。

进入无线设置中的无线安全,安全模式选择WPA2-PSK模式。WPA加密规则选择AES。设置无线网络秘钥。设置后路由器会自动重启,请输入新的WiFi密码进行连接。

6.配置完成,享受网络。

⑺ 如何在cisco路由器上配置TCL脚本

设置如下:
浏览器输入192.168.1.1,回车;
进入路由器登录界面,输入用户名及密码(铭牌上有标示),回车;
左击管理界面左侧的“DHCP服务器”→“DHCP服务”;

右侧出现DHCP服务设置界面,选择“启用”即可。

⑻ cisco全新路由器怎么配置,需要输入哪些命令

配置思科路由器的第一步:

当一个新的设备拿回来它本身是没有TCP/IP的概念的所以就需要网管从CONSOLE口连接

进行带外配置(小提示利用以太网连接到设备叫带内、反之就为带外)

用的线是设备本身带的线(CONSOLE线它是一条全反线也就是两边的线序完全相反)线的一端是接在COM口上的

计算机本身就有一个软件可以用来配置路由器在开始菜单的附件的通讯下的超级终端

安装这个软件是从控制面板的添加删除程序的WINDOWS组件向导里添加

CISCO设备在配置时超级终端的设置都为默认值

路由器的配置模式( >号是表示在普通模式下、#号是在特权模式下、CONFIG#是在全局模式下、CONFIG-LINE或别的#是在端口模式下)

⑼ 怎么使用脚本配置cisco路由器

首先,要进行running-configure配置的备份操作,当然设备早已经配置好了,tftp服务器也准备好了。那么,思科路由器配置如下: 一、BT无线网络破解: 1. username ccie privilege 15 password 0 ccie 2. ! 3. interface FastEthernet0/0 4. no ip address 5. shutdown 6. plex auto speed auto 7. ! 8. interface FastEthernet0/1 9. ip address 11.133.183.251 255.255.255.0 10. plex auto speed auto 11. ! 12. ip classless ip route 0.0.0.0 0.0.0.0 11.133.183.254 13. ip http server ip pim bidir-enable 14. ! 15. line vty 0 4 login local 二、按照下面的步骤进行思科路由器配置: (1)编写脚本 新建一个文件crt.vbs,尾缀为。vbs,内容如下: 1. #$language = "VBScript" 2. Ubuntu 论坛 #$interface = "1.0" Sub main ' turn on synchronous mode so we don't miss any data 3. crt.Screen.Synchronous = True On Error Resume Next 4. crt.session.Connect("/telnet 10.1.1.1") If Err.Number0 Then 5. crt.session.Connect("/telnet 10.1.1.1") End If 6. crt.Screen.WaitForString "Username:" crt.Screen.Send "ccie" & VbCr 7. crt.Screen.WaitForString "Password:" 8. crt.Screen.Send "ccie " & VbCr 9. crt.Screen.WaitForString "Router#" 10. crt.Screen.Send "config t" & VbCr 11. crt.Screen.WaitForString "Router(config)#" 12. crt.Screen.Send "int f0/1" & VbCr 13. crt.Screen.WaitForString "Router(config-if)#" 14. crt.Screen.Send "no sh" & VbCr 15. crt.Screen.WaitForString "Router(config-if)#" 16. crt.Screen.Send "end" & VbCr 17. crt.Screen.WaitForString "Router#" 18. crt.Screen.Send " run tftp://10.1.1.10" & VbCr 19. crt.Screen.WaitForString "Address or name of remote host [11.133.183.249]" crt.Screen.Send ""& VbCr 思科路由器 20. crt.Screen.WaitForString "Destination filename [router-confg]" 21. crt.Screen.Send ""& VbCr 22. Do while (crt.Screen.WaitForString("--- more ---",1)False) 23. crt.Screen.Send " " Loop ' 24. crt.Screen.Send "exit" & VbCr crt.session.disconnect 25. crt.Screen.Synchronous = False End Sub (2)懂vb的朋友应该很容易看懂的,上面内容的相关解释如下: crt.Screen.WaitForString "Username:"—从设备上返回的信息,也就是提示信息。 crt.session.Connect("/telnet 11.133.183.251")—需要telnet的设备。 crt.Screen.Send "ccie" & VbCr—向设备上发送的字符,即你在正常操作时输入的命令或字符 & VbCr—输入字符后并回车。 注:" "中部分为需要进行相应改动的地方,您只需要根据您的具体情况进行改动即可。 (3)应用脚本 打开CRT软件,点击Script菜单,点击RUN; 在弹出菜单中找到刚才编写的脚本存放的目录,并输入脚本的名字crt.vbs.这时可以看到脚本在执行,如下: 1. User Access Verification Username: ccie 2. Password: Netscreen 防火墙 3. Router#config t Enter configuration commands, one per line. End with CNTL/Z. 4. Router(config)#int f0/1 5. Router(config-if)#no sh ubuntu 输入法 6. Router(config-if)#end 7. Router# run tftp://11.133.183.249 Address or name of remote host [11.133.183.249]? 8. Destination filename [router-confg]? !! 694 bytes copied in 9.60 secs (77 bytes/sec) 9. Router#linux 论坛 思科论坛 Cisco

⑽ 在cisco模拟软件中如何实现电脑与电脑间ping通如下图路由器交换机pc都是如何配置的具体代码是什么

就拿PC0和PC1说,根据你的图,四台PC分别都接了路由,那么肯定在四个不同的网段了。
例如分配PC0在192.168.0.0/24网段,其IP地址为192.168.0.10,网关为192.168.0.1
PC1在192.168.1.0/24网段,其IP地址为192.168.1.10,网关为192.168.1.1
那么,中间的二层交换机不需要配置什么,直接分别在路由器上面配置好对应接口的网关即可:
假设Router0的F0/0口接的SW0的F0/0,那么在router0的F0/0接口下配置如下命令:
ip add 192.168.0.1 255.255.255.0
no sh
同理,在Router1上配置
ip add 192.16.1.1 255.255.255.0
no sh
另,四台路由器都汇聚到一台三层交换机上,那么他们之间会有另外一个网段,假设是100.1.1.0/24,分别给路由器连接交换机的接口配置上这个网段的地址,然后在三层交换上写好静态路由即可。
如有不明白可以追问。

阅读全文

与怎么在Cisco设备上配置代码相关的资料

热点内容
steam令牌换设备了怎么办 浏览:246
新生测听力仪器怎么看结果 浏览:224
化学试验排水集气法的实验装置 浏览:156
家用水泵轴承位置漏水怎么回事 浏览:131
羊水镜设备多少钱一台 浏览:125
机械制图里型钢如何表示 浏览:19
测定空气中氧气含量实验装置如图所示 浏览:718
超声波换能器等级怎么分 浏览:800
3万轴承是什么意思 浏览:110
鑫旺五金制品厂 浏览:861
苏州四通阀制冷配件一般加多少 浏览:153
江北全套健身器材哪里有 浏览:106
水表阀门不开怎么办 浏览:109
花冠仪表盘怎么显示时速 浏览:106
洗砂机多少钱一台18沃力机械 浏览:489
超声波碎石用什么材料 浏览:607
组装实验室制取二氧化碳的简易装置的方法 浏览:165
怎么知道天然气充不了阀门关闭 浏览:902
公司卖旧设备挂什么科目 浏览:544
尚叶五金机电 浏览:59