Hi 

I have just tested Ryu BGPS .
But the result  looks unexpected regarding of show_command .
As you see, I can’t find the advertised labels or assigned labels for vpnv4 
prefix .
Is it right ? 

Best Regards ,
Toshiki Tsuboi 



**** result  of show command  ****

1) In case of sample App for ryu-BGP

Status codes: * valid, > best
     Network                          Next Hop             Reason          
Metric LocPrf Path
VPN: ('64511:101', 'ipv4')
 *>  10.20.2.0/24                     0.0.0.0              Only Path            
         2
 *>  10.20.1.0/24                     0.0.0.0              Only Path            
         2
 *>  10.20.3.0/24                     0.0.0.0              Only Path            
         2
 *>  10.10.0.1/32                     192.168.100.100      Only Path       0    
         64511 2

INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': 
['rib', 'all'], 'format': 'cli'}
Status codes: * valid, > best
     Network                          Next Hop             Reason          
Metric LocPrf Path
Family: rtfilter
 *>  64512:64511:101                  0.0.0.0              Only Path            
         2
Family: vpnv6
Family: vpnv4
 *>  64511:101:10.10.0.1/32           192.168.100.100      Only Path       0    
         64511 2
 *>  64511:101:10.20.1.0/24           0.0.0.0              Only Path            
         2
 *>  64511:101:10.20.2.0/24           0.0.0.0              Only Path            
         2
 *>  64511:101:10.20.3.0/24           0.0.0.0              Only Path            
         2
Family: ipv4
Family: ipv6

2) In case of BGP neighbor router (Cisco 7200)

R1#sh ip bgp vpnv4 vrf customerA labels 
   Network          Next Hop      In label/Out label
Route Distinguisher: 64511:101 (customerA)
   10.10.0.1/32     0.0.0.0         17/aggregate(customerA)
   10.20.1.0/24     192.168.100.102 nolabel/100
   10.20.2.0/24     192.168.100.102 nolabel/100
   10.20.3.0/24     192.168.100.102 nolabel/100


import eventlet
import time

# BGPSpeaker needs sockets patched
eventlet.monkey_patch()

# initialize a log handler
# this is not strictly necessary but useful if you get messages like:
#    No handlers could be found for logger "ryu.lib.hub"
import logging
import sys
logging.basicConfig(level=logging.DEBUG)

from ryu.services.protocols.bgp.bgpspeaker import BGPSpeaker

def dump_remote_best_path_change(event):
    print 'the best path changed:', event.remote_as, event.prefix,\
        event.nexthop, event.is_withdraw

if __name__ == "__main__":
    speaker = BGPSpeaker(as_number=64512, router_id='10.10.0.2',
                         best_path_change_handler=dump_remote_best_path_change, ssh_console=True)

    speaker.neighbor_add('192.168.100.100', 64511, True, True)
    speaker.vrf_add('64511:101', ['64511:101'], ['64511:101'])

    count = 1
    while True:
        eventlet.sleep(30)
        prefix = '10.20.' + str(count) + '.0/24'
        print "add a new prefix", prefix
        speaker.prefix_add(prefix, next_hop='0.0.0.0', route_dist='64511:101', route_family='ipv4')
        count += 1
        if count == 4:
            eventlet.sleep(60)
            vrfs_ret = speaker.vrfs_get('cli')
            print vrfs_ret
            rib_ret = speaker.rib_get('all', 'cli')
            print rib_ret
            break

Attachment: sampleBGP_vpnv4.log
Description: Binary data

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to