[BGPCEP-788] Local-as failing with BAD_PEER_AS Created: 13/Apr/18  Updated: 12/Jul/18  Resolved: 16/Apr/18

Status: Verified
Project: bgpcep
Component/s: BGP
Affects Version/s: Fluorine
Fix Version/s: Fluorine

Type: Bug Priority: Medium
Reporter: Tomas Markovic Assignee: Claudio David Gasparini
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File conf2.py     File default2.cfg    

 Description   

Overview: Configure external passive peer with local-as.
Connect with exabgp with both peer-as and local-as set to local-as from the peer conf.
result:

2018-04-13T16:00:52,117 | WARN  | epollEventLoopGroup-5-8 | StrictBGPPeerRegistry            | 210 - org.opendaylight.bgpcep.bgp-rib-impl - 0.10.0.SNAPSHOT | Unexpected remote AS number. Expecting AsNumber{_value=64496}, got AsNumber{_value=65432}
2018-04-13T16:00:52,117 | ERROR | epollEventLoopGroup-5-8 | BGPDocumentedException           | 204 - org.opendaylight.bgpcep.bgp-parser-api - 0.10.0.SNAPSHOT | Error = BAD_PEER_AS
org.opendaylight.protocol.bgp.parser.BGPDocumentedException: Peer AS number mismatch
	at org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry.validateAs(StrictBGPPeerRegistry.java:205) [210:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT]
	at org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry.getPeer(StrictBGPPeerRegistry.java:191) [210:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT]
	at org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.handleOpen(AbstractBGPSessionNegotiator.java:204) [210:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT]
	at org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.handleMessage(AbstractBGPSessionNegotiator.java:173) [210:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT]
	at org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.channelRead(AbstractBGPSessionNegotiator.java:286) [210:org.opendaylight.bgpcep.bgp-rib-impl:0.10.0.SNAPSHOT]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [103:io.netty.transport:4.1.16.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [98:io.netty.codec:4.1.16.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [98:io.netty.codec:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [103:io.netty.transport:4.1.16.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [98:io.netty.codec:4.1.16.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [98:io.netty.codec:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) [103:io.netty.transport:4.1.16.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:797) [104:io.netty.transport-native-epoll:4.1.16.Final]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) [104:io.netty.transport-native-epoll:4.1.16.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [104:io.netty.transport-native-epoll:4.1.16.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [100:io.netty.common:4.1.16.Final]
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) [100:io.netty.common:4.1.16.Final]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Steps to reproduce:

  • fluorine karaf with ( tested on version 4.11.2018 )
    feature:install odl-restconf odl-bgpcep-bgp odl-bgpcep-bgp-config-example
    
  • configure peer with local-as, there is config in the file.
    ./conf2.py
    
  • start exabgp
    env exabgp.tcp.port=1790 exabgp --debug default2.cfg
    

Also reproducable on sandbox with PATCHREFSPEC: refs/changes/41/70841/5
and SUITES: bgpcep/bgpuser/basic.robot

If I configure play.py with --asnumber=64496 for example, it does connect and there is as sequence in loc-rib with 64496 and 65432.



 Comments   
Comment by Claudio David Gasparini [ 16/Apr/18 ]

Hi, it's just miss-configuration 

ODL Configuration says that

ODL(AS 65432) <----> Exabgp Peer (AS 64496)

 

but your exabgp config

Exabgp Peer (AS 64496) <---->  ODL(AS 64496)

where

local-as 65432;  --> this is the exabgp AS
peer-as 65432;  --> this is the remote AS (ODL), therefore should be 64496

 

I see that doc images uses different AS than doc post payload, if you think it will be clearer if the AS match, please push change for that.

 

Regards, 

 

Generated at Wed Feb 07 19:14:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.