我正在从几个 AS_PATHS 中解析出 ASN。我遇到的大多数属性看起来像这样:
[64, 1, 1, 0, 64, 2, 10, 2, 2, 0, 0, 23, 169, 0, 0, 50, 156, 64, 3, 4, 200, 40, 162, 202]
在哪里:
64, 1, 1, 0, -> Type Code 1, ORIGIN: IGP
64, 2, 10, 2, 2, 0, 0, 23, 169, 0, 0, 50, 156, ->
64 - Length of attribute length: 1 byte (5th bit is NOT flipped)
2 - Type Code 2: AS_PATH
10 - Attribute length: 10 bytes
2 - AS_SEQUENCE (ASNs in this attribute are ordered)
2 - Number of ASNs in the AS_PATH (2)
0, 0, 23, 169 - ASN 1: 6057
0, 0, 50, 156 - ASN 2: 12956
64, 3, 4, 200, 40, 162, 202 -> Type Code 3: NEXT HOP, 200.40.162.202
这一切都说得通。但是我遇到了这个 AS_PATH 属性字节流,我无法理解 AS_PATH:
[64, 2, 48, 2, 6, 0, 0, 18, 169, 0, 0, 27, 27, 0, 0, 81, 28, 0, 0, 34, 201, 0, 0, 34, 201, 0, 0, 34, 201, 2, 5, 0, 0, 164, 148, 0, 0, 221, 203, 0, 0, 221, 203, 0, 0, 221, 203, 0, 0, 221, 203]
跳过海峡到 AS_PATH 属性...
64 - Length of attribute length: 1 byte (5th bit is NOT flipped)
2 - Type Code 2: AS_PATH
48 - Attribute length: 48 bytes
2 - AS_SEQUENCE (ASNs in this attribute are ordered)
6 - Number of ASNs in the AS_PATH (6)
0, 0, 18, 169 - ASN 1: 4777
0, 0, 27, 27 - ASN 2: 6939
0, 0, 81, 28 - ASN 3: 20764
0, 0, 34, 201 - ASN 4: 8905
0, 0, 34, 201 - ASN 4: 8905
0, 0, 34, 201 - ASN 4: 8905
2, 5, - What is this??????
0, 0, 164, 148 - ASN 5: 42132
0, 0, 221, 203 - ASN 6: 56779
0, 0, 221, 203 - ASN 6: 56779
0, 0, 221, 203 - ASN 6: 56779
0, 0, 221, 203 - ASN 6: 56779
我的问题是:
2,5AS_PATH 属性中的字节是什么?- 为什么重复 ASN 4 和 6?
提前致谢。
