2014-03-17 13:32 GMT+08:00 FUJITA Tomonori <[email protected]>:

> On Mon, 17 Mar 2014 11:31:23 +0800
> Wei-Li Tang <[email protected]> wrote:
>
> > Openflow 1.1 and later versions allow the use of IP address with
> > arbitrary bitmask in match fields. This enables related fields
> > to be interpreted in the following order:
> >
> > 1. Standard CIDR:
> >
> >     192.168.1.0/24
> >     fe80::/10
> >
> > 2. Hybrid CIDR format (IP address with dotted decimal or
> >    colon-hexadecimal mask):
> >
> >     192.168.1.0/255.255.255.0
> >     fe80::/ffc0::
> >
> > 3. ACL hybrid CIDR format (Cisco-like ACL bitmask):
> >
> >     192.168.1.0/0.0.0.255 (equivalent to 192.168.1.0/24)
> >     fe80::/3f:ffff:ffff:ffff:ffff:ffff:ffff:ffff (equivalent to
> fe80::/10)
> >
> > 4. IP address with arbitrary bitmask:
> >
> >     192.168.1.0/0.255.0.255
> >     fe80::dead:beaf/ffff:0000:ffff:ffff:ffff:ffff:ffff:ffff
> >
> > Please note that a bitmask with only continuous '1' bits starting from
> > LSB (e.g. 0.0.0.255) will be considered an ACL hybrid CIDR hostmask,
> > not an arbitrary bitmask.
> >
> > You can explicitly specify arbitrary bitmask in separate fields as below:
> >
> >     nw_src_w, nw_dst_w, ipv4_src_w, ipv4_dst_w,
> >     arp_spa_w, arp_tpa_w, ipv6_src_w, ipv6_dst_w.
>
> Thanks a lot for the updated patch. But why we need new fields? The
> existing fields can be extended to handle an arbitrary mask? I think
> that that's the discussion point.
>

Because arbitrary bitmask is incompatible to ACL hybrid CIDR format
(provided by netaddr) in some cases.

When I want to specify an IP address 192.168.1.1 with an explicit bitmask
0.0.0.255, netaddr.IPNetwork interpret the mask as a "hostmask", so
192.168.1.1/0.0.0.255 becomes 192.168.1.1/24 which is completely not I
want. I don't want 0.0.0.255 to be interpreted as 255.255.255.0.

Such arbitrary bitmasks (e.g. 0.0.0.1/0.0.0.255, 0.0.0.2/0.0.0.255,
0.0.0.3/0.0.0.255...etc.) are useful when we want to do something round
robin or load balancing tasks, the last decimal of IP address can be the
variable for the distribution of flows. It can't be considered as a
hostmask.

I understand that introducing new fields may complicate the use of REST
API, so I once thought it's not necessary to keep the "ACL hybrid CIDR"
support because such format exists only in router ACL configuration. But
it's no way to keep the mutual incompatible formats in the existing fields.

If we want to keep REST API simple, I'd like to suggest that we obsolete
the use of ACL hybrid CIDR format since it's out of Openflow specification,
and it's originally supported by netaddr.IPNetwork only in to_match_ipv6
function. (to_match_ip was not supported previously.) I believe the impact
is small for the users.

Thanks!

-- 
Sincerely,

Wei-Li Tang
System Engineer, Xinguard Inc.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to