summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 08:00:12 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:53:08 -0500
commitd22c338e07cc98276ea5cc4feaa5a370baa63243 (patch)
treeac72ae8a2d99ba9b48757aa148a8fe1b5f1cdd7d /doc
parent228041893c2b6f79326f4b49ee7b3b3a90e90e8e (diff)
downloadblackbird-obmc-uboot-d22c338e07cc98276ea5cc4feaa5a370baa63243.tar.gz
blackbird-obmc-uboot-d22c338e07cc98276ea5cc4feaa5a370baa63243.zip
net: Add link-local addressing support
Code based on networking/zcip.c in busybox commit 8531d76a15890c2c535908ce888b2e2aed35b172 Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/README.link-local76
1 files changed, 76 insertions, 0 deletions
diff --git a/doc/README.link-local b/doc/README.link-local
new file mode 100644
index 0000000000..e623e5659f
--- /dev/null
+++ b/doc/README.link-local
@@ -0,0 +1,76 @@
+------------------------------------------
+ Link-local IP address auto-configuration
+------------------------------------------
+
+Negotiate with other link-local clients on the local network
+for an address that doesn't require explicit configuration.
+This is especially useful if a DHCP server cannot be guaranteed
+to exist in all environments that the device must operate.
+
+This is an implementation of RFC3927.
+
+----------
+ Commands
+----------
+
+When CONFIG_CMD_LINK_LOCAL is defined in the board config file,
+the "linklocal" command is available. This running this will
+take approximately 5 seconds while the address is negotiated.
+
+------------------------
+ Environment interation
+------------------------
+
+The "llipaddr" variable is set with the most recently
+negotiated address and is preferred in future negotiations.
+
+The "ipaddr", "netmask", and "gatewayip" variables are set
+after successful negotiation to enable network access.
+
+-------------
+ Limitations
+-------------
+
+RFC3927 requires that addresses are continuously checked to
+avoid conflicts, however this can only happen when the NetLoop
+is getting called. It is possible for a conflict to go undetected
+until a command that accesses the network is executed.
+
+Using NetConsole is one way to ensure that NetLoop is always
+processing packets and monitoring for conflicts.
+
+This is also not a concern if the feature is use to connect
+directly to another machine that may not be running a DHCP server.
+
+----------------
+ Example script
+----------------
+
+This script allows use of DHCP and/or Link-local controlled
+by env variables. It depends on CONFIG_CMD_LINK_LOCAL, CONFIG_CMD_DHCP,
+and CONFIG_BOOTP_MAY_FAIL.
+If both fail or are disabled, static settings are used.
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "ipconfigcmd=if test \\\"$dhcpenabled\\\" -ne 0;" \
+ "then " \
+ "dhcpfail=0;dhcp || dhcpfail=1;" \
+ "else " \
+ "dhcpfail=-1;" \
+ "fi;" \
+ "if test \\\"$linklocalenabled\\\" -ne 0 -a " \
+ "\\\"$dhcpfail\\\" -ne 0;" \
+ "then " \
+ "linklocal;" \
+ "llfail=0;" \
+ "else " \
+ "llfail=-1;" \
+ "fi;" \
+ "if test \\\"$llfail\\\" -ne 0 -a " \
+ "\\\"$dhcpfail\\\" -ne 0; " \
+ "then " \
+ "setenv ipaddr $sipaddr; " \
+ "setenv netmask $snetmask; " \
+ "setenv gatewayip $sgatewayip; " \
+ "fi;\0" \
+
OpenPOWER on IntegriCloud