BGP route-map 策略路由通告测试报告

简介:
Technorati 标签:  , , ,
今天给客户做了一个bgp基于route-map来进行过滤通过不同路由到不同的对端跨域邻居那里去的一个测试报告。
功能点很小,不过对于初级的同学来说希望有帮助。
BGP实际上对于路由选择过滤是相当强大的一个路由协议。也是CCIE中考试的重点,其实有一本很好的书想推荐给大家: <CISCO BGP-4 命令与配置手册>,曾经有人给我说过,把这本书的命令敲3遍,终身难忘,,可惜我只敲了一遍,哈哈哈,,很多东西只是在脑子里留了一个概念,等到要用的时候再去查.....真的是一本很好的书,敲了一遍,我就成菜鸟了,至少知道别人在说bgp的时候我不会很茫然了。:)
希望对初学bgp的同学有用。

1, Testing topology:

image

2, Testing target:

L3 switch as the ASBR, connect two different Service provider.

Here for example switch port 1 connect to TATA ISP. Port 2 connect to Reliance ISP.

On L3 switch enable the BGP, make the neighbor ship with TATA and reliance router, from AS 17483 internal routing-router, will advertise loopback 0 and loopback 1 all of the network to L3 switch ASBR by IGP, then need enable the route-map on switch, the interface loopback 0 networks will only advertise to TATA router, and interface looback 1 only advertise to Reliance router by BGP.

3, Testing snapshots:

On MAIPU L3 switch switch first we can check all of the internal routes are already learned by IGP OSPF from routing router:

clip_image004

And now we can check on switch should be has 2 BGP neighbor ship:

clip_image006

For BGP neighbor 111.93.11.249, the switch only advertise interface loopback 0 networks:

clip_image008

And for neighbor 115.248.84.66 only advertise interface loopback 1 networks:

clip_image010

Finally let’s check on TATA router how many routes was learned from MAIPU 4128F V3 switch:

clip_image012

And on Reliance router:

clip_image014

4, Testing configuration:

Routing-router of AS 17483:

interface loopback0

ip address 49.156.130.1 255.255.255.0

ip address 49.156.131.1 255.255.255.0 secondary

ip address 49.156.132.1 255.255.255.0 secondary

ip address 49.156.133.1 255.255.255.0 secondary

ip address 49.156.134.1 255.255.255.0 secondary

ip address 49.156.135.1 255.255.255.0 secondary

ip address 49.156.136.1 255.255.255.0 secondary

ip address 49.156.137.1 255.255.255.0 secondary

ip address 49.156.138.1 255.255.255.0 secondary

ip address 49.156.139.1 255.255.255.0 secondary

ip address 49.156.140.1 255.255.255.0 secondary

ip address 49.156.141.1 255.255.255.0 secondary

ip address 49.156.142.1 255.255.255.0 secondary

ip address 49.156.143.1 255.255.255.0 secondary

ip address 49.156.144.1 255.255.255.0 secondary

ip address 49.156.145.1 255.255.255.0 secondary

ip address 49.156.146.1 255.255.255.0 secondary

ip address 49.156.147.1 255.255.255.0 secondary

ip address 49.156.155.1 255.255.255.0 secondary

ip address 49.156.128.1 255.255.255.0 secondary

ip address 49.156.129.1 255.255.255.0 secondary

ip address 202.62.72.1 255.255.255.0 secondary

ip address 202.62.85.1 255.255.255.0 secondary

ip address 202.62.67.1 255.255.255.0 secondary

ip address 202.62.74.1 255.255.255.0 secondary

ip address 202.62.90.1 255.255.255.0 secondary

ip ospf network point-to-point

exit

interface loopback1

ip address 49.156.158.1 255.255.255.0

ip address 103.5.18.1 255.255.255.0 secondary

ip ospf network point-to-point

exit

interface fastethernet0

ip address 1.1.1.2 255.255.255.0

exit

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

exit

L3 switch:

!

vlan 1-4;4094

!

ip access-list standard TATA

permit 49.156.130.0 0.0.0.255

permit 49.156.131.0 0.0.0.255

permit 49.156.132.0 0.0.0.255

permit 49.156.133.0 0.0.0.255

permit 49.156.134.0 0.0.0.255

permit 49.156.135.0 0.0.0.255

permit 49.156.136.0 0.0.0.255

permit 49.156.137.0 0.0.0.255

permit 49.156.138.0 0.0.0.255

permit 49.156.139.0 0.0.0.255

permit 49.156.140.0 0.0.0.255

permit 49.156.141.0 0.0.0.255

permit 49.156.142.0 0.0.0.255

permit 49.156.143.0 0.0.0.255

permit 49.156.144.0 0.0.0.255

permit 49.156.145.0 0.0.0.255

permit 49.156.146.0 0.0.0.255

permit 49.156.147.0 0.0.0.255

permit 49.156.155.0 0.0.0.255

permit 49.156.128.0 0.0.0.255

permit 49.156.129.0 0.0.0.255

permit 202.62.72.0 0.0.0.255

permit 202.62.85.0 0.0.0.255

permit 202.62.67.0 0.0.0.255

permit 202.62.74.0 0.0.0.255

permit 202.62.90.0 0.0.0.255

ip access-list standard reliance

permit 103.5.18.0 0.0.0.255

permit 49.156.158.0 0.0.0.255

!

Interface Ethernet1/0/1

switchport access vlan 2

!

Interface Ethernet1/0/2

switchport access vlan 3

!

Interface Ethernet1/0/3

switchport access vlan 4

!

Interface Ethernet1/0/4

!

Interface Ethernet1/0/5

!

Interface Ethernet1/0/6

!

Interface Ethernet1/0/7

!

Interface Ethernet1/0/8

!

Interface Ethernet1/0/9

!

Interface Ethernet1/0/10

!

Interface Ethernet1/0/11

!

Interface Ethernet1/0/12

!

Interface Ethernet1/0/13

!

Interface Ethernet1/0/14

!

Interface Ethernet1/0/15

!

Interface Ethernet1/0/16

!

Interface Ethernet1/0/17

!

Interface Ethernet1/0/18

!

Interface Ethernet1/0/19

!

Interface Ethernet1/0/20

switchport access vlan 4094

!

Interface Ethernet1/0/21

!

Interface Ethernet1/0/22

!

Interface Ethernet1/0/23

!

Interface Ethernet1/0/24

!

Interface Ethernet1/0/25

!

Interface Ethernet1/0/26

!

Interface Ethernet1/0/27

!

Interface Ethernet1/0/28

!

interface Vlan2

description connect-to-TATA-router

ip address 111.93.11.250 255.255.255.252

!

interface Vlan3

description connect-to-Reliance-router

ip address 115.248.84.65 255.255.255.252

!

interface Vlan4

description connect-to-LAN-router

ip address 1.1.1.1 255.255.255.0

!

interface Vlan4094

ip address 192.168.2.83 255.255.252.0

!

router ospf 1

network 1.1.1.0 0.0.0.255 area 0

!

router bgp 17483

network 49.156.128.0/24

network 49.156.129.0/24

network 49.156.130.0/24

network 49.156.131.0/24

network 49.156.132.0/24

network 49.156.133.0/24

network 49.156.134.0/24

network 49.156.135.0/24

network 49.156.136.0/24

network 49.156.137.0/24

network 49.156.138.0/24

network 49.156.139.0/24

network 49.156.140.0/24

network 49.156.141.0/24

network 49.156.142.0/24

network 49.156.143.0/24

network 49.156.144.0/24

network 49.156.145.0/24

network 49.156.146.0/24

network 49.156.147.0/24

network 49.156.155.0/24

network 49.156.158.0/24

network 103.5.18.0/24

network 202.62.67.0/24

network 202.62.72.0/24

network 202.62.74.0/24

network 202.62.85.0/24

network 202.62.90.0/24

neighbor 111.93.11.249 remote-as 45820

neighbor 111.93.11.249 update-source 111.93.11.250

neighbor 111.93.11.249 route-map TATA-OUT out

neighbor 115.248.84.66 remote-as 18101

neighbor 115.248.84.66 update-source 115.248.84.65

neighbor 115.248.84.66 route-map RIL-OUT out

!

route-map RIL-OUT permit 10

match ip address reliance

!

route-map TATA-OUT permit 10

match ip address TATA

!

!

TATA-router:

interface fastethernet0

ip address 111.93.11.249 255.255.255.252

exit

router bgp 45820

no auto-summary

no synchronization

neighbor 111.93.11.250 remote-as 17483

exit

Reliance router:

interface fastethernet0

ip address 115.248.84.66 255.255.255.252

exit

router bgp 18101

no auto-summary

no synchronization

neighbor 115.248.84.65 remote-as 17483

exit


本文转自 hny2000 51CTO博客,原文链接:http://blog.51cto.com/361531/921178



相关文章
|
6月前
|
安全 Java
如何测试map对象的线程不安全
【6月更文挑战第20天】如何测试map对象的线程不安全
46 0
|
7月前
|
弹性计算 测试技术 数据中心
阿里云香港服务器BGP多线精品网络_CN2性能测试_中国香港主机测试
阿里云香港服务器BGP多线精品网络_CN2性能测试_中国香港主机测试,阿里云香港服务器中国香港数据中心网络线路类型BGP多线精品,中国电信CN2高速网络高质量、大规格BGP带宽,运营商精品公网直连中国内地,时延更低,优化海外回中国内地流量的公网线路,可以提高国际业务访问质量
|
7月前
|
弹性计算 数据中心
阿里云香港服务器详细介绍_BGP多线精品测试_CN2高速网络
阿里云香港服务器中国香港数据中心网络线路类型BGP多线精品,中国电信CN2高速网络高质量、大规格BGP带宽,运营商精品公网直连中国内地,时延更低,优化海外回中国内地流量的公网线路,可以提高国际业务访问质量。阿里云百科来详细介绍阿里云香港云服务器
|
测试技术 索引 Python
Pandas的apply, map, transform介绍和性能测试
在这篇文章中,我们将通过一些示例讨论apply、agg、map和transform的预期用途。
276 0
Pandas的apply, map, transform介绍和性能测试
|
弹性计算
阿里云BGP多线精品EIP香港CN2线路网络时延测试
阿里云弹性公网IP(EIP)中国香港地域推出BGP(多线)_精品,精品EIP底层线路采用中国电信优质的CN2线路与中国大陆进行直连,阿里云精品EIP时延低速度快,价格只有一半IDC厂商的一半,阿里云官网关于香港EIP普通BGP(多线)和BGP(多线)精品EIP网络时延对比:
阿里云BGP多线精品EIP香港CN2线路网络时延测试
|
弹性计算
阿里云BGP多线精品EIP香港CN2线路网络时延测试
阿里云弹性公网IP(EIP)中国香港地域分为EIP普通BGP(多线)和BGP(多线)精品EIP,新手站长网来测试一下普通EIP和BGP(多线)精品EIP的网络延时区别
4278 0
阿里云BGP多线精品EIP香港CN2线路网络时延测试

热门文章

最新文章