路由器的配置
上一篇 /
下一篇 2008-09-06 22:39:58
路由器的配置模式:
router> 用户模式
router>enable
router# 特权模式
router# config terminal
router(config)# 全局配置模式
router(config)#interface f0/n
router(config-if)# 接口配置模式
router(config)#interface f0/0.1
router(config-subif)# 子接口配置模式
router(config)#line console 0
router(config-line)# 链路模式
router(config)#router rip
router(config-router)# 路由模式
配置主机名:
router(config)#hostname 主机名
配置静态路由:
router(config)#ip route network mask address|
目标网段 子网掩码 下一跳地址或接口
配置默认路由:
router(config)#ip route 0.0.0.0 0.0.0.0 address (下一跳地址)
配置接口的IP地址:
config terminal
interface fa0/0
ip address ip地址 子网掩码
no shutdown
查看接口的状态:
show interface f0/0(接口)
查看路由表:
show ip route
查看接口是否开启:
show ip interface brief
配置控制台密码:
line console 0
password 密码
login
配置特权模式密码:
enable password 密码
配置加密保存的密码:
enable secret 密码
配置对所有密码加密:
service password-encryption
配置接口标识:
interface f0/n
description 描述的内容
配置console
配置超时:
line console 0
exec-timeout 0 0 (分钟 秒)
配置显示同步:
line console 0
logging synchronous
配置禁用DNS:
no domain-lookup
启用时钟频率:(接口模式)
clock rate 64000
配置路由器提示信息:
banner motd $banner 信息内容$
设置路由器时间:
router#clock set 小时:分钟:秒 日 月 年
show ip route 查看路由表
show interface 接口 查看接口状态
show running-config 查看配置
show clock 查看路由器当前时间
show version 查看路由器的硬件配置、版本、内存大小、等信息
路由器的单臂路由配置:
router(config)# interface 接口内型 槽位/接口序号.子接口序号(f0/0.1)
router(config-subif)#ip address ip地址 子网掩码
router(config-subif)#encapsolution dot1q vlan-id
路由器密码恢复:
1. 重启路由器,在60秒内按下ctrl+break键,进入rom monitor模式
2.在提示符下输入命令修改寄存器的值,重启路由器
rommon1>confreg 0*2142
rommon2>reset
3.重启路由器后进入setup模式,选择NO退到EXEC模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变,应把startup-config中的配置保存到running-config中,然后重新设置Enable密码,并把配置寄存器的值改回 0*2102
enable
copy startup-config running-config
config terminal
enable password 新密码
config-register 0*2102
4.保存当前配置到startup-config,然后重启路由器。
copy running-config startup-config
reload
rip路由协议的配置:
rip v1的配置:
启动rip:
router(config)#router rip
在启动RIP的路由器接口上的主网络号宣告出去:
router(config-router)#network network-number
查看路由表:
show ip route
查看路由协议的配置
show ip protocol
打开RIP协议调试命令
router#debug ip rip
RIP 配置步骤
1.配置路由器接口的IP地址:
config terminal
interface f0/n
ip address ip地址 子网掩码
no shutdown
2.在路由器上启动RIP进程,并宣告主网络号:
router rip
network network-number (与路由器的直连网段)
rip v2的配置:
router(config)#router rip
router(config-router)#version 2 配置使用版本二
no auto-summary 关闭自动汇总
show ip protocol 查看路由协议的配置。
相关阅读:
- 浅谈利用路由器设置防范漏洞攻击 (jiaobenbingdu, 2008-8-20)
- "ARP蜗牛"欺骗所有主机和路由器拖慢网速 (arpbingdu, 2008-8-21)
- 浅谈利用路由器设置防范漏洞攻击 (sjbwsbd, 2008-8-21)
- 超强性能:锐捷NBR2000路由器评测 (arpbingdu, 2008-8-21)
- 双WAN网吧路由器:华为ER3260有卖点 (arpbingdu, 2008-8-21)
- 飞鱼星全千兆路由器助力医疗器械行业 (arpbingdu, 2008-8-21)
- 最新“机器狗病毒”防制方法,侠诺路由器帮助你 (jiqigou2008, 2008-8-28)
- 巧妙设置路由器 保护内网安全 (蚂蚁当家, 2008-8-28)
- 利用路由器做到防止DoS洪水攻击 (DoS攻击木马, 2008-8-29)
- Cisco路由器防止DDos攻击讲解 (DoS攻击木马, 2008-8-29)
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG:
路由器