> 文档中心 > 路由策略配置实战ospf与eigrp的重分布

路由策略配置实战ospf与eigrp的重分布

 路由策略配置实战

IP地址规划

  • 拓扑中的IP 地址段采用: 172.8.AB.X/24, 其中AB为两台路由器编号组合,例如:R3-R6之间的AB为36,X为路由器编号例如R3的X=3
  • 所有路由器都有一个Loopback0接口,地址格式为: X.X.X.X/32, 其中X为路由器编号。

实验需求

  1. A---F所有区用Loopback 模拟,地址格式为: XX.XX.XX.XX/32, 其中X为路由器编号。根据拓扑宣告进对应协议。A1和A2区为特例,A1: 55.55.55.0/24, A2:55.55.66.0/24。
  2. 按照拓扑图配置EIGRP/OSPF 路由协议,关闭所有自动汇总。OSPF手动指明RID为Loopback 0地址。
  3. R4做双向重分布,R6把OSPF重分布到EIGRP, 要求全网ping 通。如无明确说明,禁止使用静态路由,禁止直接使用ACL过滤数据。
  4. A1区网段为55.55.55.0/24. 配置R6使其禁止从R7学到此网段(要求:使用前缀列表)
  5. 在R4上配置,要求EIGRP重分布到OSPF时,B区Metric 值为100,类型为E1; C区Metric值为200, 类型为E1。 其他路由按照默认设置。
  6. 在R1的Area0中增加以下网段: 11.11.1.0/24、 11.11.2.0/24(用Loopback 模拟),要求在R2上配置最精确的路由汇总,并且只允许在II 区学到该汇总路由。
  7. 要求A1到F区的数据流走R4,A2到E区的数据流走R6(R5带A1和A2的源地址采用Traceroute 测试)
  8. 在R7上配置, 使其路由表中显示去往E、F区的下一跳是R6。
  9. 在R4上配置,使其访问E区走1区-->III 区,其他路线不变(要求:不允许策略路由和分发列表)

案例答案

R1:interface Loopback0ip address 1.1.1.1 255.255. 255.255interface g1/0ip address 172.8.14.1 255. 255. 255.0no shutdowninterface g2/0ip address 172.8.12.1 255. 255. 255.0no shutdownrouter ospf 1router-id 1.1.1.1network 1.1.1.1 0.0.0.0 area 0network 172.8.12.10.0.0.0 area 0neteork 172.8.14.1 0.0.0.0 araa 2interface Loopbacklip address 11.11.1. 1 255.255.255.0ip ospf network point-to-pointinterface Loopback2ip address 11.11.2.1 255.255.255.0ip ospf network point-to-point router ospf 1network 11.11.1.1 0.0.0.0 area 0network 11.11.2.1 0.0. 0.0 area 0

R2:interface Loopback0ip address 2.2.2.2 255.255.255.255interface Loopbacklip address 22.22.22.22 255.255.255.255interface g1/0ip address 172.8.23.2 255.255.255.0no shutdowninterface g2/0ip address 172.8.12.2 255.255.255.0no shutdown router ospf 1router-id 2.2.2.2network 2.2.2.2 0.0.0.0 area 0network 22.22.22.22 0.0.0.0 area 0network 172.8.12.2 0.0.0.0 area 0network 172.8.23.2 0.0.0.0 area 3router ospf 1area 0 range 11.11.0.0 255.255.252.0 

R3:interface Loopback0ip address 3.3.3.3 255.255.255.255interface Loopbacklip address 33.33.33.33 255.255.255.255interface g1/0ip address 172.8.23.3 255.255.255.0no shutdowninterface g2/0ip address 172.8.36.3 255.255.255.0no shutdown router ospf 1router-id 3.3.3.3network 3.3.3.3 0.0.0.0 area 3 network 33.33.33.33 0.0.0.0 area 3network 172.8.23.3 0.0.0.0 area 3 network 172.8.36.30.0.0.0 area 3 

R4:interface Loopback0ip address 4.4.4.4 255.255.255.255interface Loopback1ip address 44.44.44.44 255.255.255.255 interface g1/0ip address 172.8.14.4 255.255.255.0no shutdown interface g2/0ip address 172.8.47.4 255.255.255.0no shutdownrouter ospf 1router-id 4.4.4.4network 172.8.14.4 0.0.0.0 area 2router eigrp 1network 4.4.4.4 0.0.0.0 network 44.44.44.44 0.0.0.0network 172.8.47.4 0.0.0.0no auto-summaryrouter eigrp 1redistribute ospf 1 metric 10000 100 255 1 1500router ospf 1redistribute eigrp 1 subnetsaccess-list 10 permit 44.44.44.44access-list 20 permit 66.66.66.66route-map cisco permit 10match ip address 10set metric 100set metric-type type-1route -map cisco permit 20match ip address 20set metric 200set metric-type type-1route-map cisco permit 30router ospf 100redistribute eigrp 100 subnets route -map ciscoaccess-list 30 permit 33.33.33.33router ospf 100distance 180 0.0.0.0 255.255.255.255 30

R5:interface Loopback0ip address 5.5.5.5 255.255.255.255interface Loopback1ip address 55.55.55.55 255.255.255.0interface Loopback2ip address 55.55.66.55 255.255.255.0interface g3/0ip address 172.8.57.5 255.255.255.0no shutdownrouter eigrp 1network 5.5.5.5 0.0.0.0network 55.55.55.1 0.0.0.0network 55.55.66.2 0.0. 0.0network 172.8.57.5 0.0.0.0no auto-summary

R6:interface Loopback0ip address 6.6.6.6 255.255.255.255interface Loopbacklip address 66.66.66.66 255.255.255.255interface g1/0ip address 172.8.67.6 255.255.255.0no shutdown interface g2/0ip address 172.8.36.6 255.255.255.0no shutdownrouter ospf 1router-id 6.6.6.6network 172.8.36.6 0.0.0.0 area 3router eigrp 1network 6.6.6.6 0.0.0.0network 66.66.66.66 0.0.0.0 network 172.8.67.6 0.0.0.0no auto-summaryrouter eigrp 1redistribute ospf 1 metric 10000 100 255 1 1500ip prefix-list cisco seq 5 deny 55.55.55.0/24ip prefix-list cisco seq 10 permit 0.0.0.0/0 le 32router eigrp 1distribute-list prefix cisco in g1/0R6ip prefix-list ccie seq 5 permit 11.11.0.0/22route-map ccie deny 10match ip address prefix-list R1-summaryroute-map ccie permit 20router eigrp 1redistribute ospf 1 metric 10000 100 255 1 1500 route-map ccie

R7:interface Loopback0ip address 7. 7.7.7 255. 255. 255.255interface Loopback1ip address 77.77. 77.77 255. 255. 255. 255interface g1/0ip address 172.8. 67.7 255. 255.255.0no shutdown interface g2/0ip address 172.8.47.7 255.255.255.0no shutdown interface g3/0ip address 172.8.57.7 255.255.255.0no shutdownrouter eigrp 1network 7.7.7.7 0.0.0.0network 77.77.77.77 0.0.0.0network 172.8.47.7 0.0.0. 0network 172.8.57.7 0.0.0.0network 172.8.67.7 0.0.0.0no auto-summaryaccess-list 155 permit ip 55.55.55.0 0.0.0.255 host 22.22.22.22access-list 156 permit ip 55.55.66.0 0.0.0.255 host 33.33.33.33route-map CCIE permit 10match ip address 155set ip next-hop 172.8.47.4route-map CCIE permit 20match ip address 156set ip next-hop 172.8.67.6 interface g3/0ip policy route-map CCIEaccess-list 10 permit 22.22.22.22access-list 10 permit 33.33.33.33router eigrp 1offset-list 10 in 100 g2/0

B2C跨境电商