存档

‘CCNP实验报告’ 分类的存档

CCNP实验---OSPF多区域+帧中继配置

2011年9月29日 没有评论

一 实验环境:C3640-IK9O3S-M Version 12.4(10)

二 实验拓扑

ospf+fr

三 实验描述:

根据拓扑中区域的划分配置OSPF。OSPF的骨干区域在R1的loopback上。配置帧中继,R1与R2在Area 100,网络类型为点到点。R1与R3在Area 300,网络类型为NBMA,且Area 300 为NSSA类型。R2上的loopback在Area 200,且对路由进行汇总。将R3上的loopback口重分布进OSPF中。为了使全网都通,需要在Area 300上创建虚链路。

阅读全文...

分类: CCNP实验报告 标签: ,

CCNP实验---使用重分布静态路由+prefix lists,对RIP进行路由汇总

2011年9月29日 没有评论

一、实验拓扑
RIP_summary

二、实验描述

R1和R2都运行RIPv2,让双方都拥有全网拓扑。关闭RIPv2自动汇总功能。为了减少R2上的路由条目,在R1上使用 ip summary-address rip命令进行手工汇总,但是RIPv2中手工汇总所宣告的子网掩码长度只能大于等于主类路由的子网掩码长度。

这样,使用 ip summary-address rip命令肯定是行不通。怎么办呢?下面我将提供另一种方法进行RIPV2的汇总。

三、实验步骤

1 R1基本配置

interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface Loopback48
ip address 192.168.48.1 255.255.255.0
!
interface Loopback49
ip address 192.168.49.1 255.255.255.0
!
interface Loopback50
ip address 192.168.50.1 255.255.255.0
!
interface Loopback51
ip address 192.168.51.1 255.255.255.0
!
interface Serial0/0
bandwidth 64
ip address 172.16.12.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
router rip
version 2
//只让s0/0接口发送更新,减少路由器资源
passive-interface default
no passive-interface Serial0/0
network 172.16.0.0
network 192.168.48.0
network 192.168.49.0
network 192.168.50.0
network 192.168.51.0
no auto-summary
!

2 R2基本配置

interface Loopback0
ip address 172.16.2.1 255.255.255.0
!
interface Serial0/0
bandwidth 64
ip address 172.16.12.2 255.255.255.0
serial restart-delay 0
!
router rip
version 2
passive-interface Loopback0
network 172.16.0.0
no auto-summary
!

3 查看R2路由器条目

R2# show ip route rip
172.16.0.0/24 is subnetted, 4 subnets
R       172.16.1.0 [120/1] via 172.16.12.1, 00:00:29, Serial0/0
R    192.168.51.0/24 [120/1] via 172.16.12.1, 00:00:29, Serial0/0
R    192.168.50.0/24 [120/1] via 172.16.12.1, 00:00:29, Serial0/0
R    192.168.49.0/24 [120/1] via 172.16.12.1, 00:00:29, Serial0/0
R    192.168.48.0/24 [120/1] via 172.16.12.1, 00:00:29, Serial0/0

4 在R1上做路由汇总

R1(config)# interface serial 0/0
R1(config-if)# ip summary-address rip 192.168.48.0 255.255.252.0
Summary mask must be greater or equal to major net

将连续的C类路由在R1的s0/0使用ip summary address rip命令进行路由汇总时,你会发现路由器只允许汇总的子网掩码长度大于等于主类网络。
注:其它路由协议汇总并没有此限制

5 R1上进行静态路由重分布

想一下,EIGRP中汇总路由条目在汇总路由器上的下一跳接口可以指向Null0,那么我们是不是也可以在R1上创建这样一条汇总路由让它下一跳指向Null0,并进行路由重分布呢。

R1(config)# ip route 192.168.48.0 255.255.252.0 null0
R1(config)# router rip
R1(config-router)# redistribute static

6 查看R1和R2路由条目

R1# show ip route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 4 subnets
C       172.16.12.0 is directly connected, Serial0/0
C       172.16.1.0 is directly connected, Loopback0
R       172.16.2.0 [120/1] via 172.16.12.2, 00:00:27, Serial0/0
C    192.168.51.0/24 is directly connected, Loopback51
C    192.168.50.0/24 is directly connected, Loopback50
C    192.168.49.0/24 is directly connected, Loopback49
C    192.168.48.0/24 is directly connected, Loopback48
S    192.168.48.0/22 is directly connected, Null0

R2# show ip route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 4 subnets
C       172.16.12.0 is directly connected, Serial0/0
R       172.16.1.0 [120/1] via 172.16.12.1, 00:00:05, Serial0/0
C       172.16.2.0 is directly connected, Loopback0
R    192.168.51.0/24 [120/1] via 172.16.12.1, 00:00:05, Serial0/0
R    192.168.50.0/24 [120/1] via 172.16.12.1, 00:00:05, Serial0/0
R    192.168.49.0/24 [120/1] via 172.16.12.1, 00:00:05, Serial0/0
R    192.168.48.0/24 [120/1] via 172.16.12.1, 00:00:07, Serial0/0

R    192.168.48.0/22 [120/1] via 172.16.12.1, 00:00:07, Serial0/0

可以看到R1和R2都出现汇总路由,但显然4条连续C类路由还是出现在R2上
注:RIP或EIGRP这样的距离矢量路由,要求全网路由表是要同步的。

7 使用prefix list过滤路由条目

为了减少R2路由条目,只能进行路由过滤,这里使用prefix lists过滤路由条目。在R1上使用 prefix list作为分发列表来过滤loopback口上48到51的路由,并允许其他的路由包括总结路由

R1(config)# ip prefix-list RIP-OUT permit 192.168.48.0/22
R1(config)# ip prefix-list RIP-OUT deny 192.168.48.0/22 le 24
R1(config)# ip prefix-list RIP-OUT permit 0.0.0.0/0 le 32

第一条的prefix list允许总结路由,因为它使用22位的子网掩码严格匹配192.168.48.0网络

第二条的prefix list禁止子网掩码长度在22到24的192.168.48.0/22的网络块。这条也会匹配22位的总结路由。

第三条允许其它所有的路由

8 将过滤列表应用在R1的出口方向上

R1(config)# router rip
R1(config-router)# distribute-list prefix RIP-OUT out serial0/0

9 清除路由条目

R2#clear ip route *

R2# show ip route rip
172.16.0.0/24 is subnetted, 4 subnets
R       172.16.1.0 [120/1] via 172.16.12.1, 00:00:12, Serial0/0
R    192.168.48.0/22 [120/1] via 172.16.12.1, 00:00:12, Serial0/0

分类: CCNP实验报告 标签: ,

CCNP实验---多种方法影响BGP路径选择

2011年9月3日 没有评论

1、实验目的:修改attribute中的weigtht、local preference、AS-path以及MED属性值来满足BGP路径选择需求

2、实验环境:C3640-IK9O3S-M Version 12.4(10)

3、实验拓扑
BGP_attribute

4、实验描述

四个路由器运行BGP,R1与R2、R4与R3为IBGP关系,R1与R4、R2与R3为EBGP关系。四个路由器分别使用环回口建立子网,且让对方互相学习到路由信息,实现全拓扑互通。

按照正常配置,会发现R3到达R1的1.1.1.1/24网段有两种路径,第一种,R3->R4->R1,第二种,R3->R2->R1。根据BGP选路的11个原则(这里就不一一列出来了,需要的话到思科官方网站上查阅),匹配第7条---Prefer EBGP over IBGP paths,故R3会选择第二种路径,经过R2。

但是R3到达1.1.1.1/24网段使用R2作为下一跳并不是最佳路径选择,因为R3与R2是串行链路,而R1与R4是以太网线路,很明显我们应该选择带宽较大的R4作为下一跳。为了让R3选择R4作为下一跳,我们可以分别修改BGP attribute中的weigtht、local preference、AS-path以及MED值来达到目的。

5、实验步骤

A、R1基本配置

interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial0/0
ip address 12.0.0.1 255.255.255.0
!
interface FastEthernet1/0
ip address 14.0.0.1 255.255.255.0
!
router rip
version 2
network 1.0.0.0
network 12.0.0.0
!
router bgp 12
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 14.0.0.4 remote-as 34
no auto-summary

B、R2基本配置

interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/0
ip address 12.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 23.0.0.2 255.255.255.0
!
router rip
version 2
network 2.0.0.0
network 12.0.0.0
no auto-summary
!
router bgp 12
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 12
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 23.0.0.3 remote-as 34
no auto-summary

阅读全文...

分类: CCNP实验报告 标签: ,

CCNP实验---双点双向路由重分布问题

2011年8月31日 5 条评论

1、实验目的:使用RIP和OSPF进行双点双向重分布,实现网络互通和冗余备份。

2、实验环境:C3640-IK9O3S-M Version 12.4(10)

3、实验拓扑

RIP-into-OSPF

4、实验描述

该网络中,R1、R2同时运行RIP和OSPF,而R3运行OSPF,R4运行RIP,并在R3、R4上模拟两个子网。这样R3和R4并不能互相学习到对方的子网信息,这时我们需要采用路由重分布进行解决。实际上,我们只需在R1或者R2上部署路由重分布就可以让R3与R4互访子网,但我们为了保证网络的高可用性,让R1和R2同时进行路由重分布。

这时问题出现了,当进行R1和R2都进行双向重分布时,会出现R2(R1)访问4.4.4.0/24网络时先经过R3到R1(R2)最后才到达R4。而不是选择最优的路径,直接到达R4。因为在进行双点双向重分布时,R1将重分布进OSPF的4.4.4.0/24的网络传给R2,由于OSPF的AD值90>RIP的AD 值120,所以R2将使用从R1学习到4.4.4.0/24的网络。

为了解决这个问题,那么可以通过修改OSPF的AD值,当R2从R1学到的关于OSPF的AD值>RIP的AD值,即可解决这个问题

5、实验步骤:

A、R1基本配置

interface Serial0/0
ip address 14.0.0.1 255.255.255.0
!
interface Serial0/1
ip address 13.0.0.1 255.255.255.0
!

B、R2基本配置

interface Serial0/0
ip address 23.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 24.0.0.2 255.255.255.0
!

C、R3基本配置

interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0/0
ip address 23.0.0.3 255.255.255.0
!
interface Serial0/1
ip address 13.0.0.3 255.255.255.0
!

D、R4基本配置

interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Serial0/0
ip address 14.0.0.4 255.255.255.0
!
interface Serial0/1
ip address 24.0.0.4 255.255.255.0
!

E、R1路由协议配置

router ospf 1
router-id 1.1.1.1
//将RIP重分布进OSPF
redistribute rip subnets

network 13.0.0.0 0.0.0.255 area 0
!
router rip
version 2
//将OSPF重分布进RIP,并将metric值设为5。如果没有设置,metric值默认是无穷大
redistribute ospf 1 metric 5

network 14.0.0.0
no auto-summary

F、R2路由协议配置

router ospf 1
router-id 2.2.2.2
//将RIP重分布进OSPF
redistribute rip subnets

network 23.0.0.0 0.0.0.255 area 0
!
router rip
version 2
//将OSPF重分布进RIP,并将metric值设为5。如果没有设置,metric值默认是无穷大
redistribute ospf 1 metric 5

network 24.0.0.0
no auto-summary

G、R3路由协议配置

router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 13.0.0.0 0.0.0.255 area 0
network 23.0.0.0 0.0.0.255 area 0

H、R4路由协议配置

router rip
version 2
network 4.0.0.0
network 14.0.0.0
network 24.0.0.0
no auto-summary

I、查看R2路由表

3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 23.0.0.3, 00:00:12, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
O E2    4.4.4.0 [110/20] via 23.0.0.3, 00:00:12, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial0/0
24.0.0.0/24 is subnetted, 1 subnets
C       24.0.0.0 is directly connected, Serial0/1
13.0.0.0/24 is subnetted, 1 subnets
O       13.0.0.0 [110/128] via 23.0.0.3, 00:00:12, Serial0/0
14.0.0.0/24 is subnetted, 1 subnets
O E2    14.0.0.0 [110/20] via 23.0.0.3, 00:00:14, Serial0/0

可以发现4.4.4.0/24的下一跳IP地址是23.0.0.3,这就造成R2出现非最优路径选择问题

J、修改R1和R2互相学习到AD值

因为出现次路由选择是因为R1或者R2学习到的外部路由协议AD值(RIP---120)比内部路由协议(OSPF---90)(R1、R2互相学习对方的路由)值高,所以只要将R1与R2互相学习的AD值改为121(比RIP AD大就可以)

//在R1上将从R2学习的路由AD值设为121,2.2.2.2 0.0.0.0为R2的router-id
distance 121 2.2.2.2 0.0.0.0

//在R2上将从R1学习的路由AD值设为121,1.1.1.1 0.0.0.0为R1的router-id
distance 121 1.1.1.1 0.0.0.0

需要同时在R1和R2上配置,因为R1和R2谁先学习对方的路由信息是随机的。

K、修改AD值后再查看R2的路由表

3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 23.0.0.3, 00:00:16, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
R       4.4.4.0 [120/1] via 24.0.0.4, 00:00:08, Serial0/1
23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial0/0
24.0.0.0/24 is subnetted, 1 subnets
C       24.0.0.0 is directly connected, Serial0/1
13.0.0.0/24 is subnetted, 1 subnets
O       13.0.0.0 [110/128] via 23.0.0.3, 00:00:16, Serial0/0
14.0.0.0/24 is subnetted, 1 subnets
R       14.0.0.0 [120/1] via 24.0.0.4, 00:00:09, Serial0/1

问题解决了~

分类: CCNP实验报告 标签: ,