码迷,mamicode.com
首页 > 其他好文 > 详细

BGP水平分割

时间:2018-09-20 01:10:58      阅读:364      评论:0      收藏:0      [点我收藏+]

标签:虚拟接口   地址   使用   proc   bit   ping   虚拟   命令   text   

实验拓扑:
技术分享图片
实验需求:
配置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水平分割

标签:虚拟接口   地址   使用   proc   bit   ping   虚拟   命令   text   

原文地址:http://blog.51cto.com/13975564/2177340

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!