Commit Graph
106 Commits
Author SHA1 Message Date
Ben Pfaff ddbf6040e3 Make pkidir, rundir, logdir modifiable from "configure" command line.
Make "make" behave properly when these are changed by re-running
"configure", by putting their definitions into a generated file that
depends on Makefile.
2008-10-23 14:07:25 -07:00
Ben Pfaff be0ea769dd Make the format of vlog messages user-configurable. 2008-10-23 11:08:23 -07:00
Justin Pettit f1126f43ad Switch default OpenFlow port from 975 and 976 to 6633. 2008-10-22 17:17:50 -07:00
Ben Pfaff b50bbdf27d Centralize daemon option processing and usage. 2008-10-16 16:16:36 -07:00
Ben Pfaff f248de356e Fix typo in manpage. 2008-10-16 13:46:06 -07:00
Ben Pfaff 4fbcabe104 Revamp build system to make it easier to integrate openflowext. 2008-10-16 11:11:59 -07:00
Ben Pfaff 4a7706ed49 secchan: Make sure fail-open doesn't drop the first messages from connection.
Fail-open mode is entered or left in a secchan "periodic" callback, which
may not be called immediately after the connection to the controller
actually comes up.  This can cause the fail-open local-packet CB to
locally handle messages from the datapath and drop them, causing the
controller to think that it's being ignore and drop the connection.

Thanks to Dan for raising the issue.
2008-10-15 15:46:48 -07:00
Ben Pfaff 37c94b45fd Rework STP implementation in controller.
Before, we tried to use the port configuration bits to implement STP; e.g.
if a port was in LISTEN state we turned off sending and receiving frame
other than BPDUs.  Unfortunately this interacts very badly with in-band
control: when the switch connects to the controller, it can be connected
to the controller over a port that is not in FORWARD, and so then the
controller disabled that port, and the connection eventually dropped when
an echo request/reply failed to get through.

Now, we implement STP by querying the flows on the switch and killing
off the ones that STP does not allow.  This works much better because,
although we still kill off the in-band control connection, the in-band
hook in secchan is then able to resurrect it.

--no-stp is still the default since this has not been tested very much.
2008-10-14 16:48:47 -07:00
Ben Pfaff 2c5272bc28 Set DHCP maximum retransmission timeout to 3 seconds in secchan.
This should help discovery complete faster, especially with hops across
multiple OpenFlow switches to the controller.
2008-10-14 16:14:13 -07:00
Ben Pfaff 0949dc379b secchan: Log switch datapath id at startup. 2008-10-14 16:14:13 -07:00
Ben Pfaff 83319dfc65 secchan: Remove unhelpful STP-related log message. 2008-10-14 13:31:09 -07:00
Ben Pfaff 11a8137e64 secchan: Increase max number of local_cbs to accommodate STP. 2008-10-14 13:31:09 -07:00
Ben Pfaff 4a4424a739 Support up to 0xff00 ports in OpenFlow, without changing the implemented max. 2008-10-14 10:53:27 -07:00
Ben Pfaff e26574fdd9 No problum any more. 2008-10-14 10:17:00 -07:00
Justin Pettit 6a51c7a9f1 Conditionally leave out a few more things if "--enable-snat" isn't used. 2008-10-14 00:08:18 -07:00
Justin Pettit 94f287969d Add support for Source-NAT to Linux 2.6 datapaths.
To enable SNAT, run configure with the "--enable-snat" flag.  This has
only been tested with the 2.6.23 kernel...more diverse testing will follow.
Documentation and a cleaner build setup will also be in a future check-in.
2008-10-11 00:30:02 -07:00
Ben Pfaff e10dfcf357 rconn: Be pickier about what constitutes a successful connection.
When secchan is configured to "fail open" after failing to connect to
a controller for a period of time, it needs a heuristic for what
constitutes a successful connection.  Until now, that heuristic was
simply that when it received an OpenFlow message from the controller
(any OpenFlow message), it considered the connection successful.

However, this is no longer good enough, because NOX performs
admission control on connections after sending a number of OpenFlow
messages, in particular after doing OpenFlow version negotiation and
requesting the switch features (and receiving the reply).  Thus, this
commit adjusts the heuristic by only considering certain OpenFlow
messages to demonstrate that admission control checks have passed and
thus that the connection should be considered successful.

As a fallback, any connection that persists for 30 seconds or longer is
also considered successful.

An alternate and complementary approach (that this commit does not
implement) would be to use an OpenFlow error message to indicate why
the connection is closing.

Fixes bug #239.
2008-10-10 10:13:12 -07:00
Ben Pfaff d7da8505f2 Fix inaccurate log message. 2008-10-10 09:56:13 -07:00
Ben Pfaff a6a94c514f Remove secchan dependence on Netlink for connecting to the datapath. 2008-10-09 15:53:05 -07:00
Ben Pfaff e24bd9bcb7 Disable STP in secchan by default (but let --stp enable it). 2008-09-23 15:47:33 -07:00
Ben Pfaff 6a774239db stp: Turn off STP on ports that are disabled or have no link.
Fixes a problem that a port that is disabled via "ifconfig down" does
not come back up properly when it is brought back up again with "ifconfig
up", if STP is enabled.
2008-09-23 11:24:53 -07:00
Justin Pettit 9da88ee2ad Modify OpenFlow commands related to ports to be more expressive.
This new OpenFlow message format provides a cleaner interface and greater
detail and control over ports.  It is now possible to see what features
the switch's port is currently configured as having, what it's advertising,
and what it's capable of handling.  It is also possible to return the
features advertised by the port's peer.
2008-09-22 15:18:22 -07:00
Ben Pfaff 35e701d77a Drop port_watcher support for editing ports.
This was only needed for STP, which doesn't need it anymore.
2008-09-19 17:07:47 -07:00
Ben Pfaff 512f02d405 Get rid of per-port STP implemented bits, by reducing OFPP_MAX to 255.
802.1D Spanning Tree Protocol supports a maximum of 255 ports per bridge,
but OpenFlow supported 256, so 1 port had to not implement STP.  This
gets rid of the problem by reducing the maximum number of ports to 255.
2008-09-19 17:07:47 -07:00
Ben Pfaff 55ecbead39 Add the ability to disable the STP implementation. 2008-09-19 15:37:53 -07:00
Ben Pfaff 4da0bed334 Make "controller nl:0" work again, by fixing a layering violation.
The kernel datapath was claiming that it implements STP, which is untrue.
In fact, the secchan implements STP, so if the secchan was not running
the STP support did not work.  Thus, "controller nl:0" would do the
wrong thing.

This makes the secchan edit the responses from the datapath to claim
STP support.
2008-09-16 16:56:37 -07:00
Ben Pfaff 84f7d34079 Make it easier to bootstrap the PKI for SSL connections in OpenFlow. 2008-09-16 16:06:45 -07:00
Ben Pfaff f593e3ab70 Merge branch "partner", to simplify partner integration. 2008-09-15 15:31:36 -07:00
Ben Pfaff 9c1b16772c Implement OFPT_HELLO simple version negotiation. 2008-09-15 14:29:53 -07:00
Ben Pfaff 553dfa572d Break passive vconns out into separate pvconn routines and data structures.
There really was nothing in common between the active and passive vconns.
This arrangement makes more sense.
2008-09-15 14:29:53 -07:00
Ben Pfaff 51ab8ae072 Fix handling of port flags.
The "port watcher" in secchan was not keeping track of updates to port
flags by the controller, which caused some combinations of secchan
and controller to not turn on ports when the STP state otherwise should
have done so.

Thanks to Justin for reporting the problem.
2008-09-15 14:25:09 -07:00
Ben Pfaff d0fb7347b9 Delete OFPST_SWITCH and make it available as a Nicira vendor extension. 2008-09-10 15:00:47 -07:00
Ben Pfaff a70ca44e6d Fix uninitialized data read in secchan.
Found by valgrind.
2008-09-10 13:21:34 -07:00
Ben Pfaff b5e9402df5 Implement 802.1D Spanning Tree Protocol. 2008-09-09 14:15:57 -07:00
Ben Pfaff b5bcab1b47 Add ability to monitor both ends of secchan connections from dpctl. 2008-09-08 10:05:13 -07:00
Ben Pfaff e71fcda320 Do not send in-band control traffic to the controller.
This commit prevents the secure channel from sending any traffic to
or from the controller up to the controller over its OpenFlow connection.
Instead, such traffic is always handled completely locally.  This is
what the changes to in-band control up until now have been converging on:
each time, we have reduced the category of traffic that can be sent up
to the controller because we have found that doing so can cause a control
loop.  This change goes all the way.
2008-09-05 17:09:53 -07:00
Ben Pfaff eb0341e711 Rename utility functions to avoid partner namespace conflicts. 2008-09-04 13:53:27 -07:00
Ben Pfaff 9b13a5792f Revert "Do not send in-band control traffic to the controller."
This reverts commit 123301f8b5,
because it broke second-hop OpenFlow switches' attempts to connect
to the controller.

Probably re-spin it later, with more testing this time.
2008-09-04 13:53:26 -07:00
Ben Pfaff 2c775287e2 Rename struct queue to struct ofp_queue.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Ben Pfaff 5549180a54 Rename struct buffer to struct ofpbuf.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Ben Pfaff 123301f8b5 Do not send in-band control traffic to the controller.
This commit prevents the secure channel from sending any traffic to
or from the controller up to the controller over its OpenFlow connection.
Instead, such traffic is always handled completely locally.  This is
what the changes to in-band control up until now have been converging on:
each time, we have reduced the category of traffic that can be sent up
to the controller because we have found that doing so can cause a control
loop.  This change goes all the way.
2008-09-02 15:44:58 -07:00
Ben Pfaff cfc54b8793 Minimal fix for in-band control loop with hub.
When a hub has two switches and the controller on three of its ports,
control traffic from the controller to switch 1 is seen by switch 2 as
data traffic, and switch 2 sends it up over its OpenFlow connection.  That
control traffic is in turn seen by the switch 1 as data traffic, and so
switch 1 sends it up over its OpenFlow connection.  And so on: this is a
loop.

This commit fixes the situation by not sending up over the OpenFlow
connection traffic to the controller that arrived on the controller's
port, as well as traffic from the controller.
2008-09-02 15:42:34 -07:00
Ben Pfaff 80e0e1e029 Remove duplicate prefixes on switch-status items. 2008-08-28 14:25:05 -07:00
Ben Pfaff 686e34c8b7 Make the secchan report a few more switch-status items. 2008-08-28 14:25:05 -07:00
Ben Pfaff e9ab3dbf6d Make -P or --pidfile keep programs from running if already running. 2008-08-28 13:17:16 -07:00
Ben Pfaff 7518061f7d Allow multiple -l or --listen options on secchan command line.
Bug #149.
2008-08-27 11:50:11 -07:00
Ben Pfaff ab43666b20 vlog: Apply rate-limiting everywhere it seems warranted. 2008-08-26 13:25:21 -07:00
Ben Pfaff e3d722e73b Implement new OpenFlow "switch statistics" feature.
This should be useful for reporting the status of a switch on its
front-panel display (for those switches that have one) or in the
controller UI.
2008-08-26 11:53:51 -07:00
Ben Pfaff 8a83c00302 Print OpenFlow ref. impl. and protocol versions at secchan startup time.
Bug #83.
2008-08-13 14:37:36 -07:00
Ben Pfaff 69abd4346d Prevent the secchan from dying due to SIGPIPE.
Fix for bug #88.
2008-08-12 16:21:45 -07:00