Nathan Coulson wrote: >> Alternatively we could use something like: >> >> #TYPE:IP:PREFIX:MASK:GATEWAY:BOOT >> eth0=static:192.168.1.1:24:192.168.1.255:192.168.1.1:onboot > > that, is beautiful.
I'm not sure about that. :) > [ipv6 uses : for deliminators if I recall] Yes, of course. I forgot about that. Setting up a ipv6 configuration shouldn't be any more complicated than ipv4. The same entries, ip, mask, broadcast, network, default router are all the same concepts. The actual stack is more complicated of course and the format of the numbers is different, but the principles are the same. > [not sure how static routes would work, does anyone actually use that > on LFS though?] A static route is nothing more than a table entry. A packet is generated by the system or is received my a network interface (if forwarding is allowed). Once the stack has the packet, the output logic is the same. Say you have something like: Destination Gateway Genmask Flags Metric Ref Use Iface 1.2.0.0 1.2.7.8 255.255.0.0 UG 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 You take the destination ip address, AND it with the mask, and compare to the destination. If you get multiple matches, you use the lowest metric. Then you send the packet to the corresponding gateway through the associated interface. The difference between ipv4 and ipv6 is that ipv4 uses 32-bit numbers and ipv6 uses 128-bit numbers. The routing principle is the same. The only difference in Linux between a router and standard host is that for a router, a daemon manages the table dynamically. Note that if the destination is a system on a locally attached network, the gateway is not used and the link layer frame is sent directly via the underlying link level protocol via the appropriate interface. > [dhcp, should work great.] > > Still wouldn't mind something like > /lib/boot/services/{static,dhcp,bridge} [with only static existing on > a lfs build]. and pass the parameters to the service script. Perhaps, but /lib/boot would probably be enough. What other directory besides services would be in /lib/boot? -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page