kickstart/brctl
kickstart/brctl
How would I do a brctl addif br0 eth1 with kickstart? I tried just the command itself in my kickstart file but once the box is up. brctl show does not show the interface.
Thanks
Thanks
Re: kickstart/brctl
You mean when the just-installed system boots?s0ke wrote:... but once the box is up.
You have to store the configuration into file(s).
The kickstart file has option "network", but apparently attribute 'bridge' is known by el7 installer but not yet in el6.
Plan B is obviously to do the deed in %post
https://access.redhat.com/documentation ... onfig.html
Re: kickstart/brctl
Thank you. Yes I ended up just using sed to put the commands into the rc.local during %post.
Thanks
Thanks
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: kickstart/brctl
You should be creating the proper ifcfg files in /etc/sysconfig/network-scripts instead.
Re: kickstart/brctl
Yes I am doing that.
cat << BRIDGE >>/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.16.204.1
NETMASK=255.255.255.0
NM_CONTROLLED=no
DELAY=0
BRIDGE
cat << ETH1 >>/etc/sysconfig/network-scripts/ifcfg-eth1
Bridge=br0
ETH1
...etc for my eth2,eth3,eth4 interfaces. But after the install the bridge isn't actually up according to brctl.
cat << BRIDGE >>/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.16.204.1
NETMASK=255.255.255.0
NM_CONTROLLED=no
DELAY=0
BRIDGE
cat << ETH1 >>/etc/sysconfig/network-scripts/ifcfg-eth1
Bridge=br0
ETH1
...etc for my eth2,eth3,eth4 interfaces. But after the install the bridge isn't actually up according to brctl.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: kickstart/brctl
What is that 'BRIDGE' line ifcfg-br0 ?
Your ifcfg-eth1 needs
DEVICE=eth1
ONBOOT=YES
WHAT is that "ETH1" line?
Your ifcfg-eth1 needs
DEVICE=eth1
ONBOOT=YES
WHAT is that "ETH1" line?
Re: kickstart/brctl
It ends the operator:
Ex:
hostname:~> cat << TEST >> /tmp/test.txt
> Blue
> Red
> Green
> TEST
hostname:~> cat test.txt
Blue
Red
Green
The devices are set in my %pre config
network --onboot yes --device eth1 --bootproto static
network --onboot yes --device eth2 --bootproto static
network --onboot yes --device eth3 --bootproto static
network --onboot yes --device eth4 --bootproto static
Could that be the issue?
Ex:
hostname:~> cat << TEST >> /tmp/test.txt
> Blue
> Red
> Green
> TEST
hostname:~> cat test.txt
Blue
Red
Green
The devices are set in my %pre config
network --onboot yes --device eth1 --bootproto static
network --onboot yes --device eth2 --bootproto static
network --onboot yes --device eth3 --bootproto static
network --onboot yes --device eth4 --bootproto static
Could that be the issue?
Re: kickstart/brctl
Bash "here document" EOF. s0ke did show what code the kickstart %post contains.gerald_clark wrote:What is that 'BRIDGE' line ifcfg-br0 ?
@s0ke:
Please show the ifcfg-{eth1,br0} as they are after the installation.
Do you have interface br0 at all after install?
BRIDGE=br0 or Bridge=br0?
The br0 is logically BOOTPROTO=static and the eth? are 'none'.
Re: kickstart/brctl
It does create the .cfg files after the install.
#ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.16.204.1
NETMASK=255.255.255.0
NM_CONTROLLED=no
DELAY=0
#ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:15"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
#ifcfg-eth2
DEVICE="eth2"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:16"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
...etc for eth3, eth4.
If I add:
brctl addif br0 eth1
brctl addif br0 eth2
brctl addif br0 eth3
brctl addif br0 eth4
To the rc.local in my ks file. Then it works:
I do see that BOOTPROTO for br0 is set to none instead of static.
#ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.16.204.1
NETMASK=255.255.255.0
NM_CONTROLLED=no
DELAY=0
#ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:15"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
#ifcfg-eth2
DEVICE="eth2"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:16"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
...etc for eth3, eth4.
Code: Select all
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000024d13e15 no
If I add:
brctl addif br0 eth1
brctl addif br0 eth2
brctl addif br0 eth3
brctl addif br0 eth4
To the rc.local in my ks file. Then it works:
Code: Select all
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000024d13e15 no eth1
eth2
eth3
eth4
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: kickstart/brctl
#ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:15"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
should be:
DEVICE=eth1
ONBOOT=yes
BRIDGE=br0
as I stated earlier
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="00:00:24:D1:3E:15"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
Bridge=br0
should be:
DEVICE=eth1
ONBOOT=yes
BRIDGE=br0
as I stated earlier