BGP水平分割

Posted

tags:

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

实验拓扑:
技术分享图片
实验需求:
配置BGP ,AR1通过虚拟接口ping通AR6。
需求分析:

  1. 配置IBGP 和EBGP
  2. 分配AS
    实验步骤:
  3. 为每一台路由器配置虚拟地址以及IP地址
    例:Interface GigabitEthernet 0/0/0
    Ip address 192.168.10.1 255.255.255.0
    Interface lookback 0
    Ip address 10.10.10.1 255.255.255.0
  4. AR2至AR5 配置ospf
    例: AR2:OSPF 1 router-id 2.2.2.2
    Area 0
    Network 192.168.20.0 0.0.0.255
    Network 10.10.2.2 0.0.0.0
    AR3:ospf 1 router-id 3.3.3.3
    Area 0
    Network 192.168.20.0 0.0.0.255
    Network 192.168.30.0 0.0.0.255
    Network 10.10.3.3 0.0.0.0
    3.AR1 的AS 设置为100
    AR2至AR5设置大AS号为200
    AR6设置为600
    AR2 和AR3设置为小AS 64523
    AR4 和AR5 设置为小AS 64545
    4.配置命令:
    R1:
    undo terminal monitor
    system-view
    sysname R1
    interface loopback 0
    ip address 10.10.1.1 32
    interface gigabitethernet 0/0/0
    ip address 192.168.10.1 24
    quit
    bgp 100
    router 1.1.1.1
    peer 192.168.10.2 as-number 200
    network 10.10.1.1 255.255.255.255
    quit

R2
undo terminal monitor
system-view
sysname R2
interface loopback 0
ip address 10.10.2.2 32
interface gigabitethernet 0/0/0
ip address 192.168.20.1 24
interface gigabitethernet 0/0/1
ip address 192.168.10.2 24
quit
ospf 1 router-id 2.2.2.2
area 0
network 192.168.20.0 0.0.0.255
network 10.10.2.2 0.0.0.0
quit
quit
bgp 64523 设置联盟的小AS号
router-id 2.2.2.2
confederation id 200 配置联盟号
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
发送BGP 报文时所使用的源IP
peer 192.168.10.1 as-number 100 指定邻居的IP地址以及邻居的AS号
peer 10.10.3.3 next-hop-local 设置最大下一跳
quit

R3
undo terminal monitor
system-view
sysname R3
interface gigabitethernet 0/0/0
ip address 192.168.30.1 24
interface gigabitethernet 0/0/1
ip address 192.168.20.2 24
interface loopback 0
ip address 10.10.3.3 32
quit
ospf 1 router-id 3.3.3.3
area 0
network 192.168.20.0 0.0.0.255
network 192.168.30.0 0.0.0.255
network 10.10.3.3 0.0.0.0
quit
quit
bgp 64523
router-id 3.3.3.3
confederation id 200
confederation peer-as 64545 将 64545 设置为同一个联盟下小AS
peer 10.10.2.2 as-number 64523
peer 10.10.2.2 connect-interface LoopBack0
peer 10.10.4.4 as-number 64545
peer 10.10.4.4 connect-interface LoopBack0
peer 10.10.4.4 ebgp-max-hop 更改TTL值
quit

R4
undo teminal monitor
system-view
sysname R4
interface loopback 0
ip address 10.10.4.4 32
interface gigabitethernet 0/0/0
ip address 192.168.40.1 24
interface gigabitethernet 0/0/1
ip address 192.168.30.2 24
quit
ospf 1 router-id 4.4.4.4
area 0
network 192.168.30.0 0.0.0.255
network 192.168.40.0 0.0.0.255
network 10.10.4.4 0.0.0.0
quit
quit
bgp 64545
router-id 4.4.4.4
confederation id 200
confederation peer-as 64523
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface loopback 0
peer 10.10.3.3 ebgp-max-hop
peer 10.10.5.5 as-number 64545
peer 10.10.5.5 connect-interface loopback 0
quit

R5
undo terminal monitor
system-view
sysname R5
interface gigabitethernet 0/0/0
ip address 192.168.50.1 24
interface gigabitethernet 0/0/1
ip address 192.168.40.2 24
interface loopback 0
ip address 10.10.5.5 32
quit
ospf 1 router-id 5.5.5.5
area 0
network 192.168.40.0 0.0.0.255
network 10.10.5.5 0.0.0.0
quit
quit
bgp 64545
router-id 5.5.5.5
confederation id 200
peer 10.10.4.4 as-number 64545
peer 10.10.4.4 connect-interface LoopBack0
peer 10.10.4.4 next-hop-local
peer 192.168.50.2 as-number 600
quit

R6
undo terminal monitor
system-view
sysname R6
interface gigabitethernet 0/0/1
ip address 192.168.50.2 24
interface loopback 0
ip address 10.10.6.6 32
quit
bgp 600
router-id 6.6.6.6
peer 192.168.50.1 as-number 200
import-route direct
quit

以上是关于BGP水平分割的主要内容,如果未能解决你的问题,请参考以下文章

BGP基础知识

BGP的环路问题以及水平分割(厂商:huawei)版权所属:Vincent-yang未经允许禁止用于商用,仅供参考。

Calico BGP RR Model

[svc]gns3模拟器及探讨几个bgp问题

日常笔记--GBP路由策略

数据库的水平分割和垂直分割