首先配置ip接口环回口,r4在as4,r5在as5,r1,2,3在 AS10。as10内起ibgp用eigrp只宣告内网接口
在内网运行igp
r1:
router eigrp 90
no auto-summary
eigrp router-id 1.1.1.1
network 12.1.1.1 0.0.0.0
network 13.1.1.1 0.0.0.0
netwrok 1.1.1.1 0.0.0.0
r2
rouer eigrp 90
no auto-summary
eigrp router-id 2.2.2.2
network 2.2.2.2 0.0.0.0
network 12.1.1.2 0.0.0.0
r3
router eigrp 90
no auto-summary
eigrp router-id 3.3.3.3
network 13.1.1.3 0.0.0.0
network 3.3.3.3 0.0.0.0
在r4, r2,r3 和r5上配置bgp
r4:
router bgp 4 //as号
no auto-summary
no synchronization
neighbor 24.1.1.2 remote-as 10 //默认自动建立ipv4的邻居关系。
r2
router bgp 10
no auto-summary
no synchronization
no bgp defalut ipv4-unicast //关闭默认
neighbor 24.1.1.4 remote-as 4
address-family ipv4 unicast
neighbor 24.1.1.4 activate // TBl ver传递变化 次数
//跟r3建立 ibgp邻居
router bgp 10
neighbor 3.3.3.3 remote-as 10
neighbor 3.3.3.3 update-source loopback 0 //修改更新源地址
address-family ipv4 unicast
neighbor 3.3.3.3 activate
邻居关系 :
- idle 针对邻居查路由表的过程
- connect 尝试建立tcp三次握手
- active 尝试频率更快
- open sent 发送
- open confirm 收到keepalive
- established 邻接 cisco用空白显示 prxrcd 0通过这个邻居收到几条路由。
neighbor x.x.x.x ransport connection-mode passive
被动
//# neighbor x.x.x.x soft-reconfiguration inbound 排错命令 开启入向缓冲器 并记录
shwo bgp ipv4 unicast neighbor 5.5.5.5 received-routes
r3
router bgp 10
no auto-summary
no synchronization
bgp router-id 3.3.3.3
no bgp default ipv4 unicast
neighbor 2.2.2.2 remote-as 10
neighbor 2.2.2.2 update-source loopback 0
address-family ipv4 unicast
neighbor 2.2.2.2 activate // show bgp ipv4 unicast summary
在r3和r5之间建立ebgp邻居,假设3跟5之间有多条链路连接,利用链路冗余性来保证bgp邻居关系的高可用性,使用环回口。但会有问题,没有对端的环回口路由,ebgp报文ttl为1.要解决。 路由问题写静态,
r3
ip route 5.5.5.0 255.255.255.0 s1/1 35.1.1.5
router bgp 10
neighbor 5.5.5.5 remote-as 5
neighbor 5.5.5.5 update-source loopback 0
neighbor 5.5.5.5 ebgp-multihop //cr 255
address-family ipv4 unicast
neighbor 5.5.5.5 activate
r5
ip route 3.3.3.0 255.255.255.0 s1/0 35.1.1.3
router bgp 5
no auto-summary
no synchronization
bgp router-id 5.5.5.5
neighbor 3.3.3.3 remote-as 10
neighbor 3.3.3.3 update-source loopback 0
neighbor 3.3.3.3 ebgp-multihop
看传路由
r4:
interface loopback 8
ip address 8.8.8.8 255.255.255.0
router bgp 4
network 8.8.8.0 mask 255.255.255.0 //主类路由通告会把mask隐藏掉
show bgp ipv4 unicast \
//其它方式重分发 ?
r5:int loo 9
ip address 9.9.9.9 255.255.255.0
do swho ipv4 unicast path起源属性
- 通过network agreedate :i
- 通过ebgp 重分发进bgp就是:e
- 通过其它方式学习到的路由,通告进 bgp ?
*代表有资格 被加入路由表
s 不能加路由表 不能传递给其实邻居
r没有资格加路由表,能给其它邻居
最优
ebgp
i ibgp
r3收到是下一跳是不可达的
r2
router bgp 10
address-family ipv4 unicast
neighbor 3.3.3.3 next-hop-self
end
clear ip bgp * soft //两件事 对于入向 给邻居重新发一次 入向:要求邻居把他们能给我发的路由重新发一次
同样9.9.9.9在传到r2时也是一样
ping 9.9.9.9 source 8.8.8.8能否ping 通
不能因为他是没有任何bgp路由的
所以可以启用mpls
R1
ip cef
mpls ip
mpls label protocol ldp
mpls ldp router-id loo0 force
int range ehternet0/0-1
mpls ip
r2
ip cef
mpls ip
mpls label protocol ldp
mpls ldp router-id loo0 force
int ethernet0/1
mpls ip
r3
ip cef
mpls ip
mpls label protocol ldp
mpls ldp router-id loo0 force
int ethernet0/0
mpls ip
bgp汇总 汇总会产生 明系也不会抑制 尽可能的提供选路空间
不把路由通告进bgp,通告汇总
r5两条路由
1:r5上不通告两条路由 写静态指向172.16.8.0/23 null 在network 会少一个原子聚合属性,没办法判断是汇总路由,影响后续选路
2.0
下放默认路由
neighbor x.x.x.x default-originate
没办法操控它的med属性,属性是有缺失的。
2。default-information originates
redistribute static
属性:
公共属性:
1.公认强制 支持 通告必须携带
AS path next-hop origin
2.公认自由 能识别,可以不携带
local preference
可选 厂商私有
可选传递
完整可传递
部分可传递 标记为部分
可选非传递 med
as :20 10
从左到右 数据层面 流量经过20 最终10
从右到左 控制层面 来自10 经过20 到达 本地
有>才有参选的资格