路由基础配置命令
路由器配置命令大全

路由器配置命令大全路由器配置命令大全1.连接路由器1.1 使用串行控制台线连接路由器1.2 使用以太网接口连接路由器1.3 使用无线网络连接路由器2.基本配置2.1 配置主机名router(config)hostname [hostname]2.2 配置域名解析router(config)ip domn-name [domn-name] 2.3 配置密码router(config)enable secret [password] router(config)line console 0router(config-line)password [password] router(config-line)loginrouter(config-line)exitrouter(config)line vty 0 15router(config-line)password [password]router(config-line)loginrouter(config-line)exit2.4 配置管理IP地质router(config)interface [interface]router(config-if)ip address [ip-address] [subnet-mask]router(config-if)no shutdown3.网络协议配置3.1 配置静态路由router(config)ip route [destination-network] [subnet-mask] [next-hop]3.2 配置动态路由router(config)router [routing-protocol]router(config-router)network [network-address] [subnet-mask]3.3 配置带宽管理router(config)interface [interface]router(config-if)bandwidth [bandwidth-in-kbps]3.4 配置ACL(访问控制列表)router(config)access-list [access-list-number] [permit/deny] [source-network] [source-wildcard]4.NAT(网络地质转换)配置4.1 配置静态NATrouter(config)ip nat inside source static [inside-local-address] [outside-global-address]4.2 配置动态NATrouter(config)ip nat pool [pool-name] [start-ip-address] [end-ip-address] netmask [subnet-mask]router(config)ip nat inside source list [access-list] pool [pool-name]4.3 配置PAT(端口地质转换)router(config)interface [interface]router(config-if)ip nat insiderouter(config)interface [interface]router(config-if)ip nat outside5.VLAN(虚拟局域网)配置5.1 配置VLANrouter(config)vlan [vlan-id]router(config-vlan)name [vlan-name]5.2 配置接口VLANrouter(config)interface [interface]router(config-if)switchport mode accessrouter(config-if)switchport access vlan [vlan-id]5.3 配置Trunk接口router(config)interface [interface]router(config-if)switchport mode trunkrouter(config-if)switchport trunk allowed vlan [vlan-list]6.特定协议配置6.1 配置DHCP(动态主机配置协议)router(config)ip dhcp pool [pool-name]router(dhcp-config)network [network-address] [subnet-mask]router(dhcp-config)default-router [default-gateway]router(dhcp-config)dns-server [dns-server-ip]6.2 配置NTP(网络时间协议)router(config)ntp server [ntp-server-ip]router(config)ntp update-calendar6.3 配置SNMP(简单网络管理协议)router(config)snmp-server community [community-string] [ro/rw]router(config)snmp-server host [host-ip] [community-string]7.安全配置7.1 配置SSH(安全外壳协议)router(config)hostname [hostname]router(config)ip domn-name [domn-name]router(config)crypto key generate rsarouter(config)ip ssh version 2router(config)line vty 0 15router(config-line)transport input sshrouter(config-line)login localrouter(config-line)exit7.2 配置防火墙router(config)access-list [access-list-number] [permit/deny] [source-network] [source-wildcard] router(config)interface [interface]router(config-if)ip access-group [access-list-number] [in/out]附件:无法律名词及注释:- IP地质:Internet Protocol Address,互联网协议地质,用于标识网络上主机的唯一数字标识。
路由器配置命令

路由器配置命令1:连接路由器要配置路由器,首先需要通过网线将计算机与路由器连接。
确保电脑和路由器处于同一个局域网中,并且电脑的网卡设置为自动获取IP地址。
2:登录路由器打开计算机上的浏览器,输入路由器的管理IP地址(通常为192.168.1.1或192.168:0:1)并按回车键。
在弹出的登录界面中输入用户名和密码进行登录。
3:路由器基本设置在路由器的管理界面中,选择“基本设置”选项。
在此部分可以设置路由器的主机名、域名、时区以及路由器的管理密码等。
4:网络设置在管理界面中找到“网络设置”选项。
在此部分可以设置路由器的IP地址、子网掩码、网关和DNS信息等。
确保这些设置与网络环境相匹配。
5: WLAN设置如果路由器支持无线网络功能,可以在“WLAN设置”选项中进行相关设置。
包括无线网络的SSID名称、加密方式及密码等。
6:接口设置在管理界面中找到“接口设置”选项。
在此部分可以设置路由器的LAN口、WAN口、VLAN等接口相关的配置。
7:安全设置保护路由器的安全至关重要,可以在“安全设置”选项中进行相关的配置。
包括设置防火墙、启用ACL以及安全登录等选项。
8:服务设置在管理界面中找到“服务设置”选项。
在此部分可以设置路由器的DHCP服务、DNS代理、动态DNS等相关服务。
9: NAT设置如果需要进行网络地址转换(NAT)配置,可以在“NAT设置”选项中进行相关设置。
包括端口映射、虚拟服务器等。
10:路由设置在管理界面中找到“路由设置”选项。
在此部分可以进行路由设置相关的配置,如静态路由等。
附件:本文档不附带任何附件。
法律名词及注释:1: IP地址:互联网协议地址,用于标识计算机或网络设备在网络上的唯一标识。
2:子网掩码:用于将IP地址分成网络地址和主机地址两部分的32位二进制数。
3:网关:连接两个不同网络的设备,用于在网络之间进行中转和交换数据。
4: DNS:域名系统,将域名解析为IP地址的系统。
路由器的基本配置命令与方法

路由器的基本配置命令与方法路由器是连接不同网络的设备,它可以将来自不同网络的数据包进行转发和交换,使得不同网络之间可以实现通信。
为了使路由器能够正常工作,需要进行一些基本的配置。
本文将介绍路由器的基本配置命令与方法。
一、登录路由器要进行路由器的配置,首先需要登录路由器的管理界面。
一般情况下,可以通过在浏览器中输入默认的管理地址来访问路由器的管理界面。
例如,大多数路由器的默认管理地址是192.168.1.1。
登录时需要输入正确的用户名和密码。
二、修改管理员密码登录成功后,为了提高路由器的安全性,首先需要修改管理员密码。
可以在管理界面的设置选项中找到修改密码的入口,按照提示进行操作即可。
三、设置无线网络如果需要使用无线网络,可以在管理界面的无线设置选项中进行配置。
首先需要设置无线网络的名称(SSID),然后选择安全加密方式,如WPA2-PSK。
根据选择的加密方式,需要设置相应的加密密码。
最后保存设置,无线网络就配置完成了。
四、设置有线网络除了无线网络,路由器还可以提供有线网络连接。
要设置有线网络,需要将计算机通过网线连接到路由器的LAN口。
然后在管理界面的网络设置选项中,选择有线网络配置。
根据需要,可以设置静态IP 地址或者开启DHCP服务来自动获取IP地址。
五、端口转发与DMZ主机如果需要在路由器上设置端口转发或者将某台计算机设为DMZ主机,可以在管理界面的端口转发或者DMZ设置选项中进行配置。
根据需要,输入要转发的端口号或者选择要设为DMZ主机的计算机IP地址,然后保存设置即可。
六、虚拟服务器与特殊应用有些应用程序需要特殊的网络配置才能正常工作,例如网络摄像头、远程桌面等。
在管理界面的虚拟服务器或者特殊应用选项中,可以进行相应的配置。
根据需要,输入应用程序的端口号和要转发的计算机IP地址,然后保存设置即可。
七、防火墙与安全设置为了保护网络安全,路由器一般都会提供防火墙和其他安全设置。
可以在管理界面的防火墙设置选项中进行配置。
路由器配置命令大全

路由器配置命令大全视图模式介绍:普通视图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 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议hdlc 或者ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca frrouter(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口3、路由配置:(1)静态路由router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由(2)动态路由rip协议router(config)#router rip /启动rip协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#version 2 转换为rip 2版本router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用router(config-router)# passive-int 接口名/启动本路由器的那个接口为被动接口router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ip,igrp协议-----内部网关路由协议(IGRP:Interior Gateway Routing Protocol)router(config)#router igrp xxx /启动igrp协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡eigrp---Enhanced Interior Gateway Routing Protocol(增强网关内部路由线路协议)router(config)#router eigrp xxx /启动协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡router(config-router)#no auto-summary /关闭自动汇总功能ospf协议----开放最短路径协议(OSPF)协议router(config)#router ospf xxx /启动协议启动一个OSPF协议进程router(config-router)#network xxx.xxx.xxx.xxx area xxx /宣告自己的接口或网段在ospf的区域中,可以把不同接口宣告在不同区域中router(config-router)#router-id xxx.xxx.xxx.xxx /配置路由的idrouter(config-router)#area xxx stub /配置xxx区域为末梢区域,加入这个区域的路由器全部要配置这个条命令router(config-router)#area xxx stub no-summary /配置xxx区域为完全末梢区域,只在ABR上配置router(config-router)#area xxx nssa /配置xxx区域为非纯末梢区域,加入这个区域的路由器全部要配置这个条命令router(config-router)#area xxx nssa no-summary /配置xxx区域为完全非纯末梢区域,只在ABR上配置,并发布缺省路由信息进入这个区域内的路由器4、保存当前修改/运行的配置:router#write /将RAM中的当前配置存储到NVRAM中,下次路由器启动就是执行保存的配置router#Copy running-config startup-config /命令与write效果一样5、一般的常用命令router(config-if)#exitrouter(config)#router(config-router)#exitrouter(config)#router(config-line)#exitrouter(config)#router(config)#exitrouter#exit命令/从接口、协议、line等视图模式下退回到全局配置模式,或从全局配置模式退回到特权模式router(config-if)#endrouter(config-router)#endrouter(config-line)#endrouter#end命令/从任何视图直接回到特权模式router#Logout /退出当前路由器登陆模式相对与windows的注销router#reload /重新启动路由器(热启动)冷启动就是关闭路由器再打开电源开关特权模式下:router#show ip route /查看当前的路由表router#clear ip route * /清楚当前的路由表router#show ip protocol /查看当前路由器运行的动态路由协议情况router#show ip int brief /查看当前的路由器的接口ip地址启用情况router#show running-config /查看当前运行配置router#show startup-config /查看启动配置router#debug ip pack /打开ip报文的调试router#terminal monitor /输出到终端上显示调试信息router#show ip eigrp neighbors /查看eigrp协议的邻居表router#show ip eigrp top //查看eigrp协议的拓朴表router#show ip eigrp interface /查看当前路由器运行eigrp协议的接口情况router#show ip ospf neighbor /查看当前路由器的ospf协议的邻居表router#show ip ospf interface /查看当前路由器运行ospf协议的接口情况router#clear ip ospf process /清楚当前路由器ospf协议的进程router#Show interfaces /显示设置在路由器和访问服务器上所有接口的统计信息. 显示路由器上配置的所有接口的状态router#Show interfaces serial /显示关于一个串口的信息router#Show ip interface /列出一个接口的IP信息和状态的小结, 列出接口的状态和全局参数。
路由器的配置命令总结

路由器的配置命令总结配置路由器的命令可以分为以下几类:1. 基础配置命令:- configure terminal:进入全局配置模式- hostname:设置路由器的主机名- enable password:设置特权模式密码- line console 0:进入控制台线路配置模式- line vty 0 4:进入虚拟终端线路配置模式2. 接口配置命令:- interface interface_name:进入接口配置模式- ip address:配置接口IP地址- no shutdown:激活接口- description:为接口添加描述信息3. 路由配置命令:- ip route destination_network next_hop:配置静态路由- router rip:进入RIP路由器配置模式- network:指定RIP协议工作的网络地址4. 网络地址转换(NAT)配置命令:- ip nat inside source static inside_local_ip outside_global_ip:配置静态NAT- ip nat pool pool_name start_ip end_ip netmask:配置动态NAT 池5. 访问控制列表(ACL)配置命令:- access-list acl_number {deny | permit} source destination:创建ACL规则- interface interface_name:进入接口配置模式- ip access-group acl_number {in | out}:应用ACL到接口6. VLAN配置命令:- vlan vlan_id:创建VLAN- switchport mode {access | trunk}:配置接口模式7. 安全配置命令:- enable secret:设置特权模式加密密码- username username password password:创建本地用户8. 特定协议配置命令:- router ospf process_ID:进入OSPF路由器配置模式- network network_address wildcard_mask area area_number:配置OSPF网络- router bgp autonomous_system_number:进入BGP路由器配置模式- neighbor ip_address remote-as autonomous_system_number:配置BGP邻居以上是一些常见的路由器配置命令,不同型号和品牌的路由器可能会有一些差异,具体命令请参考相应的操作手册或文档。
路由器的配置命令

路由器的配置命令1.路由器的模式Router>用户模式Router#特权模式Router(config)#配置模式Router(config-if)# 接口模式Router(config)#interface f0/0.1 进入子接口Router(config-subif)# 子接口模式Router(config-line)# 进行线模式Router(config-router)# 路由配置模式2.配置静态路由条目Router(config)# ip route 192.168.10.0 255.255.255.0 192.168.9.2 /192.168.10.0网段及掩码需要经过相邻路由器接口的IP地址3.配置默认路由Router B(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2 /所以外出的数据包如果找不到路由表目均找192.168.2.2接口。
4.配置路由控制台密码teacher(config)#line console 0teacher(config-line)#loginteacher(config-line)password ciscoteacher(config)#enable password cisco /配置特权模式密码teacher(config)#enable secret 1234 /配置加密保存的密码teacher(config)#service password-encryption / 对所有密码加密5.配置控制台会话时间teacher(config)#line console 0teacher(config-line)exec-timeout 0 06.配置控制台输出日志同步teacher(config)#line console 0teacher(config-line)#logging synchronous7.路由密码恢复(1)进入ROM Monitor 模式(2)修改配置寄存器的值,启动是绕过 startup-config文件rommon1>confreg ox2140rommon2>reset(3)用startup-config覆盖running-configROuter#copy starup-config running-config修改密码Router(config)#enable password cisco(4)修改配置寄存器的值Router(config)#config-register ox21028.动态路由配置(1)截断超时(2)打开接口(3)为接口设置IP 地址Router(config)#interface f0/0Router(config-if)#ip address 192.168.1.1Router(configif)#no shutdown(4)启动RIP进程,并宣告主网络号Router(config)#router ripRouter(config-router)#network 192.68.1.09.单臂路由配置Router(config)#interface f0/0.1router(config-subif)#encapsolution dotlq 1 :子接口封装dot1q针对的是VLAN1Router(config-subif)#ip address 192.168.1.1 255.255.255.0 :设置VLAN的网关地址Router(config)#interface f0/0.2router(config-subif)# encapsolution dotlq 2 子网接口封装do1q针对的是VLAN2 Router(config-subif)# 192.168.2.1 255.255.255.0 :设置VLAN2的网关地址路由器的操作系统,它是一个功能非常强大的系统,特别是在一些高档的路由器中,它具有相当丰富的操作命令,就像我们的DOS系统一样。
路由器的配置命令

路由器的配置命令路由器的配置命令可以通过命令行界面(CLI)或者图形用户界面(GUI)来完成。
在命令行界面下,我们可以使用不同的命令,来对路由器进行配置和管理。
一、基本配置命令1. 进入特权模式在配置路由器之前,我们需要进入特权模式。
在命令行界面中输入以下命令,然后按下回车键即可:```enable```2. 进入全局配置模式进入特权模式之后,我们需要进入全局配置模式。
在全局配置模式下,可以对路由器进行各种配置。
在命令行界面中输入以下命令,按下回车键即可:```configure terminal```3. 配置主机名在全局配置模式下,我们可以为路由器配置一个唯一的主机名,以区分其他路由器。
在命令行界面中输入以下命令,按下回车键即可:```hostname Router1```这里的"Router1"可以替换为你想要的主机名。
4. 配置密码为了保护路由器的安全,我们可以为路由器配置密码。
以下是两种常用的密码配置命令:为特权模式设置密码:```enable secret password```为虚拟终端线路设置密码:```line vty 0 4password passwordlogin```这里的"password"可以替换为你想要的密码。
二、接口配置命令1. 进入接口配置模式在全局配置模式下,我们可以进入接口配置模式,对特定接口进行配置。
以下是两个常用的进入接口模式的命令:进入以太网接口配置模式:```interface Ethernet0/0```进入串口接口配置模式:```interface Serial0/0```2. 配置IP地址在接口配置模式下,我们可以为接口配置IP地址。
以下是一个配置IP地址的命令示例:```ip address 192.168.0.1 255.255.255.0```这里的"192.168.0.1"和"255.255.255.0"可以替换为你想要的IP地址和子网掩码。
路由的配置命令

路由的配置命令单臂路由的配置Router(config)# Interface interface-idRouter(config-if)#no ip addressRouter(config-if)#exitRouter(config)#interface fastethernet slot-number/interface-number.subinterface-number Router(config-subif)#encapsulation dot1Q VlanID Router(config-subif)#i p address ip-address mask路由器基本配置配置模式简介⽤户模式Router>特权模式Router#全局配置模式Router(config)#端⼝配置模式Router(config-if)#⾏命令配置模式Router(config-line)#动态协议配置模式Router(config-router)#注意:这⾥的Router是路由器的名字,可以通过命令改为其他名字;不同的模式有不同的⽤途,在查看或配置不同信息时,应在不同的模式下进⾏。
命令中的字母不区分⼤⼩写。
Show 命令该命令可以查询诸如版本、端⼝、⽂件、配置、时钟的配置信息,⼤部分show命令都可在⽤户模式和特权模式下运⾏。
查询有多少show命令:Show ?Show running-config 显⽰在RAM中的配置情况Show startup-config 显⽰保存在NVRAM中的配置情况查看某个端⼝的配置情况:格式:Router# show interface 端⼝名称Router# show ip interface brief显⽰IOS的版本情况:格式:Router# show version显⽰当前协议状况:格式:Router# show protocols全局配置模式Router(config)#配置路由器的整体参数,⼀旦被设置就会影响整个路由器。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
路由基础配置命令UTP双绞线类型:直通线:交叉线:广域网线缆连接类型:DTE:DCE:时钟速率:路由器的接口:(作用)1. 广域网接口: serial2. 内网接口: fastethernet3. 管理接口: console (控制台) AUX(备份)连接两个设备:1. 物理连接2. 逻辑连接配置网络设备:1. 管理属性:用户名密码描述警告2. 协议地址:IP IPX3. 协议策略:vlan 静态访问控制交换机直接可以应用路由器需要初始配置才能应用设备启动过程:1. 加电自检2. 查找加载操作系统3. 查找加载配置文件配置网络设备方式:1. 初始配置:console2. 初始配置后通过interface(拥有ip地址的接口):1)telnet2)TFTP3)WEB4)网络管理工具: SNA SDM配置直接应用到内存登陆路由器:Router>Router>enable /*进入特权模式Router#Router#disable /*退出特权模式Router>Router>logout /*退出路由器Router>exit /*退出路由器路由器IOS帮助功能:?的三个用法1/ 直接问号2/Router#cl?clear clockRouter#cl3/Router#clock% Incomplete command.Router#clock ?set Set the time and dateRouter#clock问号的帮助功能:(查找路由器设置时间的命令并设置时间)Router#cl?clear clockRouter#clock% Incomplete command.Router#clock ?set Set the time and dateRouter#clock set% Incomplete command.Router#clock set ?hh:mm:ss Current TimeRouter#clock set 11:04:50% Incomplete command.Router#clock set 11:04:50 ?<1-31> Day of the monthMONTH Month of the yearRouter#clock set 11:04:50 15% Incomplete command.Router#clock set 11:04:50 15 ?MONTH Month of the yearRouter#clock set 11:04:50 15 09^% Invalid input detected at '^' marker.Router#clock set 11:04:50 15 ?MONTH Month of the yearRouter#clock set 11:04:50 15 sep ?<1993-2035> YearRouter#clock set 11:04:50 15 sep 2009Router#Router#clokTranslating "clok"...domain server (0.0.0.0)% Unknown command or computer name, or unable to find computer addressRouter#clok /* 输入快捷键“Ctrl+Shift+6”Translating "clok"...domain server (0.0.0.0) % Name lookup abortedRouter#clock sit^% Invalid input detected at '^' marker.Router#Router#clock s?setRouter#clock sRouter#show history /*查看输入的历史命令clock set 10:41:30clock set 10:41:30 22clock set 10:41:30 22 dec 2009clokclock sitconfigure terminalcloconfigure terminalhistoryshow historyRouter#查看操作系统版本:Router#show version查看配置文件:1. 查看正在运行的配置文件(工作在内存 RAM)Router#show run2. 查看启动的配置文件(存储过的配置文件 NVRAM)Router#show startRouter#show startup-configstartup-config is not present /*没有启动的配置文件Router#路由器的硬件:RAM:内存NVRAM:存储配置文件FLASH:存储IOSROM:类似计算机BIOS,Interface:CPU:保存路由器的配置文件:Router#copy run startDestination filename [startup-config]?Building configuration...[OK]Router#writeBuilding configuration...[OK]Router#重新启动路由器:Router#reloadProceed with reload? [confirm]设置路由的标识符:1. 路由器的名称Router#conf tRouter(config)#hostname R1R1(config)#2. 每日欢迎信息R1(config)#banner motd # This is R1, shenyang ,Don't shutdown it!! # 重新登录路由器3. 端口描述R1(config)#interface serial 0/0/0 (进入接口的子模式)R1(config-if)#description To R2 S0/0/0(端口的描述信息)R1(config-if)#查看端口信息:R1#show interfaces fastEthernet 0/0R1#show run路由器的密码:1. 控制台管理接口的密码:R1(config)#line console 0 (进入console接口的配置模式)R1(config-line)#password cisco (密码是cisco)R1(config-line)#login (登陆过程中,检查密码)R1(config-line)#2. 用户到特权模式的密码R1(config)#enable password 1234 (明文方式显示密码)R1(config)#enable secret 4321 (加密方式显示密码,权限比明文高)3. 删除密码:R1(config)#no enable passwordR1(config)#no enable secret4. 启动密码的加密服务:R1(config)#service password-encryptionConsole接口有用的命令:1.设置超时时间R1(config)#line con 0R1(config-line)#exec-timeout 0 02. 设置console的同步:R1(config)#line con 0R1(config-line)#logging synchronous3. 关闭路由器名称查找功能R1(config)#no ip domain-lookupRouter#adfdsafTranslating "adfdsaf"% Unknown command or computer name, or unable to find computer address Router#设置路由器的协议地址:1. 配置路由器广域网接口(serial)R1(config)#interface serial 0/0/0R1(config-if)#exitR1(config)#int s0/0/0R1(config-if)#clock rate 64000 (设置时钟输率)R1(config-if)#bandwidth 64 (设置接口带宽)启动路由器的接口:R1(config-if)#no shutdown (开启接口)R1(config-if)#%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up (接口的物理层UP)%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up (接口的数据链路层UP)R1(config-if)#配置接口的ip地址:R1(config)#int s0/0/0R1(config-if)#ip address 12.1.1.1 255.255.255.0R1(config-if)#no shutdown (开启接口)测试接口的连通性:R1#ping 12.1.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msR1#查看端口的状态:R1# show int s0/0/0Serial0/0/0 is up, line protocol is up (connected)Hardware is HD64570Description: To R2 S0/0/0Internet address is 12.1.1.1/24MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not set, keepalive set (10 sec)Last input never, output never, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops)Conversations 0/0/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)Available Bandwidth 48 kilobits/sec5 minute input rate 5 bits/sec, 0 packets/sec5 minute output rate 5 bits/sec, 0 packets/sec5 packets input, 640 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort5 packets output, 640 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=up DSR=up DTR=up RTS=up CTS=upR1#查看接口连接线缆的类型:R1#show controllers serial 0/0/0Interface Serial0/0/0Hardware is PowerQUICC MPC860DCE V.35, clock rate 64000idb at 0x81081AC4, driver data structure at 0x81084AC0SCC Registers:.... ....R2#show controllers serial 0/0/0Interface Serial0/0/0Hardware is PowerQUICC MPC860DTE V.35TX and RX clocks detectedidb at 0x81081AC4, driver data structure at 0x81084AC0SCC Registers:........接口状态的提示:R3#show int serial 0/3/0 /* 默认关闭的端口或手工关闭的端口Serial0/3/0 is administratively down, line protocol is down (disabled) ........Router#show int s0/0/0 /* 端口物理层有问题,远端接口没有开启Serial0/0/0 is down, line protocol is down (disabled)........Router#show int s0/0/0 /* 物理层工作正常,数据链路层有问题:1.时钟速率 2.端口的封装类型 3.Keeplive 周期不一样Serial0/0/0 is up, line protocol is down (disabled)........Router#show int s0/0/0 /* 物理层工作正常,数据链路层工作正常Serial0/0/0 is up, line protocol is up (connected)远程管理网络设备:设置远程登录的密码:R1#conf tR1(config)#line vty 0 4R1(config-line)#password 5678R1(config-line)#loginR1(config-line)#exitR1(config)#enable password cisco在计算机上:PC>telnet 12.1.1.1Trying 12.1.1.1 ...OpenUser Access VerificationPassword:R1>enable% Error in authentication. /* 缺少用户模式到特权模式的密码R1>enablePassword:R1#conf tEnter configuration commands, one per line. End with CNTL/Z. R1(config)#exitR1#exit /* 退出telnet会话[Connection to 12.1.1.1 closed by foreign host]PC>。