On Mar 29, 2012, at 12:31 AM, Simon O'Riordan wrote:

> I've been searching for about a week and am now going over old links, so I 
> think
> I may have exhausted the literature.
> I'm not (yet) an expert on networking LFS.
> What I want to do is add a dhcp ethernet interface to a bridge.
> I am trying to use the blfs scripting as far as possible, and have found
> numerous small errors in the scripts which cause a little untidiness.
> 
> I've installed the latest scripts, and the latest DHCP...P2 package(client 
> only
> as per the comprehensive instructions).
> 
> Now.
> I've got dhcp ethernet on eth0 quite successfully; all the assignments work 
> and
> I can ping our gateway after automatic startup.
> 
> According to the brctl man page, simply adding eth0 to a bridge should be 
> enough.

Simon,

Bridging is a little confusing at first.  Don't be too discouraged.

What you want is to enable DHCP on br0 (or whatever the bridge interface is 
called).  For now, you'll have to do this manually--or write your own scripts.  
The big picture looks like this:

        1. Bring up physical interface (get eth0 to "UP")
---->   2. Do *NOT* configure eth0.
        3. Create a bridge interface (e.g., br0).
        4. Attach eth0 to the bridge
        5. Configure br0.

The interface you want to do your IP config (whether static or DHCP) is br0.  
When used in a bridge configuration, eth0 (assuming that's your physical 
interface) should never be configured.  If it currently has an IP address, make 
sure you remove it while the interface is up.  The important thing is that once 
a bridge is up, you don't configure the "endpoint interfaces" (otherwise known 
as the "enslaved ports"); you configure the bridge interface itself.  If both 
happen to be configured, it won't work.

The current bridging scripts are up for review...Just waiting for some folks to 
finish up other things so they have time to look at it.

* * *

@Bruce,Nathan--This is another good test of my bridge proposal; I don't run 
DHCP, but I believe the BLFS DHCP script could be easily adapted to my scripts; 
i.e., it would look for the interfaces in this order: DHCP_IF, IPV4_IF, and 
then PHYS.  As before, ifup takes care of step (1), bridge would take care of 
(2), (3), and (4).  Then, dhcp (or whatever it's called in /lib/services) would 
handle (5), looking for those interfaces in the order listed (from most to 
least specific).

I hadn't considered this before, but this scheme would have the added benefit 
of allowing you to maintain a static IP config alongside a DHCP config; you 
just change what's in SERVICE to switch between them--DHCP would obviously 
ignore IP, PREFIX, GATEWAY, etc.

        Q


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to