信息发布靠CBR协议,发布的信息包括:邻居、链路、cost、可保留带宽、管理权重、亲和属性。
CBR协议,基于约束的路由协议,由于要计算在一个Area内的到达尾端的路径,所以需要知道整个网络的拓扑。需要一个链路状态协议。
如OSPF和ISIS,但是OSPF和ISIS发布的信息没有那么多,所以就对OSPF和ISIS进行了扩展。
在ISIS路由协议中,默认发布如下信息:
R1#show isis database R2.00-00 detail
IS-IS Level-2 LSP R2.00-00
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 0x0000005D 0x9314 519 0/0/0
- Area Address: 49 ------TLV1
NLPID: 0xCC ------TLV29
Hostname: R2 -----TLV7
Metric: 10 IS R3.00
Metric: 10 IS R1.00 ------TLV2 邻居
Metric: 10 IS R5.00
Metric: 10 IS R6.00
Metric: 10 IS R7.00
IP Address: 10.0.0.2 -----TLV132
Metric: 10 IP 10.0.0.2/32
Metric: 10 IP 10.0.12.0/24 -----链路 & 距离
Metric: 10 IP 10.0.23.0/24
Metric: 10 IP 10.0.25.0/24
Metric: 10 IP 10.0.26.0/24
Metric: 10 IP 10.0.27.0/24
R1#
IOS 开启MPLS TE步骤:
一,开启 ip cef (设备默认开启)
对应的检查命令show ip cef summary
R1#show ip cef summary
IPv4 CEF is enabled for distributed and running
VRF Default
42 prefixes (42/0 fwd/non-fwd)
Table id 0x0
Database epoch: 2 (42 entries at this epoch)
二,全局开启mpls traffic-eng tunnels
对应的检查命令show mpls traffic-eng tunnels summary
R1#show mpls traffic-eng tunnels summary
Signalling Summary:
LSP Tunnels Process: running
Passive LSP Listener: running
RSVP Process: running
Forwarding: enabled
Periodic reoptimization: every 3600 seconds, next in 2590 seconds
Periodic FRR Promotion: Not Running
Periodic auto-bw collection: every 300 seconds, next in 190 seconds
P2P:
Head: 2 interfaces, 2 active signalling attempts, 2 established
5 activations, 3 deactivations
194 failed activations
0 SSO recovery attempts, 0 SSO recovered
Midpoints: 0, Tails: 0
P2MP:
Head: 0 interfaces, 0 active signalling attempts, 0 established
0 sub-LSP activations, 0 sub-LSP deactivations
0 LSP successful activations, 0 LSP deactivations
0 SSO recovery attempts, LSP recovered: 0 full, 0 partial, 0 fail
Midpoints: 0, Tails: 0
R1#
三,接口下开启mpls traffic-eng tunnels
对应的检查命令show mpls interfaces
R1#show mpls interfaces
Interface IP Tunnel BGP Static Operational
GigabitEthernet1 No Yes No No Yes
GigabitEthernet2 No Yes No No Yes
ISIS开启支持MPLS TE功能:
对ISIS进行了扩展以让它能够支持MPLS TE:
增加了新的TLV用于传递新添加的链路参数和Wide metric-style。
新添加的TLV有:
TLV22:Extended intermediate-system reachability
这个TLV可以send更加详细的Link信息:比如带宽,代替IS-neighbor TLV2 ,这个TLV可以使用Wide metric
TLV134: Router-id
用于在MPLS TE中标识路由器。应该设置为一个稳定的地址,而Tunnel source和tunnel destination 应该匹配合适的Router-id
TLV135:Extended IP reachability
代替了原来的TLV 128和130。这个TLV不管是internal 还是External都是使用Wide metric。并且允许路由在泄漏到Level-1的时候被打上标记。
其中TLV 22可以包括7个子TLV,其中3个用于表示带宽。
Sub-TLV | Name | Length(octets) |
3 | Administrative Group (Color) | 4 |
6 | IPv4 interface address | 4 |
8 | IPv4 Neighbor address | 4 |
9 | Maximum link bandwidth | 4 |
10 | Reservable link bandwidth | 4 |
11 | Unreserved bandwidth | 32 |
18 | TE default metric | 3 |
250-254 | Reserved for cisco specific extensions |
|
255 | Reserved for future expansion |
|
ISIS开启支持MPLS TE的命令:
router isis
net 49.0000.0000.0001.00
is-type level-2-only
metric-style wide
log-adjacency-changes
mpls traffic-eng router-id Loopback0
mpls traffic-eng level-2
检查命令:
#show isis database level-2 R2.00-00 detail
#show isis database level-2 R2.00-00 verbose
示例:
R1#show isis database level-2 R2.00-00 detail
IS-IS Level-2 LSP R2.00-00
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 0x0000006D 0x7324 1057 0/0/0
Area Address: 49
NLPID: 0xCC
Router ID: 10.0.0.2
Hostname: R2
Metric: 10 IS-Extended R3.00
Metric: 10 IS-Extended R1.00
Metric: 10 IS-Extended R5.00
Metric: 10 IS-Extended R6.00
Metric: 10 IS-Extended R7.00
IP Address: 10.0.0.2
Metric: 10 IP 10.0.0.2/32
Metric: 10 IP 10.0.12.0/24
Metric: 10 IP 10.0.23.0/24
Metric: 10 IP 10.0.25.0/24
Metric: 10 IP 10.0.26.0/24
Metric: 10 IP 10.0.27.0/24
R1#show isis database level-2 R2.00-00 verbose
IS-IS Level-2 LSP R2.00-00
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 0x0000006D 0x7324 1021 0/0/0
Area Address: 49
NLPID: 0xCC
Router ID: 10.0.0.2
Hostname: R2
Metric: 10 IS-Extended R3.00 <<<<邻居
Affinity: 0x00000000 <<<<<亲和属性,新增
Interface IP Address: 10.0.23.2
Neighbor IP Address: 10.0.23.3
Physical BW: 1000000 kbits/sec <<<<<<<<<<<物理带宽,新增
Reservable Global Pool BW: 800000 kbits/sec <<<<<<<最大可保留带宽,新增
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec <<<<<<每优先级可保留带宽,新增
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R1.00
Affinity: 0x00000000
Interface IP Address: 10.0.12.2
Neighbor IP Address: 10.0.12.1
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R5.00
Affinity: 0x00000000
Interface IP Address: 10.0.25.2
Neighbor IP Address: 10.0.25.5
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R6.00
Affinity: 0x00000000
Interface IP Address: 10.0.26.2
Neighbor IP Address: 10.0.26.6
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R7.00
Affinity: 0x00000000
Interface IP Address: 10.0.27.2
Neighbor IP Address: 10.0.27.7
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 700000 kbits/sec
IP Address: 10.0.0.2
Metric: 10 IP 10.0.0.2/32
Metric: 10 IP 10.0.12.0/24
Metric: 10 IP 10.0.23.0/24
Metric: 10 IP 10.0.25.0/24
Metric: 10 IP 10.0.26.0/24
Metric: 10 IP 10.0.27.0/24
R1#
新增属性-MPLS TE预留带宽
在接口下配置ip rsvp bandwidth xxx,单位为K
如果只配置ip rsvp bandwidth则默认最大保留端口物理带宽的75%。
验证命令show ip rsvp interface
R1#show ip rsvp interface
interface rsvp allocated i/f max flow max sub max VRF
Gi1 ena 0 750M 750M 0
Gi2 ena 200M 800M 800M 0
Ena代表端口已经启用RSVP协议
Allocated代表已经保留出去的带宽大小。
i/f MAX代表接口最大可以保留的带宽。
Flow Max与QoS相关。
新增属性-亲和属性:
又称链路属性标记,共32bits,没有具体意义,需网络管理员定义。
链路亲和属性配置:R1(config-if)#mpls traffic-eng attribute-flags 0x111
验证命令
RP/0/0/CPU0:R5#show mpls traffic-eng topology
Wed Oct 16 07:44:43.313 UTC
Link[1]:Point-to-Point, Nbr IGP Id:0000.0000.0002.00, Nbr Node Id:2, gen:26084
Frag Id:0, Intf Address:10.0.25.5, Intf Id:0
Nbr Intf Address:10.0.25.2, Nbr Intf Id:0
TE Metric:10, IGP Metric:10
Attribute Flags: 0x11
Ext Admin Group:
Length: 256 bits
Value : 0x::11
Attribute Names:
Unnamed bits : 0 4
Switching Capability:None, Encoding:unassigned
BC Model ID:RDM
Physical BW:1000000 (kbps), Max Reservable BW Global:800000 (kbps)
Max Reservable BW Sub:0 (kbps)
Global Pool Sub Pool
Total Allocated Reservable Reservable
BW (kbps) BW (kbps) BW (kbps)
--------------- ----------- ----------
bw[0]: 0 800000 0
bw[1]: 0 800000 0
bw[2]: 0 800000 0
bw[3]: 0 800000 0
bw[4]: 0 800000 0
bw[5]: 0 800000 0
bw[6]: 0 800000 0
bw[7]: 0 800000 0
新增属性-TE Metric:
链路的TE Metric属性默认等于链路的IGP属性,默认在ISIS的LSP中没有显示,如下所示,但是在MPLS TE中会显示TE的Metric大小,如上示例。
R1#show isis database R2.00-00 level-2 verbose
IS-IS Level-2 LSP R2.00-00
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 0x00000076 0x612D 989 0/0/0
Area Address: 49
NLPID: 0xCC
Router ID: 10.0.0.2
Hostname: R2
Metric: 10 IS-Extended R3.00 <<<<<<<<<<
Affinity: 0x00000000
Interface IP Address: 10.0.23.2
Neighbor IP Address: 10.0.23.3
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R1.00
Affinity: 0x00000000
Interface IP Address: 10.0.12.2
Neighbor IP Address: 10.0.12.1
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R5.00
Affinity: 0x00000000
Interface IP Address: 10.0.25.2
Neighbor IP Address: 10.0.25.5
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R6.00
Affinity: 0x00000000
Interface IP Address: 10.0.26.2
Neighbor IP Address: 10.0.26.6
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 800000 kbits/sec
Metric: 10 IS-Extended R7.00
Affinity: 0x00000000
Interface IP Address: 10.0.27.2
Neighbor IP Address: 10.0.27.7
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 700000 kbits/sec
IP Address: 10.0.0.2
Metric: 10 IP 10.0.0.2/32
Metric: 10 IP 10.0.12.0/24
Metric: 10 IP 10.0.23.0/24
Metric: 10 IP 10.0.25.0/24
Metric: 10 IP 10.0.26.0/24
Metric: 10 IP 10.0.27.0/24
R1#
配置接口的TE Metric使用如下命令
R1(config-if)#mpls traffic-eng administrative-weight 5
修改后,在ISIS的LSP中就会显示,并传递给ISIS邻居。
R1#show isis database R1.00-00 level-2 verbose
IS-IS Level-2 LSP R1.00-00
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R1.00-00 * 0x0000007A 0xEB5F 1026 0/0/0
Area Address: 49
NLPID: 0xCC
Router ID: 10.0.0.1
Hostname: R1
Metric: 10 IS-Extended R2.00
Affinity: 0x00000000
Interface IP Address: 10.0.12.1
Neighbor IP Address: 10.0.12.2
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 750000 kbits/sec
Global Pool BW Unreserved:
[0]: 750000 kbits/sec, [1]: 750000 kbits/sec
[2]: 750000 kbits/sec, [3]: 750000 kbits/sec
[4]: 750000 kbits/sec, [5]: 750000 kbits/sec
[6]: 750000 kbits/sec, [7]: 650000 kbits/sec
Admin. Weight: 5 <<<<<<<<<<<<<<<<<<
Metric: 10 IS-Extended R5.00
Affinity: 0x00000000
Interface IP Address: 10.0.15.1
Neighbor IP Address: 10.0.15.5
Physical BW: 1000000 kbits/sec
Reservable Global Pool BW: 800000 kbits/sec
Global Pool BW Unreserved:
[0]: 800000 kbits/sec, [1]: 800000 kbits/sec
[2]: 800000 kbits/sec, [3]: 800000 kbits/sec
[4]: 800000 kbits/sec, [5]: 800000 kbits/sec
[6]: 800000 kbits/sec, [7]: 700000 kbits/sec
IP Address: 10.0.0.1
Metric: 10 IP 10.0.0.1/32
Metric: 10 IP 10.0.12.0/24
Metric: 10 IP 10.0.15.0/24
R1#
OSPF开启对TE的支持
OSPF默认发布的LSA中信息如下
R1#show ip ospf database router
OSPF Router with ID (10.0.0.1) (Process ID 1)
Router Link States (Area 0)
LS age: 60
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.0.0.1
Advertising Router: 10.0.0.1
LS Seq Number: 80000003
Checksum: 0xEA8C
Length: 84
Number of Links: 5
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.0.0.1
(Link Data) Network Mask: 255.255.255.255
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.0.15.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.0.0.2
(Link Data) Router Interface address: 10.0.12.1
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.0.12.0
(Link Data) Network Mask: 255.255.255.0 <<<<<<<<<<<<链路,
Number of MTID metrics: 0
TOS 0 Metrics: 1 <<<<<<<<<<<<<<<<<<<<<
对OSPF进行扩展:增加了新的LSA,这些LSA来描述新增的属性。
NEW LSA:9,10,11
Two top-Level TLVs:router address and link。
Link TLV描述一条链路,由一些sub-TLV组成。
LSA-9: Local (sub) network
LSA-10: Local area
LSA-11: Domain
cisco用LSA-10
LSA-10类的LSA类似于LSA-1,但它是一条Link一条Link,如果一个路由器有多条链路,它就会发多条LSA-10
在多路访问链路 ,LSA-10描述的是这条链路的DR
R1#show ip ospf database opaque-area 1.0.0.0 adv-router 10.0.0.1
OSPF Router with ID (10.0.0.1) (Process ID 1)
Type-10 Opaque Link Area Link States (Area 0)
LS age: 204
Options: (No TOS-capability, DC)
LS Type: Opaque Area Link
Link State ID: 1.0.0.0
Opaque Type: 1
Opaque ID: 0
Advertising Router: 10.0.0.1
LS Seq Number: 80000001
Checksum: 0x44D7
Length: 28
Fragment number : 0
MPLS TE router ID : 10.0.0.1
Number of Links : 0
R1#show ip ospf database opaque-area 1.0.0.1 adv-router 10.0.0.1
OSPF Router with ID (10.0.0.1) (Process ID 1)
Type-10 Opaque Link Area Link States (Area 0)
LS age: 215
Options: (No TOS-capability, DC)
LS Type: Opaque Area Link
Link State ID: 1.0.0.1
Opaque Type: 1
Opaque ID: 1
Advertising Router: 10.0.0.1
LS Seq Number: 80000001
Checksum: 0xE540
Length: 132
Fragment number : 1
Link connected to Point-to-Point network
Link ID : 10.0.0.2
Interface Address : 10.0.12.1
Neighbor Address : 10.0.12.2
Admin Metric : 5 <<<<<<<<<<<
Maximum bandwidth : 125000000 <<<<<<<<<<<物理带宽,单位Byte 125000000*8=1G
Maximum reservable bandwidth : 93750000 <<<<<<<<<<最大保留带宽,单位Byte
Number of Priority : 8
Priority 0 : 93750000 Priority 1 : 93750000
Priority 2 : 93750000 Priority 3 : 93750000
Priority 4 : 93750000 Priority 5 : 93750000
Priority 6 : 93750000 Priority 7 : 81250000
Affinity Bit : 0x0
IGP Metric : 1 <<<<<<<<<<<<<<<<<
Number of Links : 1
R1#
OSPF中默认IGP与MPLS TE Metirc相等,但是仍然可以在LSA中显示。