Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
For example, what systemd is going to do if network interface required for the daemon does not go up? Or only one of two interfaces goes up?
There's just too many possibilities.
The road forward for systemd
Posted May 27, 2010 18:27 UTC (Thu) by drag (subscriber, #31333)
Most network services that want to listen on multiple interfaces will just listen to 0.0.0.0 which will cause them to listen to all network interfaces regardless of the time they come up or not. In that case the service will remain dormant until somebody on any network tries to use it.
For network services that I've used that depend on different ports being open for different purposes the daemon itself just listenned on all interfaces and then only responded appropriately based on it's own internal configuration.
For example: DNSMASQ.
Dnsmasq (just so you don't have to look it up if you never used it) is a clever little daemon used to cache DNS requests and can perform DHCP services if configured. I've used it extensively for building network routers and in doing virtual machine host configurations. It's also used in things like OpenWRT for small soho routers. Very nice little application that allows me to eliminate a number of difficult-to-configure services and can read from yoru hosts file to make it simple to make contained DNS resolved network names for a small/medium sized network.
Well Dnsmasq depends on being able to use the DNS ports and DHCP ports on the internal network. Then it also needs to have the ability to do DNS requests to a external network.
Also it's common to have many multiple network ports on a router, so you can configure it to provide DHCP services to some networks, but not on others.
Now you can hard-code it to use only certain network interfaces or ip addresses, but the recommended configuration just has it listenning to DNS/DHCP requests on all networks simultaniously and it will choose to respond to it based netmasks and that sort of thing. That way you don't have to care about it... it takes care of the policies on it's own.
Otherwise what I use for services like that that can't handle things intellegently I'll use If/up, if/down network initialization scripts and/or Network-Manager-Dispatcher (which behaves very similar and uses a similar structure to ifup/ifdown scripts)
Needless to say that all of this would be a advanced system-specific configuration and is a nitch need. For a general purpose thing like Systemd it may not be appropriate for it to address this needs.
But if it could then that would be terrific, of course.
Posted May 27, 2010 19:34 UTC (Thu) by hppnq (guest, #14462)
Posted May 31, 2010 16:52 UTC (Mon) by mezcalero (subscriber, #45103)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds