【实验】在 MPLS TE tunnel 上使用 RSVP 预留带宽

实验环境:

操作系统:Windows 10(1607,14393.351,当时最新测试版),模拟器:GNS3 IOU for Windows 1.5.2(当时最新正式版)
注:当然,只要有思科模拟器都可以做这个实验

【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)

实验需求:

现在我们需要在上述实验拓扑中做基于 MPLS 的流量工程,规划出一条如下图所示的 MPLE TE tunnel,让 IOU1 和 IOU4 之间的流量从 MPLS TE tunnel 走(IOU1 → IOU7 → IOU3 → IOU5 → IOU4)。

【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)

然后在这条 MPLE TE tunnel 上预留出 1 M 的带宽,这 1 M 的带宽专门供 MPLE TE tunnel 使用。

其他相关文章:

实验步骤:

1、先配置 IP 地址、 IGP(ISIS)和 MPLS:

IOU1:

conf t
int l 0
ip add 1.1.1.1 255.255.255.255

int e 0/0
ip add 12.1.1.1 255.255.255.0
no sh

int e 0/1
ip add 17.1.1.1 255.255.255.0
no sh

int r e 0/0-1 , l 0
ip router isis

router isis
net 49.1234.1111.1111.1111.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 1000 1999

IOU2:

conf t
int l 0
ip add 2.2.2.2 255.255.255.255

int e 0/0
ip add 12.1.1.2 255.255.255.0
no sh

int e 0/1
ip add 23.1.1.2 255.255.255.0
no sh

int e 0/2
ip add 25.1.1.2 255.255.255.0
no sh

int e 0/3
ip add 27.1.1.2 255.255.255.0
no sh

int r e 0/0-3 , l 0
ip router isis

router isis
net 49.1234.2222.2222.2222.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 2000 2999

IOU3:

conf t
int l 0
ip add 3.3.3.3 255.255.255.255

int e 0/0
ip add 34.1.1.3 255.255.255.0
no sh

int e 0/1
ip add 23.1.1.3 255.255.255.0
no sh

int e 0/2
ip add 37.1.1.3 255.255.255.0
no sh

int e 1/0
ip add 35.1.1.3 255.255.255.0
no sh

int r e 0/0-2 , e 1/0 , l 0
ip router isis

router isis
net 49.1234.3333.3333.3333.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 3000 3999

IOU4:

conf t
int l 0
ip add 4.4.4.4 255.255.255.255

int e 0/0
ip add 34.1.1.4 255.255.255.0
no sh

int e 0/1
ip add 45.1.1.4 255.255.255.0
no sh

int r e 0/0-1
ip router isis

router isis
net 49.1234.4444.4444.4444.00
is-type level-2
adv pass
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 4000 4999

注意!IOU4 上并没有用 ISIS 将
loopback 0 口通告出去!

IOU5:

conf t
int l 0
ip add 5.5.5.5 255.255.255.255

int e 0/1
ip add 45.1.1.5 255.255.255.0
no sh

int e 0/2
ip add 25.1.1.5 255.255.255.0
no sh

int e 0/3
ip add 56.1.1.5 255.255.255.0
no sh

int e 1/0
ip add 35.1.1.5 255.255.255.0
no sh

int r e 0/1-3 , e 1/0 , l 0
ip router isis

router isis
net 49.1234.5555.5555.5555.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 5000 5999

IOU6:

conf t
int l 0
ip add 6.6.6.6 255.255.255.255

int e 0/0
ip add 67.1.1.6 255.255.255.0
no sh

int e 0/3
ip add 56.1.1.6 255.255.255.0
no sh

int r e 0/0 , e 0/3 , l 0
ip router isis

router isis
net 49.1234.6666.6666.6666.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 6000 6999

IOU7:

conf t
int l 0
ip add 7.7.7.7 255.255.255.255

int e 0/1
ip add 17.1.1.7 255.255.255.0
no sh

int e 0/0
ip add 67.1.1.7 255.255.255.0
no sh

int e 0/2
ip add 37.1.1.7 255.255.255.0
no sh

int e 0/3
ip add 27.1.1.7 255.255.255.0
no sh

int r e 0/0-3 , l 0
ip router isis

router isis
net 49.1234.7777.7777.7777.00
is-type level-2
adv pass
pass l 0
log all

ip cef
mpls ip
mpls label pro ldp
mpls ldp ro l 0 fo
mpls label range 7000 7999

2、在全局和接口下使能 MPLS Traffic Engineering,同时在 ISIS 里也是要配置 MPLS Traffic Engineering 的相关命令的:

IOU1:

! MPLS TE 全局使能
mpls traffic-eng tunnels

! MPLS TE 接口使能
int r e 0/0-1
mpls traffic-eng tunnels

! 配置 ISIS,让 ISIS 支持 MPLS TE
router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU2:

mpls traffic-eng tunnels

int r e 0/0-3
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU3:

mpls traffic-eng tunnels

int r e 0/0-2 , e 1/0
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU4:

mpls traffic-eng tunnels

int r e 0/0-1
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU5:

mpls traffic-eng tunnels

int r e 0/1-3 , e 1/0
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU6:

mpls traffic-eng tunnels

int r e 0/0 , e 0/3
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

IOU7:

mpls traffic-eng tunnels

int r e 0/0-3
mpls traffic-eng tunnels

router isis
metric-style wide
mpls traffic-eng router-id l 0
mpls traffic-eng level-2

3、在 IOU1 和 IOU4 之间建立那条 MPLS TE tunnel:

【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)

由上图可知,这个 MPLS TE tunnel 的路径是这样的: IOU1 → IOU7 → IOU3 → IOU5 → IOU4。

在 IOU1 上配置:

! 建立 IOU1 -> IOU7 -> IOU3 -> IOU5 -> IOU4 的 MPLS TE tunnel

IOU1:

int tun 14
 ip unnumbered l 0
 tunnel mode mpls traffic-eng 
 tunnel destination 4.4.4.4
 tunnel mpls traffic-eng path-option 10 explicit name A
 ex

ip explicit-path name A enable 
 next-address 17.1.1.7
 next-address 37.1.1.3
 next-address 35.1.1.5
 next-address 45.1.1.4

ip route 4.4.4.4 255.255.255.255 tunnel 14

我们现在来测试一下:

IOU1#traceroute 4.4.4.4 so l 0
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
  1 17.1.1.7 [MPLS: Label 7000 Exp 0] 1 msec 2 msec 2 msec
  2 37.1.1.3 [MPLS: Label 3000 Exp 0] 2 msec 2 msec 1 msec
  3 35.1.1.5 [MPLS: Label 5000 Exp 0] 1 msec 1 msec 1 msec
  4 45.1.1.4 1 msec 2 msec 2 msec

MPLS TE tunnel 没有问题,IOU1 去往 IOU4 的数据包已经按照预期的路径去走了。

4、使用 RSVP 来预留 1 M 带宽:

接着我们在 IOU1 的 tunnel 14 接口下配置一条命令:

IOU1(config)#int tun 14
IOU1(config-if)#tunnel mpls traffic-eng bandwidth 1000
IOU1(config-if)#sh
*Nov 28 13:56:56.636: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel14,
 changed state to down
*Nov 28 13:56:56.636: %LINK-5-CHANGED: Interface Tunnel14, changed state to
 administratively down
IOU1(config-if)#no sh
IOU1(config-if)#
*Nov 28 13:57:00.863: %LINK-3-UPDOWN: Interface Tunnel14, changed state to up

tunnel mpls traffic-eng bandwidth 1000 —— 这条命令的意思是:这条 MPLS TE tunnel 需要有 1 M 的带宽预留,没有 1 M 的带宽预留这条 MPLS TE tunnel 就不能被使用。

现在我们可以看到,tunnel 14 这个接口就已经起不来了(tunnel 14 可能需要 shutdown 再 no shutdown 一下,让配置生效):

IOU1#sh ip int bri
Interface              IP-Address      OK? Method Status                Protocol
Ethernet0/0            12.1.1.1        YES manual up                    up      
Ethernet0/1            17.1.1.1        YES manual up                    up      
Ethernet0/2            unassigned      YES NVRAM  administratively down down    
Ethernet0/3            unassigned      YES NVRAM  administratively down down    
Ethernet1/0            unassigned      YES NVRAM  administratively down down    
Ethernet1/1            unassigned      YES NVRAM  administratively down down    
Ethernet1/2            unassigned      YES NVRAM  administratively down down    
Ethernet1/3            unassigned      YES NVRAM  administratively down down    
Serial2/0              unassigned      YES NVRAM  administratively down down    
Serial2/1              unassigned      YES NVRAM  administratively down down    
Serial2/2              unassigned      YES NVRAM  administratively down down    
Serial2/3              unassigned      YES NVRAM  administratively down down    
Serial3/0              unassigned      YES NVRAM  administratively down down    
Serial3/1              unassigned      YES NVRAM  administratively down down    
Serial3/2              unassigned      YES NVRAM  administratively down down    
Serial3/3              unassigned      YES NVRAM  administratively down down    
Loopback0              1.1.1.1         YES manual up                    up      
Tunnel14               1.1.1.1         YES TFTP   up                    down

因为很明显,我们在 IOU1 上提了一个要求,要求这条 MPLS TE tunnel 需要有 1 M 的带宽预留,而我们并没有去做 RSVP 的带宽预留,所以接口自然就起不来了。

现在我们在这条 MPLS TE tunnel 所经过的各个接口上配置 RSVP,让 RSVP 去预留带宽:

【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)
IOU1:

int e 0/1
ip rsvp bandwidth 1000

IOU7:

int r e 0/1 , e 0/2
ip rsvp bandwidth 1000

IOU3:

int r e 0/2 , e 1/0
ip rsvp bandwidth 1000

IOU5:

int r e 0/1 , e 1/0
ip rsvp bandwidth 1000

IOU4:

int e 0/1
ip rsvp bandwidth 1000

配置完上述命令后,IOU1 的 tunnel 14 口很快就 up 了:

IOU1#
*Nov 28 17:44:33.062: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel14,
 changed state to up

我们在 IOU1 上 sh ip int bri 看一下:

IOU1#sh ip int bri
Interface              IP-Address      OK? Method Status                Protocol
Ethernet0/0            12.1.1.1        YES manual up                    up      
Ethernet0/1            17.1.1.1        YES manual up                    up      
Ethernet0/2            unassigned      YES NVRAM  administratively down down    
Ethernet0/3            unassigned      YES NVRAM  administratively down down    
Ethernet1/0            unassigned      YES NVRAM  administratively down down    
Ethernet1/1            unassigned      YES NVRAM  administratively down down    
Ethernet1/2            unassigned      YES NVRAM  administratively down down    
Ethernet1/3            unassigned      YES NVRAM  administratively down down    
Serial2/0              unassigned      YES NVRAM  administratively down down    
Serial2/1              unassigned      YES NVRAM  administratively down down    
Serial2/2              unassigned      YES NVRAM  administratively down down    
Serial2/3              unassigned      YES NVRAM  administratively down down    
Serial3/0              unassigned      YES NVRAM  administratively down down    
Serial3/1              unassigned      YES NVRAM  administratively down down    
Serial3/2              unassigned      YES NVRAM  administratively down down    
Serial3/3              unassigned      YES NVRAM  administratively down down    
Loopback0              1.1.1.1         YES manual up                    up      
Tunnel14               1.1.1.1         YES TFTP   up                    up 

没有问题,tunnel 14 确实 up 了。

再 traceroute 一下:

IOU1#traceroute 4.4.4.4 so l 0
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
  1 17.1.1.7 [MPLS: Label 7000 Exp 0] 1 msec 2 msec 1 msec
  2 37.1.1.3 [MPLS: Label 3000 Exp 0] 1 msec 2 msec 1 msec
  3 35.1.1.5 [MPLS: Label 5000 Exp 0] 1 msec 1 msec 1 msec
  4 45.1.1.4 1 msec 1 msec 1 msec

没有问题,MPLS TE tunnel 再次起来了。

(未完待续)

 

本文完。如有疑问,欢迎在下方留言;如本文有什么错误,欢迎在下方留言指正,谢谢。

打赏 赞(0)
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

Was this article helpful?

Related Articles

Leave A Comment?

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据