思科交换机和路由器配置命令简写与完整对照

合集下载

思科交换机和路由器配置命令简写与完整对照(Excel文章多个页签_下载可见)

思科交换机和路由器配置命令简写与完整对照(Excel文章多个页签_下载可见)
Interface FastEthernet0/2 set to default configuration
完整命令
将端口加入到VLAN switch(config)#interface f0/2 switch(config-if)#switchport access vlan 30 验证VLAN配置信息 switch#show vlan brief switch#show vlan-switch 删除VLAN中的端口 1:switch(config-if)#no switchport access vlan 3 switch(config-if)#end 2:switch(config-if)#default interface f0/2 Building configuration...
宣告启用RIP的
switch(config)#end 同时将多个端口加入VLAN并验证 switch(config)#interface range f0/3 - 10 switch(config-if-range)#switchport access vlan 3 switch(config)#end switch#show vlan-switch 配置VLAN TRUHK switch(config)#interface f0/15 switch(config-if)#switchport mode trunk 从TRUNK中添加某个VLAN switch(config)#interface f0/15
switch(config-if)#no shutdown 删除交换机接口IP地址 switch(config-if)#no ip address 配置交换机默认网关 switch(config)#ip default-gateway 192.168.0.1 查看交换机的MAC地址表 switch#show mac-address-table 查看思科交换机相邻设备的详细信息 switch#show cdp neighbors detail 保存交换机配置 1:switch#copy running-config startup-config 2:switch#write 恢复交换机出厂配置 switch#erase startup-config switch#reload 创建VLAN switch#vlan database switch(vlan)#vlan 30 switch(vlan)#exit VLAN重命名 switch(vlan)#vlan 20 name benet VLAN 20 modified: Name: benet 删除VLAN switch(vlan)#no vlan 20 Deleting VLAN 2... switch(vlan)#exit

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

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

思科路由器命令大全(完整版)思科路由器命令大全(完整版)本文档旨在提供思科路由器命令的详细说明和使用指南,包括路由器配置、网络管理、安全性设置等内容。

每个章节都详细介绍了不同的命令和参数,以帮助用户更好地理解和使用思科路由器。

1:路由器基本配置1.1 主机名设置1.2 用户名和密码设置1.3 IP 地址和子网掩码配置1.4 默认网关配置2:接口配置2.1 以太网接口配置2.2 串行接口配置2.3 子接口配置2.4 虚拟局域网 (VLAN) 配置3:路由协议配置3.1 静态路由配置3.2 动态路由配置3.2.1 RIP 配置3.2.2 OSPF 配置3.2.3 BGP 配置4:网络管理4.1 SNMP 配置4.2 NetFlow 配置4.3 Syslog 配置4.4 路由器时间设置5:安全性配置5.1 访问控制列表 (ACL) 配置5.2 VPN 配置5.3 防火墙配置5.4 AAA 配置附件:本文档附带的附件包括示例配置文件、命令输出示例等,以帮助读者更好地理解和应用文档中的内容。

法律名词及注释:本文档所涉及的法律名词及其注释如下:1:主机名:指路由器的主机标识名称,用于在网络中识别路由器。

2:用户名和密码:用于登录和管理路由器的凭证信息。

3: IP 地址:网络协议中用于唯一标识设备的数字地址。

4:子网掩码:用于标识 IP 地址中网络部分和主机部分的分界线。

5:默认网关:用于转发网络流量的下一跳路由器。

6:以太网接口:用于连接局域网设备的物理接口。

7:串行接口:用于连接广域网设备的物理接口。

8:子接口:在一个物理接口上创建多个逻辑接口,用于实现VLAN 分隔等功能。

9:虚拟局域网 (VLAN):用于将局域网划分成多个逻辑网络的技术。

10:静态路由:手动配置的路由表项,用于指定数据包传输的路径。

11:动态路由:根据路由协议动态学习和更新的路由表项,用于自动路由选择。

12: RIP:路由信息协议,一种距离向量路由协议。

思科Cisco交换机、路由器设置命令(附详解)

思科Cisco交换机、路由器设置命令(附详解)

交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <hostname> ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令为xxx switch(config)#enable password xxx ;设置特权非密口令为xxx switch(config)#line console 0 ;进控制台口(Rs232)初始化switch(config-line)#line vty 0 4 ;进入虚拟终端virtual tty switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口1加入VLAN 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain <name> ; 设置发vtp域名switch(config)#vtp password <word>switch(config)#vtp mode serverswitch(config)#vtp mode client交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address <IP> <mask> ;添加远程登录IPswitch(config)#ip default-gateway <IP> ;添加默认网关switch#dir flash: ;查看内存交换机显示命令:switch#write ;写入保存switch#show vtpswitch#show run ;查看当前配置信息switch#show vlan ;看VLAN。

思科交换机路由基本配置命令

思科交换机路由基本配置命令

思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。

下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。

cisco交换机和路由器配置命令大全

cisco交换机和路由器配置命令大全

cisco交换机和路由器配置命令大全最近在学习交换机和路由器的配置,把整理的资料发到博文上,以便日后的学习。

switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#noshut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet0/17 以17端口为例aptech2950(conf-if)#duplexfull/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

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

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

思科交换机路由器命令大全思科交换机和路由器命令大全本文档为思科交换机和路由器命令的最新最全范本,供参考使用。

以下是详细的命令列表,包括每个命令的说明和用法。

一、接口配置命令1、ip address:设置接口的IP地质示例:ip address 192.168.1.1 255.255.255:02、no shutdown:启用接口示例:no shutdown3、duplex:设置接口的双工模式示例:duplex auto4、speed:设置接口的速度示例:speed 1005、exit:退出接口配置模式示例:exit二、VLAN命令1、vlan database:进入VLAN数据库模式示例:vlan database2、vlan id name:创建VLAN并设置名称示例:vlan 10 name VLAN-103、vlan id:删除VLAN示例:no vlan 104、show vlan:显示VLAN信息示例:show vlan5、exit:退出VLAN数据库模式示例:exit三、路由命令1、ip route:设置静态路由示例:ip route 192.168.2:0 255.255.255:0 192.168.1.22、router rip:启用RIP路由协议示例:router rip3、network:将网络添加到RIP路由表中示例:network 10:0:0:04、redistribute:将静态路由或其他路由协议添加到RIP路由表中示例:redistribute static5、exit:退出路由配置模式示例:exit四、ACL命令1、access-list:创建标准或扩展ACL示例:access-list 10 permit 192.168.1:0 0:0:0.2552、ip access-group:应用ACL到接口示例:ip access-group 10 in3、show access-lists:显示ACL信息示例:show access-lists4、exit:退出ACL配置模式示例:exit五、SNMP命令1、snmp-server community:设置SNMP团体字符串示例:snmp-server community public RO2、snmp-server enable traps:启用SNMP陷阱示例:snmp-server enable traps3、snmp-server host:配置SNMP陷阱接收主机示例:snmp-server host 192.168.1.1004、exit:退出SNMP配置模式示例:exit六、SSH命令1、ip ssh version:设置SSH协议版本示例:ip ssh version 22、crypto key generate rsa:RSA密钥对示例:crypto key generate rsa3、username:创建新的本地用户示例:username admin privilege 15 password password1234、exit:退出SSH配置模式示例:exit七、其他命令1、show running-config:显示当前配置示例:show running-config2、copy running-config startup-config:将当前配置保存到启动配置中示例:copy running-config startup-config3、reload:重新启动设备示例:reload4、exit:退出CLI命令行模式示例:exit本文档涉及附件:1、无附件本文所涉及的法律名词及注释:1、ACL(Access Control List):访问控制列表,用于控制网络流量的进出。

思科的路由器配置及H3C交换机命令详解

思科的路由器配置及H3C交换机命令详解

H3C的路由器配置命令详解en 进入特权模式conf 进入全局配置模式in s0 进入 serial 0 端口配置ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配enca hdlc/ppp 捆绑链路协议hdlc 或者pppip unn e0exit 回到全局配置模式in e0 进入以太接口配置ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配exit 回到全局配置模式ip route 0.0.0.0 0.0.0.0 s 0 添加路由表ena password 口令writeexit以上根据中国电信ddn 专线多数情况应用普通用户模式enable 转入特权用户模式exit 退出配置help 系统帮助简述language 语言模式切换ping 检查网络主机连接及主机是否可达show 显示系统运行信息telnet 远程登录功能tracert 跟踪到目的地经过了哪些路由器特权用户模式#?clear 清除各项统计信息clock 管理系统时钟configure 进入全局配置模式debug 开启调试开关disable 返回普通用户模式download 下载新版本软件和配置文件erase 擦除FLASH中的配置exec-timeout 打开EXEC超时退出开关exit 退出配置first-config 设置或清除初次配置标志help 系统帮助简述language 语言模式切换monitor 打开用户屏幕调试信息输出开关no 关闭调试开关ping 检查网络主机连接及主机是否可达reboot 路由器重启setup 配置路由器参数show 显示系统运行信息telnet 远程登录功能tracert 跟踪到目的地经过了哪些路由器unmonitor 关闭用户屏幕调试信息输出开关write 将当前配置参数保存至FLASH MEM中全局配置模式aaa-enable 使能配置AAA(认证,授权和计费) access-list 配置标准访问表arp 设置静态ARP人口chat-script 生成一个用在modem上的执行脚本custom-list 创建定制队列列表dialer-list 创建dialer-listdram-wait 设置DRAM等待状态enable 修改ENABLE口令exit 退出全局配置模式firewall 配置防火墙状态flow-interval 设置流量控制时间间隔frame-relay 帧中继全局配置命令集ftp-server FTP 服务器help 系统帮助命令简述host 添加主机名称和其IP地址hostname 修改主机名ifquelen 更改接口队列长度interface 选择配置接口ip 全局IP配置命令子集ipx 全局IPX配置命令子集loghost 设置日志主机IP地址logic-channel 配置逻辑通道login 启动EXEC登录验证modem-timeout 设置modem 超时时间multilink 配置multilink 用户使用的接口multilink-user 配置multilink 用户使用的接口natserver 设置FTP,TELNET,WWW服务的IP地址no 关闭某些参数开关priority-list 创建优先级队列列表router 启动路由处理settr 设置时间范围snmp-server 修改SNMP参数tcp 配置全局TCP参数timerange 启动或关闭时间区域user 为PPP验证向系统中加入用户vpdn 设置VPDNvpdn-group 设置VPDN组x25 X.25协议分组层H3C交换机常用命令解释作者:admin 日期:2009-12-19字体大小: 小中大H3C交换机常用命令注释H3C交换机######################################################## ###############31、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器######################################################## ##############################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router######################################################## ##################################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:reset save ;reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

思科交换路由常用命令

思科交换路由常用命令

交换路由常用命令一、基础配置1、修改主机名配置:S(config)#hostname SWITCHA2、enable口令:Switch(config)#enable password1233、TELNET:只需密码的telnet需用户名和密码的telnetS(config)#line vty04S(config)#username S2password123S(config-line)#password123S(config)#line vty04S(config-line)#login//启用登陆时口令检查S(config-line)#login local//启用登陆本地验证只允许pc所在的网段对交换路由进行远程登陆:S(config)#access-list99permit192.168.1.00.0.0.255S(config)#line vty04S(config-line)#access-class99inS(config-line)#password123S(config-line)#login4、console配置:S(config)#line console0S(config-line)#password123S(config-line)#login5、显示当前配置:switch#show run6、保存当前配置:switch#write7、进入全局配置模式:switch#conf t8、进入接口配置模式:S(config)#interface f0/1二、二层接入交换机常见配置1、创建vlan10及命名:S(config)#vlan10S(config-vlan)#name caiwubu2、多个端口划分入vlan:vlan:S(config)#int range fa0/1-5S(config-if)#sw access vlan103、接口trunk模式配置:S(config)#inter f0/0S(config-if)#sw mode trunk4、二层交换机管理ip配置:S2(config)#interface vlan100//进入vlan100接口S2(config-if)#ip address192.168.10.1255.255.255.0//为vlan100接口上设置管理ip S2(config)#ip default-gateway192.168.10.2545、生成树配置:S(config)#spanning-tree mode rapid-pvst//配置快速生成树S(config)#spanning-tree vlan10,20priority0//配置根网桥S(config)#spanning-tree vlan10,20,30priority4096//配置备份根网桥6、端口双工、带宽设置:S(config)#int F0/2S(config-if)#duplex fullS(config-if)#speed100三、三层交换机常见配置1、三层交换机开启路由功能:S(config)#ip routing//开启后可实现vlan间相互通信2、三层交换机接口配置成路由口:S(config-if)#no swtichport//在接口模式下配置,可配置ip地址3、三层交换机创建SVI接口(SVI接口常作为vlan的网关):S(config)#interface vlan104、三层交换机接口改trunk模式:Switch(config-if)#switchport trunk encapsulation dot1q//先封装Switch(config-if)#switchport mode trunk//再设置trunk模式5、trunk允许vlan通过:S(config)#inter fa0/23S(config-if)#switchport trunk allowed vlan2,3//trunk口只让vlan2,3通过S(config-if)#switchport trunk allowed vlan all//trunk口允许所有的vlan通过四、路由器常见配置1、ip地址设置:router(config-if)#ip address192.168.1.1255.255.255.0//接口模式下配置2、静态路由配置:router(config)#ip route192.168.1.0255.255.255.010.1.1.1{f0/0}//下一跳地址可替换为出接口3、默认路由配置:router(config)#ip route0.0.0.00.0.0.010.1.1.14、浮动静态路由作为备份路由:R(config)#ip route172.16.20.0255.255.255.010.10.10.4R(config)#ip route172.16.20.0255.255.255.010.10.10.6100//路由开销值100比默认值1大,作为备份路由5、路由可达,有去有回。

思科路由器命令大全

思科路由器命令大全

思科路由器命令大全思科路由器命令大全1.基本设置命令1.1 主机名配置●hostname [主机名]:设置路由器的主机名。

1.2 用户名和密码配置●enable password [密码]:设置特权模式的密码。

●enable secret [密码]:设置加密的特权模式密码。

●username [用户名] password [密码]:创建一个本地用户并设置密码。

●line console 0:进入控制台命令行配置模式。

●password [密码]:设置控制台访问密码。

●line vty [行号] [结束行号]:进入虚拟终端配置模式。

●password [密码]:设置虚拟终端访问密码。

1.3 IP 地质配置●interface [接口类型] [接口编号]:进入接口配置模式。

●ip address [IP 地质] [子网掩码]:设置接口的IP 地质和子网掩码。

●no shutdown:启用接口。

1.4 默认网关配置●ip default-gateway [默认网关地质]:设置默认网关。

2.路由配置命令2.1 静态路由配置●ip route [目标网络] [目标子网掩码] [下一跳地质]:配置静态路由。

2.2 动态路由配置●router rip:进入 RIP 路由配置模式。

●network [网络地质]:启动 RIP 并指定要进行路由的网络地质。

●router ospf [进程号]:进入 OSPF 路由配置模式。

●network [IP 地质] [反掩码] area [区域号]:配置 OSPF。

3.状态和监控命令3.1 接口状态命令●show ip interface brief:显示路由器接口的 IP 地质和状态。

●show interfaces [接口类型] [接口编号]:显示指定接口的详细信息。

●show interfaces status:显示接口的状态和统计信息。

3.2 路由表命令●show ip route:显示路由表信息。

思科路由器配置命令详解及实例

思科路由器配置命令详解及实例

思科路由器配置命令详解及实例思科路由器配置命令详解及实例一、路由器基本配置1.1 登录路由器为了配置和管理思科路由器,您需要登录到路由器的控制台或通过远程登录方式。

使用以下命令登录路由器,并进行必要的身份验证:```Router> enableRouterconfigure terminalEnter configuration commands, one per line: End with TL/Z:Router(config)hostname [路由器名称]Router(config)enable secret [密码]Router(config)line console 0Router(config-line)password [密码]Router(config-line)logging synchronousRouter(config-line)exitRouter(config)line vty 0 4Router(config-line)password [密码]Router(config-line)logging synchronous```1.2 配置接口接下来,您需要配置路由器的接口,以便与其他网络设备进行通信。

使用以下命令配置接口:```Router(config)interface [接口类型] [接口编号]Router(config-if)ip address [IP地址] [子网掩码]Router(config-if)no shutdownRouter(config-if)exit```二、路由配置2.1 静态路由静态路由是手动配置的路由项,将特定的网络目的地与下一跳路由器关联起来。

以下是配置静态路由的示例命令:```Router(config)ip route [目的网络] [子网掩码] [下一跳地址]```2.2 动态路由动态路由是通过路由协议动态学习并自动更新的路由项。

思科交换机和路由器配置命令简写与完整对照

思科交换机和路由器配置命令简写与完整对照

思科2600系列路由器的enable密码恢复原理:因enable密码保存在startup-config中,可以使路由器启动时绕过startup-config配置,然后重新如果想让路由器启动时绕过startup-config配置,只有修改配置寄存器的值.正常情况下配置寄存器的值是0x2102,把2102换算成16进制为:0010.0001.0000.0010其中第三段中的第二个比特位即0000中的第二个0可以控制路由器启动时的顺序,当这一位为0,表示启动时运行startup-config的配置,如果为1,则表示启动时忽略startup-config的配置,进入setup模式当该位为1时,配置寄存器的值为0x2142恢复步骤:1:重启路由器,在启动60S内按下Ctrl+Break键,使路由器进入ROM Monitor模式2:在提示符下输入命令修改配置寄存器的值,然后重启路由器rommon1>confreg 0x2142rommon2>resetrommon3>boot3:重启路由器后进入setup模式,选NO退回到exec模式,此时路由器原有配置仍保存在startup-config中,为使路由器恢复密码后配置不变,应把startup-config中的配置保存到running-config中,然后重新设置enable密码,并把Router>enableRouter#copy startup-config running-configRouter# config terminalRouter(config)# enable secret 123456Router(config)# config-register 0x2102Router(config)#exit4:保存当前配置到startup-config,然后重启路由器.Router# copy running-config startup-config或WRRouter#reload后重新配置密码即可.。

思科路由器配置命令简写与完整对照

思科路由器配置命令简写与完整对照
思科路由器配置命令
简写命令
完整命令
1 Router>
2 Router>en
用户模式: Router>
特权模式: Router>enable
Router#
Router# 全局配置模式
3 Router#conf t
Router#config terminal
Router(config)#
Router(config)#
Router(config-subif)#
Router(config-subif)#
line模式:
6 Router(config)#lin c 0
Router(config)#line console 0
Router(config-line)#
Router(config-line)#
路由模式
7 Router(config)#router rip(rip是一种路由协议)
14 Router(config)#in f1/0 (有些写成e0/1,e0) Router(config-if)#ip ad 10.20.30.40 255.0.0.0
Router(config)#interface f1/0 (有些写成e0/1,e0) Router(config-if)#ip address 10.20.30.40 255.0.0.0
Router(config-if)#no shutdown Router(config-if)#exit
Router(config)#ip route 目标网段 目标网段掩码 下一跳入口IP地址 Router(config)#ip route 目标网段 目标网段掩码 下一跳入口IP地址
默认路由的配置

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

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

思科路由器命令大全完整版Modified by JEEP on December 26th, 2020.思科交换机路由器命令大全交换机命令:switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#configure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolabaptech2950(conf)#no ip domain-lookup -----设置禁用IP地址解析特性aptech2950(conf)#logging synchronous -----设置启用消息同步特性aptech2950(conf)#interface range fastethernet0/1-20aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口aptech2950(conf)#interface range fastethernet 0/23-24aptech2950(conf-if-range)#swichport mode trunk -----设置主干道端口aptech2950(conf)#spanning-tree uplingkfast ---设置阻塞启用迅速(只可以在访问层启用)6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#configure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

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

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

思科路由器命令大全完整版一、基本配置命令1、`enable`:进入特权模式。

2、`configure terminal`:进入全局配置模式。

3、`hostname 主机名`:设置路由器的主机名。

4、`interface 接口类型接口编号`:进入指定接口的配置模式,例如`interface ethernet 0/0`。

5、`ip address IP 地址子网掩码`:为接口配置 IP 地址和子网掩码。

6、`no shutdown`:启用接口。

二、路由配置命令1、`ip route 目标网络子网掩码下一跳地址`:添加静态路由。

2、`router ospf 进程号`:启用 OSPF 路由协议,并指定进程号。

3、`network 网络地址反掩码 area 区域号`:在 OSPF 中宣告网络。

三、访问控制列表(ACL)命令1、`accesslist 编号 permit|deny 源地址源掩码目的地址目的掩码协议端口`:创建访问控制列表规则。

2、`ip accessgroup 编号 in|out`:将访问控制列表应用到接口的入站或出站方向。

四、NAT 配置命令1、`ip nat inside source list 访问控制列表编号 interface 外部接口overload`:配置 PAT(端口地址转换)。

2、`interface 接口 ip nat inside`:指定接口为内部接口。

3、`interface 接口 ip nat outside`:指定接口为外部接口。

五、VLAN 配置命令1、`vlan VLAN 号`:创建 VLAN。

2、`name VLAN 名称`:为 VLAN 命名。

3、`interface vlan VLAN 号`:进入 VLAN 接口配置模式。

六、端口镜像命令1、`monitor session 会话号source interface 源接口`:指定源端口。

2、`monitor session 会话号 destination interface 目的接口`:指定目的端口。

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

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

思科路由器交换机配置命令大全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 ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入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 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(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地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息2. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xxrouter(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address ;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address ;设置子接口IProuter(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。

思科的路由器配置及H3C交换机命令详解

思科的路由器配置及H3C交换机命令详解

思科的路由器配置及H3C交换机命令详解思科路由器配置在网络设备中,路由器是一个重要的组件,用于将数据包从一个网络传输到另一个网络。

思科公司是一个广泛使用的路由器制造商,下面将详细介绍思科路由器的配置。

一、连接到路由器1. 打开终端程序,输入路由器的IP地址。

例如:192.168.1.12. 输入用户名和密码以登录路由器的管理界面。

默认情况下,用户名为"admin",密码为空。

3. 成功登录后,将进入路由器的配置界面。

二、基本配置1. 设置路由器的主机名。

使用以下命令:hostname 路由器名称2. 配置路由器的IP地址和子网掩码。

使用以下命令:interface GigabitEthernet0/0ip address 192.168.1.1 255.255.255.0这里的“GigabitEthernet0/0”是代表路由器的接口名称,具体根据路由器型号和配置来定。

三、路由配置1. 配置静态路由。

使用以下命令:ip route 目标网络子网掩码下一跳IP地址例如,要将数据包发送到目标网络192.168.2.0/24,下一跳IP地址为192.168.1.2:ip route 192.168.2.0 255.255.255.0 192.168.1.22. 配置动态路由。

使用以下命令:router ospf 进程号network 目标网络区域号例如,将192.168.1.0/24和192.168.2.0/24添加到OSPF进程号为1的区域0:router ospf 1network 192.168.1.0 0.0.0.255 area 0network 192.168.2.0 0.0.0.255 area 0H3C交换机命令详解H3C交换机是一种高级网络设备,用于在局域网中转发数据包。

下面将详细介绍H3C交换机的配置命令。

一、连接到交换机1. 打开终端程序,使用Console或SSH连接到交换机。

CISCO配置命令简写速记表

CISCO配置命令简写速记表
路由器、交换机配置命令简写对照表
全称 enable configure terminal interface f0/0 interface f0/0.1 line console 0 password 123 enable password 123 enable secret 321 service passwordencryption no shutdown hostname benet exit router rip network 192.168.1.0 network 172.16.1.0 no router rip show ip route hostname zsc show interfaces f0/0 show clock ip address 10.20.30.40 255.0.0.0 show version show running-config 简写 en conf t in f0/0 in f0/0.1 lin c 0 pas 123 ena p 123 ena s 321 ser pas n sh ho benet ex ro ne ne no sh ho rip 192.168.1.0 172.16.1.0 router r ip ro zsc 含义 特权模式 配置模式 f0/0 接口配置模式 子接口配置模式 line模式 配置控制台密码 配置特权模式密码 配置加密保存的密码 对所有密码加密 开启端口 更改交换机主机名 退出(特权、配置模 式支持) 路由模式用rip协议 动态路由配置,f0/0 动态路由配置,f0/1 删除RIP动态路由协议 查看路由表 更改路由器主机名 查看接口状态 查看路由器当前时间 配置路由器接口IP地 址 查看路由器版本信息 查看当前配置
sh int f0/0 sh clo ip ad 10.20.30.40 255.0.0.0 sh ve sh run

思科路由器命令大全详解

思科路由器命令大全详解

思科路由器命令大全详解思科路由器命令大全详解本文档旨在提供一份最新最全的思科路由器命令详解,供读者参考使用。

以下为各个章节的详细内容:1、连接管理1.1 连接路由器1.1.1 使用串行接口连接路由器1.1.2 使用以太网接口连接路由器1.2 断开与路由器的连接1.3 查看当前连接状态2、基本配置2.1 配置路由器主机名2.2 设置密码和特权级2.2.1 设置密码2.2.2 设置特权级密码2.3 配置路由器接口2.3.1 配置IP地质2.3.2 配置子网掩码 2.3.3 配置默认网关 2.4 查看路由器配置信息2.5 保存路由器配置3、路由配置3.1 配置静态路由3.2 配置动态路由3.2.1 RIP协议配置 3.2.2 OSPF协议配置 3.2.3 BGP协议配置3.3 查看路由表4、网络地质转换(NAT)配置 4.1 配置静态NAT4.2 配置动态NAT4.3 配置PAT4.4 查看NAT配置信息5、访问控制列表(ACL)配置5.1 配置标准ACL5.2 配置扩展ACL5.3 应用ACL到接口5.4 查看ACL配置6、路由器安全性配置6.1 配置SSH访问6.2 配置Telnet访问 6.3 配置访问类别6.4 配置防火墙6.5 配置AAA认证7、接口配置7.1 配置以太网接口 7.2 配置串行接口7.3 配置VLAN接口 7.4 配置隧道接口附件:本文档附带以下附件:1:思科路由器命令示例图表2:思科路由器配置实例法律名词及注释:1、版权:法律规定的对原创作品的独占使用权。

2、许可证:许可证是通过行政机关的批准,对依法许可的活动设定限制和要求。

3、违约:违反合同中的任何条款或条件的行为或事件。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
switch(config-if)#ip ad 192.168.0.2 255.255.255.0
完整命令
用户模式: switch> 特权模式: switch>enable switch# 全局配置模式 switch#config terminal switch(config)# 接口配置模式 switch(config)#interface f0/1 switch(config-if)# line模式: switch(config)#line console 0 switch(config-line)# 更改交换机主机名 switch(config)#hostname benet benet(config)# 配置进入特权模式的明文口令 switch(config)#enable password 123 删除进入特权模式的明文口令 switch(config)#no enable password 配置进入特权模式的加密口令 switch(config)#enable secret 456 删除进入特权模式的加密口令 switch(config)#no enable secret 查看交换机配置 switch#show running-config 配置console口令 switch(config)#line console 0 switch(config-line)#password 123 switch(config-line)#login 配置交换机IP地址 switch(config)#interface vlan 1
思科交换机配置命令 简写命令
1 2 用户模式: switch> 特权模式: switch>en switch# 全局配置模式 switch#conf t switch(config)# 接口配置模式 switch(config)#in f0/1 switch(config-if)# line模式: switch(config)#lin c 0 switch(config-line)# 更改交换机主机名 switch(config)#ho benet benet(config)# 配置进入特权模式的明文口令 switch(config)#en pass 123 删除进入特权模式的明文口令 switch(config)#no ena pass 配置进入特权模式的加密口令 switch(config)#en se 456 删除进入特权模式的加密口令 switch(config)#no ena se 查看交换机配置 switch#sh run 配置console口令 switch(config)#lin cons 0 switch(config-line)#pass 123 switch(config-line)#logi 配置交换机IP地址 switch(config)#in vl 1
switch(config-if)#switchport trunk allowed vlan add 3
switch(config-if)#end 从TRUNK中删除某个VLAN switch(config)#interface f0/15
switch(config-if)#switchport trunk allowed vlan remove 3
switch(config-if)#no shutdown 删除交换机接口IP地址 switch(config-if)#no ip address 配置交换机默认网关 switch(config)#ip default-gateway 192.168.0.1 查看交换机的MAC地址表 switch#show mac-address-table 查看思科交换机相邻设备的详细信息 switch#show cdp neighbors detail 保存交换机配置 1:switch#copy running-config startup-config 2:switch#write 恢复交换机出厂配置 switch#erase startup-config switch#reload 创建VLAN switch#vlan database switch(vlan)#vlan 30 switch(vlan)#exit VLAN重命名 switch(vlan)#vlan 20 name benet VLAN 20 modified: Name: benet 删除VLAN switch(vlan)#no vlan 20 Deleting VLAN 2... switch(vlan)#exit
switch(config-if)#ip address 192.168.0.2 255.255.255.0
3
4
5
6 7 8 9 10 11
12
13
14 11
22
switch(config-if)#no sh 删除交换机接口IP地址 switch(config-if)#no ip ad 配置交换机默认网关 switch(config)#ip default-g 192.168.0.1 查看交换机的MAC地址表 switch#sh mac-a 查看思科交换机相邻设备的详细信息 switch#sh cdp nei de 保存交换机配置 1:switch#cop run st 2:switch#wr 恢复交换机出厂配置 switch#er st switch#relo 创建VLAN switch#vl da switch(vlan)#vl 30 switch(vlan)#exit VLAN重命名 switch(vlan)#vl 20 n benet VLAN 20 modified: Name: benet 删除VLAN switch(vlan)#n vl 20 Deleting VLAN 2... switch(vlan)#e
Interface FastEthernet0/2 set to default configuration
26
27
28
29
30 31
switch(config)#end 同时将多个端口加入VLAN并验证 switch(config)#in r f0/3 - 10 switch(config-if-range)#sw a v 3 switch(config)#end switch#sh vlan-s 配置VLAN TRUHK switch(config)#in f0/15 switch(config-if)#sw m t 从TRUNK中添加某个VLAN switch(config)#in f0/15 switch(config-if)#sw t a v ad 3 switch(config-if)#end 从TRUNK中删除某个VLAN switch(config)#in f0/15 switch(config-if)#sw t a v r 3 switch(config-if)#end 验证接口模式(检查中断端口允许的VLAN列表) switch#sh int f0/15 switchp 查看用过的命令 switch#sh hi
Interface FastEthernet0/2 set to default configuration
完整命令
将端口加入到VLAN switch(config)#interface f0/2 switch(config-if)#switchport access vlan 30 验证VLAN配置信息 switch#show vlan brief switch#show vlan-switch 删除VLAN中的端口 1:switch(config-if)#no switchport access vlan 3 switch(config-if)#end 2:switch(config-if)#default interface f0/2 Building configuration...
宣告启用RIP的
switch(config)#end 同时将多个端口加入VLAN并验证 switch(config)#interface range f0/3 - 10 switch(config-if-range)#switchport access vlan 3 switch(config)#end switch#show vlan-switch 配置VLAN TRUHK switch(config)#interface f0/15 switch(config-if)#switchport mode trunk 从TRUNK中添加某个VLAN switch(config)#interface f0/15
switch(config-if)#end 验证接口模式(检查中断端口允许的VLAN列表) switch#show interface f0/15 switchport 查看用过的命令 switch#show history
宣告启用RIP的
简写命令
将端口加入到VLAN 23 switch(config)#in f0/2 switch(config-if)#sw a v 30 验证VLAN配置信息 24 switch#sh vlan b switch#sh vlan-s 删除VLAN中的端口 1:switch(config-if)#no sw a v 3 switch(config-if)#end 25 2:switch(config-if)#def interface f0/2 Building configuration...
相关文档
最新文档