BGP 路由过滤应用案例

需求1:不通告默认路由及私网路由:

ip ip-prefix default_route index 10 permit 0.0.0.0 0

用前缀列表写出私网IP地址段

ip ip-prefix private_ip index 10 permit 10.0.0.0 8 greater-equal 8 less-equal 32

ip ip-prefix private_ip index 20 permit 172.16.0.0 12 greater-equal 12 less-equal 16

ip ip-prefix private_ip index 30 permit 192.168.0.0 16 greater-equal 16 less-equal 32

route-policy policy_export deny node 10

  if-match ip-prefix default_route

route-policy policy_export deny node 20

  if-match ip-prefix private_ip

需求2:不通告含xxAS号的路由及该AS号始发的路由

ip as-path-filter  deny_DX  permit _4134_

ip as-path-filter  deny_DX  permit _4134$

route-policy policy_export deny node 30

  if-match as-path-filter deny_DX

需求3:65001 AS始发的路由掩码大于24的过滤掉

ip as-path-filter 65001start index 10 permit _65001$

ip ip-prefix all>24 index 10 permit 0.0.0.0 0 greater-equal 25 less-equal 32

route-policy policy_export deny node 100

  if-match ip-prefix all>24

  if-match as-path-filter 65001start

需求4:通告的BGP路由AS-path中的私有AS号要删掉,而路由不删除

华为路由器配置 peer 1.1.1.1 public-as-only force 命令作用:删除bgp路由AS-path中的私有as号

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值