配置RSVP认证示例
组网需求
如图4-51,LSRA和LSRB之间的Eth-Trunk 1的成员接口为GE1/0/0和GE2/0/0。使用RSVP建立了一条从LSRA到LSRC的MPLS TE隧道。
要求配置Handshake功能使LSRA和LSRB之间互相进行RSVP密钥认证,防止伪造的RSVP资源预留请求非法占用网络资源,并配置message window功能解决RSVP报文失序问题。
配置思路
采用如下的思路配置RSVP认证:
配置各节点接口的IP地址,并使用OSPF协议实现各节点之间公网路由可达。
配置LSR ID并全局使能各节点以及接口的MPLS、MPLS TE、MPLS RSVP-TE功能。
在入节点创建隧道接口,指定隧道的IP地址、隧道协议、目的地址、隧道ID、动态信令协议RSVP-TE,使能CSPF。
在LSRA和LSRB上配置RSVP消息认证功能。
在LSRA和LSRB上配置Handshake功能,防止伪造的RSVP资源预留请求非法占用网络资源。
在LSRA和LSRB上配置message window功能解决RSVP报文失序问题。
建议将滑动窗口大小配置为大于32。如果滑动窗口设置过小,收到的RSVP消息有些可能不在窗口范围内而被丢弃,这样会导致RSVP邻居关系终止。
操作步骤
- 配置各接口的IP地址,并配置OSPF
# 配置LSRA。
<Huawei> system-view [Huawei] sysname LSRA [LSRA] interface eth-trunk 1 [LSRA-Eth-Trunk1] undo portswitch [LSRA-Eth-Trunk1] ip address 172.1.1.1 255.255.255.0 [LSRA-Eth-Trunk1] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] eth-trunk 1 [LSRA-GigabitEthernet1/0/0] quit [LSRA] interface gigabitethernet 2/0/0 [LSRA-GigabitEthernet2/0/0] eth-trunk 1 [LSRA-GigabitEthernet2/0/0] quit [LSRA] interface loopback 1 [LSRA-LoopBack1] ip address 1.1.1.9 255.255.255.255 [LSRA-LoopBack1] quit [LSRA] ospf 1 [LSRA-ospf-1] area 0 [LSRA-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [LSRA-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255 [LSRA-ospf-1-area-0.0.0.0] quit [LSRA-ospf-1] quit
按图4-51配置LSRB和LSRC的接口IP地址,具体配置与配置LSRA类似,不再赘述。
配置完成后,在各节点上执行display ip routing-table命令,应可以看到相互之间都学到了到对方Loopback1的路由。
- 配置MPLS基本能力,使能MPLS TE、MPLS RSVP-TE和CSPF
# 配置LSRA。
[LSRA] mpls lsr-id 1.1.1.9 [LSRA] mpls [LSRA-mpls] mpls te [LSRA-mpls] mpls rsvp-te [LSRA-mpls] mpls te cspf [LSRA-mpls] quit [LSRA] interface eth-trunk 1 [LSRA-Eth-Trunk1] mpls [LSRA-Eth-Trunk1] mpls te [LSRA-Eth-Trunk1] mpls rsvp-te [LSRA-Eth-Trunk1] quit
配置LSRB和LSRC与配置LSRA类似,不再赘述。其中,只需在主隧道的入节点上使能CSPF。
- 配置OSPF TE
# 配置LSRA。
[LSRA] ospf [LSRA-ospf-1] opaque-capability enable [LSRA-ospf-1] area 0 [LSRA-ospf-1-area-0.0.0.0] mpls-te enable [LSRA-ospf-1-area-0.0.0.0] quit [LSRA-ospf-1] quit
配置LSRB和LSRC与配置LSRA类似,不再赘述。
- 在入节点创建MPLS TE Tunnel
# 在LSRA上创建Tunnel0/0/1。
[LSRA] interface tunnel 0/0/1 [LSRA-Tunnel0/0/1] ip address unnumbered interface loopback 1 [LSRA-Tunnel0/0/1] tunnel-protocol mpls te [LSRA-Tunnel0/0/1] destination 3.3.3.9 [LSRA-Tunnel0/0/1] mpls te tunnel-id 101 [LSRA-Tunnel0/0/1] mpls te commit [LSRA-Tunnel0/0/1] quit
配置完成后,在LSRA上执行display interface tunnel命令可以看到隧道接口状态为Up。
[LSRA] display interface tunnel 0/0/1 Tunnel0/0/1 current state : UP Line protocol current state : UP Last line protocol up time : 2013-02-22 14:28:37 Description:...
- 在LSRA、LSRB的MPLS TE链路的接口上配置RSVP验证
# 配置LSRA。
[LSRA] interface eth-trunk 1 [LSRA-Eth-Trunk1] mpls rsvp-te authentication cipher Huawei@1234 [LSRA-Eth-Trunk1] mpls rsvp-te authentication handshake [LSRA-Eth-Trunk1] mpls rsvp-te authentication window-size 32 [LSRA-Eth-Trunk1] quit
# 配置LSRB。
[LSRB] interface eth-trunk 1 [LSRB-Eth-Trunk1] mpls rsvp-te authentication cipher Huawei@1234 [LSRB-Eth-Trunk1] mpls rsvp-te authentication handshake [LSRB-Eth-Trunk1] mpls rsvp-te authentication window-size 32 [LSRB-Eth-Trunk1] quit
- 验证配置结果
# 在LSRA上执行reset mpls rsvp-te,再执行display interface tunnel命令可以看到隧道接口状态为Up。
# 在LSRA或LSRB上执行display mpls rsvp-te interface命令,可查看RSVP认证的相关配置信息。
[LSRA] display mpls rsvp-te interface eth-trunk 1 Interface: Eth-Trunk1 Interface Address: 172.1.1.1 Interface state: UP Interface Index: 0x36 Total-BW: 0 Used-BW: 0 Hello configured: NO Num of Neighbors: 1 SRefresh feature: DISABLE SRefresh Interval: 30 sec Mpls Mtu: 1500 Retransmit Interval: 5000 msec Increment Value: 1 Authentication: ENABLE Challenge: ENABLE WindowSize: 32 Next Seq # to be sent:2767789282 0 Key ID: 0xa4ff1cdc0000 Bfd Enabled: DISABLE Bfd Min-Tx: 1000 Bfd Min-Rx: 1000 Bfd Detect-Multi: 3
配置文件
LSRA的配置文件
# sysname LSRA # mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf # interface Eth-Trunk1 undo portswitch ip address 172.1.1.1 255.255.255.0 mpls mpls te mpls rsvp-te mpls rsvp-te authentication cipher %#%#>=AuX`p[n/)rujP2Z{2Q+*xi/1W|k5`{-^3bMG+$%#%# mpls rsvp-te authentication handshake mpls rsvp-te authentication window-size 32 # interface GigabitEthernet1/0/0 eth-trunk 1 # interface GigabitEthernet2/0/0 eth-trunk 1 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # interface Tunnel0/0/1 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 101 mpls te commit # ospf 1 opaque-capability enable area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 172.1.1.0 0.0.0.255 mpls-te enable # return
LSRB的配置文件
# sysname LSRB # mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te # interface Eth-Trunk1 undo portswitch ip address 172.1.1.2 255.255.255.0 mpls mpls te mpls rsvp-te mpls rsvp-te authentication cipher %#%#RDFLW8Z-7Sc,&=T\h]x>\MYTPm;2#"a!>{:$SM_V%#%# mpls rsvp-te authentication handshake mpls rsvp-te authentication window-size 32 # interface GigabitEthernet1/0/0 eth-trunk 1 # interface GigabitEthernet2/0/0 eth-trunk 1 # interface GigabitEthernet3/0/0 ip address 172.2.1.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 172.1.1.0 0.0.0.255 network 172.2.1.0 0.0.0.255 mpls-te enable # return
LSRC的配置文件
# sysname LSRC # mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 ip address 172.2.1.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 172.2.1.0 0.0.0.255 mpls-te enable # return