zoukankan      html  css  js  c++  java
  • 使用BGP的虚拟下一跳实现IGP的路由负载

    网络拓扑:

    XRV1

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

    !
    hostname XRV1
    !

    interface Loopback0
    ip address 220.198.32.1 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.1 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.1.1 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet2
    ip address 10.10.1.9 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet3
    ip address 10.10.1.17 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    router isis 100
    net 49.0000.2201.9832.1000.00
    is-type level-2-only
    !
    router bgp 4809
    bgp router-id 220.198.32.1
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.1 mask 255.255.255.255
    neighbor internal peer-group
    neighbor internal password cisco
    neighbor internal update-source Loopback0
    neighbor 220.198.32.2 remote-as 4809
    neighbor 220.198.32.2 peer-group internal
    neighbor 220.198.32.3 remote-as 4809
    neighbor 220.198.32.3 peer-group internal
    neighbor 220.198.32.4 remote-as 4809
    neighbor 220.198.32.4 peer-group internal
    !

    XRV2

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

    hostname XRV2
    !

    interface Loopback0
    ip address 220.198.32.2 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.2 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.1.2 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet2
    ip address 10.10.1.13 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet3
    ip address 10.10.1.21 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    router isis 100
    net 49.0000.2201.9832.2000.00
    is-type level-2-only
    !
    router bgp 4809
    bgp router-id 220.198.32.2
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.2 mask 255.255.255.255
    neighbor internal peer-group
    neighbor internal password cisco
    neighbor internal update-source Loopback0
    neighbor 220.198.32.1 remote-as 4809
    neighbor 220.198.32.1 peer-group internal
    neighbor 220.198.32.3 remote-as 4809
    neighbor 220.198.32.3 peer-group internal
    neighbor 220.198.32.4 remote-as 4809
    neighbor 220.198.32.4 peer-group internal
    !

    XRV3

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

    !
    hostname XRV3
    !

    interface Loopback0
    ip address 220.198.32.3 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.3 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.1.5 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet2
    ip address 10.10.1.10 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet3
    ip address 10.10.1.22 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet4
    ip address 123.103.15.1 255.255.255.252
    negotiation auto
    bfd interval 250 min_rx 250 multiplier 3
    !
    router isis 100
    net 49.0000.2201.9832.3000.00
    is-type level-2-only
    redistribute static ip
    !
    router isis 1200
    !
    router bgp 4809
    bgp router-id 220.198.32.3
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.3 mask 255.255.255.255
    neighbor internal peer-group
    neighbor internal password cisco
    neighbor internal update-source Loopback0
    neighbor internal next-hop-self
    neighbor internal route-map external-import out
    neighbor 123.103.15.2 remote-as 9808
    neighbor 123.103.15.2 password cisco
    neighbor 123.103.15.2 fall-over bfd
    neighbor 220.198.32.1 remote-as 4809
    neighbor 220.198.32.1 peer-group internal
    neighbor 220.198.32.2 remote-as 4809
    neighbor 220.198.32.2 peer-group internal
    neighbor 220.198.32.4 remote-as 4809
    neighbor 220.198.32.4 peer-group internal
    !
    !
    virtual-service csr_mgmt
    !
    ip forward-protocol nd
    !
    no ip http server
    no ip http secure-server
    ip route 108.108.108.1 255.255.255.255 123.103.15.2
    !
    !
    ip prefix-list external-import seq 5 permit 114.114.1.5/32
    ip prefix-list external-import seq 10 permit 114.114.1.6/32
    !
    route-map external-import permit 10
    match ip address prefix-list external-import
    set ip next-hop 108.108.108.1
    !
    route-map external-import permit 20
    !

    XRV4

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

    !
    hostname XRV4
    !

    interface Loopback0
    ip address 220.198.32.4 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.4 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.1.6 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet2
    ip address 10.10.1.14 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet3
    ip address 10.10.1.18 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet4
    ip address 61.135.142.1 255.255.255.252
    negotiation auto
    bfd interval 250 min_rx 250 multiplier 3
    !
    router isis 100
    net 49.0000.2201.9832.4000.00
    is-type level-2-only
    redistribute static ip
    !
    router bgp 4809
    bgp router-id 220.198.32.4
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.4 mask 255.255.255.255
    neighbor internal peer-group
    neighbor internal password cisco
    neighbor internal update-source Loopback0
    neighbor internal next-hop-self
    neighbor internal route-map external-import out
    neighbor 61.135.142.2 remote-as 9808
    neighbor 61.135.142.2 password cisco
    neighbor 61.135.142.2 fall-over bfd
    neighbor 220.198.32.1 remote-as 4809
    neighbor 220.198.32.1 peer-group internal
    neighbor 220.198.32.2 remote-as 4809
    neighbor 220.198.32.2 peer-group internal
    neighbor 220.198.32.3 remote-as 4809
    neighbor 220.198.32.3 peer-group internal
    !
    !
    virtual-service csr_mgmt
    !
    ip forward-protocol nd
    !
    no ip http server
    no ip http secure-server
    ip route 108.108.108.1 255.255.255.255 61.135.142.2
    !
    !
    ip prefix-list external-import seq 5 permit 114.114.1.5/32
    ip prefix-list external-import seq 10 permit 114.114.1.6/32
    !
    route-map external-import permit 10
    match ip address prefix-list external-import
    set ip next-hop 108.108.108.1
    !
    route-map external-import permit 20
    !

    XRV5

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

    !
    hostname XRV5

    !
    interface Loopback0
    ip address 220.198.32.5 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.5 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.2.1 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet4
    ip address 123.103.15.2 255.255.255.252
    negotiation auto
    bfd interval 250 min_rx 250 multiplier 3
    !
    router isis 100
    net 49.0000.2201.9832.5000.00
    is-type level-2-only
    !
    router bgp 9808
    bgp router-id 220.198.32.5
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.5 mask 255.255.255.255
    neighbor 123.103.15.1 remote-as 4809
    neighbor 123.103.15.1 password cisco
    neighbor 123.103.15.1 fall-over bfd
    neighbor 220.198.32.6 remote-as 9808
    neighbor 220.198.32.6 password cisco
    neighbor 220.198.32.6 update-source Loopback0
    neighbor 220.198.32.6 next-hop-self
    !

    XRV6

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

    !
    hostname XRV6

    interface Loopback0
    ip address 220.198.32.6 255.255.255.255
    ip router isis 100
    !
    interface Loopback1
    ip address 114.114.1.6 255.255.255.255
    !
    interface GigabitEthernet1
    ip address 10.10.2.2 255.255.255.252
    ip router isis 100
    negotiation auto
    isis circuit-type level-2-only
    !
    interface GigabitEthernet4
    ip address 61.135.142.2 255.255.255.252
    negotiation auto
    bfd interval 250 min_rx 250 multiplier 3
    !
    router isis 100
    net 49.0000.2201.9832.6000.00
    is-type level-2-only
    !
    router bgp 9808
    bgp router-id 220.198.32.6
    bgp log-neighbor-changes
    bgp graceful-restart restart-time 120
    bgp graceful-restart stalepath-time 360
    bgp graceful-restart
    network 114.114.1.6 mask 255.255.255.255
    neighbor 61.135.142.1 remote-as 4809
    neighbor 61.135.142.1 password cisco
    neighbor 61.135.142.1 fall-over bfd
    neighbor 220.198.32.5 remote-as 9808
    neighbor 220.198.32.5 password cisco
    neighbor 220.198.32.5 update-source Loopback0
    neighbor 220.198.32.5 next-hop-self
    !

    在XRV1上使用show ip bgp 查看BGP路由表

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

    在XRV1上使用tracert跟踪路由,源为XRV1的l1地址,目标为XRV5的l1地址

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

    配置要点:

    1.在两个ISP的边界上写一条下一跳并非真实存在的路由,下一跳指向友商的真实的EBGP的接口地址

    2.将上述静态路由重分布进ISIS路由

    3.在边界上通过前缀列表匹配需要进行IBGP负载的友商的路由

    4.通过route-map进行修改需要进行IBGP负载的友商的路由的下一跳为1的静态的目标路由

    5.在边界上通过neighbor调用route-map修改下一跳后发布给IBGP

    6.IBGP邻居受到从EBGP学习到的路由后即可实现负载

  • 相关阅读:
    Oracle.ManagedDataAccess.dll 连接Oracle数据库不需要安装客户端
    Oracle.DataAccess.Client.OracleCommand”的类型初始值设定项引发异常
    SQLAchemy
    MySQL 索引详解大全
    不用任何图片,只用简单的css写出唯美的钟表,就问你行吗?
    Ajax详解
    Mysql自定义函数
    MySQL目录
    Mysql函数集合
    MySQL之扩展(触发器,存储过程等)
  • 原文地址:https://www.cnblogs.com/networking/p/10809863.html
Copyright © 2011-2022 走看看