【资料整理】cisco [cli, static, rip, eigrp, ospf]

3. CLI
{
1)设定密码、接口IP地址
router>

router>enable
router#
router#configure terminal
router(config)#hostname A
A(config)#enable secret APwd
A(config)#interface fastEthernet 0/1
A(config-if)#ip address 10.1.1.1 255.255.255.0
A(config-if)#description Your Desc
A(config-if)#no shutdown
A(config-if)#line console 0
A(config-line)#password ConsolePwd
A(config-line)#login
A(config-line)#logging synchronous
A(config-line)#exec-timeout 0 0 
A(config-line)#line aux 0
A(config-line)#password AuxPwd
A(config-line)#login
A(config-line)#exit
A(config)#line vty 0 ?
<1-4> Last line number
<cr>
A(config)#line vty 0 4
A(config-line)#password TelnetPwd
A(config-line)#login
A(config-line)#exit
A(config)#no ip domain-lookup
A(config)#banner motd # This is my router #
A(config)#end
A#copy run start
A#

2)验证命令
sh run | begin interface

sh ip route
sh ip protocols
debug ip rip
sh ip route eigrp
sh ip eigrp neighbors
sh ip eigrp topology
debug eigrp packet
debug ip eigrp notification
sh ip ospf database
sh ip ospf interface
sh ip ospf neighbor
debug ip ospf packet
debug ip ospf hello
debug ip ospf adjacency 

3)静态路由
R1(config)#ip route 172.16.3.0 255.255.255.0 192.168.2.4

R1(config)#ip route 172.16.3.0 255.255.255.0 192.168.2.4 150  //管理距离AD=150
R1(config)#ip route 172.16.3.0 255.255.255.0 s0/0  //用借口代替Next hop 地址
R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.11.1 //静态路由
R1(config)#ip route 0.0.0.0 0.0.0.0 vlan1
R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0
R1(config)#ip default-network 10.1.11.1

4)动态路由
AD(Administrative Distance)

-----------------
interface  0
Static  1
EIGRP  90
IGRP  100
OSPF  110
RIP   120
EEIGRP  170
UNKNOWN 255

5) RIP
A#conf t

A(config)#router rip
A(config-router)#network 10.0.0.0

A(config-router)#version 2 //使用RIPv2
A(config-router)#passive-interface s0/0    //阻止RIP更新广播从该接口发出。

6)EIGRP
A#conf t

A(config)#router eigrp 10
A(config-router)#network 10.0.0.0

A(config-router)#maximum-paths ?   //默认支持4条链路的不等代价的负载均衡
<1-6> Number of paths
A(config-router)#maximum-hops ?    //默认最大跳计数值是100,通常不用修改
<1-255> hop count

//再发布
A(config)#router eigrp 10
A(config-router)#redistribute rip metric 10000000 20000 255 1 1500

B(config)#router rip
B(config-router)#redistribute eigrp 10 metric 1

//不连续网络
A(config)#router eigrp 100
A(config-router)#network 172.16.0.0
A(config-router)#network 10.0.0.0
A(config-router)#no auto-summary

B(config)#router eigrp 100
B(config-router)#network 172.16.0.0
B(config-router)#network 10.0.0.0
B(config-router)#no auto-summary

7)OSPF
A(config)#router ospf 1

A(config-router)#network 10.0.0.0 0.255.255.255 area 0    // = 10.0.0.0/8
A(config-router)#network 192.168.10.64 0.0.0.15 area 0    // = 192.168.10.64/28
A(config-router)#network 192.168.10.80 0.0.0.15 area 0    // = 192.168.10.80/28
A(config-router)#network 192.168.10.96 0.0.0.15 area 0    // = 192.168.10.96/28
A(config-router)#network 192.168.10.8 0.0.0.3 area 0        // = 192.168.10.8/30

#OSPF RID Loopback
A#sh ip ospf

Routing Process "ospf 10" with ID 10.1.1.1
[output cut]
A(config)#int loopback 0
A(config-if)#ip address 172.16.8.1 255.255.255.255
[reboot]
A#sh ip ospf
Routing Process "ospf 10" with ID 172.16.8.1
[output cut]

A(config)#router ospf 10
A#(config-router)router-id 172.16.8.1
A#(config-router)do clear ip ospf process
A#(config-router)do sh ospf 10
Routing Process "ospf 10" with ID 172.16.8.1
[output cut]

#OSPF priority
A(config)#int f0/0

A(config-if)#ip ospf prority 2

#配置EIGRP和OSPF汇总路由
EIGRP:
Core(config)#router eigrp 10

Core(config-router)#network 192.168.10.0
Core(config-router)#network 10.0.0.0
Core(config-router)#no auto-summary
Core(config-router)#interface ethernet 0
Core(config-if)#ip summary-address eigrp 10 192.168.10.64 255.255.255.224

OSPF:
Core(config)#router ospf 1

Core(config-router)#network 192.168.10.64 0.0.0.3 area 1
Core(config-router)#network 192.168.10.68 0.0.0.3 area 1
Core(config-router)#network 10.10.10.0 0.0.0.255 area 0
Core(config-router)#area 1 range 192.168.10.64 255.255.255. 224

}
时间: 2024-08-29 17:57:33

【资料整理】cisco [cli, static, rip, eigrp, ospf]的相关文章

RIP\EIGRP\OSPF\IPV6

RIP RIPv1 conf#router rip conf#net 0.0.0.0 conf#no auto-summary关闭自动汇总 RIPv2 增加条命令>version 2 EIGRP conf#router eigrp 任意型号 conf#no auto-summary conf#net 0.0.0.0 conf-if>ip summary-address eigrp 1 汇总IP 正掩码 接口下手动汇总 OSPF 一定要先设置环回口,route-id指向环回口,未设置route-

iOS开发资料整理

Please help me contribute to this list, for non-experience iOS developers or someone who need a come-in-handy library list to refer or to use in their projects. Fork, edit and send a PR are all things you can do! Table of Contents UI Component// UI组件

RIP、OSPF、BGP、动态路由选路协议、自治域AS

相关学习资料 tcp-ip详解卷1:协议.pdf http://www.rfc-editor.org/rfc/rfc1058.txt http://www.rfc-editor.org/rfc/rfc1388.txt http://www.rfc-editor.org/rfc/rfc1247.txt http://www.rfc-editor.org/rfc/rfc1267.txt http://www.rfc-editor.org/rfc/rfc1268.txt http://www.cnpa

综合实验DMVPN+EZVPN+Eigrp&OSPF+路由重发布

互联基本配置 !Internet: conf t int f0/0 ip add 100.1.1.1 255.255.255.0 no shut exit int f1/0 ip add 210.1.1.1 255.255.255.0 no shut exit int f1/1 ip add 200.1.1.1 255.255.255.0 no shut exit !Beijing-Center: Route# conf t int f0/0 ip add 100.1.1.2 255.255.2

POI3的资料整理

转自http://aman.cao.blog.163.com/blog/static/32951336201010823557408/ POI3的资料整理一.POI简介 Jakarta POI 是apache的子项目,目标是处理ole2对象.它提供了一组操纵Windows文档的Java API 目前比较成熟的是HSSF接口,处理MS Excel(97-2002)对象.它不象我们仅仅是用csv生成的没有格式的可以由Excel转换的东西,而是真正的Excel对象,你可以控制一些属性如sheet,ce

OSPF的rip、ospf、静态重分发及动态重分发配置

动态路由OSPF的rip.ospf.静态重分发及动态重分发实验 实验拓扑如下: R1 ip route 0.0.0.0 0.0.0.0 192.168.20.2 R2 ip route 192.168.10.0 255.255.255.0 192.168.20.1 router ospf 1 network 192.168.30.0 0.0.0.255 area 1 //宣告30网段 redistribute static subnets //重分发静态路由 R3 ip route 0.0.0.

不错的Nodejs或者JS资料整理

资料整理 Node.js官网 - 可以下载到Node.js以及查看官方文档 Node.js教程 - 菜鸟教程网 Javascript模块化编程(一):模块的写法 - 阮一峰老师的日志,很值得看 CommonJS官网 requireJS官网 - AMD规范在其中 seaJS官网 - CMD规范在其中 request模块 cheerio模块

iOS 开发学习资料整理(持续更新)

"如果说我看得比别人远些,那是因为我站在巨人们的肩膀上." ---牛顿 iOS及Mac开源项目和学习资料[超级全面] http://www.kancloud.cn/digest/ios-mac-study/84557 iOS 学习资料整理 https://segmentfault.com/a/1190000002473595#articleHeader16 iOS.mac开源项目及库 https://github.com/Tim9Liu9/TimLiu-iOS Swift语言 http

mql4资料整理

mql4资料整理 开发工具和SDK相关 http://codebase.mql4.com/cn/在该页面的左边有MeteTrader 5 和 页面 MT4的开发工具下载 开发资料1. 参考文档http://docs.mql4.com/cn/ 2.其它相关bloghttp://www.cnblogs.com/niniwzw/category/212678.htmlhttp://www.cnblogs.com/niniwzw/tag/MQL4/3.其它相关资源学习列表http://search.do