ket 分配 地址 bsp 创建 nds mis tracer ria
动态路由的配置记录基于cisco模拟器 Packet Tracer Student 6.2 ,一下是实践以及具体内容
拓扑结构基本如图所示:
RIP协议现有两个版本,v1和v2 ,
命令 | 功能 | 命令 | 功能 |
router rip | 指定使用RIP协议 | show ip route | 查看路由表信息 |
version {1|2} | 指定RIP版本 | show ip route rip | 查看RIP协议的路由信息 |
network network | 指定改路由器相连的网络 | show ip protocol | 查看路由协议的配置信息 |
两个版本的区别在于:
v1 不支持变长的子网掩码, 同时会将IP地址自动汇总
v2 支持变长的子网掩码,同时能够关闭自动汇总
- Router(config)#router rip
- Router(config-router)#version 1 //选择rip的版本,默认为 1 版本
- Router(config-router)#do show ip route //查看直连网络
- Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
- D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
- N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
- E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
- i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
- * - candidate default, U - per-user static route, o - ODR
- P - periodic downloaded static route
- Gateway of last resort is not set
- 1.0.0.0/24 is subnetted, 1 subnets
- C 1.1.1.0 is directly connected, FastEthernet0/0
- 192.168.1.0/30 is subnetted, 1 subnets
- C 192.168.1.0 is directly connected, Serial0/0/0
- Router(config-router)#network 1.1.1.0 ? //从此处能够发现ripv1 的宣告规则
- <cr>
- Router(config-router)#network 1.1.1.0
- Router(config-router)#network 192.168.1.0
通过ripv1来宣告路由方法如上
- Router(config)#router rip
- Router(config-router)#version 2 //选择rip 2版本
- Router(config-router)#no auto-summary //关闭自动汇总
- Router(config-router)#network 1.1.1.0 ?
- <cr>
- Router(config-router)#network 1.1.1.0
- Router(config-router)#network 192.168.1.0
RIPv2 与RIPv1 配置方法均较为简单,但要注意最多支持15个路由器
除此之外有些共通的命令
- Router(config)#int loopback 0 //采用回环接口,相当于建立虚拟主机
- Router(config-if)#
- %LINK-5-CHANGED: Interface Loopback0, changed state to up
- %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
- Router(config-if)#ip address 15.15.15.15 255.255.255.255
- Router(config-if)#do show ip route
- Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
- D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
- N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
- E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
- i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
- * - candidate default, U - per-user static route, o - ODR
- P - periodic downloaded static route
- Gateway of last resort is not set
- 1.0.0.0/24 is subnetted, 1 subnets
- C 1.1.1.0 is directly connected, FastEthernet0/0
- 15.0.0.0/32 is subnetted, 1 subnets
- C 15.15.15.15 is directly connected, Loopback0 //在这里可以看到创建的回环地址
- 192.168.1.0/30 is subnetted, 1 subnets
- C 192.168.1.0 is directly connected, Serial0/0/0
- Router(config -
- if)#do debug ip rip RIP protocol debugging is on
- Router(config -
- if)#do no debug ip rip RIP protocol debugging is off
passive-interface 禁止端口路由信息更新
- Router(config - router)#passive - interface fastEthernet 0 / 0
- Router(config-router)#default-information originate
- Router(config - router)#redistribute ? connected Connected eigrp Enhanced Interior Gateway Routing Protocol(EIGRP) //EIGRP协议
- metric Metric
- for redistributed routes //重新分配路由的度量
- ospf Open Shortest Path First(OSPF) //OSPF协议
- rip Routing Information Protocol(RIP) //RIP协议
- static Static routes //静态路由
- Router(config-router)#redistribute ospf ?
- <1-65535> Process ID
- Router(config-router)#redistribute ospf 1
- Router(config-router)#redistribute eigrp ?
- <1-65535> Autonomous system number
- Router(config-router)#redistribute eigrp 1
命令 | 功能 |
router ospfprocess-id | 指定使用OSPF协议 |
networkaddress wildcard-mask areaarea-id | 指定与该路由器相连的网段 |
show ip route | 查看路由表信息 |
show ip route ospf |
查看OSPF协议的路由信息 |
- Router(config)#router ospf ?
- <1-65535> Process ID
- Router(config)#router ospf 1 //使用OSPF协议,并且创建进程 ID=1
- Router(config-router)#do show ip route
- Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
- D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
- N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
- E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
- i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
- * - candidate default, U - per-user static route, o - ODR
- P - periodic downloaded static route
- Gateway of last resort is not set
- 1.0.0.0/24 is subnetted, 1 subnets
- C 1.1.1.0 is directly connected, FastEthernet0/0
- 192.168.1.0/30 is subnetted, 1 subnets
- C 192.168.1.0 is directly connected, Serial0/0/0
- Router(config-router)#network 1.1.1.0 255.255.255.0 area 0 //在OSPF 中区分区域 0区域称为主干区域 使用并配置多个区域可减小链路状态数据
- 22 Router(config - router)#network 192.168.1.0 255.255.255.252 area 0
- Router(config-router)#router ospf 1
- Router(config-router)#redistribute r
- Router(config-router)#redistribute rip ?
- metric Metric for redistributed routes
- metric-type OSPF/IS-IS exterior metric type for redistributed routes //
- subnets Consider subnets for redistribution into OSPF//考虑将子网重新分配到OSPF中
- tag Set tag for routes redistributed into OSPF//为路由重新分配到OSPF的路由设置标记
- <cr>
- Router(config-router)#redistribute rip subnets
- Router(config-router)#REdistribute Eigrp ?
- <1-65535> Autonomous system number
- Router(config-router)#REdistribute Eigrp 1 ?
- metric Metric for redistributed routes
- metric-type OSPF/IS-IS exterior metric type for redistributed routes
- subnets Consider subnets for redistribution into OSPF
- tag Set tag for routes redistributed into OSPF
- <cr>
- Router(config-router)#REdistribute Eigrp 1 Subnets
- Router(config-if)#bandwidth ?//修改开销值
- <1-10000000> Bandwidth in kilobits
- Router(config-if)#ip ospf hello-interval ? //修改hello包间隔时间
- <1-65535> Seconds
- Router(config-if)#ip ospf cost ?//指定接口开销
- <1-65535> Cost
命令 | 功能 |
router eigrp autonomous-system | 指定使用IGRP协议 |
networknetwork | 指定与该路由器相连的网络 |
show ip route | 查看路由表信息 |
show ip route eigrp | 查看IGRP协议的路由信息 |
- Router(config)#router eigrp ?
- <1-65535> Autonomous system number
- Router(config)#router eigrp 1
- Router(config-router)#no auto-summary
- Router(config-router)#network 1.1.1.0
- Router(config-router)#network 192.168.1.0
- Router(config-if)#ip summary-address ?
- eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
- Router(config-if)#ip summary-address eigrp ?
- <1-65535> Autonomous system number
- Router(config-if)#ip summary-address eigrp 1 ?
- A.B.C.D IP address
- //手动总结
- Router(config-if)#ip hello-interval ?
- eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
- Router(config-if)#ip hello-interval e
- Router(config-if)#ip hello-interval eigrp ?
- <1-65535> Autonomous system number
- Router(config-if)#ip hello-interval eigrp 1 ?
- <1-65535> Seconds between hello transmissions
- 置hello 间隔和保留时间
- Router(config-router)#redistribute ospf 1 ?
- match Redistribution of OSPF routes //OSPF路由重分布
- metric Metric for redistributed routes//重新分配路由度量
- <cr>
- Router(config-router)#redistribute ospf 1 metric ?
- <1-4294967295> Bandwidth metric in Kbits per second//带宽度量
- Router(config-router)#redistribute ospf 1 metric 64 ?
- <0-4294967295> EIGRP delay metric, in 10 microsecond units//延迟
- Router(config-router)#redistribute ospf 1 metric 64 10 ?
- <0-255> EIGRP reliability metric where 255 is 100% reliable //可靠性
- Router(config-router)#redistribute ospf 1 metric 64 10 255 ?
- <1-255> EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded//有效带宽加载
- Router(config-router)#redistribute ospf 1 metric 64 10 255 1 ?
- <1-65535> EIGRP MTU of the path//MTU路径
- Router(config-router)#redistribute ospf 1 metric 64 10 255 1 1
关于简单动态路由协议配置,注入,路由重分布
ket 分配 地址 bsp 创建 nds mis tracer ria
原文:http://www.cnblogs.com/bigxBoss/p/7911988.html
来源: http://www.bubuko.com/infodetail-2410608.html