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

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

然后在这条 MPLE TE tunnel 上预留出 1 M 的带宽,这 1 M 的带宽专门供 MPLE TE tunnel 使用。
其他相关文章:
- 本实验其实借用了《【实验】基于 MPLS 的流量工程(Traffic Engineering base on MPLS / MPLS TE)》的实验环境和配置,您可以看一下这篇文章。
实验步骤:
1、先配置 IP 地址、 IGP(ISIS)和 MPLS:
IOU1:
conf t int e 0/0 int e 0/1 int r e 0/0-1 , l 0 router isis ip cef |
IOU2:
conf t int e 0/0 int e 0/1 int e 0/2 int e 0/3 int r e 0/0-3 , l 0 router isis ip cef |
IOU3:
conf t int e 0/0 int e 0/1 int e 0/2 int e 1/0 int r e 0/0-2 , e 1/0 , l 0 router isis ip cef |
IOU4:
conf t int e 0/0 int e 0/1 int r e 0/0-1 router isis ip cef 注意!IOU4 上并没有用 ISIS 将 |
IOU5:
conf t int e 0/1 int e 0/2 int e 0/3 int e 1/0 int r e 0/1-3 , e 1/0 , l 0 router isis ip cef |
IOU6:
conf t int e 0/0 int e 0/3 int r e 0/0 , e 0/3 , l 0 router isis ip cef |
IOU7:
conf t int e 0/1 int e 0/0 int e 0/2 int e 0/3 int r e 0/0-3 , l 0 router isis ip cef |
2、在全局和接口下使能 MPLS Traffic Engineering,同时在 ISIS 里也是要配置 MPLS Traffic Engineering 的相关命令的:
IOU1:
! MPLS TE 全局使能 ! MPLS TE 接口使能 ! 配置 ISIS,让 ISIS 支持 MPLS TE |
IOU2:
mpls traffic-eng tunnels int r e 0/0-3 router isis |
IOU3:
mpls traffic-eng tunnels int r e 0/0-2 , e 1/0 router isis |
IOU4:
mpls traffic-eng tunnels int r e 0/0-1 router isis |
IOU5:
mpls traffic-eng tunnels int r e 0/1-3 , e 1/0 router isis |
IOU6:
mpls traffic-eng tunnels int r e 0/0 , e 0/3 router isis |
IOU7:
mpls traffic-eng tunnels int r e 0/0-3 router isis |
3、在 IOU1 和 IOU4 之间建立那条 MPLS TE tunnel:

由上图可知,这个 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 去预留带宽:


IOU1:
int e 0/1 |
IOU7:
int r e 0/1 , e 0/2 |
IOU3:
int r e 0/2 , e 1/0 |
IOU5:
int r e 0/1 , e 1/0 |
IOU4:
int e 0/1 |
配置完上述命令后,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 再次起来了。
(未完待续)
本文完。如有疑问,欢迎在下方留言;如本文有什么错误,欢迎在下方留言指正,谢谢。
发表评论?