示例:使用 MPLS LSP 隧道交叉连接跨 MPLS 网络的 OpenFlow 流量定向
在支持 OpenFlow 的 MX 系列路由器上,您可以使用逻辑隧道接口和 MPLS LSP 隧道交叉连接,将来自 OpenFlow 网络的流量通过 MPLS 网络定向。此示例说明如何配置 MX 系列路由器,以使用 MPLS LSP 隧道交叉连接,通过基于 MPLS 的网络在两个远程 OpenFlow 网络之间发送流量。
要求
此示例对支持 OpenFlow 的路由器使用以下硬件和软件组件:
运行 Junos OS 13.3 或更高版本的 MX240 路由器。
OpenFlow 软件包,其软件包版本与安装设备的 Junos OS 版本匹配
路由器与 OpenFlow 控制器之间的 TCP 连接
路由器的 fxp0 管理接口和管理网络之间的连接,可从控制器 IP 地址访问
概述
在此示例中,您将配置 MPLS LSP 隧道交叉连接,以连接由一个 MPLS 网络隔开的两个远程 OpenFlow 网络。 图 1 显示了此示例中使用的拓扑。
此示例有三个路由器:一个提供商路由器 (P) 和两个提供商边缘路由器(PE1 和 PE2)。路由器 P 驻留在 MPLS 网络中。路由器 PE1 和 PE2 是支持 OpenFlow 的路由器,每个路由器均配置了用于接受和转发 OpenFlow 流量的 ge-1/0/0.0 接口,以及两个连接到路由器 P 的 MPLS 接口。网络使用 OSPF 作为 IPG,它有两个 LSP:LSP 1-3 路由流量从 PE1 到 PE2,LSP 3-1 将流量从 PE2 路由到 PE1。
您可以使用两个逻辑隧道接口(lt-1/1/10.0 和 lt-1/1/10.100)将 OpenFlow 接口拼接到 MPLS LSP。您可以将第一个逻辑隧道接口 lt-1/1/10.0 配置为具有封装 ethernet-bridge
和家族 bridge
的第 2 层接口。此接口参与 OpenFlow。第二个逻辑隧道接口 lt-1/1/10.100 使用电路交叉连接 (CCC) 封装。您将 lt-1 和 lt-2 接口配置为对等方,以便进入一个逻辑接口的流量会自动定向到第二个逻辑接口。
在 PE1 和 PE2 路由器上,您可以使用采用 CCC 封装的逻辑隧道接口在 [edit protocols connections remote-interface-switch]
层级配置 MPLS LSP 隧道交叉连接。此配置在 CCC 接口和两个 LSP 之间建立关联,一个用于将 MPLS 数据包从本地设备传输到远程设备,另一个用于从远程设备接收本地设备上的 MPLS 数据包。
对于从 PE1 流到 PE2 的流量,OpenFlow 控制器必须在 PE1 上安装流条目,以便将所需的 OpenFlow 流量作为 OpenFlow 入口端口从 ge-1/0/0.0 定向到 lt-1/1/10.0 作为输出端口。在 PE2 上,OpenFlow 控制器必须安装流条目,将 OpenFlow 流量从 lt-1/1/10.0 作为 OpenFlow 入口端口定向到 ge-1/0/0.0 作为输出端口。同样,对于从 PE2 流到 PE1 的流量,OpenFlow 控制器必须在 PE2 上安装流条目,以便将所需的 OpenFlow 流量作为 OpenFlow 入口端口从 ge-1/0/0.0 定向到 lt-1/1/10.0 作为输出端口。在 PE1 上,OpenFlow 控制器必须安装将 OpenFlow 流量从 lt-1/1/10.0 作为 OpenFlow 入口端口定向到 ge-1/1/0.0 作为输出端口的流条目。
拓扑

配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
设备 PE1
set chassis fpc 1 pic 1 tunnel-services bandwidth 1g set interfaces ge-1/0/0 encapsulation ethernet-bridge set interfaces ge-1/0/0 unit 0 family bridge set interfaces ge-1/1/0 unit 0 family inet address 10.10.0.1/24 set interfaces ge-1/1/0 unit 0 family mpls set interfaces ge-1/1/1 unit 0 family inet address 10.10.1.1/24 set interfaces ge-1/1/1 unit 0 family mpls set interfaces lt-1/1/10 unit 0 encapsulation ethernet-bridge set interfaces lt-1/1/10 unit 0 peer-unit 100 set interfaces lt-1/1/10 unit 0 family bridge set interfaces lt-1/1/10 unit 100 encapsulation ethernet-ccc set interfaces lt-1/1/10 unit 100 peer-unit 0 set interfaces lt-1/1/10 unit 100 family ccc set interfaces lo0 unit 0 family inet address 10.1.1.1/32 set protocols rsvp interface ge-1/1/0.0 set protocols rsvp interface ge-1/1/1.0 set protocols mpls label-switched-path 1-3 from 10.1.1.1 set protocols mpls label-switched-path 1-3 to 10.3.3.3 set protocols mpls interface ge-1/1/0.0 set protocols mpls interface ge-1/1/1.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-1/1/0.0 set protocols ospf area 0.0.0.0 interface ge-1/1/1.0 set protocols connections remote-interface-switch 1-3-ccc interface lt-1/1/10.100 set protocols connections remote-interface-switch 1-3-ccc transmit-lsp 1-3 set protocols connections remote-interface-switch 1-3-ccc receive-lsp 3-1 set protocols openflow switch s1 interfaces ge-1/0/0.0 port-id 1 set protocols openflow switch s1 interfaces lt-1/1/10.0 port-id 2 set protocols openflow switch s1 controller protocol tcp port 6633 set protocols openflow switch s1 controller address 10.94.175.213 set routing-instances r1 instance-type virtual-switch set routing-instances r1 bridge-domains bd1 interface ge-1/0/0.0 set routing-instances r1 bridge-domains bd1 interface lt-1/1/10.0 set routing-options router-id 10.1.1.1
设备 P
set interfaces ge-1/1/0 unit 0 family inet address 10.10.0.2/24 set interfaces ge-1/1/0 unit 0 family mpls set interfaces ge-1/1/1 unit 0 family inet address 10.10.1.2/24 set interfaces ge-1/1/1 unit 0 family mpls set interfaces ge-1/1/2 unit 0 family inet address 10.10.2.2/24 set interfaces ge-1/1/2 unit 0 family mpls set interfaces ge-1/1/3 unit 0 family inet address 10.10.3.2/24 set interfaces ge-1/1/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.2/32 set protocols rsvp interface ge-1/1/0.0 set protocols rsvp interface ge-1/1/1.0 set protocols rsvp interface ge-1/1/2.0 set protocols rsvp interface ge-1/1/3.0 set protocols mpls interface ge-1/1/0.0 set protocols mpls interface ge-1/1/1.0 set protocols mpls interface ge-1/1/2.0 set protocols mpls interface ge-1/1/3.0 set protocols mpls interface lo0.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface ge-1/1/0.0 set protocols ospf area 0.0.0.0 interface ge-1/1/1.0 set protocols ospf area 0.0.0.0 interface ge-1/1/2.0 set protocols ospf area 0.0.0.0 interface ge-1/1/3.0 set protocols ospf area 0.0.0.0 interface lo0.0 set routing-options router-id 10.2.2.2
设备 PE2
set chassis fpc 1 pic 1 tunnel-services bandwidth 1g set interfaces ge-1/0/0 encapsulation ethernet-bridge set interfaces ge-1/0/0 unit 0 family bridge set interfaces ge-1/1/2 unit 0 family inet address 10.10.2.3/24 set interfaces ge-1/1/2 unit 0 family mpls set interfaces ge-1/1/3 unit 0 family inet address 10.10.3.3/24 set interfaces ge-1/1/3 unit 0 family mpls set interfaces lt-1/1/10 unit 0 encapsulation ethernet-bridge set interfaces lt-1/1/10 unit 0 peer-unit 100 set interfaces lt-1/1/10 unit 0 family bridge set interfaces lt-1/1/10 unit 100 encapsulation ethernet-ccc set interfaces lt-1/1/10 unit 100 peer-unit 0 set interfaces lt-1/1/10 unit 100 family ccc set interfaces lo0 unit 0 family inet address 10.3.3.3/32 set protocols rsvp interface ge-1/1/2.0 set protocols rsvp interface ge-1/1/3.0 set protocols mpls label-switched-path 3-1 from 10.3.3.3 set protocols mpls label-switched-path 3-1 to 10.1.1.1 set protocols mpls interface ge-1/1/2.0 set protocols mpls interface ge-1/1/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-1/1/2.0 set protocols ospf area 0.0.0.0 interface ge-1/1/3.0 set protocols connections remote-interface-switch 3-1-ccc interface lt-1/1/10.100 set protocols connections remote-interface-switch 3-1-ccc transmit-lsp 3-1 set protocols connections remote-interface-switch 3-1-ccc receive-lsp 1-3 set protocols openflow switch s1 interfaces ge-1/0/0.0 port-id 1 set protocols openflow switch s1 interfaces lt-1/1/10.0 port-id 2 set protocols openflow switch s1 controller protocol tcp port 6633 set protocols openflow switch s1 controller address 10.94.175.213 set routing-instances r1 instance-type virtual-switch set routing-instances r1 bridge-domains bd1 interface ge-1/0/0.0 set routing-instances r1 bridge-domains bd1 interface lt-1/1/10.0 set routing-options router-id 10.3.3.3
配置入口提供商边缘路由器 (PE1)
逐步过程
要配置路由器 PE1:
通过配置 DPC 及其相应的 PIC 以使用隧道服务来创建隧道接口。
[edit] user@PE1# set chassis fpc 1 pic 1 tunnel-services bandwidth 1g
将 OpenFlow 接口配置为第 2 层接口。
[edit interfaces] user@PE1# set ge-1/0/0 encapsulation ethernet-bridge user@PE1# set ge-1/0/0 unit 0 family bridge
配置 OpenFlow 虚拟交换机路由实例。
[edit] user@PE1# set routing-instances r1 instance-type virtual-switch user@PE1# set routing-instances r1 bridge-domains bd1 interface ge-1/0/0.0 user@PE1# set routing-instances r1 bridge-domains bd1 interface lt-1/1/10.0
配置 OpenFlow 控制器。
[edit protocols openflow] user@PE1# set switch s1 controller address 10.94.175.213 user@PE1# set switch s1 controller protocol tcp port 6633
配置参与 OpenFlow 的接口。
[edit protocols openflow] user@PE1# set switch s1 interfaces ge-1/0/0.0 port-id 1 user@PE1# set switch s1 interfaces lt-1/1/10.0 port-id 2
配置环路接口和路由器 ID。
[edit] user@PE1# set interfaces lo0 unit 0 family inet address 10.1.1.1/32 user@PE1# set routing-options router-id 10.1.1.1
配置 MPLS 接口。
[edit interfaces] user@PE1# set ge-1/1/0 unit 0 family inet address 10.10.0.1/24 user@PE1# set ge-1/1/0 unit 0 family mpls user@PE1# set ge-1/1/1 unit 0 family inet address 10.10.1.1/24 user@PE1# set ge-1/1/1 unit 0 family mpls
配置逻辑隧道接口。
[edit interfaces] user@PE1# set lt-1/1/10 unit 0 family bridge user@PE1# set lt-1/1/10 unit 0 encapsulation ethernet-bridge user@PE1# set lt-1/1/10 unit 0 peer-unit 100 user@PE1# set lt-1/1/10 unit 100 family ccc user@PE1# set lt-1/1/10 unit 100 encapsulation ethernet-ccc user@PE1# set lt-1/1/10 unit 100 peer-unit 0
在连接到路由器 P 的接口上启用 RSVP、MPLS 和 OSPF。
[edit protocols] user@PE1# set rsvp interface ge-1/1/0.0 user@PE1# set rsvp interface ge-1/1/1.0 user@PE1# set mpls interface ge-1/1/0.0 user@PE1# set mpls interface ge-1/1/1.0 user@PE1# set ospf area 0.0.0.0 interface ge-1/1/0.0 user@PE1# set ospf area 0.0.0.0 interface ge-1/1/1.0
为 OSPF 启用流量工程。
[edit protocols] user@PE1# set ospf traffic-engineering
配置从 PE1 到 PE2 的 MPLS LSP。
[edit protocols] user@PE1# set mpls label-switched-path 1-3 from 10.1.1.1 user@PE1# set mpls label-switched-path 1-3 to 10.3.3.3
配置 MPLS LSP 隧道交叉连接。
[edit protocols] user@PE1# set connections remote-interface-switch 1-3-ccc interface lt-1/1/10.100 user@PE1# set connections remote-interface-switch 1-3-ccc transmit-lsp 1-3 user@PE1# set connections remote-interface-switch 1-3-ccc receive-lsp 3-1
提交配置。
[edit] user@PE1# commit
结果
在配置模式下,输入命令以确认 show
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。为简洁起想,此命令 show
输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
chassis { fpc 1 { pic 1 { tunnel-services { bandwidth 1g; } } } } interfaces { ge-1/0/0 { encapsulation ethernet-bridge; unit 0 { family bridge; } } ge-1/1/0 { unit 0 { family inet { address 10.10.0.1/24; } family mpls; } } ge-1/1/1 { unit 0 { family inet { address 10.10.1.1/24; } family mpls; } } lt-1/1/10 { unit 0 { encapsulation ethernet-bridge; peer-unit 100; family bridge; } unit 100 { encapsulation ethernet-ccc; peer-unit 0; family ccc; } } lo0 { unit 0 { family inet { address 10.1.1.1/32; } } } } protocols { rsvp { interface ge-1/1/0.0; interface ge-1/1/1.0; } mpls { label-switched-path 1-3 { from 10.1.1.1; to 10.3.3.3; } interface ge-1/1/0.0; interface ge-1/1/1.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-1/1/0.0; interface ge-1/1/1.0; } } connections { remote-interface-switch 1-3-ccc { interface lt-1/1/10.100; transmit-lsp 1-3; receive-lsp 3-1; } } openflow { switch s1 { interfaces { ge-1/0/0.0 port-id 1; lt-1/1/10.0 port-id 2; } controller { protocol { tcp { port 6633; } } address 10.94.175.213; } } } } routing-instances { r1 { instance-type virtual-switch; bridge-domains { bd1 { interface ge-1/0/0.0; interface lt-1/1/10.0; } } } } routing-options { router-id 10.1.1.1; } ...
配置提供商路由器 (P)
逐步过程
要配置路由器 P:
配置环路接口和路由器 ID。
[edit] user@P# set interfaces lo0 unit 0 family inet address 10.2.2.2/32 user@P# set routing-options router-id 10.2.2.2
配置 MPLS 接口。
[edit interfaces] user@P# set ge-1/1/0 unit 0 family inet address 10.10.0.2/24 user@P# set ge-1/1/0 unit 0 family mpls user@P# set ge-1/1/1 unit 0 family inet address 10.10.1.2/24 user@P# set ge-1/1/1 unit 0 family mpls user@P# set ge-1/1/2 unit 0 family inet address 10.10.2.2/24 user@P# set ge-1/1/2 unit 0 family mpls user@P# set ge-1/1/3 unit 0 family inet address 10.10.3.2/24 user@P# set ge-1/1/3 unit 0 family mpls
在连接到 PE1 和 PE2 的接口上启用 RSVP、MPLS 和 OSPF。
[edit protocols] user@P# set rsvp interface ge-1/1/0.0 user@P# set rsvp interface ge-1/1/1.0 user@P# set rsvp interface ge-1/1/2.0 user@P# set rsvp interface ge-1/1/3.0 user@P# set mpls interface lo0.0 user@P# set mpls interface ge-1/1/0.0 user@P# set mpls interface ge-1/1/1.0 user@P# set mpls interface ge-1/1/2.0 user@P# set mpls interface ge-1/1/3.0 user@P# set ospf area 0.0.0.0 interface fxp0.0 disable user@P# set ospf area 0.0.0.0 interface ge-1/1/0.0 user@P# set ospf area 0.0.0.0 interface ge-1/1/1.0 user@P# set ospf area 0.0.0.0 interface ge-1/1/2.0 user@P# set ospf area 0.0.0.0 interface ge-1/1/3.0 user@P# set ospf area 0.0.0.0 interface lo0.0
为 OSPF 启用流量工程。
[edit protocols] user@P# set ospf traffic-engineering
提交配置。
[edit] user@P# commit
结果
在配置模式下,输入命令以确认 show
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。为简洁起想,此命令 show
输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
interfaces { ge-1/1/0 { unit 0 { family inet { address 10.10.0.2/24; } family mpls; } } ge-1/1/1 { unit 0 { family inet { address 10.10.1.2/24; } family mpls; } } ge-1/1/2 { unit 0 { family inet { address 10.10.2.2/24; } family mpls; } } ge-1/1/3 { unit 0 { family inet { address 10.10.3.2/24; } family mpls; } } lo0 { unit 0 { family inet { address 10.2.2.2/32; } } } } protocols { rsvp { interface ge-1/1/0.0; interface ge-1/1/1.0; interface ge-1/1/2.0; interface ge-1/1/3.0; } mpls { interface ge-1/1/0.0; interface ge-1/1/1.0; interface ge-1/1/2.0; interface ge-1/1/3.0; interface lo0.0; } ospf { traffic-engineering; area 0.0.0.0 { interface fxp0.0 { disable; } interface ge-1/1/0.0; interface ge-1/1/1.0; interface ge-1/1/2.0; interface ge-1/1/3.0; interface lo0.0; } } } routing-options { router-id 10.2.2.2; } ...
配置出口提供商边缘路由器 (PE2)
逐步过程
要配置路由器 PE2:
通过配置 DPC 及其相应的 PIC 以使用隧道服务来创建隧道接口。
[edit] user@PE2# set chassis fpc 1 pic 1 tunnel-services bandwidth 1g
将 OpenFlow 接口配置为第 2 层接口。
[edit interfaces] user@PE2# set ge-1/0/0 encapsulation ethernet-bridge user@PE2# set ge-1/0/0 unit 0 family bridge
配置 OpenFlow 虚拟交换机路由实例。
[edit] user@PE2# set routing-instances r1 instance-type virtual-switch user@PE2# set routing-instances r1 bridge-domains bd1 interface ge-1/0/0.0 user@PE2# set routing-instances r1 bridge-domains bd1 interface lt-1/1/10.0
配置 OpenFlow 控制器。
[edit protocols openflow] user@PE2# set switch s1 controller protocol tcp port 6633 user@PE2# set switch s1 controller address 10.94.175.213
配置参与 OpenFlow 的接口。
[edit protocols openflow] user@PE2# set switch s1 interfaces ge-1/0/0.0 port-id 1 user@PE2# set switch s1 interfaces lt-1/1/10.0 port-id 2
配置环路接口和路由器 ID。
[edit] user@PE2# set interfaces lo0 unit 0 family inet address 10.3.3.3/32 user@PE2# set routing-options router-id 10.3.3.3
配置 MPLS 接口。
[edit interfaces] user@PE2# set ge-1/1/2 unit 0 family inet address 10.10.2.3/24 user@PE2# set ge-1/1/2 unit 0 family mpls user@PE2# set ge-1/1/3 unit 0 family inet address 10.10.3.3/24 user@PE2# set ge-1/1/3 unit 0 family mpls
配置逻辑隧道接口。
[edit interfaces] user@PE2# set lt-1/1/10 unit 0 family bridge user@PE2# set lt-1/1/10 unit 0 encapsulation ethernet-bridge user@PE2# set lt-1/1/10 unit 0 peer-unit 100 user@PE2# set lt-1/1/10 unit 100 family ccc user@PE2# set lt-1/1/10 unit 100 encapsulation ethernet-ccc user@PE2# set lt-1/1/10 unit 100 peer-unit 0
在连接到路由器 P 的接口上启用 RSVP、MPLS 和 OSPF。
[edit protocols] user@PE2# set rsvp interface ge-1/1/2.0 user@PE2# set rsvp interface ge-1/1/3.0 user@PE2# set mpls interface ge-1/1/2.0 user@PE2# set mpls interface ge-1/1/3.0 user@PE2# set ospf area 0.0.0.0 interface ge-1/1/2.0 user@PE2# set ospf area 0.0.0.0 interface ge-1/1/3.0
为 OSPF 启用流量工程。
[edit protocols] user@PE2# set ospf traffic-engineering
配置从 PE2 到 PE1 的 MPLS LSP。
[edit protocols] user@PE2# set mpls label-switched-path 3-1 from 10.3.3.3 user@PE2# set mpls label-switched-path 3-1 to 10.1.1.1
配置 MPLS LSP 隧道交叉连接。
[edit protocols] user@PE2# set connections remote-interface-switch 3-1-ccc interface lt-1/1/10.100 user@PE2# set connections remote-interface-switch 3-1-ccc transmit-lsp 3-1 user@PE2# set connections remote-interface-switch 3-1-ccc receive-lsp 1-3
提交配置。
[edit] user@PE2# commit
结果
在配置模式下,输入命令以确认 show
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。为简洁起想,此命令 show
输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
chassis { fpc 1 { pic 1 { tunnel-services { bandwidth 1g; } } } } interfaces { ge-1/0/0 { encapsulation ethernet-bridge; unit 0 { family bridge; } } ge-1/1/2 { unit 0 { family inet { address 10.10.2.3/24; } family mpls; } } ge-1/1/3 { unit 0 { family inet { address 10.10.3.3/24; } family mpls; } } lt-1/1/10 { unit 0 { encapsulation ethernet-bridge; peer-unit 100; family bridge; } unit 100 { encapsulation ethernet-ccc; peer-unit 0; family ccc; } } lo0 { unit 0 { family inet { address 10.3.3.3/32; } } } } protocols { rsvp { interface ge-1/1/2.0; interface ge-1/1/3.0; } mpls { label-switched-path 3-1 { from 10.3.3.3; to 10.1.1.1; } interface ge-1/1/2.0; interface ge-1/1/3.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-1/1/2.0; interface ge-1/1/3.0; } } connections { remote-interface-switch 3-1-ccc { interface lt-1/1/10.100; transmit-lsp 3-1; receive-lsp 1-3; } } openflow { switch s1 { interfaces { ge-1/0/0.0 port-id 1; lt-1/1/10.0 port-id 2; } controller { protocol { tcp { port 6633; } } address 10.94.175.213; } } } } routing-instances { r1 { instance-type virtual-switch; bridge-domains { bd1 { interface ge-1/0/0.0; interface lt-1/1/10.0; } } } } routing-options { router-id 10.3.3.3; } ...
验证
确认配置工作正常。
验证 OpenFlow 控制器连接是否已开启
目的
在每台支持 OpenFlow 的路由器上,验证 OpenFlow 控制器的连接状态是否为 up
。
行动
发出 show openflow controller
操作模式命令,并验证控制器连接状态是否为 up
。
user@PE1> show openflow controller Openflowd controller information: Controller socket: 11 Controller IP address: 10.94.175.213 Controller protocol: tcp Controller port: 6633 Controller connection state: up Number of connection attempt: 1 Controller role: equal
意义
除了有关控制器 up
的其他信息外,输出还显示 OpenFlow 控制器的连接状态。
验证 OpenFlow 接口是否已启动
目的
在每台支持 OpenFlow 的路由器上,验证 OpenFlow 接口是否已开启。
行动
发出 show openflow interfaces
操作模式命令,并验证每个接口的状态是否为 Up
。例如,在 PE1 上:
user@PE1> show openflow interfaces Switch name: s1 Interface Name: ge-1/0/0.0 Interface port number: 1 Interface Hardware Address: 00:00:5e:00:53:b1 Interface speed: 1Gb Full-duplex Interface Auto-Negotiation: Enabled Interface media type: Fiber Interface state: Up Switch name: s1 Interface Name: lt-1/1/10.0 Interface port number: 2 Interface Hardware Address: 00:00:5e:00:53:be Interface speed: 1Gb Full-duplex Interface Auto-Negotiation: Disabled Interface media type: Fiber Interface state: Up
意义
除了有关接口 Up
的其他信息外,输出还显示每个 OpenFlow 接口的状态。
验证 MPLS LSP 是否正常运行
目的
在每台边缘路由器上,验证 MPLS LSP 状态是否为 Up
。
行动
发出 show mpls lsp
操作模式命令,并验证每个 LSP 是否可操作。
user@PE1> show mpls lsp Ingress LSP: 1 sessions To From State Rt P ActivePath LSPname 10.3.3.3 10.1.1.1 Up 0 * 1-3 Total 1 displayed, Up 1, Down 0 Egress LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.1.1.1 10.3.3.3 Up 0 1 FF 299776 - 3-1 Total 1 displayed, Up 1, Down 0 Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0
user@PE2> show mpls lsp Ingress LSP: 1 sessions To From State Rt P ActivePath LSPname 10.1.1.1 10.3.3.3 Up 0 * 3-1 Total 1 displayed, Up 1, Down 0 Egress LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.3.3.3 10.1.1.1 Up 0 1 FF 299840 - 1-3 Total 1 displayed, Up 1, Down 0 Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0
意义
输出显示,每个 LSP 都运行正常。
验证 MPLS LSP 交叉连接是否正常运行
目的
验证 MPLS LSP 电路交叉连接是否正常运行。
行动
发出 show connections remote-interface-switch
操作模式命令,并验证电路交叉连接状态是否为 Up
。
user@PE1> show connections remote-interface-switch CCC and TCC connections [Link Monitoring On] [...Output truncated...] Connection/Circuit Type St Time last up # Up trans 1-3-ccc rmt-if Up Apr 18 22:30:54 1 lt-1/1/10.100 intf Up 1-3 tlsp Up 3-1 rlsp Up
user@PE2> show connections remote-interface-switch CCC and TCC connections [Link Monitoring On] [...Output truncated...] Connection/Circuit Type St Time last up # Up trans 3-1-ccc rmt-if Up Apr 18 15:07:04 1 lt-1/1/10.100 intf Up 3-1 tlsp Up 1-3 rlsp Up
意义
两个路由器的输出均表示电路交叉连接可正常运行。
验证路由
目的
确保通过 LSP 的 CCC 接口的路由处于活动状态。
行动
show route ccc lt-1/1/10.100
发出命令。
user@PE1> show route ccc lt-1/1/10.100 mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both lt-1/1/10.100 *[CCC/7/1] 00:34:54, metric 2 > to 10.10.1.2 via ge-1/1/1.0, label-switched-path 1-3
user@PE2> show route ccc lt-1/1/10.100 mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both lt-1/1/10.100 *[CCC/7/1] 00:35:48, metric 2 > to 10.10.2.2 via ge-1/1/2.0, label-switched-path 3-1
意义
示例输出显示,电路交叉连接使用配置的 LSP 和 MPLS 接口作为出口接口。
故障 排除
电路交叉连接的故障排除
问题
支持 OpenFlow 的路由器不会将 OpenFlow 流量路由到远程 OpenFlow 网络。
解决 方案
为了将流量从本地 OpenFlow 网络定向到远程 OpenFlow 网络,OpenFlow 控制器必须安装选择相应流量的流条目,并将其转发到正确的 OpenFlow 接口。对于从 PE1 流到 PE2 的流量,OpenFlow 控制器必须在 PE1 上安装流条目,以便将 OpenFlow 流量从 ge-1/0/0.0 定向到 lt-1/1/10.0,并且必须在 PE2 上安装流条目,以便将 OpenFlow 流量从 lt-1/1/10.0 定向到 ge-1/0/0.0。同样 对于从 PE2 流向 PE1 的流量,OpenFlow 控制器必须在 PE2 上安装流条目,以便将所需的 OpenFlow 流量从 ge-1/0/0.0 定向到 lt-1/1/10.0,并且必须在 PE1 上安装流条目,以便将 OpenFlow 流量从 lt-1/1/10.0 定向到 ge-1/1/0.0。