问题描述
我需要与运行 odl 和我的路由器的路由反射器建立 bgp 会话,到目前为止我已经完成了以下操作.安装 opendaylight karaf,氮气版本.
I need to establish a bgp session with route reflector running with odl and my router and so far i have done the following. Installed opendaylight karaf ,nitrogen version .
已安装 bgp 功能(功能:安装 odl-restconf odl-bgpcep-bgp,odl-bgpcep-bgp).使用高级休息客户端配置参数,直到官方网站 (http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html).当我检查我的路由器的状态时,我看到 bgp 状态处于活动状态,并且在wireshark bgp 打开数据包是由路由器发送的,odl 正在发送通知作为连接拒绝.还有一个 tcp 数据包发送,带有由 ODL 设置的重置标志.我启用了调试选项并检查了 karaf 日志,上面写着.
Installed bgp features (feature:install odl-restconf odl-bgpcep-bgp,odl-bgpcep-bgp). Configured parameters using advanced rest client till bgp peer section following the official site (http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html).when i checked the status of my router ,i saw that bgp state is active and In wireshark bgp open packet is send by router and odl is sending notification as connection reject .There is also a tcp packet send with reset flag set by ODL. I enabled the debug option and checked karaf log which says .
(org.opendaylight.protocol.bgp.parser.BGPDocumentedException: BGP peer with ip: IpAddress [_ipv4Address=Ipv4Address [_value=10.10.10.2]] 未配置,检查配置的 peers in : StrictBGPPeerRegistry{peers=[]}在 org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.startNegotiation(AbstractBGPSessionNegotiator.java:103)[117:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1]在 org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.channelActive(AbstractBGPSessionNegotiator.java:278)[117:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1]2018-01-04 16:46:44,191 |调试 |ntLoopGroup-10-3 |抽象BGPSessionNegotiator |117 - org.opendaylight.bgpcep.bgp-rib-impl - 0.8.1 |在通道 [id: 0xc90a1a8a, L:/10.10.10.1:179 - R:/10.10.10.2:51732] 上启动会话协商2018-01-04 16:46:44,191 |错误 |ntLoopGroup-10-3 |BGPDocumentedException |111 - org.opendaylight.bgpcep.bgp-parser-api - 0.8.1 |错误 = CONNECTION_REJECTED
(org.opendaylight.protocol.bgp.parser.BGPDocumentedException: BGP peer with ip: IpAddress [_ipv4Address=Ipv4Address [_value=10.10.10.2]] not configured, check configured peers in : StrictBGPPeerRegistry{peers=[]} at org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.startNegotiation(AbstractBGPSessionNegotiator.java:103)[117:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.channelActive(AbstractBGPSessionNegotiator.java:278)[117:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1]2018-01-04 16:46:44,191 | DEBUG | ntLoopGroup-10-3 | AbstractBGPSessionNegotiator | 117 - org.opendaylight.bgpcep.bgp-rib-impl - 0.8.1 | Starting session negotiation on channel [id: 0xc90a1a8a, L:/10.10.10.1:179 - R:/10.10.10.2:51732]2018-01-04 16:46:44,191 | ERROR | ntLoopGroup-10-3 | BGPDocumentedException | 111 - org.opendaylight.bgpcep.bgp-parser-api - 0.8.1 | Error = CONNECTION_REJECTED
简而言之,我想知道以下内容,
In short ,i want to know the following,
1) 为什么 odl 发送 bgp 通知并拒绝连接以及 Tcp设置复位标志的数据包发送?
1) why bgp notification is send by odl with connection reject and also Tcp packet send with reset flag set ?
2) 为什么没有生成名为 (41-bgp-example) 的文件.我仍然手动创建并配置了它,但没有效果.
2) why there is no file called (41-bgp-example) generated.Still i created it manually and configured but no effects.
3) 我怎样才能进一步到达路由反射器,是否有什么问题或我错过了什么?
3) How can i proceed further to reach till route reflector, is there any thing wrong or i missed something ?
下面是我提到的文件(41-bgp-example)
below is the file i mentioned (41-bgp-example)
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<snapshot>
<required-capabilities>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg?module=odl-bgp-rib-cfg&revision=2013-07-01</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi?module=odl-bgp-rib-spi-cfg&revision=2013-11-15</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl?module=odl-bgp-rib-impl-cfg&revision=2013-04-09</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:topology:provider?module=odl-bgp-topology-provider-cfg&revision=2013-11-15</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:reachability:ipv6?module=odl-bgp-treachability-ipv6-cfg&revision=2013-11-15</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp:reachability:ipv4?module=odl-bgp-treachability-ipv4-cfg&revision=2013-11-15</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:protocol:framework?module=protocol-framework&revision=2014-03-13</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:topology?module=odl-topology-api-cfg&revision=2013-11-15</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi?module=odl-bgp-openconfig-spi-cfg&revision=2015-09-25</capability>
</required-capabilities>
<configuration>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">prefix:timed-reconnect-strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
<min-sleep>1000</min-sleep>
<max-sleep>180000</max-sleep>
<sleep-factor>2.00</sleep-factor>
<connect-time>5000</connect-time>
<timed-reconnect-executor>
<type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
<name>global-event-executor</name>
</timed-reconnect-executor>
</module>
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-acceptor</type>
<name>bgp-peer-server</name>
<!--Default parameters-->
<!-- <binding-address>127.0.0.1</binding-address> -->
<!--Default binding-port 179-->
<!-- <binding-port>1790</binding-port> -->
<accepting-bgp-dispatcher>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-dispatcher</type>
<name>global-bgp-dispatcher</name>
</accepting-bgp-dispatcher>
<accepting-peer-registry>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
<name>global-bgp-peer-registry</name>
</accepting-peer-registry>
</module>
<module>
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
<name>example-bgp-peer-app</name>
<bgp-peer-id>10.10.10.2</bgp-peer-id>
<target-rib>
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
<name>example-bgp-rib</name>
</target-rib>
<application-rib-id>example-app-rib</application-rib-id>
<data-broker>
<type xmlns:sal="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">sal:dom-async-data-broker</type>
<name>pingpong-broker</name>
</data-broker>
</module>
<!--
A single BGP peer. Note this section is deactivated because a misconfigured peer
tends to log rather nasty error messages.
For TCP-MD5 support, make sure the dispatcher associated with the rib has
"md5-channel-factory" attribute set and then add a "password" attribute here.
Note that the peer has to have the same password configured, otherwise the
connection will not be established.
If peer role is not present, default value "ibgp" will be used (allowed values are also "ebgp" and
"rr-client").
-->
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
<name>example-bgp-peer</name>
<host>10.10.10.1</host>
<holdtimer>180</holdtimer>
<peer-role>ibgp</peer-role>
<rib>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
<name>example-bgp-rib</name>
</rib>
<peer-registry>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv4-unicast</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv6-unicast</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>linkstate</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv4-flowspec</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv6-flowspec</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>labeled-unicast</name>
</advertized-table>
</module>
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-impl</type>
<name>example-bgp-rib</name>
<rib-id>example-bgp-rib</rib-id>
<local-as>65530</local-as>
<bgp-rib-id>10.10.10.2</bgp-rib-id>
<!-- if cluster-id is not present, it's value is the same as bgp-id -->
<!-- <cluster-id>192.0.2.3</cluster-id> -->
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv4-unicast</name>
</local-table>
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv6-unicast</name>
</local-table>
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>linkstate</name>
</local-table>
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv4-flowspec</name>
</local-table>
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>ipv6-flowspec</name>
</local-table>
<local-table>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
<name>labeled-unicast</name>
</local-table>
<extensions>
<type xmlns:ribspi="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">ribspi:extensions</type>
<name>global-rib-extensions</name>
</extensions>
<bgp-dispatcher>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-dispatcher</type>
<name>global-bgp-dispatcher</name>
</bgp-dispatcher>
<data-provider>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<dom-data-provider>
<type xmlns:sal="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">sal:dom-async-data-broker</type>
<name>pingpong-broker</name>
</dom-data-provider>
<codec-tree-factory>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-codec-tree-factory</type>
<name>runtime-mapping-singleton</name>
</codec-tree-factory>
<session-reconnect-strategy>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">prefix:reconnect-strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</session-reconnect-strategy>
<tcp-reconnect-strategy>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">prefix:reconnect-strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</tcp-reconnect-strategy>
<openconfig-provider>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi">prefix:bgp-openconfig-provider</type>
<name>openconfig-bgp</name>
</openconfig-provider>
</module>
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:reachability:ipv4">prefix:bgp-reachability-ipv4</type>
<name>example-ipv4-topology</name>
<data-provider>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<local-rib>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>
<name>example-bgp-rib</name>
</local-rib>
<topology-id>example-ipv4-topology</topology-id>
</module>
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:reachability:ipv6">prefix:bgp-reachability-ipv6</type>
<name>example-ipv6-topology</name>
<data-provider>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<local-rib>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>
<name>example-bgp-rib</name>
</local-rib>
<topology-id>example-ipv6-topology</topology-id>
</module>
<module>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:topology:provider">prefix:bgp-linkstate-topology</type>
<name>example-linkstate-topology</name>
<data-provider>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<local-rib>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>
<name>example-bgp-rib</name>
</local-rib>
<topology-id>example-linkstate-topology</topology-id>
</module>
</modules>
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">prefix:reconnect-strategy-factory</type>
<instance>
<name>example-reconnect-strategy-factory</name>
<provider>/config/modules/module[name='timed-reconnect-strategy-factory']/instance[name='example-reconnect-strategy-factory']</provider>
</instance>
</service>
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:topology">prefix:topology-reference</type>
<instance>
<name>example-ipv4-topology</name>
<provider>/config/modules/module[name='bgp-reachability-ipv4']/instance[name='example-ipv4-topology']</provider>
</instance>
</service>
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>
<instance>
<name>example-bgp-rib</name>
<provider>/config/modules/module[name='rib-impl']/instance[name='example-bgp-rib']</provider>
</instance>
</service>
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
<instance>
<name>example-bgp-rib</name>
<provider>/config/modules/module[name='rib-impl']/instance[name='example-bgp-rib']</provider>
</instance>
</service>
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:topology">prefix:topology-reference</type>
<instance>
<name>example-ipv6-topology</name>
<provider>/config/modules/module[name='bgp-reachability-ipv6']/instance[name='example-ipv6-topology']</provider>
</instance>
</service>
<service>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:topology">prefix:topology-reference</type>
<instance>
<name>example-linkstate-topology</name>
<provider>/config/modules/module[name='bgp-linkstate-topology']/instance[name='example-linkstate-topology']</provider>
</instance>
</service>
</services>
</data>
</configuration>
</snapshot>
enter code here
推荐答案
得到了前几个问题的答案
Got answer for the first couple of questions
1) 为什么 odl 发送 bgp 通知并拒绝连接,还发送设置了重置标志的 Tcp 数据包?
1) why bgp notification is send by odl with connection reject and also Tcp packet send with reset flag set ?
ans:- 因为peer没有正确配置.使用rest客户端,配置没有完全成功,所以手动编辑文件protocols-config.xml(在路径/etc/opendaylight/bgp中),然后它工作了.
ans:- because peer was not properly configured.Using rest client, configuration was not completely successful, so edited manually file protocols-config.xml(in path /etc/opendaylight/bgp) and after this it worked.
2) 为什么没有生成名为 (41-bgp-example) 的文件.我仍然手动创建并配置了它,但没有效果.
2) why there is no file called (41-bgp-example) generated.Still i created it manually and configured but no effects.
ans:该文件不会生成,因为对于nitrogen版本,配置子系统已更改,因此必须使用REST.
ans:The file will not be generated because for nitrogen version,the config sub system has changed and hence have to follow using REST.
这篇关于为什么 bgp 打开和通知数据包只在 ODL 中流动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!