Re: [j-nsp] BMP and IPv6

2017-12-06 Thread Vincent Bernat
 ❦  6 décembre 2017 10:01 +0100, Vincent Bernat  :

>> Path Attribute - MP_REACH_NLRI
>> Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
>> Type Code: MP_REACH_NLRI (14)
>> Length: 30
>> Address family identifier (AFI): IPv6 (2)
>> Subsequent address family identifier (SAFI): Unicast (1)
>> Next hop network address (16 bytes)
>> Number of Subnetwork points of attachment (SNPA): 0
>> Network layer reachability information (9 bytes)
>> MP Reach NLRI length 184 invalid
>> [Expert Info (Error/Malformed): MP Reach NLRI length 184 invalid]
>>
>>    90 0e 00 1e 00 02 01 10 20 01 0d b8 00 01 00 00   ...
>> 0010   00 00 00 00 00 00 00 01 00 40 20 01 0d b8 00 53  .@ S
>> 0020   00 00..
>>
>> Moreover, when routes are withdrawn, the UPDATE message doesn't contain
>> withdrawn routes but come with a MP_UNREACH_NLRI which has the same
>> encoding problem.
>
> In fact, the MP NLRI is correctly encoded. This seems to be a bug in
> Wireshark.

This is https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14241.

Wireshark has been extended to decode Add-Path ID in IPv6 NLRI but this
ID is present only if the ADD-PATH capability has been negotiated,
something difficult to know for Wireshark as the OPEN message may have
been missed.

Sorry for the noise!
-- 
Document your data layouts.
- The Elements of Programming Style (Kernighan & Plauger)
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp

Re: [j-nsp] BMP and IPv6

2017-12-06 Thread Vincent Bernat
 ❦  6 décembre 2017 08:35 +0100, Vincent Bernat  :

> Path Attribute - MP_REACH_NLRI
> Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
> Type Code: MP_REACH_NLRI (14)
> Length: 30
> Address family identifier (AFI): IPv6 (2)
> Subsequent address family identifier (SAFI): Unicast (1)
> Next hop network address (16 bytes)
> Number of Subnetwork points of attachment (SNPA): 0
> Network layer reachability information (9 bytes)
> MP Reach NLRI length 184 invalid
> [Expert Info (Error/Malformed): MP Reach NLRI length 184 invalid]
>
>    90 0e 00 1e 00 02 01 10 20 01 0d b8 00 01 00 00   ...
> 0010   00 00 00 00 00 00 00 01 00 40 20 01 0d b8 00 53  .@ S
> 0020   00 00..
>
> Moreover, when routes are withdrawn, the UPDATE message doesn't contain
> withdrawn routes but come with a MP_UNREACH_NLRI which has the same
> encoding problem.

In fact, the MP NLRI is correctly encoded. This seems to be a bug in Wireshark.
-- 
Use self-identifying input.  Allow defaults.  Echo both on output.
- The Elements of Programming Style (Kernighan & Plauger)
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp

[j-nsp] BMP and IPv6

2017-12-05 Thread Vincent Bernat
Hey!

I am trying to collect route information using BMP:
 
https://www.juniper.net/documentation/en_US/junos/topics/concept/bgp-bmp-understanding.html

No problem with IPv4. I receive new routes and withdrawn routes without
any issue. However, for IPv6, the MP_REACH_NLRI path attribute is
incorrectly encoded (both Wireshark and GoBGP agree on this):

Path Attribute - MP_REACH_NLRI
Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
Type Code: MP_REACH_NLRI (14)
Length: 30
Address family identifier (AFI): IPv6 (2)
Subsequent address family identifier (SAFI): Unicast (1)
Next hop network address (16 bytes)
Number of Subnetwork points of attachment (SNPA): 0
Network layer reachability information (9 bytes)
MP Reach NLRI length 184 invalid
[Expert Info (Error/Malformed): MP Reach NLRI length 184 invalid]

   90 0e 00 1e 00 02 01 10 20 01 0d b8 00 01 00 00   ...
0010   00 00 00 00 00 00 00 01 00 40 20 01 0d b8 00 53  .@ S
0020   00 00..

Moreover, when routes are withdrawn, the UPDATE message doesn't contain
withdrawn routes but come with a MP_UNREACH_NLRI which has the same
encoding problem.

Border Gateway Protocol - UPDATE Message
Marker: 
Length: 39
Type: UPDATE Message (2)
Withdrawn Routes Length: 0
Total Path Attribute Length: 16
Path attributes
Path Attribute - MP_UNREACH_NLRI
Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
Type Code: MP_UNREACH_NLRI (15)
Length: 12
Address family identifier (AFI): IPv6 (2)
Subsequent address family identifier (SAFI): Unicast (1)
Withdrawn routes (9 bytes)
MP Unreach NLRI length 184 invalid
[Expert Info (Error/Malformed): MP Unreach NLRI length 184 
invalid]

   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  
0010   00 27 02 00 00 00 10 90 0f 00 0c 00 02 01 40 20  .'@ 
0020   01 0d b8 00 07 00 00 ...

Again, with IPv4 routes, no such issue:

Border Gateway Protocol - UPDATE Message
Marker: 
Length: 28
Type: UPDATE Message (2)
Withdrawn Routes Length: 5
Withdrawn Routes
192.0.2.7/32
Withdrawn route prefix length: 32
Withdrawn prefix: 192.0.2.7
Total Path Attribute Length: 0

I have tried various versions (16.1, 17.1, 17.3) without any
change. Even if Juniper was implementing an earlier draft, encoding of
path attributes should still be correct. Has someone already get this
problem?
-- 
Don't just echo the code with comments - make every comment count.
- The Elements of Programming Style (Kernighan & Plauger)
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp