RFC Bridging plan
Attached is the parser of this bridging plan. Bridge details if parsed from cmdline are written to /tmp/bridge.info for later use by network scripts with the following behavior. Any comments?
SYNTAX
======
bridge=<bridgename>:<ethname>
If bridge without parameters, assume bridge=br0:eth0
BASIC IDEA
==========
* When <ethname> would be configured by network scripts, instead create a bridge named <bridgename> then add <ethname> to that bridge.
* <bridgename> automatically inherits the MAC address of <ethname>. BOOTIF thus should be optionally workable.
* Then $netif becomes <bridgename> instead of <ethname> and all existing scripts process netroot mount via this new $netif instead of <ethname>.
* Try only the one specified <ethname> interface, do not try others. (I suppose trying others in the "bridge root=dhcp" case would be possible, but let's get the basics working first.)
* write-ifcfg.sh writes out both ifcfg-<bridgename> and ifcfg-<ethname> files for later use by NetworkManager.
BOOT EXAMPLE
============
ifconfig eth0 up
brctl addbr br0
brctl setfd br0 0
brctl addif br0 eth0
dhclient br0
ifconfig br0 <parameters>
mount -t nfs server:/path /sysrootswitch_root /sysroot
ifcfg-br0 example
=================
# Generated by dracut initrd
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=dhcp
STP=off
USERCTL=no
ifcfg-eth0 example
==================
# Generated by dracut initrd
TYPE=Ethernet
DEVICE=eth0
HWADDR=52:54:00:12:34:56
ONBOOT=yes
BRIDGE=br0
USERCTL=no
Warren Togami
[email protected]
From 329b0b77e7d63ebe2092111de31f471fd22a5b06 Mon Sep 17 00:00:00 2001
From: Warren Togami <[email protected]>
Date: Thu, 16 Jul 2009 00:09:07 -0400
Subject: [PATCH] Bridge parsing example
--- modules.d/40network/check | 2 +- modules.d/40network/install | 3 +- modules.d/40network/parse-bridge.sh | 55 +++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100755 modules.d/40network/parse-bridge.sh
modules.d/40network/check +1 -1
@@ -1,4 +1,4 @@ #!/bin/sh -which ip dhclient hostname >/dev/null 2>&1 || exit 1 +which ip dhclient hostname brctl >/dev/null 2>&1 || exit 1 exit 255
modules.d/40network/install +2 -1
@@ -1,5 +1,5 @@ #!/bin/bash -dracut_install ip dhclient hostname +dracut_install ip dhclient hostname brctl # Include wired net drivers, excluding wireless for modname in $(find "/lib/modules/$kernel/kernel/drivers" -name '*.ko'); do if nm -uPA $modname | grep -q eth_type_trans; then
@@ -18,6 +18,7 @@ instmods ecb arc4 inst_hook pre-udev 60 "$moddir/net-genrules.sh" inst_hook cmdline 91 "$moddir/dhcp-root.sh" inst_hook cmdline 99 "$moddir/parse-ip-opts.sh" +inst_hook cmdline 98 "$moddir/parse-bridge.sh" inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh" # TODO ifcfg config style is redhat specific, this should probably
modules.d/40network/parse-bridge.sh new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.6.2.5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Warren Togami
Attached is the parser of this bridging plan. Bridge details if parsed from cmdline are written to
/tmp/bridge.infofor later use by network scripts with the following behavior. Any comments?
I was under the impression that you could swizzle IP addresses from "real" userspace even if the root filesystem was mounted over the network.
That said, did you have a specific use case in mind?
Quoted 52 lines
SYNTAX
======
bridge=<bridgename>:<ethname>
If bridge without parameters, assume bridge=br0:eth0BASIC IDEA
==========
* When <ethname> would be configured by network scripts, instead create a bridge named <bridgename> then add <ethname> to that bridge.
* <bridgename> automatically inherits the MAC address of <ethname>. BOOTIF thus should be optionally workable.
* Then $netif becomes <bridgename> instead of <ethname> and all existing scripts process netroot mount via this new $netif instead of <ethname>.
* Try only the one specified <ethname> interface, do not try others. (I suppose trying others in the "bridge root=dhcp" case would be possible, but let's get the basics working first.)
*write-ifcfg.shwrites out both ifcfg-<bridgename> and ifcfg-<ethname> files for later use by NetworkManager.BOOT EXAMPLE
============
ifconfig eth0 up
brctl addbr br0
brctl setfd br0 0
brctl addif br0 eth0
dhclient br0
ifconfig br0 <parameters>
mount -t nfs server:/path /sysrootswitch_root/sysrootifcfg-br0 example
=================
# Generated by dracut initrd
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=dhcp
STP=off
USERCTL=noifcfg-eth0 example
==================
# Generated by dracut initrd
TYPE=Ethernet
DEVICE=eth0
HWADDR=52:54:00:12:34:56
ONBOOT=yes
BRIDGE=br0
USERCTL=noWarren Togami
[email protected]
Signature · 7 lines
Victor Lowther RHCE# 805008539634727 LPIC-2# LPI000140019 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html