双向重发布实验

双向重发布实验

1. 实验拓扑及其要求如上:

2. 实验思路:

(1) 左边、右边拓扑分别启动RIP、OSPF协议完成路由学习

(2) 通过多点双向重发部使得RIP、OSPF协议相互共享路由

(3) R4环回修改借口类型为广播

(4) 通过路由策略,改变cost,干涉路由选路

3. 实验步骤

(1) IP配置:

R1:
int g0/0/0

ip add 12.1.1.1 24

int g0/0/1

ip add 14.1.1.1 24

int l0

ip add 1.1.1.1 24

R2:
int g0/0/0

ip add 12.1.1.2 24

int g0/0/1

ip add 23.1.1.1 24

int l0

ip add 2.2.2.2 24

R3:
int g0/0/0

ip add 23.1.1.2 24

int g0/0/1

ip add 34.1.1.2 24

int l0

ip add 3.3.3.3 24

R4:
int g0/0/0

ip add 34.1.1.1 24

int g0/0/1

ip add 14.1.1.2 24

ip add 4.4.4.4 24

(2)启动动态路由协议:

R1:rip

undo summary

network
12.0.0.0

network
1.0.0.0

network 14.0.0.0

R2:rip

version 2

undo summary

network
12.0.0.0

network
2.0.0.0

ospf 1
router-id 2.2.2.2

a 0

network
23.1.1.1 0.0.0.0

R3:ospf 1 router-id 3.3.3.3

a 0

network
23.1.1.2 0.0.0.0

network
34.1.1.2 0.0.0.0

network
3.3.3.3 0.0.0.0

R4:rip

version 2

undo summary

network
14.0.0.0

ospf 1
router-id 4.4.4.4

a 0

network
34.1.1.1 0.0.0.0

network
4.4.4.4 0.0.0.0

(3)重发部:

R2:ospf 1

import-route
rip

rip

import-route
ospf 1

R4:ospf 1

import-route
rip

rip

import-route
ospf 1

(4) 修改R4环回接口类型:

int l0

ospf network-type broadcast

(5) 路由策略:

R1:ip ip-prefix a permit 23.1.1.0 24

route-policy
ccnp permit node 10

if-match
ip-prefix a

apply
cost-type type-1

apply cost 5

route-policy
ccnp permit node 100

R3:ip ip-prefix 1 permit 12.1.1.0 24

route-policy
hcip permit node 10

if-match
ip-prefix 1

apply
cost-type type-1

apply cost 5

route-policy
hcip permit node 100