设为首页收藏本站language 语言切换
查看: 1868|回复: 3
收起左侧

[分享] 路由的基本配置

[复制链接]
发表于 2011-10-21 17:20:54 | 显示全部楼层 |阅读模式
     相信作为cisco的老鸟们,每个人手上都应该有个路由的基本配置。你说你没有,打死我也我不信…………嘿嘿,这里是我的基础配置,无论新手还是老鸟们都来围观下哈,能顺便指教下当然更好………………

en
conf t
ip domain-name hxp.com                           //  域名,配置SSH必须滴
no ip domain-lookup                               //无域名查找,新手最容易忘掉的地方
user admin passw hxp                           
  //本地用户数据库,在SSH中要加上特权等级  : user admin  privilege  _  passw hxp   
clock timezone bj 8                                  //时区
service password-encryption                            // cisco 自带密码加密
service timestamps log datetime msec              //毫秒时间戳
service timestamps debug datetime msec
banner motd &                                                //公告板
***********************
www.hxp.com
***********************
&
enable secret hxp                                           //特权模式密码
lin console 0                                                     //console 配置
password hxp                                                   //线路验证
exec-timeout 5 30                                              //超时时间
logging synchronous                                           //同步
login                                                                  //一定不能忘掉的login
line vty 0 15                                                       //vty配置
exec-timeout 6 30
logging synchronous
login local                                                         //本地验证
exit
hostname                                                       //主机名


配完后就可以配置接口、路由等其他的设置了。
如果要配置SSH,需要加上一条R1(config)#crypto key generate rsa   ____(生成密钥512/1024位)
生成用户数据库,带特权等级的:R1(config)#user admin  privilege  _  passw hxp
然后在vty里面配置就可以了:R1(config-line)#transport input all
                                            R1(config-line)#transport input SSH


显示如下:
R1#SHOW R
Building configuration...

Current configuration : 845 bytes
!
version 12.4
service timestamps log datetime msec
service timestamps debug datetime msec
service password-encryption
!
hostname R1
!
!
!
enable secret 5 $1$mERr$HK5fiXjXqVkopU2cF6W7Z1
!
!
!
clock timezone bj 8
!
!
!
!
username admin password 7 0829545E
!
!
!
!
!
no ip domain-lookup
ip domain-name hxp.com
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
banner motd ^C
***********************
www.hxp.com
***********************
^C
!
!
!
!
line con 0
exec-timeout 5 30
password 7 0829545E
logging synchronous
login
line vty 0 4
exec-timeout 6 30
logging synchronous
login local
line vty 5 15
exec-timeout 6 30
logging synchronous
login local
!
!
来自于http://www.netconfed.com
发表于 2012-3-21 07:36:49 | 显示全部楼层
谢谢楼主贡献
沙发 2012-3-21 07:36:49 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2020-7-27 19:36:52 | 显示全部楼层
感谢楼主分享
地板 2020-7-27 19:36:52 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-10 14:26 , Processed in 0.083907 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表