|
这一节描述流量调配所支持的两种范例情况。这些情况说明了怎样在网络中调配通过某条路径的流量,以及怎样为那个被调配流量的路径建立一个备份路由(见表10-2)。
在这两种情况中,假定从R1和R2来的数据流(见图10-2,它们打算去往R11)将被第3层(Layer 3)路由沿着“上方”(upper)的路径R3-R4-R7-R10-R11发送出去。
表10-2 流量调配情况范例
| 情况 |
描述 |
| 情况1——调配穿越某条路径流量 |
这些步骤对于调配穿越“中间”路径R3-R5-R8的流量(见图10-2)是必要的。 |
| 情况2——建立一条备份路径 |
为了给情况1中被调配的流量建立一个备份流量调配路由,这些步骤是必要的。 |
图10-2显示了一个只使用路由器的Tag交换网络,其中带有已被调配了流量的路径。

图10-2 范例Tag交换网络,其中带有已被调配了流量的路径
情况1:调配通过一条路径的流量
下表列出了所需的配置命令,你可以利用它们建立一个隧道R1-R3-R5-R8-R10,用以调配通过“中间”路径R3-R5-R8的流量,而又不影响来自R2的数据流所采用的路径(见图10-2)。
为了调配通过一条路径的流量,在路由器配置模式下,执行下面的步骤即可:
| 步骤 |
命令 |
目的 |
| |
在R1:
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/1
Router(config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
在R3 :
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/1
Router( config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
Router(config)# interface e0/3
Router(config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
在R5和 R8:
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/1
Router(config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
Router(config)# interface e0/2
Router(config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
在 R 10:
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/1
在 R 10:
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/1 |
配置对TSP隧道的支持,使之可沿着该路径发出信号。
为了配置分散式的VIP标签交换(Tag Switching),你必须配置分散式的CEF交换。在所有的路由器中输入ip cef distributed 命令。
注意:为了配置一个 Cisco7200系列路由器,输入ip cef命令即可;为了配置一个Cisco 7500系列路由器,输入ip cef distributed命令即可。 |
| 2 |
在 R1:
Router(config)# interface tunnel2003
Router(config-if)# ip unnumberede0/1
Router(config-if)# tunnel mode tag-switching
Router(config-if)# tunnel tsp-hop 110.10.0.103
Router(config-if)# tunnel tsp-hop 210.11.0.105
Router(config-if)# tunnel tsp-hop 310.12.0.108
Router(config-if)# tunnel tsp-hop 410.13.0.110 lasthop
Router(config-if)# exit
|
在头端配置一个TSP隧道。
(R3:e0/l的IP地址)。
(R5:e0/l的IP地址)。
(R8:e0/1的IP地址)。
(R10:e0/l的IP地址)。 |
| 3 |
在 R1:
Router(config)# router traffic-engineering
Router(config)# traffic-engineeringfilter 1 egress 10.14.0.111255.255.255.255 |
配置流量调配过滤器,用于把要传送数据流分类。
该过滤器选择所有那样的数据流,它们的自主系统(AS——autonomous system)的出口路由器是10.14.0.111(10.14.0.111是R11:e0/1的IP地址)。 |
| 4 |
在 R1:
Router(config)# router traffic-engineering
Router(config)# traffic-engineeringroute 1 tunnel 2003 |
配置流量调配路由,用以把调配后的流量沿着该隧道送下去。 |
情况2:建立一条备份路径
在情况2中,要为情况1中被调配的流量建立一个备份的流量调配路由。这个备份路由使用“下方”(lower)的路径。该备份路由使用隧道R1-R3-R6,并依赖于第3层(Layer 3)路由把数据包从R6传递到R11。
为了建立一条流量调配备份路径(假定已经执行了情况1中的步骤),在路由器配置模式下,执行下面的步骤即可:
| 步骤 |
命令 |
目的 |
| 1 |
在R6:
Router(config)# ip cef distributed
Router(config)# tag- switching tsp-tunnels
Router(config)# interface e0/1
Router(config-if)# tag-switching tsp-tunnels
Router(config-if)# exit
在R3:
Router(config)# ip cef distributed
Router(config)# tag-switching tsp-tunnels
Router(config)# interface e0/4
Router(config-if)# tag- switching tsp-tunnels
Router(config-if)# exit |
使 TSP隧道可沿着该路径发出信号(在该路径中,尚未启用发送信号的功能)。 |
| 2 |
在R1:
Router(config)# interface tunnel 2004
Router(config-if)# ip unnumbered e0/1
Router(config-if)# tunnel mode tag-switching
Router(config-if)# tunnel tsp-hop 110.10.0.103
Router(config-if)l# tunnel tsp-hop 210.21.0.106 lasthop
Router(config-if)# exit |
在头端配置TSP隧道。
(R3:e0/1的IP地址)。。
(R6:e0/l的IP地址)。 |
| 3 |
At R1:
Router(config)# router traffic-engineering
Router(config)# traffic-engineering route1 tunnel 2004 pref 200
|
配置流量调配路由。这样,如果中间的路径(即情况1中的路由)不能用的话,就把调配后的流量沿着该隧道送下去。 |
|