Discussion:
[ovs-discuss] Configure datapath_id
Arthur van Kleef
2010-06-15 11:32:47 UTC
Permalink
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?

Thanks,
Arthur
Ben Pfaff
2010-06-16 16:32:01 UTC
Permalink
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
Yes:
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
Ben Pfaff
2010-06-16 20:32:37 UTC
Permalink
Post by Ben Pfaff
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
# ./ovs-vsctl set Bridge br0 datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
I'm running Open vSwitch (v1.0.1) inside an User Mode Linux VM and also
on a normal host. I have attached the relevant sections of
ovs-vswitchd's logfiles (both from UML instance and on a normal Linux
host). What I see is that an update message is received, but immediatly
is reversed by another update message. Is this perhaps a bug?
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.

The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.

To set a fixed datapath ID, instead set other-config:datapath-id, like
so:

ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

I actually tested it this time, and it works for me.
Ben Pfaff
2010-06-16 21:39:59 UTC
Permalink
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"
This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef
This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.
ovs-vsctl tolerates hyphens in column names. It will accept, for
example, "ovs-vsctl get Bridge br0 datapath-id". So if you use hyphens
consistently, it will work out OK.
Arthur van Kleef
2010-06-16 21:22:56 UTC
Permalink
Post by Ben Pfaff
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.
The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.
To set a fixed datapath ID, instead set other-config:datapath-id, like
ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
I actually tested it this time, and it works for me.
Perfect! Thanks a lot.

One small note:
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"

This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef

This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.

Arthur
Ben Pfaff
2010-06-16 21:39:59 UTC
Permalink
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"
This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef
This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.
ovs-vsctl tolerates hyphens in column names. It will accept, for
example, "ovs-vsctl get Bridge br0 datapath-id". So if you use hyphens
consistently, it will work out OK.
Ben Pfaff
2010-06-16 21:39:59 UTC
Permalink
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"
This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef
This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.
ovs-vsctl tolerates hyphens in column names. It will accept, for
example, "ovs-vsctl get Bridge br0 datapath-id". So if you use hyphens
consistently, it will work out OK.
Arthur van Kleef
2010-06-16 21:22:56 UTC
Permalink
Post by Ben Pfaff
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.
The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.
To set a fixed datapath ID, instead set other-config:datapath-id, like
ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
I actually tested it this time, and it works for me.
Perfect! Thanks a lot.

One small note:
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"

This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef

This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.

Arthur
Arthur van Kleef
2010-06-16 21:22:56 UTC
Permalink
Post by Ben Pfaff
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.
The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.
To set a fixed datapath ID, instead set other-config:datapath-id, like
ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef
I actually tested it this time, and it works for me.
Perfect! Thanks a lot.

One small note:
# ./ovs-vsctl list Bridge
_uuid : 61e1cf27-3015-4a66-9861-b46365d30d0d
controller : [4923c57b-9895-4afd-b66f-e3d1e67b82d9]
datapath_id : "123456789abcdef"

This one doesn't work
# ./ovs-vsctl set Bridge br0 other-config:datapath_id=0123456789abcdef

This one does
# ./ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

In the 'list Bridge' output an underscore is used in 'datapath_id',
while with the set commando you need to use it with a hyphen, 'datapath-id'.

Arthur

Arthur van Kleef
2010-06-16 20:15:50 UTC
Permalink
Post by Ben Pfaff
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
I tried that one, but it seems to fail, output from console:

# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
# ./ovs-vsctl set Bridge br0 datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"

I'm running Open vSwitch (v1.0.1) inside an User Mode Linux VM and also
on a normal host. I have attached the relevant sections of
ovs-vswitchd's logfiles (both from UML instance and on a normal Linux
host). What I see is that an update message is received, but immediatly
is reversed by another update message. Is this perhaps a bug?

Thanks,
Arthur
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ovs-vswitch-uml.log
URL: <http://openvswitch.org/pipermail/discuss/attachments/20100616/10387bc3/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ovs-vswitch-host.log
URL: <http://openvswitch.org/pipermail/discuss/attachments/20100616/10387bc3/attachment.asc>
Ben Pfaff
2010-06-16 20:32:37 UTC
Permalink
Post by Ben Pfaff
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
# ./ovs-vsctl set Bridge br0 datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
I'm running Open vSwitch (v1.0.1) inside an User Mode Linux VM and also
on a normal host. I have attached the relevant sections of
ovs-vswitchd's logfiles (both from UML instance and on a normal Linux
host). What I see is that an update message is received, but immediatly
is reversed by another update message. Is this perhaps a bug?
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.

The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.

To set a fixed datapath ID, instead set other-config:datapath-id, like
so:

ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

I actually tested it this time, and it works for me.
Ben Pfaff
2010-06-16 20:32:37 UTC
Permalink
Post by Ben Pfaff
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
# ./ovs-vsctl set Bridge br0 datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
I'm running Open vSwitch (v1.0.1) inside an User Mode Linux VM and also
on a normal host. I have attached the relevant sections of
ovs-vswitchd's logfiles (both from UML instance and on a normal Linux
host). What I see is that an update message is received, but immediatly
is reversed by another update message. Is this perhaps a bug?
Oops, I gave you bad advice. The documentation is not very clear in
this area. I'll try to check in improvements.

The "datapath_id" column reports the datapath_id actually in use. If
you set it, ovs-vswitchd will set it right back, as you saw.

To set a fixed datapath ID, instead set other-config:datapath-id, like
so:

ovs-vsctl set Bridge br0 other-config:datapath-id=0123456789abcdef

I actually tested it this time, and it works for me.
Arthur van Kleef
2010-06-16 20:15:50 UTC
Permalink
Post by Ben Pfaff
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
I tried that one, but it seems to fail, output from console:

# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"
# ./ovs-vsctl set Bridge br0 datapath_id=0123456789abcdef
# ./ovs-vsctl get Bridge br0 datapath_id
"002320f00173"

I'm running Open vSwitch (v1.0.1) inside an User Mode Linux VM and also
on a normal host. I have attached the relevant sections of
ovs-vswitchd's logfiles (both from UML instance and on a normal Linux
host). What I see is that an update message is received, but immediatly
is reversed by another update message. Is this perhaps a bug?

Thanks,
Arthur
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ovs-vswitch-uml.log
URL: <http://openvswitch.org/pipermail/discuss/attachments/20100616/10387bc3/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ovs-vswitch-host.log
URL: <http://openvswitch.org/pipermail/discuss/attachments/20100616/10387bc3/attachment-0001.asc>
Arthur van Kleef
2010-06-15 11:32:47 UTC
Permalink
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?

Thanks,
Arthur
Ben Pfaff
2010-06-16 16:32:01 UTC
Permalink
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
Yes:
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
Arthur van Kleef
2010-06-15 11:32:47 UTC
Permalink
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?

Thanks,
Arthur
Ben Pfaff
2010-06-16 16:32:01 UTC
Permalink
Post by Arthur van Kleef
Is it possible to manually configure the datapath_id (that is also seen
by an OpenFlow controller such as NOX) of a bridge using the ovs-vsctl
utility?
Yes:
ovs-vsctl set Bridge <bridgename> datapath_id=0123456789abcdef
Loading...