双点双向引入和路由策略

双点双向引入
实验介绍
1.1.1 关于本实验
本实验主要介绍了路由选择工具route-policy和IP-Prefix的配置,路由引入的配置以及路由策略的配置方法及注意事项。
1.1.2 实验目的
 掌握路由选择工具的配置方法,路由策略与策略路由的配置与注意事项。
 解决双点双向路由引入的环路问题。
1.1.3 实验组网介绍
双点双向引入和路由策略

图1-1 路由引入与控制配置实验拓扑图
1.1.4 实验规划
某公司网络如实验拓扑所示,公司总部运行OSPF协议,分部运行ISIS协议,总部和分部中各有若干业务网段,其中奇数网段为业务A网段,偶数网段为业务B网段,请根据如下需求对网络进行部署:
1)按照拓扑分别搭建总部OSPF网络与分部ISIS网络,并尽量减少OSPF Area 1中设备需要维护的路由条目(不做路由聚合);
2)网络管理员在R1上将ISIS路由引入到OSPF中,在R2上将OSPF路由引入到ISIS中,并通过适当调测使得业务网段间能够正常通信;
3)为了避免由于总部与分部网络间单点故障而造成的断网,网络管理员在R1、R2上部署双向引入,并通过适当调测使得业务网段间能够正常通信;
4)在总部网络中,使得总部网段A和B业务各使用一条链路以实现负载(不能使用路由策略);
IP地址规划:
使用ab.1.1.a/30 ab.1.1.b/30 的方法配置路由器两端的地址
1.2 实验任务配置
1.2.1 配置思路
1.配置各接口IP
2.配置OSPF
3.配置ISIS
4.配置任务一
5.配置任务二
6.配置任务三
7.配置任务四
1.2.2 配置步骤
步骤 1 配置各接口IP地址
#配置R5
system-view
sysname R5
interface Serial 1/0/0
ip address 45.1.1.1 30
interface Serial 1/0/1
ip address 45.2.2.1 30
interface LoopBack 0
ip address 5.5.5.5 32
interface LoopBack 1
ip address 172.16.0.1 24
interface LoopBack 2
ip address 172.16.1.1 24
interface LoopBack 3
ip address 172.16.2.1 24
interface LoopBack 4
ip address 172.16.3.1 24
#配置R4
system-view
sysname R4
interface Serial 1/0/0
ip address 45.1.1.2 30

interface Serial 1/0/1
ip address 45.2.2.2 30
interface LoopBack 0
ip address 4.4.4.4 32
interface GigabitEthernet 0/0/0
ip address 14.1.1.1 30
interface GigabitEthernet 0/0/1
ip address 24.1.1.1 30
#配置R1
system-view
sysname R1
interface GigabitEthernet 0/0/1
ip address 14.1.1.2 30
interface GigabitEthernet 0/0/0
ip address 13.1.1.1 30
interface LoopBack 0
ip address 1.1.1.1 32
#配置R2
system-view
sysname R2
interface GigabitEthernet 0/0/1
ip address 24.1.1.2 30
interface GigabitEthernet 0/0/0
ip address 23.1.1.1 30
interface LoopBack 0
ip address 2.2.2.2 32
#配置R3
system-view
sysname R3
interface GigabitEthernet 0/0/1
ip address 23.1.1.2 30
interface GigabitEthernet 0/0/0
ip address 13.1.1.2 30
interface LoopBack 0
ip address 3.3.3.3 32
interface LoopBack 1
ip address 192.168.1.1 24
interface LoopBack 2
ip address 192.168.2.1 24
interface LoopBack 3
ip address 192.168.3.1 24
interface LoopBack 4
ip address 192.168.4.1 24
步骤 2 配置OSPF
#配置R5
ospf 1 router-id 5.5.5.5
area 1
network 5.5.5.5 0.0.0.0
network 45.1.1.0 0.0.0.3
network 45.2.2.0 0.0.0.3
import-route direct
#配置R4
ospf 1 router-id 4.4.4.4
area 1
network 45.1.1.0 0.0.0.3
network 45.2.2.0 0.0.0.3
area 0
network 14.1.1.0 0.0.0.3
network 24.1.1.0 0.0.0.3
network 4.4.4.4 0.0.0.0
#配置R1
ospf 1 router-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 14.1.1.0 0.0.0.3
#配置R2
ospf 1 router-id 2.2.2.2
area 0
network 2.2.2.2 0.0.0.0
network 24.1.1.0 0.0.0.3
步骤 3 配置ISIS
#配置R1
isis 1
network-entity 49.0010.0100.1001.00
is-level level-2
cost-style wide
interface GigabitEthernet 0/0/0
isis enable 1
interface LoopBack 0
isis enable 1
#配置R2
isis 1
network-entity 49.0020.0200.2002.00
is-level level-2
cost-style wide
interface GigabitEthernet 0/0/0
isis enable 1
interface LoopBack 0
isis enable 1
#配置R3
isis 1
network-entity 49.0030.0300.3003.00
is-level level-2
cost-style wide
import-route direct
interface GigabitEthernet 0/0/0
isis enable 1
interface GigabitEthernet 0/0/1
isis enable 1
interface LoopBack 0
isis enable 1
步骤 4 按照拓扑分别搭建总部 OSPF 网络与分部 ISIS 网络,并尽量减少 OSPF Area 1 中设备需要维护的路由条目(不做路由聚合)
#配置R4
ospf 1
area 1
nssa no-summary
#配置R5
ospf 1
area 1
nssa
步骤 5 网络管理员在 R1 上将 ISIS 路由引入到 OSPF 中,在 R2 上将 OSPF 路由引入到 ISIS 中,并通过适当调测使得业务网段间能够正常通信;
#配置R1
route-policy i2o permit node 10
apply tag 200

//在把ISIS引入ospf时 给引入路由打上tag 200

route-policy 2 deny node 10
if-match tag 400

//拒绝传过来R2过来带有tag 400 的路由

route-policy 2 permit node 10000

//允许其他路由通过

ospf 1 router-id 1.1.1.1
filter-policy route-policy 2 import //当R1接收从R2传过来的ospf路由时,拒绝 带有 tag 400的路由
import-route isis 1 route-policy i2o 引入ISIS路由到ospf中并给路由打上 tag 200
##配置R2
route-policy 1 deny node 10
if-match tag 200

//拒绝带有tag200 的路由

route-policy 1 permit node 10000

//允许其他路由通过

route-policy 2o2i permit node 10
apply tag 400

//在把ospf引入Isis时 给路由打上tag 400

isis 1
filter-policy route-policy 1 import //当R2从R1接收传过来的Isis路由时,拒绝 带有 tag 200的路由
import-route ospf 1 route-policy 2o2i

//把ospf引入Isis时给路由打上tag 400

步骤 6 为了避免由于总部与分部网络间单点故障而造成的断网,网络管理员在 R1、 R2 上部署双向引入,并通过适当调测使得业务网段间能够正常通信;
#配置R1
route-policy o2i permit node 10
apply tag 100

//在把ospf引入ISIS时 给路由打上 tag 100

route-policy 2 deny node 20
if-match tag 300

//拒绝传过来R2过来带有tag 300 的路由

isis 1
filter-policy route-policy 2 import //当R1收到R2传过来带有tag300 的路由直接拒绝掉
import-route ospf 1 route-policy o2i //在Isis引入ospf路由时给引入的路由打上tag 100

#配置R2
route-policy 2i2o permit node 10
apply tag 300
#// 在把ISIS引入ospf时 给路由打上tag300
route-policy 1 deny node 20
if-match tag 100
#// 拒绝带有 tag 100 的路由
ospf 1 router-id 2.2.2.2
filter-policy route-policy 1 import //当R2收到R1穿过来带有tag 100的路由直接拒绝
import-route isis 1 route-policy 2i2o //在ospf引入Isi路由时给引入的路由打上tag 300

步骤 7 在总部网络中,使得总部网段 A 和 B 业务各使用一条链路以实现负载(不能使用路由策
略);
双点双向引入和路由策略

R4配置

  1. interface GigabitEthernet0/0/1
    ospf cost 100
    R3配置
    interface GigabitEthernet0/0/0
    isis cost 100
    测试效果:
    双点双向引入和路由策略双点双向引入和路由策略

1.3 思考
是否有其他方法完成各项任务?