导航:首页 > 程序命令 > cisco路由器命令配置

cisco路由器命令配置

发布时间:2022-06-23 15:00:16

A. 在cisco路由器上设置TELNET的命令

在cisco路由器上设置TELNET的命令的操作方法和步骤如下:

1、第一步,在思科软件中放置两个路由器。
然后在路由器下方输入名称和IP地址,如下图所示,然后进入下一步。

B. 思科路由器基础配置命令

基础配置命令如下
一、1.router(config)#router rip 启动rip进程
2.router(conifg-router)#network 172.17.0.0指定rip协议的主网络
3.router(config-router)#passive-interface f0/1把f0/1配置成passive端口
4.router(config-router)#neighbor 172.17.12.67 以单波方式通告rip更新给路由器
5.router(config-if)#ip address 192.168.83.244 255.255.255.0 主ip地址
router(config-if)#ip address 10.33.55.1 255.255.255.0 secondary辅助ip地址
二、1.router(config-router)#version 2将rip配置成版本2
2.router(config-ip)#ip rip send version 1只发rip 1数据包
router(config-ip)#ip rip receive version 2只接收rip 2数据包
3.router(config-router)#no auto-summary 关闭汇总功能
4.router(config-if)#no ip split-horizon关闭水平分割
5.router#show ip ospf database router 192.168.30.10显示路由器LSA通告
router#show ip ospf database network 192.168.17.18显示网络LSA通告
router#show ip ospf database summary 172.16.121.0显示网络汇总LSA通告
router#show ip ospf database asbr-summary显示ASBR汇总LSA通告
router#show ip ospf database external 10.83.10.0显示自主系统外部LSA通告
router#show ip ospf database nssa-external显示NSSA外部LSA通告
三、1.router(config)#router ospf 10配置ospf进程id
2.router(config)#interface loopback0
router(config-if)#ip address 192.168.10.1 255.255.255.0配置loopback0接口
3.router(config-router)#area 1 stub 配置stub区域
4.router(config-router)#area 1 stub no-summary配置totally stubby区域
5.router(config-router)#area 1 nssa配置nssa区域
6.router(config-router)#area 25 range 172.16.0.0 255.240.0.0 配置地址汇总
7.router(config-router)#area 100 virtual-link 192.168.100.33 配置虚链路
四、1.router(config)#standby 172 ip 172.16.10.254加入备份组172 指定虚拟IP 地址
2.router(config-if)#standby 47 priority 150配置HSRP的优先级150
3.router(config-if)#standby 47 preempt 配置HSRP的占先权
4.router(config-if)#standby 47 ip time 2 9 2表示HELLO时间,9表示保持时间
5.router(config)#interface s0
6.router(config-if)#standby 47 track s0 100配置跟踪端口s0并在端口down时减少100
7.router#show standby brief 查看HSRP的状态
8.router#no debuge all关闭调试功能
五、1.router(config-if)#ip access-group 1 in 访问列表的入
router(config-if)#ip access-group 1 out访问列表的出
2.router(config)#access-list 1 premit 192.168.10.0 0.0.0.255 允许192.168.10.0的网段通过
router(config)#access-list 1 deny 192.168.10.0 2.0.0.255 拒绝192.168.10.2的主机通过
3.router(config)#access-list 1 premit any ;any表示0.0.0.0 255.255.255.255
router(config)#access-list 1 premit host 172.30.16.29 ;host表示0.0.0.0
4.router(config)#access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 21拒绝来自172.16.4.0去往172.16.3.0的FTP流量
5.router(config)#ip access-list extended cisco创建名为cisco的命名访问控制列表
六、静态地址转换1.配置外部端口的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置内部端口的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.静态地址转换
Router(config)#ip nat inside source static 192.168.100.2 61.159.62.130
4.在内部和外部端口上启用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside
七、动态NAT配置1.配置外部端口的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置内部端口的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.定义内部网络允许访问外部网络
Router(config)#access-list 1 permit 192.168.100.0 0.0.0.255
4.定义合法的IP地址池
Router(config)#ip nat pool chen 61.159.62.129 61.159.62.190 netmask 255.255.255.248
5.实现网络地址转换
Router(config)#ip nat inside source list 1 pool chen
6.在内部和外部端口上启用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside
八、PAT的配置1.配置外部端口的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置内部端口的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.定义内部网络允许访问外部网络
Router(config)#access-list 1 permit 192.168.100.0 0.0.0.255
4.定义合法的IP地址池
Router(config)#ip nat pool chen 61.159.62.129 61.159.62.190 netmask 255.255.255.248
5.实现复用IP地址转换
Router(config)#ip nat inside source list 1 pool chen overload
6.在内部和外部端口上启用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside

C. 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 阻止会话退出

(3)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

D. 求思科路由器的全部配置命令

思科路由器的全部配置命令:
1、Exec commands:
<1-99> 恢复一个会话
bfe 手工应急模式设置
clear 复位功能
clock 管理系统时钟
configure 进入设置模式
connect 打开一个终端
从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上
debug 调试功能
disable 退出优先命令状态
disconnect 断开一个网络连接
enable 进入优先命令状态
erase 擦除快闪内存
exit 退出exce模式
help 交互帮助系统的描述
lat 打开一个本地传输连接
lock 锁定终端
login 以一个用户名登录
logout 退出终端
mbranch 向树形下端分支跟踪多路由广播
mrbranch 向树形上端分支跟踪反向多路由广播
name-connection 给一个存在的网络连接命名
no 关闭调试功能
pad 打开X.29 PAD连接
ping 发送回显信息
ppp 开始点到点的连接协议
reload 停机并执行冷启动
resume 恢复一个活动的网络连接
rlogin 打开远程注册连接
rsh 执行一个远端命令
send 发送信息到另外的终端行
setup 运行setup命令
show 显示正在运行系统信息
slip 开始SLIP协议
start-chat 在命令行上执行对话描述
systat 显示终端行的信息
telnet 远程登录
terminal 终端行参数
test 测试子系统内存和端口
tn3270 打开一个tin3270连接
trace 跟踪路由到目的地
undebug 退出调试功能
verify 验证检查闪烁文件的总数
where 显示活动的连接
which-route 执行OSI路由表查找并显示结果
write 把正在运行的设置写入内存、网络、或终端
x3 在PAD上设置X.3参数
xremote 进入xremote模式

2、#show ?

access-expression 显示访问控制表达式
access-lists 显示访问控制表
apollo Apollo 网络信息
appletalk Apple Talk 信息
arap 显示Appletalk 远端通道统计
arp 地址解析协议表
async 访问路由接口的终端行上的信息
bridge 前向网络数据库
buffers 缓冲池统计
clns CLNS网络信息
clock 显示系统时钟
cmns 连接模式网络服务信息
compress 显示压缩状态
configuration 非易失性内存的内容
controllers 端口控制状态
debugging 调试选项状态
decnet DEC网络信息
dialer 拨号参数和统计
dnsix 显示Dnsix/DMPP信息
entry 排队终端入口
extended 扩展端口信息
flash 系统闪烁信息
flh-log 闪烁装载帮助日志缓冲区
frame-relay 帧中继信息
history 显示对话层历史命令
hosts IP域名,查找方式,名字服务,主机表
interfaces 端口状态和设置
ip IP信息
ipx Novell IPX信息
isis IS-IS路由信息
keymap 终端键盘映射
lat DEC LAT信息
line 终端行信息
llc2 IBM LLC2 环路信息
lnm IBM 局网管理
local-ack 本地认知虚环路
memory 内存统计
netbios-cache NetBios命名缓冲存贮器内存
node 显示已知LAT节点
ntp 网络时间协议
processes 活动进程统计
protocols 活动网络路由协议
queue 显示队列内容
queueing 显示队列设置
registry 功能注册信息
rhosts 远程主机文件
rif RIF存贮器入口
route-map 路由器信息
sdlle 显示sdlc-llc2转换信息
services 已知LAT服务
sessions 远程连接信息
smds SMDS信息
source-bridge 源网桥参数和统计
spanning-tree 跨越树形拓朴
stacks 进程堆栈应用
standby 热支持协议信息
stun STUN状态和设置
subsystem 显示子系统
tcp TCP连接状态
terminal 显示终端设置
tn3270 TN3270 设置
translate 协议转换信息
ttycap 终端容易表
users 显示终端行的信息
version 系统硬、软件状态
vines VINES信息
whoami 当前终端行信息
x25 X.25信息
xns XNS信息
xermote Xremote统计

3、#config ?

Memory 从非易失性内存设置
Network 从TFTP网络主机设置
Overwrite-network 从TFTP网络主机设置覆盖非易失性内存
Terminal 从终端设置

4、Configure commads:

Access-list 增加一个访问控制域
Apollo Apollo全局设置命令
appletalk Appletalk 全局设置命令
arap Appletalk远程进出协议
arp 设置一个静态ARP入口
async-bootp 修改系统启动参数
autonomous-system 本地所拥有的特殊自治系统成员
banner 定义注册显示信息
boot 修改系统启动时参数
bridge 透明网桥
buffers 调整系统缓冲池参数
busy-message 定义当连接主机失败时显示信息
chat-script 定义一个调制解调器对话文本
clns 全局CLNS设置子命令
clock 设置时间时钟
config-register 定义设置寄存器
decnet 全局DEC网络设置子命令
default-value 缺省字符位值
dialer-list 创建一个拨号清单入口
dnsix-nat 为审计提供DMDM服务
enable 修改优先命令口令
end 从设置模式退出
exit 从设置模式退出
frame-relay 全局帧中继设置命令
help 交互帮助系统的描述
hostname 设置系统网络名
iterface 选择设置的端口
ip 全局地址设置子命令
ipx Novell/IPX全局设置命令
keymap 定义一个新的键盘映射
lat DEC本地传输协议
line 设置终端行
lnm IBM局网管理
locaddr-priority-list 在LU地址上建立优先队列
logging 修改注册(设备)信息
login-string 定义主机指定的注册字符串
map-class 设置静态表类
map-list 设置静态表清单
menu 定义用户接口菜单
mop 设置DEC MOP服务器
netbios NETBIOS通道控制过滤
no 否定一个命令或改为缺省设置
ntp 设置NTP
priority-list 建立特权列表
prompt 设置系统提示符
queue-list 建立常规队列列表
rcmd 远程命令设置命令
rcp-enable 打开Rep服务
rif 源路由进程
router-map 建立路由表或进入路由表命令模式
router 打开一个路由进程
rsh-enable 打开一个RSH服务
sap-priority-list 在SAP或MAC地址上建立一个优先队列
service 修改网络基本服务
snmp-server 修改SNMP参数
state-machine 定义一个TCP分配状态的机器
stun STUN全局设置命令
tacacs-server 修改TACACS队列参数
terminal-queue 终端队列命令
tftp-server 为网络装载请求提供TFTP服务
tn3270 tn3270设置命令
translate 解释全局设置命令
username 建立一个用户名及其权限
vines VINES全局设置命令
x25 X.25 的第三级
x29 X.29 命令
xns XNS 全局设置命令
xremote 设置Xremote

5、(config)#ip

Global IP configuration subcommands:
Accounting-list 选择保存IP记帐信息的主机
Accounting-threshold 设置记帐入口的最大数
accounting-transits 设置通过入口的最大数
alias TCP端口的IP地址取别名
as-path BGP自治系统路径过滤
cache-invalidate-delay 延迟IP路由存贮池的无效
classless 跟随无类前向路由规则
default-network 标志网络作为缺省网关候选
default-gateway 指定缺省网(如果没有路由IP)
domain-list 完成无资格主机的域名
domain-lookup 打开IP域名服务系统主机转换
domain-name 定义缺省域名
forward-protocol 控制前向的、物理的、直接的IP广播
host 为IP主机表增加一个入口
host-routing 打开基于主机的路由(代理ARP和再定向)
hp-host 打开HP代理探测服务
mobile-host 移动主机数据库
multicast-routing 打开前向IP
name-server 指定所用名字服务器的地址
ospf-name-lookup 把OSPF路由作为DNS名显示
pim PIM 全局命令
route 建立静态路由
routing 打开IP路由
security 指定系统安全信息
source-route 根据源路由头的选择处理包
subnet-zero 允许子网0子网
tcp 全局TCP参数

E. Cisco路由器配置命令

R1(config)#access-list 1 permit 1.1.1.0 0.0.0.255
R1(config)#access-list 2 permit 2.2.2.0 0.0.0.255

允许目的地址为 1.1.1.1-255 通过路由器,
允许目的地址为 2.2.2.1-255 通过路由器,

router map 是路由地图,说明了路由该走的路径,有强制性的意味里面.也有均衡负载的意味,但不是自动的。

F. 思科路由器查看配置的命令是什么

思科路由器查看配置的命令是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 ;设置登录口令xx

router(config)#(Ctrl+z) ; 返回特权模式

router#exit ;返回命令

(6)cisco路由器命令配置扩展阅读:

路由器配置:

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 ;设置第二个IP

router(config-if)#int f0/0.1 ;进入子接口

router(config-subif.1)#ip address ;设置子接口IP

router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议

router(config)#config-register 0x2142 ;跳过配置文件

router(config)#config-register 0x2102 ;正常使用配置文件

router#reload ;重新引导

参考资料来源:Cisco-思科路由器

G. 思科的路由器命令怎么使用

H. cisco路由器配置

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 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地址:

switch(config)#interface vlan 1 ;进入vlan 1switch(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# running-config startup-config ;保存配置router# running-config tftp ;保存配置到tftprouter# startup-config tftp ;开机配置存到tftprouter# tftp flash: ;下传文件到flashrouter# tftp startup-config;下载配置文件ROM状态:
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset ;重新引导
rommon> xmodem: flash: ;从console传输文件

rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>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路由协议。router(config-router)#network ;设置发布路由router(config-router)#negihbor ;点对点帧中继用。

I. CISCO路由器配置命令求教~~~

这两个口启用的是hsrp协议,即热备份路由协议,一旦主动路由器出现故障,HSRP 将激活备份路由器(Standby Routers)取代主动路由器。

interface FastEthernet0/2/1
ip address 10.34.5.2 255.255.255.0 //端口的地址和掩码配置
standby 2 ip 10.34.5.1 //在端口配置下,启用 HSRP 功能,并设置虚拟 IP 地址 ,组号为2
standby 2 preempt //置允许权值高于该hsrp组的其它路由器成为主路由器。
standby 2 track 1 decrement 10 //该设置表示如果所监测的端口出现故障,则也进行路由器的切换。可以跟踪多外端口

-----------------------------------------------------
interface FastEthernet0/2/5
ip address 10.34.241.1 255.255.255.0
ip nat inside //向内的nat地址转换
ip virtual-reassembly //IP虚拟分片重组功能开启
standby 1 ip 10.34.241.3 //组号为1的hsrp功能开启
standby 1 preempt
standby 1 track 1 decrement 10

J. cisco路由器配置命令有哪些

早年配置命令就已经十几万条了,现在至少有二十几万条,你问那些?难道是二十几万条全部给你罗列一遍?

阅读全文

与cisco路由器命令配置相关的资料

热点内容
oppo手机如何缩放文件夹 浏览:788
编译和汇编是一样的吗 浏览:267
谷梁传pdf 浏览:701
单片机的灌电流和拉电流 浏览:890
一汽金融车辆解压在哪里办成都 浏览:182
如何访问到外国服务器 浏览:755
怎么能彻底删除安卓相册照片 浏览:405
在线htmltopdf 浏览:306
python大数据范例 浏览:20
应用加密开启会耗电吗 浏览:598
安卓手机怎么设置抖音来电铃声 浏览:182
广达服务器主板开机怎么变快 浏览:1002
程序员游戏异常 浏览:71
java高并发程序设计pdf 浏览:281
zipfile编译 浏览:999
如何防止程序员接触核心代码 浏览:862
我的世界村民命令 浏览:635
服务器的kb是什么意思 浏览:293
云手机服务器的架构 浏览:56
别克君威发动机压缩比 浏览:474