目录
前言
网盘资源!!!
已完成接口IP地址配置和OSPF宣告
display ip interface brief
diplay ospf routing
一、实验拓扑图
二、实验目的
利用联邦划分的方法 实现AS间的路由传递
三、实验配置
AS内 R2-R3-R4 环回口建立邻居
AS间 R1-R2和 R4-R5 直连接口建立邻居
- 路由器声明BGP进程
- 普通EBGP邻居建立
- 联邦IBGP邻居建立
- 联邦EBGP邻居建立
1.路由器声明BGP进程
R1
bgp 100
R5
bgp 200
R2
bgp 64513
confederation id 200
R3
bgp 64513
confederation id 200
peer
R4
bgp 64523
confederation id 200
以上代价解释
联邦内的路由器R3 R4 R5
配置BGP 进程时,配置私有 AS 号(64512-65535)
声明自己所属的共有AS 号
2.普通EBGP邻居建立
EBGP邻居建立的条件
- 路由可达
- 更新源检测
- 直连检测
分析
R1-R2和 R4-R5 直连接口建立邻居
邻居建立条件成立
普通 EBGP 邻居使用公有AS号建立邻居
R1
peer 12.0.0.2 as-number 200
R5
peer 45.0.0.4 as-number 200
R2
bgp 64513
peer 12.0.0.1 as-number 100
R4
bgp 64523
peer 45.0.0.5 as-number 300
验证
3.联邦IBGP邻居建立
IBGP邻居建立的条件
- 路由可达
- 更新源检测
当路由器收到外部路由,且需要传给IBGP邻居
next-hop-local (发出的路由下一跳是自身的地址)
联邦IBGP 邻居使用私有AS号建立邻居
分析
R2-R3和 R4-R3 环回口建立邻居
不满足更新源检测
R2收到的外部路由需传递给R3
peer 3.3.3.3 next-hop-local
R2
bgp 64513
peer 3.3.3.3 as-number 64513
peer 3.3.3.3 connect-interface LoopBack0
peer 3.3.3.3 next-hop-local
R3
bgp 64513
peer 2.2.2.2 as-number 64513
peer 2.2.2.2 connect-interface LoopBack0
验证
4.联邦EBGP邻居建立
- 普通EBGP建立邻居要求相同
- confederations peer-as 64513
“联邦邻居AS号为64513”
- 建立联邦 EBGP 邻居使用私有AS号
当路由器收到外部路由,且需要传给IBGP邻居
peer 3.3.3.3 next-hop-local
联邦EBGP 邻居使用私有AS号建立邻居
分析 R3-R4
不满足普通EBGP邻居建立的 更新源检测、直连检测
跨联邦建立邻居 confederations peer-as
R4收到的外部路由需传递给R3
peer 3.3.3.3 next-hop-local
R3
bgp 64513
confederation peer-as 64523
peer 4.4.4.4 as-number 64523
peer 4.4.4.4 ebgp-max-hop 255
peer 4.4.4.4 connect-interface LoopBack0
R4
bgp 64523
confederation peer-as 64513
peer 3.3.3.3 as-number 64513
peer 3.3.3.3 ebgp-max-hop 255
peer 3.3.3.3 connect-interface LoopBack0
peer 3.3.3.3 next-hop-local
验证
四、实验观测
用未宣告OSPF 的环回口路由模拟外部路由
network装载路由
R1
BGP 100
network 1.1.1.1 32
R5
bgp 300
network 5.5.5.5 32
验证
五、实验总结
总结一下联邦路由的特点
- 无需两两建立邻居
- 划分区域,便于管理、区分流量
- 私有AS号的使用、解决了公有AS数量不足问题