3073 Commits

Author SHA1 Message Date
IWASE Yusuke
5969a89ee4 packet/bgp: Omit description of default value
Omit description of default value The default value is described in the
aut generated API doc of class.
So the default value should not be hardcoded in pydoc.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
IWASE Yusuke
c6d9bfc384 packet/lldp: Add description for each class
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
IWASE Yusuke
4c7d523e22 packet/arp: Update description for arguments
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
Shinpei Muraoka
352c007535 BGPSpeaker/info_base/base: Unify documentation format
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
Shinpei Muraoka
74c6f5b21c BGPSpeaker: Unify documentation format
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
IWASE Yusuke
3c0dd6ee7a BGPSpeaker: Improve EVPN Redundancy Mode validation
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
Satoshi Fujimoto
09fa78182f bgp: Enable to configure default local preference
This patch enables to configure the default local preference.
If not specified, the value will be 100 as a default.

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
IWASE Yusuke
2354bd7df3 packet/zebra: Support IP_ROUTE message from Zebra
Zebra IPv4/IPv6 route message have asymmetric structure, in other words,
the message structure from Zebra to the protocol daemons and that from
the protocol daemons to Zebra have the different structures.

This patch introduces _ZebraMessageFromZebra in order to distinguish
which daemon sent the message and fixes _ZebraIPRoute to decode IPv4/IPv6
route message from Zebra.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:20:16 +09:00
IWASE Yusuke
6d35bb8d01 lib/hub: Workaround for issue of eventlet
This patch adopts the workaround which is discussing on the eventlet
team at the following:
 https://github.com/eventlet/eventlet/issues/401
This workaround is suggested by Raymond Burkholder.

Suggested-by: Raymond Burkholder <ray@oneunified.net>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09 10:17:08 +09:00
FUJITA Tomonori
5a1da545bf Ryu 4.13
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.13
2017-04-04 18:01:09 +09:00
surlyjake
468f471f87 nicira_ext: Constants for IP fragment matching
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 13:03:02 +09:00
Satoshi Fujimoto
e1741b7d77 bgp/info_base: Refactor has_nexthop() method
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 11:01:12 +09:00
Satoshi Fujimoto
399a03feb1 bgp/peer: Fix invalid NEXT_HOP in UPDATE message
Currently, when BGPSpeaker advertises IPv4/6 unicast routes
via an iBGP connection, if the Nexthop in the route is omitted,
BGP Speaker advertises the Nexthop with the unspecified address.
This route can be evaluated as invalid by the receiving router.
This patch fixes it by making BGPSpeaker to advertising
the Nexthop with the host's own ip address if the local route
in the RIB has the Nexthop with the unspecified address.

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 11:01:11 +09:00
Satoshi Fujimoto
b7dcd40837 ofctl_v1_5: Fix lack of arguments for modify role API
ofctl_v1_5 can't send role request messages,
because of lack of arguments.
This patch fixes it by adding the argument for short_id.
ofctl_v1_5 sets None to short_id.
It means ofctl_v1_5 uses the default value of short_id.

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 11:00:44 +09:00
Satoshi Fujimoto
6dfda4a227 ofctl_rest: Add get role API
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 11:00:43 +09:00
Satoshi Fujimoto
d0f25d639b ofctl: Fix type of fields of DescStat
With Python3 and OpenFlow v1.0/v1.2/v1.3, Ryu can't dump
the description statistics reply message into JSON,
because the message has byte type values.
This patch fixes it by using to_jsondict().

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 11:00:17 +09:00
Shinpei Muraoka
ab902d2b5e utils/test_bgp: Add unit tests for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:55 +09:00
Shinpei Muraoka
9fa4e6b42d core_managers/test_table_manager: Add unit tests for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:45 +09:00
Shinpei Muraoka
4230897783 test_bgpspeaker: Add unit tests for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:37 +09:00
Shinpei Muraoka
06a61123be library_packet_ref: Add description of action for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:28 +09:00
Shinpei Muraoka
b3a83ef185 BGPSpeaker: Support Flow Specification update messages
This patch enables BGPSpeaker to store FlowSpec routes into
the global table and VRF tables and to provide the API
for advertising routes.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:21 +09:00
Shinpei Muraoka
a486539400 BGPSpeaker/SSH: Supports display of Flow Specification RIB
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:16 +09:00
Shinpei Muraoka
880bd4ab85 BGPSpeaker/info_base: Add tables for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:10 +09:00
Shinpei Muraoka
765a723fe6 packet/bgp: Implement the utility of Flow Specification for BGPSpeaker
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 10:00:03 +09:00
Shinpei Muraoka
f12485e6de packet/bgp: Fix subtype for Traffic Filtering Actions of Flow Specification
This patch sets the constant value
so that you can omit argument "subtype" for
Traffic Filtering Action of Flow Specification.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:58 +09:00
Shinpei Muraoka
fd16c43a31 packet/bgp: Unify variable names for Flow Specification
Currently, FLOW_SPEC and FLOWSPEC constants are mixed,
so this patch will unify to FLOWSPEC.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:57 +09:00
Shinpei Muraoka
271961ecb1 packet/bgp: Add the address converter for Flow Specification
Argument "addr" of "_FlowSpecPrefixBase" must be
specified in the network address.
If argument "addr" specified in the host address,
this patch converts the given address into the network address.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:52 +09:00
Shinpei Muraoka
66a5bddaf0 packet/bgp: Fix data structure for VPNv4 Flow Specification
The Route Distinguisher did not include in data structure
for VPNv4 Flow Specification.
This patch adds the Route Distinguisher to data structure
for VPNv4 Flow Specification.
For details, refer to Chapter 8 of RFC 5575.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:48 +09:00
Shinpei Muraoka
16c3640673 library_packet_ref:Add bgp reference for Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:42 +09:00
Shinpei Muraoka
4cbdbb767b test_bgp: Add test cases for user interface of Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:34 +09:00
Shinpei Muraoka
4838463ab3 packet/bgp: Implement user interface of Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28 09:55:29 +09:00
FUJITA Tomonori
35e12d858c Ryu 4.12
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.12
2017-03-02 15:38:47 +09:00
IWASE Yusuke
9420884db4 hub.StreamServer: Ommit validation for IPv4 address
To support the case that user specifies the host address like
'localhost', this patch removes the validation of the given address
as IPv4 address family and fixes to try listening as IPv4 by default.
Then, the validation will be handled in "eventlet.listen()".
This behavior is the same as that of before supporting the unix domain
socket.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-28 22:37:40 +09:00
IWASE Yusuke
a134362526 wsgi: Change default wsgi listen host to "0.0.0.0"
With netaddr.valid_ipv4/6, empty host is not allowed and will fail
to validate.
This patch changes to the default wsgi listen host to "0.0.0.0"
and enable to validate it by using netaddr.

Note: The default behavior is NOT changed.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-24 22:20:54 +09:00
IWASE Yusuke
7baa456696 zebra: Add sample application for Zebra server service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:33 +09:00
IWASE Yusuke
8914385148 zebra: Implement Server APIs for Zebra protocol service
This patch implements APIs for performing as Zebra daemon of Quagga
and enables to integrate with other Quagga daemons.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:24 +09:00
IWASE Yusuke
1b486a0634 zebra: Implement database for Zebra protocol service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:19 +09:00
IWASE Yusuke
dc57ff5b47 tools/optional-requires: SQLAlchemy for Zebra service
This patch adds a new optional requirements, SQLAlchemy, for Zebra
protocol service database.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:51 +09:00
IWASE Yusuke
d90589c2cc lib/netdevice: Constants defined in netdevice(7)
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:48 +09:00
IWASE Yusuke
793dc13e01 controller: Change default OPF listen host to "0.0.0.0"
With netaddr.valid_ipv4/6, empty host is not allowed and will fail
to validate.
This patch changes to the default openflow listen host to "0.0.0.0"
and enable to validate it by using netaddr.

Note: The default behavior is NOT changed.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:46 +09:00
IWASE Yusuke
9efde1d2f5 hub: Enable StreamServer to listen Unix domain socket
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:38 +09:00
IWASE Yusuke
fd3bfb55de zebra: Add sample application for Zebra client service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:30 +09:00
IWASE Yusuke
e5a0974508 Implement Zebra protocol client service
This patch implements APIs for performing as a protocol daemon of Quagga
such as "ripd", "ospfd", "bgpd", for example.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:29 +09:00
IWASE Yusuke
c1f810b9b1 bgp/utils/bgp: Use lib/ip for Python 3 compatibility
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:38:01 +09:00
IWASE Yusuke
fd96d24314 BGPSpeaker: Use isinstance(*, bool) for boolean check
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:37:57 +09:00
IWASE Yusuke
ef3eefb2ad BGPSpeaker: Support Route Reflector features [RFC4456]
This patch implements the features for acting as a Route Reflector
which defined in RFC4456.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:37:52 +09:00
IWASE Yusuke
e06ec47232 packet/zebra: Enable to specify "prefix" arg in str
Currently, "prefix" argument should be an instance of IPv4Prefix or
IPv6Prefix in some Zebra message body classes.
But for the convenience, this patch enables to specify "prefix" in
the str type representation.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17 20:14:02 +09:00
IWASE Yusuke
88aaba68bb lib/ip: Add wrapper for netaddr.valid_ipv4/6
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17 20:14:00 +09:00
Albert Siersema
15a12a7a6a allow_local_as_in_count : allow local ASN in AS patch, e.g. "rd auto/route-target both auto"
Cisco/Juniper/Cumulus and undoubtedly more vendors offer a
simplification of the EVPN configuration by not having to
specify individual RD/RT's, e.g. in Cisco NX-OS syntax:

evpn
    vni 10311 l2
      rd auto
      route-target import auto
      route-target export auto

This simplifies/unifies the configuration.
All leaf switches/ryu instances share the same ASN (e.g. 65511).
Spine switches in the same layer can share an ASN as well (e.g. 65510).

To facilitate the above, the local ASN has to be accepted in the AS path.
To this end, Cisco includes an 'allowas-in' configuration statement.
See:
http://www.cisco.com/c/en/us/products/collateral/switches/nexus-9000-series-switches/guide-c07-734107.html
search for "MP-eBGP Design with VTEP Leaf Nodes in the Same BGP
Autonomous System"

This patch offers the possibility to specify the number of accepted
occurrences
of the local ASN in incoming AS paths. The default value is 0, which basically
is the same as the code before this patch: local ASN in the path
indicates a loop.
Non-zero values allow the local ASN to appear the specified number of times in
the AS path. A maximum value of 3 should satisfy most deployments.

Signed-off-by: Albert Siersema <albert@mediacaster.nl>
2017-02-11 14:59:51 +09:00
IWASE Yusuke
e13f46b256 BGPSpeaker: Advertise VNI on EVPN Multicast Ethernet-Tag
For the interoperability with other MP BGP EVPN VXLAN implementations
(e.g., Cisco NX-OS), this patch enables to advertise the VNI with the
PMSI Tunnel attribute on the Inclusive Multicast Ethernet Tag Route
messages.

Suggested-by: Albert Siersema <albert@mediacaster.nl>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:41:08 +09:00