思科模拟器路由器配置命令(思科路由器怎么查看配置命令)

2024-05-08 09:11:54

一、思科模拟器路由器配置命令



思科模拟器是一个功能强大的网络仿真程序,它有很多特色的功能,能够有效的帮助到学习CCNA课程的网络初学者。今天就来为大家分享思科模拟器路由器配置命令,有需要的小伙伴一起看看吧
思科模拟器路由器配置命令:
1、路由器口令设置:
routerenable进入特权模式
router#configterminal进入全局配置模式
router(config)#hostname设置交换机的主机名
router(config)#enablesecretxxx设置特权加密口令
router(config)#enablepasswordxxb设置特权非密口令
router(config)#lineconsole0进入控制台口
router(config-line)#linevty04进入虚拟终端
router(config-line)#login要求口令验证
router(config-line)#passwordxx设置登录口令xx
router(config)#(Ctrl+z)返回特权模式
router#exit返回命令
2、路由器配置:
router(config)#ints0/0进入Serail接口
router(config-if)#noshutdown激活当前接口
router(config-if)#clockrate64000设置同步时钟
router(config-if)#ipaddress设置IP地址
router(config-if)#ipaddresssecond设置第二个IP
router(config-if)#intf0/0.1进入子接口
router(config-subif.1)#ipaddress设置子接口IP
router(config-subif.1)#encapsulationdot1q绑定vlan中继协议
router(config)#config-register0x2142跳过配置文件
router(config)#config-register0x2102正常使用配置文件
router#reload重新引导
3、路由器文件操作:
router#copyrunning-configstartup-config保存配置
router#copyrunning-configtftp保存配置到tftp
router#copystartup-configtftp开机配置存到tftp
router#copytftpflash:下传文件到flash
router#copytftpstartup-config下载配置文件
ROM状态:
Ctrl+Break进入ROM监控状态
rommonconfreg0x2142跳过配置文件
rommonconfreg0x2102恢复配置文件
rommonreset重新引导
rommoncopyxmodem:flash:从console传输文件
rommonIP_ADDRESS=10.65.1.2设置路由器IP
rommonIP_SUBNET_MASK=255.255.0.0设置路由器掩码
rommonTFTP_SERVER=10.65.1.1指定TFTP服务器IP
rommonTFTP_FILE=c2600.bin指定下载的文件
rommontftpdnld从tftp下载
rommondirflash:查看闪存内容
rommonboot引导IOS
4、静态路由:
iproute命令格式
router(config)#iproute2.0.0.0255.0.0.01.1.1.2静态路由举例
router(config)#iproute0.0.0.00.0.0.01.1.1.2默认路由举例
5、动态路由:
router(config)#iprouting启动路由转发
router(config)#routerrip启动RIP路由协议。
router(config-router)#network设置发布路由
router(config-router)#negihbor点对点帧中继用。
6、帧中继命令:
router(config)#frame-relayswitching使能帧中继交换
router(config-s0)#encapsulationframe-relay使能帧中继
router(config-s0)#fram-relaylmi-typecisco设置管理类型
router(config-s0)#frame-relayintf-typeDCE设置为DCE
router(config-s0)#frame-relaydlci16
router(config-s0)#frame-relaylocal-dlci20设置虚电路号
router(config-s0)#frame-relayinterface-dlci16
router(config)#log-adjacency-changes记录邻接变化
router(config)#ints0/0.1point-to-point设置子接口点对点
router#showframepvc显示永久虚电路
router#showframemap显示映射
7、基本访问控制列表:
router(config)#access-listpermit|deny
例1:
router(config)#access-list1denyhost10.65.1.1
router(config)#access-list1permitany
router(config)#intf0/0
router(config-if)#ipaccess-group4in
例2:
router(config)#access-list4permit10.8.1.1
router(config)#access-list4deny10.8.1.00.0.0.255
router(config)#access-list4permit10.8.0.00.0.255.255
router(config)#access-list4deny10.0.0.00.255.255.255
router(config)#access-list4permitany
router(config)#intf0/1
router(config-if)#ipaccess-group4in
扩展访问控制列表:
access-listpermit|denyicmp[type]
access-listpermit|denytcp[port]
例1:
router(config)#access-list101denyicmpany10.64.0.20.0.0.0echo
router(config)#access-list101permitipanyany
router(config)#ints0/0
router(config-if)#ipaccess-group101in
例2:
router(config)#access-list102denytcpany10.65.0.20.0.0.0eq80
router(config)#access-list102permitipanyany
router(config)#interfaces0/1
router(config-if)#ipaccess-group102out
删除访问控制例表:
router(config)#noaccess-list102
router(config-if)#noipaccess-group101in
路由器的nat配置
Router(config-if)#ipnatinside当前接口指定为内部接口
Router(config-if)#ipnatoutside当前接口指定为外部接口
Router(config)#ipnatinsidesourcestatic[p]私有IP公网IP[port]
Router(config)#ipnatinsidesourcestatic10.65.1.260.1.1.1
Router(config)#ipnatinsidesourcestatictcp10.65.1.38060.1.1.180
Router(config)#ipnatpoolp160.1.1.160.1.1.20255.255.255.0
Router(config)#ipnatinsidesourcelist1poolp1
Router(config)#ipnatinsidedestinationlist2poolp2
Router(config)#ipnatinsidesourcelist2interfaces0/0overload
Router(config)#ipnatpoolp210.65.1.210.65.1.4255.255.255.0typerotary
Router#showipnattranslation
rotary参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。
overload参数用于PAT将内部IP映射到一个公网IP不同的端口上。
外部网关协议配置
routerA(config)#routerbgp100
routerA(config-router)#network19.0.0.0
routerA(config-router)#neighbor8.1.1.2remote-as200
配置PPP验证:
RouterA(config)#usernamepassword
RouterA(config)#ints0
RouterA(config-if)#pppauthentication{chap|pap}
8、路由器子接口封装为8021Q(补充)
Encapsulationdot1q2封装类型设置为802.1Q,2是子接口号标识,这里是示范,可以随意设置。


二、思科路由器配置命令教程


enable:进入特权命令状态
configterminal:进入全局设置状态
end:退出全局设置状态
interfacetypeslot/number:进入端口设置状态
exit:退出局部设置状态
hostnamename:设置交换机名
showversion:查看版本及引导信息
showrunning-config:查看运行设置
showvlan:查看VLAN设置
showinterfacetypeslot/number:显示端口信息
pinghostname|IPaddress:网络侦测
1、进入特权模式
Switchenable(进入特权模式)
Switch#
2、进入全局配置与返回模式
Switchenable
Switch#configterminal(进入全局配置模式)
Switch(config)#exit(退回上一级模式)
(cisco)路由器动态路由协议命令
3、RIP协议
router:指定使用RIP协议
version:指定与该路由器相连的网络
showiproute:查看路由表信息
showiprouterip:查看RIP协议路由信息
R1:ipadd192.168.1.254255.255.255.0
clockrate500000/指定该端口时钟频率
bankwidth64/指定相应接口的网络带宽单位KB
iproutting
routerigrp100/指定igrp协议,100为当前网络环境
network192.168.1.0/声明网络192.168.1.0/24
network192.168.2.0
network192.168.3.0
4、ospf协议
routeospfprocess-id指定使用OSPF协议
networkaddresswildcard-maskareaarea-id指定与该路由器相连的网络
showiproute查看路由表信息
showiprouteospf查看OSPF协议路由信息
5、EIGRP协议
routeeigrpprocess-id指定使用EIGRP协议
networknetwork指定与该路由器相连的网络
noauto-summary关闭EIGRP协议自动汇总功能
R1:routereigrp200
network192.168.1.2540.0.0.1
network192.168.2.2540.0.0.1
noauto-summary


三、如何查看思科路由器的路由表信息


思科路由器查看路由表的命令为Router #show ip route。

在路由器全局配置模式下,输入show ip route命令,这时屏幕会出现许多的路由表的详细信息,例如目的地址、子网掩码 、网关、明文显示的密码、PC端口的一些详细信息等。

扩展资料

思科常用操作命令

1、router>enable ;进入特权模式。

2、router#config terminal ;进入全局配置模式。

3、router(config)#hostname ;设置交换机的主机名。

4、router(config)#enable secret xxx ;设置特权加密口令。

5、router(config)#enable password xxb ;设置特权非密口令。

6、router(config)#line console 0 ;进入控制台口。

7、查看接口状态命令 Router #show interface f0/0.

8、查看基本配置命令 Router #show running-config。

9、查看版本信息命令 Router #show version。

10、查看路由器当前时间 命令Router #show clock。

11、链路状态数据库命令 Router #show ip ospf database。

12、空路由表 命令Router #clear ip route *。

13、启用调试功能HSRP 命令Router #debug standby。

14、打开RIP协议调试命令 Router #debug ip rip。