• BGP联盟和团体属性实验


    目录

    一、实验拓扑

    二、实验要求

    三、实验步骤

    1、IP地址配置

    2、ospf配置

    3、BGP建邻

    4、宣告网段

    5、配置团体属性


    一、实验拓扑

    二、实验要求

    1、按照图示配 IP 地址,R2,R3,R4,R5分别配 Loopbacke 口地址作为OSPF的Route_id和IBGP邻居地址,地址格式为 x.x.x.x/32,x为设备编号。R1 上配置Loopback口模拟业务网段

    2、As 200内部配置OSPF,仅用于实现BGP的TCP可达

    3、AS 200内部建立BGP联盟,联盟A为 AS 200,包含2个子AS为 AS 6501 和 AS 65002。R1和R2建立EBGP邻居,R4 和 R6 建立 EBGP邻居,R2和R4建立EBGP邻居,子AS内部建立IBGP全连接

    4、R1把业务网段宣告进BGP,要求AS 200内部所有路由器都能够学习到该业务网段路由

    5、通过配置团体属性,使 192.168.0.0/24 网段路由只能传递至 AS 200

    三、实验步骤

    1、IP地址配置

    1. [AR1]int g0/0/0
    2. [AR1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
    3. [AR1-GigabitEthernet0/0/0]int l0
    4. [AR1-LoopBack0]ip add 192.168.0.1 24
    5. [AR1-LoopBack0]int l1
    6. [AR1-LoopBack1]ip add 192.168.1.1 24
    1. [AR2]int g0/0/0
    2. [AR2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
    3. [AR2-GigabitEthernet0/0/0]int g0/0/1
    4. [AR2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
    5. [AR2-GigabitEthernet0/0/1]int g0/0/2
    6. [AR2-GigabitEthernet0/0/2]ip add 100.3.3.2 24
    7. [AR2]int l0
    8. [AR2-LoopBack0]ip add 2.2.2.2 32
    1. [AR3]int g0/0/0
    2. [AR3-GigabitEthernet0/0/0]ip add 100.3.3.3 24
    3. [AR3-GigabitEthernet0/0/0]int g0/0/1
    4. [AR3-GigabitEthernet0/0/1]ip add 100.5.5.3 24
    5. [AR3-GigabitEthernet0/0/1]int l0
    6. [AR3-LoopBack0]ip add 3.3.3.3 32
    1. [AR4]int g0/0/0
    2. [AR4-GigabitEthernet0/0/0]ip add 100.2.2.4 24
    3. [AR4-GigabitEthernet0/0/0]int g0/0/1
    4. [AR4-GigabitEthernet0/0/1]ip add 100.6.6.4 24
    5. [AR4-GigabitEthernet0/0/1]int g0/0/2
    6. [AR4-GigabitEthernet0/0/2]ip add 100.4.4.4 24
    7. [AR4-GigabitEthernet0/0/2]int l0
    8. [AR4-LoopBack0]ip add 4.4.4.4 32
    1. [AR5]int g0/0/0
    2. [AR5-GigabitEthernet0/0/0]ip add 100.5.5.5 24
    3. [AR5-GigabitEthernet0/0/0]int g0/0/1
    4. [AR5-GigabitEthernet0/0/1]ip add 100.4.4.5 24
    5. [AR5-GigabitEthernet0/0/1]int l0
    6. [AR5-LoopBack0]ip add 5.5.5.5 32
    1. [AR6]int g0/0/0
    2. [AR6-GigabitEthernet0/0/0]ip add 100.6.6.6 24

    2、ospf配置

    1. [AR2]ospf 1 router-id 2.2.2.2
    2. [AR2-ospf-1]a 0
    3. [AR2-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
    4. [AR2-ospf-1-area-0.0.0.0]net 100.3.3.0 0.0.0.255
    5. [AR2-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
    6. [AR3]ospf 1 router-id 3.3.3.3
    7. [AR3-ospf-1]a 0
    8. [AR3-ospf-1-area-0.0.0.0]net 0.0.0.0 255.255.255.255 # 懒人宣告法
    9. [AR4]ospf 1 router-id 4.4.4.4
    10. [AR4-ospf-1]a 0
    11. [AR4-ospf-1-area-0.0.0.0]net 100.2.2.0 0.0.0.255
    12. [AR4-ospf-1-area-0.0.0.0]net 100.4.4.0 0.0.0.255
    13. [AR4-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
    14. [AR5]ospf 1 router-id 5.5.5.5
    15. [AR5-ospf-1]a 0
    16. [AR5-ospf-1-area-0.0.0.0]net 0.0.0.0 255.255.255.255

    3、BGP建邻

    1. [AR1]bgp 100
    2. [AR1-bgp]peer 100.1.1.2 as-number 200
    3. [AR2]bgp 65001 # 申明联盟AS
    4. [AR2-bgp]confederation id 200
    5. [AR2-bgp]confederation peer-as 65002 # 申明联盟同伴
    6. [AR2-bgp]peer 100.1.1.1 as-number 100
    7. [AR2-bgp]peer 3.3.3.3 as-number 65001
    8. [AR2-bgp]peer 3.3.3.3 connect-interface l0
    9. [AR2-bgp]peer 3.3.3.3 next-hop-local
    10. [AR2-bgp]peer 100.2.2.4 as-number 65002
    11. [AR2-bgp]peer 100.2.2.4 next-hop-local
    12. [AR3]bgp 65001
    13. [AR3-bgp]confederation id 200
    14. [AR3-bgp]peer 2.2.2.2 as 65001
    15. [AR3-bgp]peer 2.2.2.2 connect-interface l0
    16. [AR4]bgp 65002
    17. [AR4-bgp]confederation id 200
    18. [AR4-bgp]confederation peer-as 65001
    19. [AR4-bgp]peer 100.2.2.2 as-number 65001
    20. [AR4-bgp]peer 100.2.2.2 next-hop-local
    21. [AR4-bgp]peer 100.6.6.6 as-number 300
    22. [AR4-bgp]peer 5.5.5.5 as-number 65002
    23. [AR4-bgp]peer 5.5.5.5 connect-interface l0
    24. [AR4-bgp]peer 5.5.5.5 next-hop-local
    25. [AR5]bgp 65002
    26. [AR5-bgp]confederation id 200
    27. [AR5-bgp]peer 4.4.4.4 as-number 65002
    28. [AR5-bgp]peer 4.4.4.4 connect-interface l0
    29. [AR6]bgp 300
    30. [AR6-bgp]peer 100.6.6.4 as-number 200

    4、宣告网段

    1. [AR1]bgp 100
    2. [AR1-bgp]net 192.168.0.0 24
    3. [AR1-bgp]net 192.168.1.0 24

    5、配置团体属性

    1. [AR1]acl 2000
    2. [AR1-acl-basic-2000]rule permit source 192.168.0.0 0.0.0.255
    3. [AR1]route-policy com permit node 10
    4. [AR1-route-policy]if-match acl 2000
    5. [AR1-route-policy]apply community no-export
    6. [AR1]route-policy com permit node 20
    7. [AR1]bgp 100
    8. [AR1-bgp]peer 100.1.1.2 route-policy com export
    9. [AR1-bgp]peer 100.1.1.2 advertise-community
    10. [AR2-bgp]peer 100.2.2.4 advertise-community

     

     

  • 相关阅读:
    React-native Android 添加音效
    python开发之远程开发工具对比
    Python中的闭包是怎么回事儿?五分钟看懂。
    单片机之瑞萨RL78定时计数器
    [CISCN 2019 初赛]Love Math
    「UG/NX」Block UI 指定坐标SpecifyCSYS
    行列式学习笔记(一)
    LabVIEW软件开发工程师需要具备哪些能力与素质?
    【Redis】3、Redis主从复制、哨兵、集群
    实验七 状态机及键盘输入 chisel
  • 原文地址:https://blog.csdn.net/weixin_68256171/article/details/134486894