使用Ping/Tracert检测VPN网络
使用Ping/Tracert检测VPN网络
- 使用Ping检测VPWS PW的连通性
配置VPWS(Virtual Private Wire Service)网络后,可以使用PW Ping检测VPWS的连通性。 - 使用Ping检测VPLS PW的连通性
配置VPLS网络后,可以使用PW Ping检测VPLS的连通性。 - 配置Tracert检测PWE3网络连通性
用户通过Tracert命令获取网络中数据包从发送端到目的端所经过的SPE和P设备的信息,检查PW的连通性并定位网络故障节点。 - 配置Tracert检测VPLS PW网络连通性
- 使用CE Ping检测VPLS网络PE和CE连通性
配置VPLS功能后,可以使用CE Ping检测PE和CE的连通性。 - 使用CE Ping检测EVC模型下PE和CE连通性
配置BD(Bridge Domain)功能后,可以使用CE Ping检测EVC(Ethernet Virtual Connection)模型下PE和CE的连通性。
使用Ping检测VPWS PW的连通性
配置VPWS(Virtual Private Wire Service)网络后,可以使用PW Ping检测VPWS的连通性。
背景信息
在VPWS网络中,当某条PW发生故障时,可以通过ping vc命令进行检测。在PW为UP的情况下,大体定位PW的异常情况,如转发项异常丢失或者不正确等。
PW Ping的检测方式和场景请参见表5-1。
检测方式 | 场景 | 特点 |
---|---|---|
Control-Word方式 | 支持单段PW和多段PW场景。 |
|
Label-Alert方式 | 仅支持单段PW场景。 |
|
TTL方式 | 支持单段PW和多段PW场景。 | 需要用户指定TTL值,以保证ping请求报文在目的设备因TTL超时上送处理。 |
操作步骤
- Control-Word方式:
执行命令ping vc vc-type pw-id [ peer-address ] [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v | -g ] * control-word [ remote remote-ip-address peer-pw-id [ sender sender-address ] ] [ ttl ttl-value ] [ pipe | uniform ],使用Control-Word方式检测PW的连通性。
在检测多段PW的连通性时,需要指定remote remote-ip-address peer-pw-id [ sender sender-address ]参数,配置远端目的PE的IP地址、PW ID和源地址。
- Label-Alert方式:
执行命令ping vc vc-type pw-id [ peer-address ] [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v | -g ] * label-alert [ no-control-word ] ,使用Label-Alert方式检测PW的连通性。
- TTL方式:
执行命令ping vc vc-type pw-id [ peer-address ] [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v | -g ] * normal [ no-control-word ] [ remote remote-ip-address peer-pw-id ] [ ttl ttl-value ] [ pipe | uniform ],使用TTL方式检测PW的连通性。
在检测多段PW的连通性时,需要指定remote remote-ip-address peer-pw-id [ ttl ttl-value ] [ pipe | uniform ]参数,配置远端目的PE的IP地址、PW ID和TTL值。
命令执行结果输出包括:
对每一个ping vc报文的响应情况,如果超时到仍没有收到响应报文,则输出“Request time out”,否则显示响应报文中数据字节数、报文序号、TTL和响应时间等。
最后的统计信息,包括发送报文数、接收报文数、未响应报文百分比和响应时间的最小、最大和平均值。
举例如下:
<HUAWEI> ping vc ethernet 100 control-word PW PING : FEC 128 PSEUDOWIRE (NEW). Type = ethernet, ID = 100 : 100 data bytes, press CTRL_C to break Reply from 10.10.10.10: bytes=100 Sequence=1 time = 140 ms Reply from 10.10.10.10: bytes=100 Sequence=2 time = 40 ms Reply from 10.10.10.10: bytes=100 Sequence=3 time = 30 ms Reply from 10.10.10.10: bytes=100 Sequence=4 time = 50 ms Reply from 10.10.10.10: bytes=100 Sequence=5 time = 50 ms --- FEC: FEC 128 PSEUDOWIRE (NEW). Type = ethernet, ID = 100 ping statistics--- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/62/140 ms
使用Ping检测VPLS PW的连通性
配置VPLS网络后,可以使用PW Ping检测VPLS的连通性。
操作步骤
- 根据组网方式,执行如下命令检测VPLS网络的连通性:
- Kompella方式:ping vpls [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v | -g ] * vsi vsi-name local-site-id remote-site-id [ bypass -si interface-type interface-number ]
- Martini方式:ping vpls [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v | -g ] * vsi vsi-name peer peer-address [ negotiate-vc-id vc-id ] [ control-word [ remote remote-address remote-pw-id [ sender sender-address ] ] ] [ bypass -si interface-type interface-number ]
命令执行结果输出包括:
对每一个ping vpls报文的响应情况,如果超时到仍没有收到响应报文,则输出“Request time out”,否则显示响应报文中数据字节数、报文序号、TTL和响应时间等。
最后的统计信息,包括发送报文数、接收报文数、未响应报文百分比和响应时间的最小、最大和平均值。
举例如下:
<HUAWEI> ping vpls vsi a2 peer 10.1.1.1 PW PING : FEC 128 PSEUDOWIRE (NEW). Type = vlan, ID = 2 : 100 data bytes, press CTRL_C to break Reply from 10.1.1.1: bytes=100 Sequence=1 time=60 ms Reply from 10.1.1.1: bytes=100 Sequence=2 time=50 ms Reply from 10.1.1.1: bytes=100 Sequence=3 time=60 ms Reply from 10.1.1.1: bytes=100 Sequence=4 time=60 ms Reply from 10.1.1.1: bytes=100 Sequence=5 time=60 ms --- FEC: FEC 128 PSEUDOWIRE (NEW). Type = vlan, ID = 2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 50/58/60 ms
配置Tracert检测PWE3网络连通性
用户通过Tracert命令获取网络中数据包从发送端到目的端所经过的SPE和P设备的信息,检查PW的连通性并定位网络故障节点。
操作步骤
- 根据组网环境,执行如下命令定位PWE3网络故障:
使用control-word通道:
tracert vc vc-type pw-id [ peer-address ] [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * control-word [ ptn-mode | full-lsp-path ] [ pipe | uniform ] [ detail ]
tracert vc vc-type pw-id [ peer-address ] [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * control-word remote remote-ip-address [ ptn-mode | full-lsp-path ] [ pipe | uniform ] [ detail ]
使用label-alert通道:
tracert vc vc-type pw-id [ peer-address ] [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * label-alert [ no-control-word ] [ full-lsp-path ] [ pipe | uniform ] [ detail ]
使用普通模式:
tracert vc vc-type pw-id [ peer-address ] [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * normal [ remote remote-ip-address ] } [ full-lsp-path ] [ pipe | uniform ] [ detail ]
使用tracert vc命令检测PWE3网络之前,必须确保:- 正确配置方式PWE3网络
- 配置PW模板,使能VCCV-PING。并在PW模板视图中进行如下配置:
- 使用控制字通道:先使用control-word使能控制字功能。
- 使用MPLS Router Alert通道:使用label-alert使能控制字功能。
- 普通模式:使用normal使能控制字功能。
<HUAWEI> tracert vc ppp 100 control-word remote 4.1.1.2 full-lsp-path TTL Replier Time Type Downstream 0 Ingress 1.1.1.2/[1025 ] 1 1.1.1.2 230 ms Transit 2.1.1.2/[1301 ] 2 2.1.1.2 230 ms Transit 3.1.1.2/[1208 ] 3 3.1.1.2 100 ms Transit 4.1.1.2/[3 ] 4 4.1.1.2 150 ms Egress
从上述结果中可以看出,PW路径上的每个节点以及到每一个节点的响应时间。
配置Tracert检测VPLS PW网络连通性
操作步骤
- 根据组网方式,执行如下命令定位VPLS网络故障:
- Kompella方式:tracert vpls [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * vsi vsi-name local-site-id remote-site-id [ full-lsp-path ] [ detail ] [ bypass -si interface-type interface-number ]
- Martini方式:tracert vpls [ -exp exp-value | -f first-ttl | -m max-ttl | -r reply-mode | -t timeout-value | -g ] * vsi vsi-name peer peer-address [ negotiate-vc-id vc-id ] [ full-lsp-path ] [ control-word ] [ pipe | uniform ] [ detail ] [ bypass -si interface-type interface-number ]
对VPLS进行Tracert测试,定位VPLS网络故障。
<HUAWEI>tracert vpls vsi test 10 10 full-lsp-path PW Trace Route FEC: L2 VPN ENDPOINT. Sender VEID = 10, Remote VEID = 20, press CTRL_C to break TTL Replier Time Type Downstream 0 Ingress 10.1.1.2/[294929 32894 32888 ] 1 10.1.1.2 93 ms Transit 10.2.1.2/[32925 3 ] 2 10.2.1.2 1 ms Transit 10.3.1.2/[32881 ] 3 4.4.4.4 2 ms Egress
从上述结果中可以看出,PW路径上的每个节点以及到每一个节点的响应时间。
使用CE Ping检测VPLS网络PE和CE连通性
配置VPLS功能后,可以使用CE Ping检测PE和CE的连通性。
背景信息
- 指定源IP地址需要跟接收用户的IP地址在同网段,否则接收用户认为ARP请求非法报文,不会回应ARP报文。
- 指定源IP地址不能与L2VPN网络内已经使用的IP地址相同,否则使得报文转发路径错误,导致IP地址被指定为源IP地址的用户无法正常上网。如果指定的源IP地址刚好是网关IP地址,将会影响网络中的所有主机无法正常上网。
为了避免上述问题,执行ce-ping命令后首先提示用户务必使用“未使用”的IP地址作为源IP地址,用户输入Y后才执行命令。
操作步骤
- 使用如下命令,检测PE和CE的连通性。
ce-ping ip-address vsi vsi-name source-ip source-ip-address [ mac mac-address ] [ interval interval | count count ] *
举例如下:
<HUAWEI> ce-ping 10.1.1.1 vsi abc source-ip 10.1.1.2 mac E024-7FA4-D2CB interval 2 count 5 Info: If the designated source IP address is in use, it could cause the abnormal data transmission in VPLS network. Are you sure the source-ip is unused in this VPLS? [Y/N]:y Ce-ping is in process... 10.1.1.1 is used by 00e0-2324-df4a
使用CE Ping检测EVC模型下PE和CE连通性
配置BD(Bridge Domain)功能后,可以使用CE Ping检测EVC(Ethernet Virtual Connection)模型下PE和CE的连通性。
背景信息
EVC定义了统一的二层承载业务模型和配置模型,EVC模型下,可使用CE Ping功能探测PE和指定BD的CE之间链路的可达性。EVC详细描述请参考《HUAWEI NE40E-M系列 特性描述-局域网与城域网接入》,详细的配置请参考EVC配置。
在使用CE Ping功能探测PE和CE之间链路的可达性时,必须指定源IP地址,且该IP地址必须满足如下两个条件:
- 源IP地址必须跟目的CE的IP地址在同一网段,否则目的CE在收到CE Ping报文时会把CE Ping报文判断为非法报文,直接丢弃。
- 指定源IP地址不能与指定BD内已经使用的IP地址相同,否则CE Ping报文的转发路径会发生错误,导致源IP地址所对应的用户无法正常上网。报文转发路径错误,导致IP地址被指定为源IP地址的用户无法正常上网。如果指定的源IP地址刚好是网关IP地址,将会影响网络中的所有主机无法正常上网。
为了避免上述问题,执行ce-ping bd命令后首先提示用户务必使用“未使用”的IP地址作为源IP地址,用户输入Y后命令生效。
操作步骤
- 在任意视图下执行ce-ping ip-address bd bd-id source-ip source-ip-address [ mac mac-address ] [ interval interval | count count ] *命令,探测PE到CE的可达性。
<HUAWEI> ce-ping 10.1.1.1 bd 123 source-ip 10.1.1.2 mac e024-7fa4-d2cb interval 2 count 5 Info: If the designated source IP address is in use, it could cause the abnormal data transmission in EVC network. Are you sure the source-ip is unused in this EVC? [Y/N]:y Ce-ping is in process... 10.1.1.1 is used by 00e0-2324-df4a