BGP社团属性实验

实验目的:

l 掌握BGP社团属性应用

实验说明:

l 通过此实验练习,可以灵活的使用BGP社团属性

实验环境:

l 五台支持SPSERVICES的IOS的路由器

l 直通线

实验拓扑:在这里插入图片描述

实验步骤(基本配置同上BGP联邦配置)

要求1,R2能收到R4的4条路由,R1能收到3条,使用No_advertise

R4(config)#access-list 1 permit 11.11.11.11 0.0.0.0

R4(config)#route-map comm permit 10

R4(config-route-map)#match ip address 1

R4(config-route-map)#set community no-advertise

R4(config)#route-map comm permit 100

R4(config)#router bgp 1

R4(config-router)#neighbor 24.1.1.2 route-map comm out

R4(config-router)#neighbor 24.1.1.2 send-community

验证:

R2#show ip bgp 11.11.11.11

BGP routing table entry for 11.11.11.11/32, version 6

Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer)

Not advertised to any peer

1

24.1.1.4 from 24.1.1.4 (4.4.4.4)

Origin IGP, metric 0, localpref 100, valid, external, best

Community: no-advertise

R3#show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 22.22.22.22/32 2.2.2.2 0 100 0 (21) 1 i

*> 33.33.33.33/32 2.2.2.2 0 100 0 (21) 1 i

*> 44.44.44.44/32 2.2.2.2 0 100 0 (21) 1 i

要求2,R3学到两条路由,使用local-as

R4(config)#access-list 2 permit 22.22.22.22 0.0.0.0

R4(config)#route-map comm permit 20

R4(config-route-map)#match ip address 2

R4(config-route-map)#set community local-AS

R2(config)#router bgp 21

R2(config-router)#neighbor 1.1.1.1 send-community

验证:

R1#show ip bgp 22.22.22.22

BGP routing table entry for 22.22.22.22/32, version 8

Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS)

Flag: 0x880

Not advertised to any peer

1

2.2.2.2 (metric 2) from 2.2.2.2 (2.2.2.2)

Origin IGP, metric 0, localpref 100, valid, confed-internal, best

Community: local-AS

R3#show ip bgp

BGP table version is 7, local router ID is 3.3.3.3

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 33.33.33.33/32 2.2.2.2 0 100 0 (21) 1 i

*> 44.44.44.44/32 2.2.2.2 0 100 0 (21) 1 i

要求3,R5学到一条路由,使用no_export

R4(config)#access-list 3 permit 33.33.33.33 0.0.0.0

R4(config)#route-map comm permit 30

R4(config-route-map)#match ip address 3

R4(config-route-map)#set community no-export

R1(config)#router bgp 21

R1(config-router)#neighbor 3.3.3.3 send-community

验证:

R3#show ip bgp 33.33.33.33

BGP routing table entry for 33.33.33.33/32, version 8

Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)

Not advertised to any peer

(21) 1

2.2.2.2 (metric 3) from 1.1.1.1 (1.1.1.1)

Origin IGP, metric 0, localpref 100, valid, confed-external, best

Community: no-export

R5#show ip bgp

BGP table version is 8, local router ID is 5.5.5.5

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 44.44.44.44/32 35.1.1.3 0 2 1 i

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

GLAB-Mary

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值