diff options
author | Toshiki Tsuboi <t.tsubo2000@gmail.com> | 2014-08-21 22:43:17 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-08-22 01:27:28 -0700 |
commit | dd795150f35b7430f354b910ce5fc7c808835bb5 (patch) | |
tree | 65dd00e932fcd69adb152a0eae11575f666063ef | |
parent | 04766aaa93c211d6245e2740046ee8e2e013fad5 (diff) |
bgp: add parameter 'label_ranges' for 'core.start' method in BGPSpeaker
In case of locating some Ryu-BGPs in the same Topology for BGP/MPLS VPNs :
When same label has been assigned '100 (defalut label)' by each Ryu-BGP, it is difficult to analyze for trouble shooting of RIB for vpnv4 .
Therefore, each Ryu-BGPs should assign different label for vpnv4 prefix according to own label_range .
bgpd> show rib all
Status codes: * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Labels Next Hop Reason Metric LocPrf Path
Family: rtfilter
*> 65001:65010:101 None 0.0.0.0 Only Path ?
Family: vpnv6
Family: vpnv4
*> 65010:101:192.168.104.0/30 [100] 172.16.0.102 Only Path 65002 ?
*> 65010:101:192.168.201.0/24 [43] 192.168.100.101 Only Path 100 65010 65011 i
*> 65010:101:10.10.10.1/32 [38] 192.168.100.101 Only Path 100 65010 65011 ?
*> 65010:101:192.168.103.0/30 [100] 0.0.0.0 Only Path ?
*> 65010:101:192.168.101.0/30 [42] 192.168.100.101 Only Path 100 65010 ?
*> 65010:101:192.168.102.0/30 [40] 192.168.100.101 Only Path 100 65010 ?
*> 65010:101:10.10.10.2/32 [37] 192.168.100.101 Only Path 100 65010 65012 ?
*> 65010:101:192.168.202.0/24 [44] 192.168.100.101 Only Path 100 65010 65012 i
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/bgpspeaker.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py index c88a972d..3cba1f82 100644 --- a/ryu/services/protocols/bgp/bgpspeaker.py +++ b/ryu/services/protocols/bgp/bgpspeaker.py @@ -96,7 +96,8 @@ class BGPSpeaker(object): refresh_stalepath_time=DEFAULT_REFRESH_STALEPATH_TIME, refresh_max_eor_time=DEFAULT_REFRESH_MAX_EOR_TIME, best_path_change_handler=None, - ssh_console=False): + ssh_console=False, + label_range=DEFAULT_LABEL_RANGE): """Create a new BGPSpeaker object with as_number and router_id to listen on bgp_server_port. @@ -133,6 +134,7 @@ class BGPSpeaker(object): settings[BGP_SERVER_PORT] = bgp_server_port settings[REFRESH_STALEPATH_TIME] = refresh_stalepath_time settings[REFRESH_MAX_EOR_TIME] = refresh_max_eor_time + settings[LABEL_RANGE] = label_range self._core_start(settings) self._init_signal_listeners() self._best_path_change_handler = best_path_change_handler |