To use vlan for net boot, you need to specify vlan and ip kernel options
for the boot interface. For example,
vlan=eth1.1:eth1 bootdev=eth1.1
ip=1.2.3.4:1.2.3.4::255.255.255.0:my-hostname:eth1:none
To use bridge for net boot, you need to specify bridge and ip kernel
option for the boot interface. For example
bridge=br1:eth1 bootdev=br1
ip=1.2.3.4:1.2.3.4::255.255.255.0:my-hostname:eth1:none
In my environment, I needs to boot machines from network within
a vlan or on a bridged network. I found curent dracut release
if-up.sh script in 40network module bypass ip setting for both
bridge and vlan interface.
linkup is a wrapper function for waiting interface ready and up.
change to use linkup as what we do in ifup script.
Signed-off-by: Dave Young <dyoung@redhat.com>
In case that configuration file did not include name of team device,
teamd would not start. Fix this by adding "-t" parameter.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
In case long delay of network driver initqueue will exit before net dev is
ready. We have no chance to setup it then.
For dhcp, when we finish the setup there will be a setup_net_<dev>.ok. Doing
same for static ip case. Also add a check to initqueue when we generate udev
rules to ensure it's early enough.
[v1->v2]: only wait for bootdev or it's possible to cause boot fail for
waiting for non-bootdev. For example bond0->eth0, set bond0 as bootdev and
dhcp, we only need to wait bond0 setup ok.
Signed-off-by: Dave Young <dyoung@redhat.com>
In case BOOTIF is not set and IFACES are not set in bonding/vlan/bridge code,
net-genrule.sh will fall to bring up all net interfaces.
Here add a failsafe option to read IFACES from /tmp/net.ifaces
[v1->v2]: move IFACES reading from net.ifaces after bonding/vlan/bridge info
code chunks.
[v2->v3]: [ -n "$IFACES" ] should be [ -z "$IFACES" ]
Signed-off-by: Dave Young <dyoung@redhat.com>
Some network driver will take long time to initialize. We have an example
in a HP machine which take about one minute for this. The callback such as
"ip link set <dev> up" will fail, afterwards setup for network will also
fail.
Fix this by add a new function wait_for_if_link, wait the link ready before
use it.
Signed-off-by: Dave Young <dyoung@redhat.com>
set link up usually include two steps, ip link set <dev> up and
wait_for_if_up <dev>. Now do these two steps in one function linkup.
Later patch will add other code into it.
Signed-off-by: Dave Young <dyoung@redhat.com>
V2: merge patch 2/2
fix active-backup mode by adding slaves one by one
sync with the latest teamd
improve the comments
wait for team ports to come up
install /etc/libnl/classid too
This patch adds the initial support for team device [1].
A new cmdline team= is introduced for it.
Note, currently we don't support stacked devices
on/under team, it is tricky and can be added on request.
1. http://www.libteam.org/
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <amwang@redhat.com>
Commit a0be1ed removes some lines from do_static() and do_ipv6auto().
When $hostname is empty, do_static() and do_ipv6auto() will return 1
and fails to run setup_net at the last of ifup.sh
Signed-off-by: WANG Chao <chaowang@redhat.com>
It looks like ip=ibft has been busted since
25aa3c5 network: refactor stuff from netroot/parse-ip-opts to net-lib
which moved ibft parsing code out to the ibft_to_cmdline function.
The use of ifname_mac was partially replaced by a local mac, but not
completely, causing ibft_to_cmdline to abort without generating network
configuration options.
Signed-off-by: Chris Leech <cleech@redhat.com>
dhclient initqueue hook fix
setup_net is scheduled in initqueue, sometimes it does not get chance to run
So the default route will not be set properly
Add a check in initqueue/finished to resolve this issue.
Signed-off-by: Dave Young <dyoung@redhat.com>
We do not support renaming in the kernel namespace anymore (as udev does
that not anymore). So, if a user wants to use ifname, he has to rename
to a custom namespace. "eth[0-9]+" is not allowed anymore.
The patch, acfab373 - Handle upper case MAC addresses in ifname
option,takes care of only the MAC conversion to lower case in the
interface name. But the same has to be taken care for BOOTIF also.
This patch takes care of changing the BOOTIF to lower case.
Note that sed has been used in the patch instead of tr, as it is not
compulsion to install tr by dracut in the initramfs and may not be
available always.
Signed-off-by: Srinivasa T N (seenutn@linux.vnet.ibm.com)
>From 2ec9c91adbf808dbad9bdd2057d9df55a62b711f Mon Sep 17 00:00:00 2001
From: Srinivasa T N <seenutn@linux.vnet.ibm.com>
Date: Wed, 27 Jun 2012 11:20:13 +0530
Subject: [PATCH] Fixed BOOTIF for converting mac addr to lowercase
This patch adds support of vlan tagged bonding, for example,
bond0.2. In case of regression, I also tested bond0 and eth0.2,
all work fine.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
"brd +" is not valid for ipv6. This causes the 'ip addr add' command to
fail with the message "Broadcast can be set only for IPv4 addresses".
So: don't use "brd +" for ipv6.
Don't try to be smarter than the admin configuring the machine.
Does also conflict with other methods trying to setup the interfaces,
like cmsifup.sh from the cms module.
A bridge device with only one underlying ethernet device is almost
useless, for sure we want to support a bridge with multiple
underlying devices.
This patch adds the support by extending <ethname> in the original
bridge= cmdline to a comma-separated list of ethernet interfaces.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Anaconda used arguments of the form:
ip=<ip> gateway=<gw> netmask=<nm>
for static IP configuration. So if we get a value for "ip" that's an IP
address, look for gateway= and netmask= and related args to fill in the
ip config vars.
rd.neednet could be removed, as we can check /tmp/net.ifaces.
After this patch, kdump can bring up the NIC without
rd.neednet.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
ifenslave is an old tool, and could be dropped,
we can use the /sys interface.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Relax the rules for kdump, we don't specify netroot in kdump.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>