首先第一种:
配置就不说了,我在MPLS BACKBONE区域的R1配置了路由反射器
有几点需要注意:
1.配置了路由反射器的路由器上有所有BGP ×××V4的路由,而客户端路由器只有import RT相关的路由,如果需要储存所有的BGP ×××V4的路由,输入:no bgp default route-target filter。
2.关注BGP ***v4路由携带的一些外部属性:
1.process-id相同则是OIA的路由,不同则是OE2的路由
2.Process-id也是domain-id,Process-id不同就是Domain-id不同,domain-id可以修改
3.O的路由通告MPLS BackBone变成OIA或者OE2的路由而OE的路由通过MPLS BackBone路由类型不变
3.关注OSPF LSA的一些要点:
1.Routing Bit Set on this LSA:这个LSA可以计算成路由
2.Downward&&External Tag
OIA的路由从PE发给CE打上Down Bit
OE2的路由从PE发给CE携带External Tag
3.LSAType
截取一个×××V4路由和LSA分析:
R2#show ip bgp ***v4 all 5.5.5.5
BGP routing table entry for 10:2:5.5.5.5/32, version 8
Paths: (1 available, best #1, table abc)
Flag: 0x820
Not advertised to any peer
Local
3.3.3.3 (metric 21) from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 11, localpref 100, valid, internal, best
Extended Community: RT:10:2 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:35.35.35.3:0
Originator: 3.3.3.3, Cluster list: 1.1.1.1
mpls labels in/out nolabel/303
RT:export RT是多少
OSPF DOMAIN-ID:OSPF进程号,可以通过domain-id的命令配置
R3(config-router)#domain-id 0.0.0.10
Extended Community: RT:10:2 OSPF DOMAIN ID:0x0005:0x0000000A0200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:35.35.35.3:0
OSPF RT:0.0.0.0标识OSPF的区域号。
2标识这个路由起源的LSA类型:
这条路由是在area 0里起源的所以,OSPF RT为 :2
现在在R5上重发布一条5.5.5.1的E1路由和5.5.5.2的E2路由。
注意OSPF重分布进BGP默认只不重分布外部路由,所以要输入下面的名令
R3(config-router-af)#redistribute ospf 2 vrf abc match internal external
查看现象:
R2#show ip bgp ***v4 all 5.5.5.1 | se OSPF RT
OSPF RT:0.0.0.0:5:0 OSPF ROUTER ID:35.35.35.3:0
R2#show ip bgp ***v4 all 5.5.5.2 | se OSPF RT
OSPF RT:0.0.0.0:5:1 OSPF ROUTER ID:35.35.35.3:0
5代表路由类型,1或0代表E2还是E1的路由。
修改了DOMAIN-ID之后的LSA
OSPF Router with ID (4.4.4.4) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 651
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 5.5.5.5 (External Network Number )
Advertising Router: 24.24.24.2 不要忽视这个,在后面有一个地方会搞人
LS Seq Number: 80000001
Checksum: 0x4927
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 11
Forward Address: 0.0.0.0
External Route Tag: 3489660938 MPLS BACKBONE的BGP进程号
修改了OSPFDOMAIN-ID之前的LSA
R4#show ip ospf da su 5.5.5.5
OSPF Router with ID (4.4.4.4) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 100
Options: (No TOS-capability, DC, Downward)防环的DownBit位
LS Type: Summary Links(Network)
Link State ID: 5.5.5.5 (summary Network Number)
Advertising Router: 24.24.24.2
LS Seq Number: 80000001
Checksum: 0x3B18
Length: 28
Network Mask: /32
TOS: 0 Metric: 11
第二种:
R2#show ip bgp ***v4 all 5.5.5.5
BGP routing table entry for 10:2:5.5.5.5/32, version 31
Paths: (1 available, best #1, table abc)
Flag: 0x820
Not advertised to any peer
Local
3.3.3.3 (metric 21) from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 11, localpref 100, valid, internal, best
Extended Community: RT:10:2 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.2:2:0 OSPF ROUTER ID:35.35.35.3:0
Originator: 3.3.3.3, Cluster list: 1.1.1.1
mpls labels in/out nolabel/307
主要关注OSPF RT的区域号
R4#show ip ospf database su 5.5.5.5
OSPF Router with ID (4.4.4.4) (Process ID 1)
Summary Net Link States (Area 2)
Routing Bit Set on this LSA
LS age: 138
Options: (No TOS-capability, DC, Downward)
LS Type: Summary Links(Network)
Link State ID: 5.5.5.5 (summary Network Number)
Advertising Router: 24.24.24.2
LS Seq Number: 80000001
Checksum: 0x3B18
Length: 28
Network Mask: /32
TOS: 0 Metric: 11
这与第一种没有什么大的区别!
第三种:
首先要解决路由的问题。
R5上数据库中有LSA,但是没有路由。
为什么呢?
解决的方法:在R2的VRF与R5建立Virtual-Link
R7#show ip ospf database summary 4.4.4.4
OSPF Router with ID (7.7.7.7) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 134 (DoNotAge)
Options: (No TOS-capability, DC, Downward) 注意这个Down bit,下面有不同
LS Type: Summary Links(Network)
Link State ID: 4.4.4.4 (summary Network Number)
Advertising Router: 35.35.35.3
上面所说的注意点就是这个!因为建立的Virtual-link所以ADV router是35.35.35.3
LS Seq Number: 80000001
Checksum: 0x5ADA
Length: 28
Network Mask: /32
TOS: 0 Metric: 11
第四种:
R2#show ip bgp ***v4 all 7.7.7.7
BGP routing table entry for 10:2:7.7.7.7/32, version 51
Paths: (1 available, best #1, table abc)
Flag: 0x820
Not advertised to any peer
Local
3.3.3.3 (metric 21) from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 21, localpref 100, valid, internal, best
Extended Community: RT:10:2 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.0:3:0 OSPF ROUTER ID:35.35.35.3:0
Originator: 3.3.3.3, Cluster list: 1.1.1.1
mpls labels in/out nolabel/305
OSPF RT:3出现了起源是三类的LSA。
R4#show ip ospf database summary 7.7.7.7
OSPF Router with ID (4.4.4.4) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 74
Options: (No TOS-capability, DC, Downward)
LS Type: Summary Links(Network)
Link State ID: 7.7.7.7 (summary Network Number)
Advertising Router: 24.24.24.2
LS Seq Number: 80000001
Checksum: 0x43FD
Length: 28
Network Mask: /32
TOS: 0 Metric: 21
Summary Net Link States (Area 3)
LS age: 73
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 7.7.7.7 (summary Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x5EC
Length: 28
Network Mask: /32
TOS: 0 Metric: 31
注意上面的内容,7.7.7.7这条路由在R4上将down bit位去除了,不止是7.7.7.7这条路由,5.5.5.5也是!
也就是说down比特位只在连接MPLS-BACKBONE的那个区域有效,到达其他区域会被去除!
R6#show ip ospf database summary 7.7.7.7
OSPF Router with ID (6.6.6.6) (Process ID 1)
Summary Net Link States (Area 3)
Routing Bit Set on this LSA
LS age: 293
Options: (No TOS-capability, DC, Upward)
上面第三种是Downward也因为是Virtual-link
LS Type: Summary Links(Network)
Link State ID: 7.7.7.7 (summary Network Number)
Advertising Router: 4.4.4.4 注意ADV router是ABR
LS Seq Number: 80000001
Checksum: 0x5EC
Length: 28
Network Mask: /32
TOS: 0 Metric: 31