云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > H3C-BGP配置

H3C-BGP配置

  • 62 次阅读
  • 3 次下载
  • 2025/5/26 1:16:01

[RouterD] display ip routing-table Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0 10.220.2.0/24 Direct 0 0 10.220.2.217 S2/0 10.220.2.217/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.64.0/24 BGP 255 1 10.220.2.16 S2/0 192.168.74.0/24 BGP 255 1 10.220.2.16 S2/0 192.168.99.0/24 BGP 255 1 10.220.2.16 S2/0

完成上述配置后,在Router D上可以ping通192.168.64.0/24、192.168.74.0/24和192.168.99.0/24网段内的主机。 (5) 在Router C上配置路由聚合

# 在Router C上将路由192.168.64.0/24、192.168.74.0/24和192.168.99.0/24聚合为192.168.64.0/18,并抑制发布具体路由。

[RouterC-bgp] aggregate 192.168.64.0 18 detail-suppressed [RouterC-bgp] quit

(6) 验证配置结果

# 在Router C上查看路由表信息,可以看到Router C上产生了一条聚合路由192.168.64.0/18,该聚合路由的出接口为Null0。

[RouterC] display ip routing-table Routing Tables: Public

Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost NextHop Interface

3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0 10.220.2.0/24 Direct 0 0 10.220.2.16 S2/0 10.220.2.16/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 172.17.100.0/24 Direct 0 0 172.17.100.2 S2/1 172.17.100.2/32 Direct 0 0 127.0.0.1 InLoop0 192.168.64.0/18 BGP 130 0 127.0.0.1 NULL0 192.168.64.0/24 O_ASE 150 1 172.17.100.1 S2/1 192.168.74.0/24 O_ASE 150 1 172.17.100.1 S2/1 192.168.99.0/24 O_ASE 150 1 172.17.100.1 S2/1

# 在Router D上查看路由表信息,可以看到Router D上到达公司内部三个网络的路由聚合为一条路由192.168.64.0/18。

[RouterD] display ip routing-table

Routing Tables: Public

Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost NextHop Interface

4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0 10.220.2.0/24 Direct 0 0 10.220.2.217 S2/0 10.220.2.217/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.64.0/18 BGP 255 0 10.220.2.16 S2/0

完成上述配置后,成功实现了路由聚合。并且,在Router D上可以ping通192.168.64.0/24、192.168.74.0/24和192.168.99.0/24网段内的主机。

1.14.5 BGP团体配置

1. 组网需求

Router B分别与Router A、Router C之间建立EBGP连接。

通过在Router A上配置NO_EXPORT团体属性,使得AS 10发布到AS 20中的路由,不再被AS 20向其他AS发布。

2. 组网图

图1-19 BGP团体组网图

3. 配置步骤

(1) 配置各接口的IP地址(略) (2) 配置EBGP # 配置Router A。

system-view [RouterA] bgp 10

[RouterA-bgp] router-id 1.1.1.1

[RouterA-bgp] peer 200.1.2.2 as-number 20 [RouterA-bgp] network 9.1.1.0 255.255.255.0 [RouterA-bgp] quit

# 配置Router B。

system-view [RouterB] bgp 20

[RouterB-bgp] router-id 2.2.2.2

[RouterB-bgp] peer 200.1.2.1 as-number 10 [RouterB-bgp] peer 200.1.3.2 as-number 30 [RouterB-bgp] quit

# 配置Router C。

system-view [RouterC] bgp 30

[RouterC-bgp] router-id 3.3.3.3

[RouterC-bgp] peer 200.1.3.1 as-number 20 [RouterC-bgp] quit

# 查看Router B的路由表。

[RouterB] display bgp routing-table 9.1.1.0

BGP local router ID : 2.2.2.2 Local AS number : 20

Paths: 1 available, 1 best

BGP routing table entry information of 9.1.1.0/24: From : 200.1.2.1 (1.1.1.1) Original nexthop: 200.1.2.1 AS-path : 10 Origin : igp

Attribute value : MED 0, pref-val 0, pre 255 State : valid, external, best, Advertised to such 1 peers: 200.1.3.2

可以看出,Router B把收到的路由发布给了位于AS 30内的Router C。 # 查看Router C的路由表。

[RouterC] display bgp routing-table

Total Number of Routes: 1

BGP Local router ID is 3.3.3.3

Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 9.1.1.0/24 200.1.3.1 0 0 20 10i

从路由表可以确认,Router C从Router B那里学到了目的地址为9.1.1.0/24的路由。 (3) 配置BGP团体属性

# 配置路由策略。

[RouterA] route-policy comm_policy permit node 0 [RouterA-route-policy] apply community no-export [RouterA-route-policy] quit

# 应用路由策略。

[RouterA] bgp 10

[RouterA-bgp] peer 200.1.2.2 route-policy comm_policy export [RouterA-bgp] peer 200.1.2.2 advertise-community

# 查看Router B的路由表。

[RouterB] display bgp routing-table 9.1.1.0 BGP local router ID : 2.2.2.2 Local AS number : 20

Paths: 1 available, 1 best

BGP routing table entry information of 9.1.1.0/24: From : 200.1.2.1 (1.1.1.1) Original nexthop: 200.1.2.1 Community : No-Export AS-path : 10 Origin : igp

Attribute value : MED 0, pref-val 0, pre 255 State : valid, external, best, Not advertised to any peers yet

在Router B的BGP路由表中可以看到配置的团体属性。此时在Router C的BGP路由表中已经没有到目的地址9.1.1.0/24的路由。

1.14.6 BGP路由反射器配置

1. 组网需求

所有路由器运行BGP协议,Router A与Router B建立EBGP连接,Router C与Router B和Router D之间建立IBGP连接。

Router C作为路由反射器,Router B和Router D为Router C的客户机。 Router D能够通过Router C学到路由1.0.0.0/8。

搜索更多关于: H3C-BGP配置 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

[RouterD] display ip routing-table Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost NextHop Interface 4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0 10.220.2.0/24 Direct 0 0 10.220.2.217 S2/0 10.220.2.217/32 Direct 0 0 127.0.0.1 InL

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com