Hi ISHIDA-san Please check my bgp packet capture in case of above report . Regards,
Toshiki Tsuboi
Wireshark_mpBGP.pcapng.gz
Description: GNU Zip compressed data
2014/07/30 14:21、ISHIDA Wataru <ishida.wat...@lab.ntt.co.jp> のメール: > Hi, > > Thank you for reporting. > Could you kindly send a pcap file of the bgp messages? > Then I will check why bgp parser can’t work well. > > Thanks, > > On Jul 30, 2014, at 13:31, Toshiki Tsuboi <t.tsubo2...@gmail.com> wrote: > >> Hi >> >> It looks Ryu BGP can not parse mpBGP Update Message . >> In spite of receiving mpBGP Update Message, Ryu BGP has parsed it as >> regular BGP Update Message in case of the sample code as follows . >> >> ( Caution : Total path attribute length including MP_REACH_NLRI ) >> >> Best Regards . >> Toshiki Tsuboi >> >> >> >> — result of sample code --- >> >> tsubo@RyuBGP:~/ryu/ryu/services/protocols/bgp/sampleApp$ sudo >> ./start_RyuBGPSpeaker.sh >> INFO 2014-07-30 12:50:24,023 base 207 API method core.start called with >> args: {'router_id': '10.10.0.2', 'label_range': (100, 100000), 'waiter': >> <ryu.lib.hub.Event object at 0x7f7d52aade90>, 'local_as': 64512, >> 'bgp_server_port': 179, 'refresh_max_eor_time': 0, 'refresh_stalepath_time': >> 0} >> DEBUG 2014-07-30 12:50:24,037 processor 89 Starting new processing run... >> DEBUG 2014-07-30 12:50:24,038 processor 118 Processing RT NLRI destination... >> DEBUG 2014-07-30 12:50:24,039 processor 108 Processing destination... >> DEBUG 2014-07-30 12:50:24,040 application 171 Core started True >> INFO 2014-07-30 12:50:24,040 base 207 API method neighbor.create called with >> args: {'remote_as': 64511, 'cap_refresh': True, 'cap_mbgp_vpnv6': True, >> 'hold_time': 180, 'cap_mbgp_vpnv4': True, 'cap_enhanced_refresh': True, >> 'ip_address': '192.168.100.100'} >> DEBUG 2014-07-30 12:50:24,041 application 194 Added neighbor 192.168.100.100 >> DEBUG 2014-07-30 12:50:24,042 application 99 Started Network Controller >> DEBUG 2014-07-30 12:50:24,043 peer 559 Started peer Peer(ip: >> 192.168.100.100, asn: 64511) >> DEBUG 2014-07-30 12:50:24,043 net_ctrl 337 NetworkController started >> listening for connections... >> DEBUG 2014-07-30 12:50:25,045 peer 209 Peer 192.168.100.100 BGP FSM went >> from Idle to Connect >> DEBUG 2014-07-30 12:50:25,046 peer 952 Peer(ip: 192.168.100.100, asn: 64511) >> trying to connect to ('192.168.100.100', 179) >> DEBUG 2014-07-30 12:50:25,046 base 398 Connect TCP called for >> 192.168.100.100:179 >> DEBUG 2014-07-30 12:50:25,070 speaker 401 Sent msg to ('192.168.100.100', >> '179') >> >> BGPOpen(bgp_identifier='10.10.0.2',hold_time=180,len=61,my_as=64512,opt_param=[BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=1,type=2), >> >> BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=128,type=2), >> >> BGPOptParamCapabilityMultiprotocol(afi=2,cap_code=1,cap_length=4,length=6,reserved=0,safi=128,type=2), >> BGPOptParamCapabilityRouteRefresh(cap_code=2,cap_length=0,length=2,type=2), >> BGPOptParamCapabilityEnhancedRouteRefresh(cap_code=70,cap_length=0,length=2,type=2)],opt_param_len=32,type=1,version=4) >> INFO 2014-07-30 12:50:25,071 peer 1859 Connection to peer: 192.168.100.100 >> established >> DEBUG 2014-07-30 12:50:25,083 speaker 447 Received msg from >> ('192.168.100.100', '179') << >> BGPOpen(bgp_identifier='10.0.0.1',hold_time=180,len=53,my_as=64511,opt_param=[BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=1,type=2), >> >> BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=128,type=2), >> >> BGPOptParamCapabilityUnknown(cap_code=128,cap_length=0,cap_value='',length=2,type=2), >> >> BGPOptParamCapabilityRouteRefresh(cap_code=2,cap_length=0,length=2,type=2)],opt_param_len=24,type=1,version=4) >> DEBUG 2014-07-30 12:50:25,085 peer 209 Peer 192.168.100.100 BGP FSM went >> from Connect to OpenConfirm >> DEBUG 2014-07-30 12:50:25,086 peer 1005 Trying to bind protocol >> <ryu.services.protocols.bgp.speaker.BgpProtocol object at 0x7f7d529be2d0> to >> peer Peer(ip: 192.168.100.100, asn: 64511) >> DEBUG 2014-07-30 12:50:25,086 peer 983 Connect retry event for Peer(ip: >> 192.168.100.100, asn: 64511) is cleared >> DEBUG 2014-07-30 12:50:25,087 speaker 532 Started keep-alive and expire >> timer for negotiated holdtime 180 >> DEBUG 2014-07-30 12:50:25,088 speaker 401 Sent msg to ('192.168.100.100', >> '179') >> BGPKeepAlive(len=19,type=4) >> DEBUG 2014-07-30 12:50:25,089 speaker 447 Received msg from >> ('192.168.100.100', '179') << BGPKeepAlive(len=19,type=4) >> DEBUG 2014-07-30 12:50:25,089 peer 209 Peer 192.168.100.100 BGP FSM went >> from OpenConfirm to Established >> DEBUG 2014-07-30 12:50:25,090 peer 1727 Communicating current best path for >> all afi/safi except 1/132 >> DEBUG 2014-07-30 12:50:25,114 speaker 447 Received msg from >> ('192.168.100.100', '179') << BGPKeepAlive(len=19,type=4) >> DEBUG 2014-07-30 12:50:25,116 speaker 447 Received msg from >> ('192.168.100.100', '179') << BGPKeepAlive(len=19,type=4) >> DEBUG 2014-07-30 12:50:25,126 speaker 566 Traceback (most recent call last): >> File >> "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", >> line 560, in _recv_loop >> self.data_received(next_bytes) >> File >> "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", >> line 275, in data_received >> self._data_received(next_bytes) >> File >> "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", >> line 351, in _data_received >> msg, rest = BGPMessage.parser(self._recv_buff) >> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/bgp.py", line >> 1937, in parser >> kwargs = subcls.parser(binmsg) >> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/bgp.py", line >> 2120, in parser >> pa, binpathattrs = _PathAttribute.parser(binpathattrs) >> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/bgp.py", line >> 1276, in parser >> **subcls.parse_value(value)), rest >> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/bgp.py", line >> 1812, in parse_value >> next_hop = addrconv.ipv4.bin_to_text(next_hop_bin) >> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/addrconv.py", line 30, >> in bin_to_text >> return str(self._addr(self._strat.packed_to_int(bin), >> File "/usr/local/lib/python2.7/dist-packages/netaddr/strategy/ipv4.py", >> line 196, in packed_to_int >> return _struct.unpack('>I', packed_int)[0] >> error: unpack requires a string argument of length 4 >> >> INFO 2014-07-30 12:50:25,128 peer 1873 Connection to peer 192.168.100.100 >> lost, reason: unpack requires a string argument of length 4 Resetting retry >> connect loop: False >> DEBUG 2014-07-30 12:50:25,128 peer 209 Peer 192.168.100.100 BGP FSM went >> from Established to Idle >> DEBUG 2014-07-30 12:50:25,128 base 305 Stopping activity BgpProtocol True, >> ('192.168.100.100', '179'), ('192.168.100.102', '46632'). >> DEBUG 2014-07-30 12:50:25,129 base 291 BgpProtocol True, ('192.168.100.100', >> '179'), ('192.168.100.102', '46632'): Stopping timer Holdtime Timer >> DEBUG 2014-07-30 12:50:25,129 base 291 BgpProtocol True, ('192.168.100.100', >> '179'), ('192.168.100.102', '46632'): Stopping timer Keepalive Timer >> DEBUG 2014-07-30 12:50:25,129 base 285 BgpProtocol True, ('192.168.100.100', >> '179'), ('192.168.100.102', '46632'): Closing socket passive_conn - >> <eventlet.greenio.GreenSocket object at 0x7f7d529bea10> >> DEBUG 2014-07-30 12:50:25,130 base 317 Stopping activity BgpProtocol True, >> ('192.168.100.100', '179'), ('192.168.100.102', '46632') finished. >> DEBUG 2014-07-30 12:50:25,130 peer 1700 Un-scheduling sending of initial >> Non-RTC UPDATEs (init. UPDATEs already sent: False) >> DEBUG 2014-07-30 12:50:25,130 peer_manager 65 Cleaning obsolete paths whose >> source/version: 192.168.100.100/2 >> INFO 2014-07-30 12:50:25,130 speaker 599 unpack requires a string argument >> of length 4 >> >> >> >> <wireshark_mpBGP_Update_message.png> >> >> ------------------------------------------------------------------------------ >> Infragistics Professional >> Build stunning WinForms apps today! >> Reboot your WinForms applications with our WinForms controls. >> Build a bridge from your legacy apps to the future. >> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________ >> Ryu-devel mailing list >> Ryu-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ryu-devel >
------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel