BGP-一网双平面

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BGP-一网双平面相关的知识,希望对你有一定的参考价值。

技术分享图片
要求:
西安节点的环回10.100.1.1东莞节点的10.200.1.1的访问流量走A 面。
西安节点的环回10.100.2.2东莞节点的10.200.2.2的访问流量走B面。
A,B两面互为备份。
A面 AS=1
B面 AS=2
西安节点AS=3
东莞节点AS=4
同城之间建立EBGP邻居关系,异城之间建立IBGP邻居关系,AS 1和2内部IBGP邻居关系全互连。
方法:
在A面抓取B面路由,在同城的EBGP邻居之间修改WEIGHT值。
在B面抓取A面路由,在同城的EBGP邻居之间修改WEIGHT值。
没有采取任何策略
XIAN#show ip bgp
BGP table version is 5, local router ID is 10.100.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

 Network          Next Hop            Metric LocPrf Weight Path

> 10.100.1.1/32 0.0.0.0 0 32768 i
> 10.100.2.2/32 0.0.0.0 0 32768 i

  • 10.200.1.1/32 10.99.1.1 0 1 2 4 i
    *> 10.99.2.1 0 2 4 i
  • 10.200.2.2/32 10.99.1.1 0 1 2 4 i
    > 10.99.2.1 0 2 4 i
    DONGGUAN#show ip bgp
    BGP table version is 7, local router ID is 10.200.2.2
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path
    *> 10.100.1.1/32 10.99.4.1 0 2 3 i

  • 10.99.3.1 0 1 2 3 i
    *> 10.100.2.2/32 10.99.4.1 0 2 3 i
  • 10.99.3.1 0 1 2 3 i
    > 10.200.1.1/32 0.0.0.0 0 32768 i
    > 10.200.2.2/32 0.0.0.0 0 32768 i

XIAN#traceroute 10.200.1.1 source 10.100.1.1 numeric
Type escape sequence to abort.
Tracing the route to 10.200.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.99.2.1 10 msec 12 msec 10 msec
2 10.1.68.1 26 msec 21 msec 19 msec
3 10.1.46.1 30 msec 32 msec 36 msec
4 10.99.4.2 42 msec 34 msec
XIAN#tr
XIAN#traceroute 10.200.2.2 so
XIAN#traceroute 10.200.2.2 source 10.100.2.2 nu
XIAN#traceroute 10.200.2.2 source 10.100.2.2 numeric
Type escape sequence to abort.
Tracing the route to 10.200.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.99.2.1 10 msec 10 msec 10 msec
2 10.1.68.1 15 msec 21 msec 19 msec
3 10.1.46.1 29 msec 30 msec 24 msec
4 10.99.4.2 39 msec
52 msec
XIAN#
DONGGUAN#traceroute 10.100.1.1 source 10.200.1.1 numeric
Type escape sequence to abort.
Tracing the route to 10.100.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.99.4.1 11 msec 10 msec 6 msec
2 10.1.24.1 20 msec 21 msec 20 msec
3 10.1.28.2 29 msec 29 msec 30 msec
4 10.99.2.2 42 msec 52 msec
DONGGUAN#tr
DONGGUAN#traceroute 10.100.2.2 so
DONGGUAN#traceroute 10.100.2.2 source 10.200.2.2 nu
DONGGUAN#traceroute 10.100.2.2 source 10.200.2.2 numeric
Type escape sequence to abort.
Tracing the route to 10.100.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.99.4.1 12 msec 14 msec 38 msec
2 10.1.24.1 27 msec 23 msec 48 msec
3 10.1.28.2 34 msec 33 msec 30 msec
4 10.99.2.2 44 msec
40 msec
DONGGUAN#
配置
XIAN#show run | s bgp
router bgp 3
bgp log-neighbor-changes
network 10.100.1.1 mask 255.255.255.255
network 10.100.2.2 mask 255.255.255.255
neighbor 10.99.1.1 remote-as 1
neighbor 10.99.1.1 send-community both
neighbor 10.99.1.1 route-map A in
neighbor 10.99.2.1 remote-as 2
neighbor 10.99.2.1 send-community both
neighbor 10.99.2.1 route-map B in
XIAN#show ip pre
XIAN#show ip prefix-list
ip prefix-list A: 2 entries
seq 5 permit 10.100.1.1/32
seq 10 permit 10.200.1.1/32
ip prefix-list B: 2 entries
seq 5 permit 10.100.2.2/32
seq 10 permit 10.200.2.2/32
XIAN#sho
XIAN#show ro
XIAN#show route-map
route-map A, permit, sequence 10
Match clauses:
ip address prefix-lists: A
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
route-map A, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map B, permit, sequence 10
Match clauses:
ip address prefix-lists: B
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
route-map B, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
XIAN#
DONGGUAN#show run | s bgp
router bgp 4
bgp log-neighbor-changes
network 10.200.1.1 mask 255.255.255.255
network 10.200.2.2 mask 255.255.255.255
neighbor 10.99.3.1 remote-as 1
neighbor 10.99.3.1 send-community both
neighbor 10.99.3.1 route-map A in
neighbor 10.99.4.1 remote-as 2
neighbor 10.99.4.1 send-community both
neighbor 10.99.4.1 route-map B in
DONGGUAN#show ip pre
DONGGUAN#show ip prefix-list
ip prefix-list A: 2 entries
seq 5 permit 10.100.1.1/32
seq 10 permit 10.200.1.1/32
ip prefix-list B: 2 entries
seq 5 permit 10.100.2.2/32
seq 10 permit 10.200.2.2/32
DONGGUAN#show ro
DONGGUAN#show route-map
route-map A, permit, sequence 10
Match clauses:
ip address prefix-lists: A
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
route-map A, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map B, permit, sequence 10
Match clauses:
ip address prefix-lists: B
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
route-map B, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
配置后
XIAN#show ip bgp
BGP table version is 7, local router ID is 10.100.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

 Network          Next Hop            Metric LocPrf Weight Path

> 10.100.1.1/32 0.0.0.0 0 32768 i
> 10.100.2.2/32 0.0.0.0 0 32768 i
*> 10.200.1.1/32 10.99.1.1 200 1 2 4 i

  • 10.99.2.1 0 2 4 i
  • 10.200.2.2/32 10.99.1.1 0 1 2 4 i
    > 10.99.2.1 200 2 4 i
    DONGGUAN#show ip bgp
    BGP table version is 9, local router ID is 10.200.2.2
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • 10.100.1.1/32 10.99.4.1 0 2 3 i
    > 10.99.3.1 200 1 2 3 i
    > 10.100.2.2/32 10.99.4.1 200 2 3 i
  • 10.99.3.1 0 1 2 3 i
    > 10.200.1.1/32 0.0.0.0 0 32768 i
    > 10.200.2.2/32 0.0.0.0 0 32768 i
    配置前
    BJ-A#show ip bgp
    BGP table version is 7, local router ID is 10.1.1.1
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • 10.100.1.1/32 10.1.12.2 0 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
    *> 10.99.1.2 0 0 3 i
  • 10.100.2.2/32 10.1.12.2 0 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
    *> 10.99.1.2 0 0 3 i
  • i 10.200.1.1/32 10.1.78.2 0 100 0 2 4 i
    *> 10.1.12.2 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
  • 10.200.2.2/32 10.99.1.2 0 3 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
    *> 10.1.12.2 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i

配置后
BJ-A#clear ip bgp soft out
BJ-A#show ro
BJ-A#show ip bgp
BGP table version is 9, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history,
valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

 Network          Next Hop            Metric LocPrf Weight Path
  • 10.100.1.1/32 10.1.12.2 0 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
    > 10.99.1.2 0 0 3 i
    > 10.100.2.2/32 10.1.12.2 200 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • 10.99.1.2 0 0 3 i
  • i 10.200.1.1/32 10.1.78.2 0 100 0 2 4 i
    *> 10.1.12.2 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
  • 10.200.2.2/32 10.99.1.2 0 3 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
    *> 10.1.12.2 200 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
    BJ-A#
    配置
    BJ-A#show run | s bgp
    router bgp 1
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 1
    neighbor k update-source Loopback0
    neighbor k send-community both
    neighbor 10.1.12.2 remote-as 2
    neighbor 10.1.12.2 send-community both
    neighbor 10.1.12.2 route-map A in
    neighbor 10.3.3.3 peer-group k
    neighbor 10.5.5.5 peer-group k
    neighbor 10.7.7.7 peer-group k
    neighbor 10.99.1.2 remote-as 3
    neighbor 10.99.1.2 send-community both
    BJ-A#show ip pre
    BJ-A#show ip prefix-list
    ip prefix-list B: 2 entries
    seq 5 permit 10.100.2.2/32
    seq 10 permit 10.200.2.2/32
    BJ-A#show ro
    BJ-A#show route-map
    route-map A, permit, sequence 10
    Match clauses:
    ip address prefix-lists: B
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map A, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    BJ-A#
    配置前
    CD-A#show ip bgp
    BGP table version is 5, local router ID is 10.7.7.7
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
    *> 10.1.78.2 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
  • i 10.100.2.2/32 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
    *> 10.1.78.2 0 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
    *> 10.200.1.1/32 10.1.78.2 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
    *> 10.200.2.2/32 10.1.78.2 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
    配置后
    CD-A#show ip bgp
    BGP table version is 7, local router ID is 10.7.7.7
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
    *> 10.1.78.2 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
  • i 10.100.2.2/32 10.1.34.2 0 100 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
    *> 10.1.78.2 200 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
    *> 10.200.1.1/32 10.1.78.2 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
    *> 10.200.2.2/32 10.1.78.2 200 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
    CD-A#
    配置
    CD-A#show run | s bgp
    router bgp 1
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 1
    neighbor k update-source Loopback0
    neighbor k send-community both
    neighbor 10.1.1.1 peer-group k
    neighbor 10.1.78.2 remote-as 2
    neighbor 10.1.78.2 send-community both
    neighbor 10.1.78.2 route-map A in
    neighbor 10.3.3.3 peer-group k
    neighbor 10.5.5.5 peer-group k
    CD-A#show ro
    CD-A#show route-map
    route-map A, permit, sequence 10
    Match clauses:
    ip address prefix-lists: B
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map A, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    CD-A#show ip pre
    CD-A#show ip prefix-list
    ip prefix-list B: 2 entries
    seq 5 permit 10.100.2.2/32
    seq 10 permit 10.200.2.2/32
    配置前
    SH-A#show ip bgp
    BGP table version is 5, local router ID is 10.5.5.5
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.1.34.2 0 100 0 2 3 i
    *> 10.1.67.2 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
  • 10.100.2.2/32 10.99.3.2 0 4 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
    *> 10.1.67.2 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
  • 10.200.1.1/32 10.1.67.2 0 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
    *> 10.99.3.2 0 0 4 i
  • 10.200.2.2/32 10.1.67.2 0 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
    > 10.99.3.2 0 0 4 i
    配置后
    SH-A#show ip bgp
    BGP table version is 7, local router ID is 10.5.5.5
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.1.34.2 0 100 0 2 3 i
    *> 10.1.67.2 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
  • 10.100.2.2/32 10.99.3.2 0 4 2 3 i
  • i 10.1.34.2 0 100 0 2 3 i
    *> 10.1.67.2 200 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
  • 10.200.1.1/32 10.1.67.2 0 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
    > 10.99.3.2 0 0 4 i
    > 10.200.2.2/32 10.1.67.2 200 2 4 i
  • i 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
  • i 10.1.34.2 0 100 0 2 4 i
  • 10.99.3.2 0 0 4 i
    配置
    SH-A#show run | s bgp
    router bgp 1
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 1
    neighbor k update-source Loopback0
    neighbor k send-community both
    neighbor 10.1.1.1 peer-group k
    neighbor 10.1.67.2 remote-as 2
    neighbor 10.1.67.2 send-community both
    neighbor 10.1.67.2 route-map A in
    neighbor 10.3.3.3 peer-group k
    neighbor 10.7.7.7 peer-group k
    neighbor 10.99.3.2 remote-as 4
    neighbor 10.99.3.2 send-community both
    SH-A#show ip pre
    SH-A#show ip prefix-list
    ip prefix-list B: 2 entries
    seq 5 permit 10.100.2.2/32
    seq 10 permit 10.200.2.2/32
    SH-A#show ro
    SH-A#show route-map
    route-map A, permit, sequence 10
    Match clauses:
    ip address prefix-lists: B
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map A, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    配置前
    SZ-A#show ip bgp
    BGP table version is 5, local router ID is 10.3.3.3
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path
    *> 10.100.1.1/32 10.1.34.2 0 2 3 i

  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
    *> 10.100.2.2/32 10.1.34.2 0 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
  • i 10.200.1.1/32 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
    *> 10.1.34.2 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
  • i 10.200.2.2/32 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
    *> 10.1.34.2 0 2 4 i
  • i 10.1.67.2 0 100 0 2 4 i
    SZ-A#
    配置后
    SZ-A#show ip bgp
    BGP table version is 9, local router ID is 10.3.3.3
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path
    *> 10.100.1.1/32 10.1.34.2 0 2 3 i

  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.99.1.2 0 100 0 3 i
    *> 10.100.2.2/32 10.1.34.2 200 2 3 i
  • i 10.1.67.2 0 100 0 2 3 i
  • i 10.1.78.2 0 100 0 2 3 i
  • i 10.1.12.2 0 100 0 2 3 i
  • i 10.200.1.1/32 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
    *> 10.1.34.2 0 2 4 i
  • i 10.99.3.2 0 100 0 4 i
  • i 10.200.2.2/32 10.1.78.2 0 100 0 2 4 i
  • i 10.1.12.2 0 100 0 2 4 i
    *> 10.1.34.2 200 2 4 i
  • i 10.1.67.2 0 100 0 2 4 i
    SZ-A#
    配置
    SZ-A#show run | s bgp
    router bgp 1
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 1
    neighbor k update-source Loopback0
    neighbor k send-community both
    neighbor 10.1.1.1 peer-group k
    neighbor 10.1.34.2 remote-as 2
    neighbor 10.1.34.2 send-community both
    neighbor 10.1.34.2 route-map A in
    neighbor 10.5.5.5 peer-group k
    neighbor 10.7.7.7 peer-group k
    SZ-A#show ip pre
    SZ-A#show ip prefix-list
    ip prefix-list B: 2 entries
    seq 5 permit 10.100.2.2/32
    seq 10 permit 10.200.2.2/32
    SZ-A#show ro
    SZ-A#show route-map
    route-map A, permit, sequence 10
    Match clauses:
    ip address prefix-lists: B
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map A, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    SZ-A#
    qian
    CD-B#show ip bgp
    BGP table version is 7, local router ID is 10.8.8.8
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path
    > 10.100.1.1/32 10.99.2.2 0 0 3 i
    > 10.100.2.2/32 10.99.2.2 0 0 3 i
    >i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    配置前
    BJ-B#show ip bgp
    BGP table version is 9, local router ID is 10.2.2.2
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path
    *>i 10.100.1.1/32 10.8.8.8 0 100 0 3 i

  • 10.1.12.1 0 1 3 i
    >i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
    >i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    BJ-B#
    配置后
    BJ-B#show ip bgp
    BGP table version is 10, local router ID is 10.2.2.2
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.8.8.8 0 100 0 3 i
    > 10.1.12.1 200 1 3 i
    >i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
    >i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    BJ-B#
    配置
    BJ-B#show run | s bgp
    router bgp 2
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 2
    neighbor k update-source Loopback0
    neighbor k next-hop-self
    neighbor k send-community both
    neighbor 10.1.12.1 remote-as 1
    neighbor 10.1.12.1 send-community both
    neighbor 10.1.12.1 route-map B in
    neighbor 10.4.4.4 peer-group k
    neighbor 10.6.6.6 peer-group k
    neighbor 10.8.8.8 peer-group k
    BJ-B#show ro
    BJ-B#show route-map
    route-map B, permit, sequence 10
    Match clauses:
    ip address prefix-lists: A
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map B, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    BJ-B#show ip pre
    BJ-B#show ip prefix-list
    ip prefix-list A: 2 entries
    seq 5 permit 10.100.1.1/32
    seq 10 permit 10.200.1.1/32
    配置前
    SH-B#show ip bgp
    BGP table version is 7, local router ID is 10.6.6.6
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.2.2.2 0 100 0 1 3 i
    >i 10.8.8.8 0 100 0 3 i
    >i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
    *>i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
  • 10.1.67.1 0 1 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    SH-B#
    配置后
    SH-B#show ip bgp
    BGP table version is 8, local router ID is 10.6.6.6
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.2.2.2 0 100 0 1 3 i
    >i 10.8.8.8 0 100 0 3 i
    >i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
  • i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
    > 10.1.67.1 200 1 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    SH-B#show run | s bgp
    router bgp 2
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 2
    neighbor k update-source Loopback0
    neighbor k next-hop-self
    neighbor k send-community both
    neighbor 10.1.67.1 remote-as 1
    neighbor 10.1.67.1 send-community both
    neighbor 10.1.67.1 route-map B in
    neighbor 10.2.2.2 peer-group k
    neighbor 10.4.4.4 peer-group k
    neighbor 10.8.8.8 peer-group k
    SH-B#show ro
    SH-B#show route-map
    route-map B, permit, sequence 10
    Match clauses:
    ip address prefix-lists: A
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map B, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    SH-B#show ip pre
    SH-B#show ip prefix-list
    ip prefix-list A: 2 entries
    seq 5 permit 10.100.1.1/32
    seq 10 permit 10.200.1.1/32
    配置前
    SZ-B#show ip bgp
    BGP table version is 5, local router ID is 10.4.4.4
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.2.2.2 0 100 0 1 3 i
    >i 10.8.8.8 0 100 0 3 i
    >i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
  • i 10.200.1.1/32 10.6.6.6 0 100 0 1 4 i
    > 10.99.4.2 0 0 4 i
    > 10.200.2.2/32 10.99.4.2 0 0 4 i
    配置
    SZ-B#show run | s bgp
    router bgp 2
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 2
    neighbor k update-source Loopback0
    neighbor k next-hop-self
    neighbor k send-community both
    neighbor 10.1.34.1 remote-as 1
    neighbor 10.1.34.1 send-community both
    neighbor 10.1.34.1 route-map B in
    neighbor 10.2.2.2 peer-group k
    neighbor 10.6.6.6 peer-group k
    neighbor 10.8.8.8 peer-group k
    neighbor 10.99.4.2 remote-as 4
    neighbor 10.99.4.2 send-community both
    SZ-B#show ip pre
    SZ-B#show ip prefix-list
    ip prefix-list A: 2 entries
    seq 5 permit 10.100.1.1/32
    seq 10 permit 10.200.1.1/32
    SZ-B#show ro
    SZ-B#show route-map
    route-map B, permit, sequence 10
    Match clauses:
    ip address prefix-lists: A
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map B, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    配置前
    CD-B#show ip bgp
    BGP table version is 10, local router ID is 10.8.8.8
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.2.2.2 0 100 0 1 3 i
    *> 10.99.2.2 0 0 3 i
  • i 10.100.2.2/32 10.2.2.2 0 100 0 1 3 i
    > 10.99.2.2 0 0 3 i
    >i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
  • i 10.6.6.6 0 100 0 1 4 i
    >i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    配置
    CD-B#show run | s bgp
    router bgp 2
    bgp log-neighbor-changes
    neighbor k peer-group
    neighbor k remote-as 2
    neighbor k update-source Loopback0
    neighbor k next-hop-self
    neighbor k send-community both
    neighbor 10.1.78.1 remote-as 1
    neighbor 10.1.78.1 send-community both
    neighbor 10.1.78.1 route-map B in
    neighbor 10.2.2.2 peer-group k
    neighbor 10.4.4.4 peer-group k
    neighbor 10.6.6.6 peer-group k
    neighbor 10.99.2.2 remote-as 3
    neighbor 10.99.2.2 send-community both
    CD-B#show ip pre
    CD-B#show ip prefix-list
    ip prefix-list A: 2 entries
    seq 5 permit 10.100.1.1/32
    seq 10 permit 10.200.1.1/32
    CD-B#show ro
    CD-B#show route-map
    route-map B, permit, sequence 10
    Match clauses:
    ip address prefix-lists: A
    Set clauses:
    weight 200
    Policy routing matches: 0 packets, 0 bytes
    route-map B, permit, sequence 20
    Match clauses:
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    CD-B#
    结果
    10.100.2.2和10.200.2.2 互相访问走流量B面
    XIAN#traceroute 10.200.2.2 source 10.100.2.2 numeric
    Type escape sequence to abort.
    Tracing the route to 10.200.2.2
    VRF info: (vrf in name/id, vrf out name/id)
    1 10.99.2.1 11 msec 11 msec 10 msec
    2 10.1.68.1 19 msec 21 msec 27 msec
    3 10.1.46.1 31 msec 30 msec 36 msec
    4 10.99.4.2 39 msec
    36 msec
    XIAN#
    DONGGUAN#traceroute 10.100.2.2 source 10.200.2.2 numeric
    Type escape sequence to abort.
    Tracing the route to 10.100.2.2
    VRF info: (vrf in name/id, vrf out name/id)
    1 10.99.4.1 10 msec 12 msec 20 msec
    2 10.1.24.1 37 msec 21 msec 20 msec
    3 10.1.28.2 36 msec 29 msec 29 msec
    4 10.99.2.2 47 msec 37 msec
    DONGGUAN#
    10.100.1.1和10.200.1.1 互相访问走流量A面出现问题
    XIAN#traceroute 10.200.1.1 source 10.100.1.1 numeric
    Type escape sequence to abort.
    Tracing the route to 10.200.1.1
    VRF info: (vrf in name/id, vrf out name/id)
    1 10.99.1.1 6 msec 9 msec 15 msec
    2 10.1.12.2 11 msec 11 msec 11 msec
    3 10.1.24.2 27 msec 17 msec 19 msec
    4 10.99.4.2 28 msec
    28 msec
    DONGGUAN#traceroute 10.100.1.1 source 10.200.1.1 numeric
    Type escape sequence to abort.
    Tracing the route to 10.100.1.1
    VRF info: (vrf in name/id, vrf out name/id)
    1 10.99.3.1 13 msec 11 msec 21 msec
    2 10.1.67.2 11 msec 11 msec 13 msec
    3 10.1.68.2 22 msec 22 msec 18 msec
    4 10.99.2.2 27 msec 26 msec
    CD-B#show ip bgp
    BGP table version is 10, local router ID is 10.8.8.8
    Status codes: s suppressed, d damped, h history,
    valid, > best, i - internal,
    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
    x best-external, a additional-path, c RIB-compressed,
    Origin codes: i - IGP, e - EGP, ? - incomplete
    RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • i 10.100.1.1/32 10.2.2.2 0 100 0 1 3 i
    > 10.99.2.2 0 0 3 i
    > 10.100.2.2/32 10.99.2.2 0 0 3 i
    *>i 10.200.1.1/32 10.4.4.4 0 100 0 4 i
  • i 10.6.6.6 0 100 0 1 4 i
    *>i 10.200.2.2/32 10.4.4.4 0 100 0 4 i
    CD-B#show ip bgp su
    CD-B#show ip bgp summary
    BGP router identifier 10.8.8.8, local AS number 2
    BGP table version is 10, main routing table version 10
    4 network entries using 576 bytes of memory
    6 path entries using 360 bytes of memory
    4/2 BGP path/bestpath attribute entries using 544 bytes of memory
    4 BGP AS-PATH entries using 96 bytes of memory
    0 BGP route-map cache entries using 0 bytes of memory
    0 BGP filter-list cache entries using 0 bytes of memory
    BGP using 1576 total bytes of memory
    BGP activity 4/0 prefixes, 10/4 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.78.1 4 1 69 79 10 0 0 00:58:16 0
10.2.2.2 4 2 73 82 10 0 0 00:58:15 1
10.4.4.4 4 2 62 72 10 0 0 00:47:44 2
10.6.6.6 4 2 78 82 10 0 0 00:58:14 1
10.99.2.2 4 3 91 87 10 0 0 00:58:19 2
CD-B#
SZ-B#show ip bgp
BGP table version is 11, local router ID is 10.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

 Network          Next Hop            Metric LocPrf Weight Path

*>i 10.100.1.1/32 10.8.8.8 0 100 0 3 i

  • i 10.2.2.2 0 100 0 1 3 i
    *>i 10.100.2.2/32 10.8.8.8 0 100 0 3 i
  • i 10.200.1.1/32 10.6.6.6 0 100 0 1 4 i
    > 10.99.4.2 0 0 4 i
    > 10.200.2.2/32 10.99.4.2 0 0 4 i
    SZ-B#show ip bgp su
    SZ-B#show ip bgp summary
    BGP router identifier 10.4.4.4, local AS number 2
    BGP table version is 11, main routing table version 11
    4 network entries using 576 bytes of memory
    6 path entries using 360 bytes of memory
    4/2 BGP path/bestpath attribute entries using 544 bytes of memory
    4 BGP AS-PATH entries using 96 bytes of memory
    0 BGP route-map cache entries using 0 bytes of memory
    0 BGP filter-list cache entries using 0 bytes of memory
    BGP using 1576 total bytes of memory
    BGP activity 8/4 prefixes, 16/10 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.34.1 4 1 57 62 11 0 0 00:48:52 0
10.2.2.2 4 2 61 57 11 0 0 00:48:52 1
10.6.6.6 4 2 62 57 11 0 0 00:48:52 1
10.8.8.8 4 2 73 63 11 0 0 00:48:52 2
10.99.4.2 4 4 78 69 11 0 0 00:48:52 2
SZ-B#

以上是关于BGP-一网双平面的主要内容,如果未能解决你的问题,请参考以下文章

BGP的一网双平面

使用BGP E***方式部署分布式网关VXLAN

BGP

如何优化C ++代码的以下片段 - 卷中的零交叉

在片段着色器中,为啥我不能使用平面输入整数来索引 sampler2D 的统一数组?

互联网协议 — BGP-EVPN/VxLAN SDN 方案