首页 科技问答 Ro0dR3,ospf路由聚合

Ro0dR3,ospf路由聚合

科技问答 245
1681744717,CRM论坛(CRMbbs.com)——一个让用户更懂CRM的垂直性行业内容平台,CRM论坛致力于互联网、客户管理、销售管理、SCRM私域流量内容输出5年。 如果您有好的内容,欢迎向我们投稿,共建CRM多元化生态体系,创建CRM客户管理一体化生态解决方案。内容来源:知了社区

问题描述:

怎么对接受到的OSPF路由进行聚合?

组网及组网描述:

现在接受到的路由是26位的,想要聚合成24位的路由

4小时前提问

asbr-summary  


1.14.3  OSPF发布聚合路由配置举例

1. 组网需求

·            Switch A和Switch B位于AS

·            Switch C、Switch D和Switch E位于AS 100内,AS 100内使用OSPF作为IGP协议。

·            Switch B和Switch C之间建立EBGP连接,配置BGP引入OSPF和直连路由,配置OSPF进程引入BGP路由。

·            为了减小Switch A的路由表规模,在Switch B上配置路由聚合,只发布聚合后的路由10.0.0.0/8。

2. 组网图

图1-10 OSPF发布聚合路由配置组网图

 

3. 配置步骤

       配置接口的IP地址(略)

       配置OSPF

# 配置Switch A。

<SwitchA> system-view

[SwitchA] router id 11.2.1.2

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 配置Switch B。

<SwitchB> system-view

[SwitchB] router id 11.2.1.1

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

<SwitchC> system-view

[SwitchC] router id 11.1.1.2

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 配置Switch D。

<SwitchD> system-view

[SwitchD] router id 10.3.1.1

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# 配置Switch E。

<SwitchE> system-view

[SwitchE] router id 10.4.1.1

[SwitchE] ospf

[SwitchE-ospf-1] area 0

[SwitchE-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] quit

[SwitchE-ospf-1] quit

       配置BGP,引入OSPF和直连路由

# 配置Switch B。

[SwitchB] bgp

[SwitchB-bgp-default] peer 11.1.1.2 as 100

[SwitchB-bgp-default] address-family ipv4 unicast

[SwitchB-bgp-default-ipv4] peer 11.1.1.2 enable

[SwitchB-bgp-default-ipv4] import-route ospf

[SwitchB-bgp-default-ipv4] import-route direct

[SwitchB-bgp-default-ipv4] quit

[SwitchB-bgp-default] quit

# 配置Switch C。

[SwitchC] bgp 100

[SwitchC-bgp-default] peer 11.1.1.1 as

[SwitchC-bgp-default] address-family ipv4 unicast

[SwitchC-bgp-default] peer 11.1.1.1 enable

[SwitchC-bgp-default-ipv4] import-route ospf

[SwitchC-bgp-default-ipv4] import-route direct

[SwitchC-bgp-default-ipv4] quit

[SwitchC-bgp-default] quit

(4)       在Switch B和Switch C上配置OSPF引入BGP路由

# 在Switch B上配置OSPF引入BGP路由。

[SwitchB] ospf

[SwitchB-ospf-1] import-route bgp

# 在Switch C上配置OSPF引入BGP路由。

[SwitchC] ospf

[SwitchC-ospf-1] import-route bgp

# 查看SwitchA的路由表信息。

[SwitchA] display ip routing-table

 

Destinations : 16        Routes : 16

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

10.1.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100

10.2.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100

10.3.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100

10.4.1.0/24         O_ASE2 150  1            11.2.1.1        Vlan100

11.2.1.0/24         Direct 0    0            11.2.1.2        Vlan100

11.2.1.0/32         Direct 0    0            11.2.1.2        Vlan100

11.2.1.2/32         Direct 0    0            127.0.0.1       InLoop0

11.2.1.255/32       Direct 0    0            11.2.1.2        Vlan100

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

(5)       在Switch B上配置路由聚合,只发布聚合路由10.0.0.0/8。

[SwitchB-ospf-1] asbr-summary 10.0.0.0 8

# 查看Switch A的路由表信息。

[SwitchA] display ip routing-table

 

Destinations : 13        Routes : 13

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

10.0.0.0/8          O_ASE2 150  2            11.2.1.1        Vlan100

11.2.1.0/24         Direct 0    0            11.2.1.2        Vlan100

11.2.1.0/32         Direct 0    0            11.2.1.2        Vlan100

11.2.1.2/32         Direct 0    0            127.0.0.1       InLoop0

11.2.1.255/32       Direct 0    0            11.2.1.2        Vlan100

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

可以看出,路由10.1.1.0/24、10.2.1.0/24、10.3.1.0/24、10.4.1.0/24已经聚合为一条路由10.0.0.0/8。

4小时前回答

暂无

在ABR或者ASBR上配置就行,ABR对区域间的路由进行聚合,abr-summary X.X.X.X X

ASBR对外部路由进行聚合,asbr-summary x.x.x.x x

4小时前回答

暂无

参考官方文档

https://www.h3c.com/cn/d_


直接搜索聚合即可

2小时前回答

暂无

你正在,ospf路由聚合