On Wed, 28 Nov 2007 21:56:14 +0100
Etaoin Shrdlu <[EMAIL PROTECTED]> wrote:

> On Wednesday 28 November 2007, Dan Farrell wrote:
> 
> > How the net init script works (there's really only one, generally
> > net.* is linked to net.lo for update simplicity)
> 
> That script only calls functions defined elsewhere. The hard (and 
> module-dependent) work is done by the files located 
> in /lib/rcscripts/net. In particular, /lib/rcscripts/net/iproute2.sh 
> and /lib/rcscripts/net/ifconfig.sh define all the various *_up(), 
> *_down(), *_add_address(), etc. functions that are invoked by net.lo.

interesting tidbit.  

> > /etc/conf.d/net.example holds examples for just 
> > about every imaginable configuration, but from my net, iproute2
> > looks something like:
> >
> > modules=("iproute2");
> > config_eth0=( "192.168.1.87/24 brd 192.168.1.255");
> > routes_eth0=( "default via 192.168.1.1" );
> > config_eth1=( "192.168.1.88/24 brd 192.168.1.255" );
> >
> > but as you can see, that still doesn't set up a netmask but uses the
> > default.  
> 
> What I see is that you are explicitly specifying the netmask. The /24
> in your lines specifies the netmask. Even if you didn't, in your case 
> things would probably still work, because iproute2 would probably use
> a class C netmask, which is also /24. But nonetheless you are not 
> using "the default" (whatever this means), but are instead explicitly 
> specifying a netmask.

good point.  i seem to have overlooked the /24 part of my
configuration.  

> > I agree that in both cases the default would be /8 for a 
> > 10.xxx network, but as you can see the config syntax is different
> > for iproute2 and ifconfig.
> 
> As I understand it, the syntax is exactly the same. What is different
> are the commands that are run behind the scenes to configure the
> interfaces, and these depend on the module you choose (iproute2 or
> ifconfig). In other words, if you substituted modules=("iproute2")
> with modules=("ifconfig") in your etc/conf.d/net, everything would
> still work as expected.
> The lack of a netmask specification will result in the tool used for
> the configuration (ifconfig or iproute2) doing whatever is
> appropriate for it: usually, this would just mean "use the default
> classful netmask",
yeah, I guess you're right.  I for some reason thought the syntax was
different, but upon examining net.example I see that I was mistaken.  
-- 
[EMAIL PROTECTED] mailing list

Reply via email to