• Huawei BGP和OSPF双边界重分布(二)


    网络拓扑:

    本例主要配置和例一致,主要是在AR3260-AR1和AR3260-AR2的路由域的边界上,从AR3260-AR1上重分布进BGP 65001的路由的时候打tag 650011,在AR3260-AR2上重分布进BGP 65001的路由的时候打tag 650012 ,然后在AR3260-AR1上将OSPF 100的路由重分布进BGP 65000的时候过滤掉打了tag 650012的路由,在AR3260-AR2上过滤掉tag 650011的路由。

    AR3260-AR1

    =========================================================================

    bgp 65000
    router-id 10.185.1.3
    peer 10.185.1.4 as-number 65000
    peer 10.185.1.4 connect-interface LoopBack0
    peer 10.201.1.2 as-number 65001
    peer 10.201.1.2 bfd enable
    #
    ipv4-family unicast
    undo synchronization
    import-route ospf 100 route-policy ospf-to-bgp
    peer 10.185.1.4 enable
    peer 10.185.1.4 next-hop-local
    peer 10.201.1.2 enable
    #
    ospf 100 router-id 10.185.1.3
    import-route bgp route-policy bgp-to-ospf
    area 0.0.0.0
    network 10.10.1.0 0.0.0.3
    network 10.10.1.8 0.0.0.3
    network 10.185.1.3 0.0.0.0
    #
    route-policy bgp-to-ospf permit node 10
    apply tag 650011
    #
    route-policy ospf-to-bgp deny node 10
    if-match tag 650012
    #
    route-policy ospf-to-bgp permit node 20
    #

    AR3260-AR2

    =========================================================================

    #
    bgp 65000
    router-id 10.185.1.4
    peer 10.185.1.3 as-number 65000
    peer 10.185.1.3 connect-interface LoopBack0
    peer 10.201.1.6 as-number 65001
    peer 10.201.1.6 bfd enable
    #
    ipv4-family unicast
    undo synchronization
    import-route ospf 100 route-policy ospf-to-bgp
    peer 10.185.1.3 enable
    peer 10.185.1.3 next-hop-local
    peer 10.201.1.6 enable
    #
    ospf 100 router-id 10.185.1.4
    import-route bgp route-policy bgpt-to-ospf
    area 0.0.0.0
    network 10.10.1.4 0.0.0.3
    network 10.10.1.8 0.0.0.3
    network 10.185.1.4 0.0.0.0
    #
    route-policy bgpt-to-ospf permit node 10
    apply tag 650012
    #
    route-policy ospf-to-bgp deny node 10
    if-match tag 650011
    #
    route-policy ospf-to-bgp permit node 20
    #

    在S5700-LSW1上查看打了tag 的路由10.136.1.0/24 

    =========================================================================

    [S5700-LSW1]display ip routing-table 10.136.1.0 verbose
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : Public
    Summary Count : 1

    Destination: 10.136.1.0/24
    Protocol: O_ASE Process ID: 100
    Preference: 150 Cost: 1
    NextHop: 10.10.1.2 Neighbour: 0.0.0.0
    State: Active Adv Age: 00h16m51s
    Tag: 650011 Priority: low
    Label: NULL QoSInfo: 0x0
    IndirectID: 0x0
    RelayNextHop: 0.0.0.0 Interface: Vlanif50
    TunnelID: 0x0 Flags: D

  • 相关阅读:
    洛谷—— P1196 银河英雄传说
    MySQL练习题参考答案
    January 16 2017 Week 3 Monday
    January 15 2017 Week 3 Sunday
    January 14 2017 Week 2nd Saturday
    January 13 2017 Week 2 Friday
    January 12 2017 Week 2 Thursday
    January 11 2017 Week 2nd Wednesday
    January 10 2017 Week 2nd Tuesday
    January 09 2017 Week 2nd Monday
  • 原文地址:https://www.cnblogs.com/networking/p/10748107.html
Copyright © 2020-2023  润新知