通信人家园
标题:
关于MPLS Ping/Traceroute
[查看完整版帖子]
[打印本页]
时间:
2010-10-7 20:26
作者:
啸傲江湖
标题:
关于MPLS Ping/Traceroute
MPLS Ping/Traceroute
的产生
n
为了提供一整套的
MPLS OAM
工具来对
MPLS
数据通道进行故障诊断定位,
RFC4377
定义了
MPLS OAM
的
requirement
,而
RFC 4379
则定义了两个
MPlS OAM
工具,
MPLS Ping and MPLS Traceroute
,满足部分
4377
提出的
requirement
。
n
这是两个通用工具,可以被不同应用用来做不同目的的检测,可以检测
LSP
的错误,也可以检测一个
MPLS PW
的错误,如
VCCV
就用这个机制来进行
MPLS PW
的错误检测
n
MPLS Ping
,类似于
ICMP ping
,用同样的
echo
和
reply
的机制来实现,用来诊断
LSP
是否有问题,若有问题,是何种问题。
n
MPLS Traceroute
,类似于
UDP Traceroute
。用来定位出问题的节点
MPLS Ping
和
Traceroute
的报文
n
MPLS Ping
和
Traceroute
的
payload
是
UDP
报文,外面有
IP header
,最外面则是
MPLS label.
n
对于
PING,
最外层
MPLS Label
的
TTL
被设置为
255
,而
Traceroute
,最外层的
MPLS Label
的
TTL
则被置为
1
,
2
,
…….,N
。跟
IP
的
ping
和
traceroute
一样。这是
MPLS Ping
和
traceroute
的唯一实现上的区别。为了描述方便起见,以下统称为
MPLS ping.
n
一个
MPLS echo request
的
IP header
的各个域如下设置:
source IP address
是取自
sender
上的一个可路由的
IP
地址
destination IP address
是一个从
127/8(ipv4) or 0:0:0:0:0:FFFF:127/104(ipv6)
网段随机选择的一个值
.
IP TTL is set to 1.
source UDP port
是
sender
自己选择的一个值
;
destination UDP port
设为
3503
The Router Alert option
必须被设置
n
MPLS PING
的
Payload format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version Number | Global Flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Type | Reply mode | Return Code | Return Subcode|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sender's Handle |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TimeStamp Sent (seconds) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TimeStamp Sent (microseconds) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TimeStamp Received (seconds) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TimeStamp Received (microseconds) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLVs ... |
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
n
报文格式中
Message Type
有下面两个值
:
Value Meaning
----- -------
1 MPLS echo request
2 MPLS echo reply
n
报文中
The Reply Mode
可以是下面几个值中的一个
Value Meaning
----- -------
1 Do not reply
2 Reply via an IPv4/IPv6 UDP packet
3 Reply via an IPv4/IPv6 UDP packet with Router Alert
4 Reply via application level control channel
其中
4
,一个例子就是
VCCV
MPLS PING
和
Traceroute
的工作机制
n
MPLS PING
的报文可以是手动按需触发,也可以是定时发送,且频率可配。
n
Request
报文
payload
编码好了之后,外面加上
UDPheader, IP header
,再加上
MPLS label,
发送出去。
n
对于
PING,
会用一个特殊的
label,
比如
mpls alert label,
置于用于转发的
MPLS label
后面,当报文到达目的地之后,目的
LSR
看到
mpls alert label
,就会把报文送到
CPU
,
CPU
检查里面的
IP
是
127.0.0.1
,就会处理它。当然也可以不用
mpls alert label,
而用一些别的机制,比如在
PWE3
封装中,通过把
PW label
的
TTL
设为
1
或者用
PW associated channel
来使目的
LSR
终结该报文,并送到
CPU
去处理,处理完后,再发送回去,报文中携带必要的信息。比如典型应用
VCCV
。
n
对于
traceroute,
则是通过把最外层
MPLS label
的
TTL
依次设置为
1
,
2
,
3….N
,每次
TTL
减为
0
,就被送到
CPU
去处理。
CPU
然后送
reply
回去,在
reply
里面把需要的信息带上。
时间:
2010-10-8 08:04
作者:
frameworks
定位MPLS网络故障的2种基本手段。呵呵。现在PTN设备里面也有。
时间:
2010-10-28 10:29
作者:
OpSword
有点帮助
时间:
2011-1-10 11:27
作者:
qiangss
通信人家园 (https://www.txrjy.com/)
Powered by C114