Commit Graph

45 Commits

Author SHA1 Message Date
William Hubbs
92b274a7de net: clarify how to prefer ifconfig over iproute2
reported-by: <vsync@quadium.net>
X-Gentoo-Bug: 417899
X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=417899
2012-06-06 23:16:35 -05:00
Robin H. Johnson
b264931034 doc/net.example: Add warnings that changing MAC on bonds can break things.
In most cases, changing the MAC on a bond manually is wrong. The bonding
module will do it as needed to failover between interfaces, or to get
multiple interfaces to correctly have the same MAC.

We cannot however enforce it, as there are some corner cases where it is
actually valid (hardware that requires specific MAC configuration, like
some quad-port NICs).

Suggested-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-19 13:53:09 -07:00
Robin H. Johnson
76d3fceb58 doc/net.example: Update bonding example
The newer bonding code using sysfs does not clearly show the most common
bond parameter: mode

Also include a path to the referenced kernel documentation for the other
settings.

X-Gentoo-Bug: 408333
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=408333

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-19 13:09:27 -07:00
William Hubbs
44e4c21f05 net: fix documentation for interface dependencies
The network script had a separate case for handling network interface
dependencies using variables of the form
rc_before/after/use/need/provide_ifname. This is unnecessary since
openrc already supports rc_net_ifname_need/use/before/after/provide.
This commit updates the documentation to use this more generally
supported form.
2012-02-18 17:03:28 -06:00
Robin H. Johnson
380752f4e0 net: allow parameters to a single address config
In the case of a single line of configuration, where the address has
parameters, the parameters were being treated as seperate addresses.
Eg:
config_eth0="4321:0:1:2:3:4:567:89ab/64 nodad home preferred_lft 0"

Also document usage of parameters in the net example, and note that
multiple addresses on a single line cannot be mixed with parameters.
Newlines are required to seperate the addresses.

X-Gentoo-Bug: 398827
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=398827

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-13 15:57:22 -08:00
William Hubbs
1875db4ff6 net: document up_before_preup for BSD 2011-12-28 11:17:58 -06:00
William Hubbs
26ceddae5e net: clean up documentation for up_before_preup 2011-12-28 10:41:07 -06:00
Robin H. Johnson
9a01f68515 net: Add up_before_preup variable for CAN devices
Historically, we have tried to up interfaces before running preup, so
that the kernel setups up the device and makes things like ethtool work
(some hardware cannot be correct probed until then). However this ends
up breaking other hardware, so a variable has been introduced to allow
the up prior to preup to be disabled: up_before_preup_IFVAR=no

X-Gentoo-Bug: 389475
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389475
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 16:27:38 -08:00
Robin H. Johnson
06f6ce408c net/iproute2: Support routing policy for IPv6 per bug #385833
For creation of routing policy entries for IPv6, the family must be
explicitly specified to 'ip'.

X-Gentoo-Bug: 385833
X-Gentoo-Bug-URL: https://bugs.gentoo.org/385833
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13 00:19:58 -08:00
Salah Coronya
a38a5071f3 Tuntap: add iproute2 support
This patch was modified by William Hubbs <williamh@gentoo.org> to
document the new usage in net.example.

X-Gentoo-Bug: 394281
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=394281
2011-12-12 21:40:39 -06:00
William Hubbs
476034dd95 net.example: Fix the bridge configuration example
The example of how to configure the bridge was invalid. It showed
invalid timer settings along with turning off stp. This update shows how
to turn on stp and set the timer settings to the defaults.

Reported-by: Sergey S. Starikoff < Ikonta@yandex.ru>
X-Gentoo-Bug: 389209
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=389209
2011-11-14 12:32:41 -06:00
Mike Frysinger
37294b4e82 net example: fix up grammar
X-Gentoo-Bug: 390295
X-Gentoo-Bug-URL: https://bugs.gentoo.org/390295
Reported-by: Patrick Lauer <patrick@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-12 15:33:03 -05:00
William Hubbs
5066d40ac8 Use pattern rules instead of suffix rules
Rework the makefiles to use pattern rules instead of suffix rules.
This is the preferred way to write implicit rules according to the gnu
make manual.
2011-10-29 09:43:24 -05:00
Stef Simoens
f94e883633 Add macvlan support
X-Gentoo-Bug: 384029
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=384029
2011-10-26 11:28:39 -05:00
Mike Frysinger
9a539ebbe1 further clean up OS differences in makefiles
No need for if() logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-20 14:32:37 -05:00
William Hubbs
9c77502f96 Make variable references in Makefiles consistent
Some variable references were written as $(foo), but the majority were
written as ${foo}. This commit changes all of the variable references
to using braces.
2011-10-19 12:22:23 -05:00
William Hubbs
ecf77254bb consolodate Makefiles
The tree contained many operating system specific Makefiles which were
being included in other Makefiles. This commit removes those and adds
the code to the makefiles which included them using make's conditional
processing.

X-Gentoo-Bug: 387441
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
2011-10-18 03:23:00 -05:00
William Hubbs
b712a9161f change udhcpc support to busybox udhcpc
This updates the udhcpc support to use busybox's udhcpc instead of the
stand alone version.

I would like to thank jackieku <kjackie@gmail.com> for assisting with
this update.

X-Gentoo-Bug: 205286
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=205286
2011-04-26 15:25:08 -05:00
Robin H. Johnson
2d197357ef [oldnet] Bug #363959: Improve plug_timeout ifplugd/netplugd code.
- Add support for a global plug_timeout setting to match the
  documentation.
- Update the documentation to also show per-interface configuration.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-19 17:49:20 +00:00
William Hubbs
de0ded4ed0 revert changes for bug #292894
This is being done because these dependency changes caused a regression.
We will need to revisit the previously mentioned bug.

X-Gentoo-Bug: 363693
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363693
2011-04-15 19:21:20 -05:00
William Hubbs
8e925368b7 bring up the loopback interface earlier
For most situations, the loopback interface can depend on root instead
of localmount, so this patch makes that happen. It also adds comments to
the net.example files explaining when a user might want to change this
and giving an example.

I would like to thank Robin Johnson for the original patch and suggested
examples.

X-Gentoo-Bug: 292894
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=292894

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-10 16:10:47 -05:00
William Hubbs
15660dbbfc add fallback_routes support to network scripts
Add support for optional fallback_routes_* variables in the network scripts.
This is similar to the fallback_route_* support in baselayout-1.
However, if you do not have fallback_routes set for an interface but you
do have routes set, that setting will be used, so you do not need this
variable unless you want the fallback routes to be different from the
primary routes.

X-Gentoo-Bug: 250978
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=250978
2011-04-09 13:54:01 -05:00
Robin H. Johnson
8a45d5e24e Bug #360963: Improve interface naming/set_name_type documentation on new vlan code.
This is primarily for users with set_name_type settings from previous
sysadmins can easily see what changes to make.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-03-29 07:54:50 +00:00
Robin H. Johnson
dfd42d1393 net/ethtool: official interface for changing ethtool params (bug #195479)
Implement a consistent interface for changing ethtool parameters, as
suggested in bug 195479. All variable names are based on the long option
to ethtool to set each group of parameters. Multiple entries seperated
by newlines are permitted for variable values.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 195479
2011-02-22 02:59:38 +00:00
Robin H. Johnson
683a21b0a0 net/vlan: update to use modern iproute2 interface
This replaces the vlan setup code that previously used the old vconfig
binary with a new implementation using the iproute2 interface.

vconfig does not handle many of the newer setups. No automatic migration
path is provided, as altering the configuration is non-trivial.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Written-by: Guillaume Castagnino <casta@xwing.info>
X-Gentoo-Bug: 346365
2011-02-21 09:41:48 +00:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Robin H. Johnson
400b45d590 Final documentation cleanup for updated bridge code.
Specifically document how to handle the case of explicitly starting a
bridge and then dynamically adding interfaces to it.

brctl_br0=''
bridge_add_eth0='br0'
2010-12-12 00:58:47 +00:00
Robin H. Johnson
e07f0ef417 Merge support for Routing Policy Database (RPDB)
This can be used for multi-homed connections and other advanced routing
in Linux. See the documentation links for more information about doing
this in linux.

The code was a originally pure addon into the conf.d/net files, written
in mid-2004 for doing multi-homing between two internet connections. I
have finally cleaned this up and integrated it. Thanks to Jonathan Kwan
for giving me the original impetus to develop this for Gentoo (it was
his dual internet connections...).

In the intervening years, it was a example of postup/postdown in the
net.example file, however that suffered from a few corner case issues.

If you were using the code from net.example, please see the updated
section 'Advanced Routing' on syntax, and drop your old function blocks.
Additionally, note that the rules added are now directly saved for
removal when the interface is taken down.
2010-12-11 14:23:52 -08:00
Robin H. Johnson
dbb5af2023 Revamp of bridging code.
- Use sysfs to read bridge information from the system instead of
  parsing the brctl outputs.
- Allow setting of all bridge configuration parameters using new sysfs
  methods, modelled after bonding configuration. Also works for per-port
  bridge interface parameters.
- Document pre-starting an empty bridge for dynamic add.
- Check for interface existence before adding to bridge.
- Should fix bug #293046, #309185.
2010-12-11 12:26:38 -08:00
William Hubbs
1cdf85e1ce fix bug #330173
This fixes a typo in the comments in net.example.
2010-07-28 13:18:33 -05:00
Jory A. Pratt
2982cfab70 Fix bug #301237, update example to list proper package for mii-tool 2010-07-12 22:45:40 -05:00
Mike Frysinger
ecf9ef49a7 random spelling fixes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-08 22:02:51 +00:00
Christopher Head
9ca65be42e Fix comments. 2009-12-21 09:45:03 +00:00
Roy Marples
a704b97fd2 Remove non working bash sequence expansion examples. 2009-12-21 09:18:00 +00:00
Roy Marples
454bd460c4 Multihomed rules show not be applied to the interface, Gentoo #273303. 2009-10-11 08:03:30 +01:00
Roy Marples
8da7a49d02 Fix example 2009-08-17 21:45:11 +01:00
Roy Marples
c568baf8c8 Ignore more foo 2009-06-05 09:20:10 +01:00
Roy Marples
2c98c5326a Punt .gitignore files. 2008-12-04 12:12:09 +00:00
Roy Marples
600d1f62fb Allow configuration of bond via extra sysfs entries, #105. 2008-09-19 09:32:24 +00:00
Roy Marples
2de401bca1 Enable bonding via sysfs, #104 thanks to Wolfram Schlich 2008-09-18 22:24:58 +00:00
Roy Marples
f2ea7ca514 Let ifdown control all interfaces. 2008-06-03 11:51:36 +00:00
Roy Marples
766ec96e3d Add ifdown_eth0=NO so that the interface stays up for WakeOnLan, Gentoo #220875 2008-05-09 10:29:06 +00:00
Roy Marples
864e17fabc Ignore more files. 2008-03-26 17:34:23 +00:00
Roy Marples
833903fc78 use $CP and $SED instead of cp and sed 2008-03-26 14:27:46 +00:00
Roy Marples
ac037241a7 Merge doc dirs. 2008-03-26 13:59:06 +00:00