Overview: We add route into application peer, then we connect peer. And check for update message on wireshark from odl.
NLRI part of packet looks like this:
20 00 01 ac 10 00 2c 00 65 0a 02 22 00 18 00 00 00
Where first number represents length 32 but there are 16 bytes after it.
So each number in length represents 4 bits?
Then route-distinguisher 172.16.0.44:101 than prefix 10.2.34.0/24
Steps for sending this route from Play.py to ODL
Steps to reproduce:
- configure app peer and internal peer
./configure.py
- start play.py
sudo ./start_play.sh
- send hex message to odl
./hex_send.py
(note: this specific play.py is necessary so it advertizes mcast-l3vpn)
at this point odl send update message to play.py
When I try to send this route to odl from play.py I get this error:
2018-06-18T13:19:26,914 | ERROR | epollEventLoopGroup-5-2 | BGPDocumentedException | 218 - org.opendaylight.bgpcep.bgp-parser-api - 0.10.0.SNAPSHOT | Error = MALFORMED_ATTR_LIST org.opendaylight.protocol.bgp.parser.BGPDocumentedException: Could not parse BGP attributes. at org.opendaylight.protocol.bgp.parser.impl.message.BGPUpdateMessageParser.parseMessageBody(BGPUpdateMessageParser.java:155) [219:org.opendaylight.bgpcep.bgp-parser-impl:0.10.0.SNAPSHOT] at org.opendaylight.protocol.bgp.parser.impl.message.BGPUpdateMessageParser.parseMessageBody(BGPUpdateMessageParser.java:53) [219:org.opendaylight.bgpcep.bgp-parser-impl:0.10.0.SNAPSHOT] at org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleMessageRegistry.parseBody(SimpleMessageRegistry.java:31) [220:org.opendaylight.bgpcep.bgp-parser-spi:0.10.0.SNAPSHOT] at org.opendaylight.protocol.bgp.parser.spi.AbstractMessageRegistry.parseMessage(AbstractMessageRegistry.java:63) [220:org.opendaylight.bgpcep.bgp-parser-spi:0.10.0.SNAPSHOT] at org.opendaylight.protocol.bgp.rib.impl.BGPByteToMessageDecoder.decode(BGPByteToMessageDecoder.java:50) [224:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT] at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) [94:io.netty.codec:4.1.22.Final] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) [94:io.netty.codec:4.1.22.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) [94:io.netty.codec:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [99:io.netty.transport:4.1.22.Final] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [94:io.netty.codec:4.1.22.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [94:io.netty.codec:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945) [99:io.netty.transport:4.1.22.Final] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:806) [100:io.netty.transport-native-epoll:4.1.22.Final] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) [100:io.netty.transport-native-epoll:4.1.22.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [100:io.netty.transport-native-epoll:4.1.22.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) [96:io.netty.common:4.1.22.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [96:io.netty.common:4.1.22.Final] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: java.lang.IllegalStateException: Cannot read Route Distinguisher from provided buffer. at com.google.common.base.Preconditions.checkState(Preconditions.java:504) ~[?:?] at org.opendaylight.bgp.concepts.RouteDistinguisherUtil.parseRouteDistinguisher(RouteDistinguisherUtil.java:77) ~[?:?] at org.opendaylight.protocol.bgp.l3vpn.mcast.nlri.L3vpnMcastNlriSerializer.extractDest(L3vpnMcastNlriSerializer.java:38) ~[?:?] at org.opendaylight.protocol.bgp.l3vpn.mcast.nlri.L3vpnMcastIpv4NlriHandler.parseNlri(L3vpnMcastIpv4NlriHandler.java:52) ~[?:?] at org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleNlriRegistry.parseMpReach(SimpleNlriRegistry.java:228) ~[?:?] at org.opendaylight.protocol.bgp.parser.impl.message.update.MPReachAttributeParser.parseAttribute(MPReachAttributeParser.java:44) ~[?:?] at org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleAttributeRegistry.parseAttributes(SimpleAttributeRegistry.java:136) ~[?:?] at org.opendaylight.protocol.bgp.parser.impl.message.BGPUpdateMessageParser.parseMessageBody(BGPUpdateMessageParser.java:151) ~[?:?] ... 25 more