>> [... location of network interface specification ...]
> As we're on that, can anyone defend this way of doing things? IP
> address. If you want to change the hostname you simply change
> /etc/hostname.le0. If you want to change the IP address, you simply
> change /etc/hosts.
The problem is, in these days of classless networks, there is other
information which tends to be required. Network size, gateway
locations and broadcast addresses aren't usually
automatically-determinable, so you have to store them somewhere.
For what it's worth, I think Debian's solution is pretty elegant;
details of network interfaces are stored in /etc/network/interfaces
(which is parsed and implemented at boot-time by
/etc/init.d/networking, and can be used thereafter by ifup/ifdown).
For example:
# Loopback
auto lo
iface lo inet loopback
# DMZ ethernet
auto eth0
iface eth0 inet static
address 1.2.3.4
netmask 255.255.255.0
gateway 1.2.3.1
# Internal ethernet 1 (DHCP)
auto eth1
iface eth1 inet dhcp
# Internal ethernet 2
iface eth2 inet static
address 10.0.1.4
netmask 255.0.0.0
... at boot time, the loopback interface, and eth0 would be set up
automatically, and eth1 would get its address from DHCP. eth2 would
not be automatically started (no "auto eth2" line), but could be
brought up later using "ifup eth2".
Very neat system, in my opinion.
Colm
--
Colm Buckley, NewWorld Commerce, 16 South Cumberland St., Dublin 2, Ireland.
Personal: +353 87 2469146 / colm at tuatha.org / http://www.tuatha.org/~colm/
Business: +353 1 4334334 / colm at nwcgroup.com / http://www.nwcgroup.com/
I don't have an attitude problem. You have a perception problem.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!