Re: basic question about assigning ip address
- From: Adalbert Prokop <adalbert.prokop@xxxxxx>
- Date: Sun, 30 Sep 2007 16:39:49 +0200
Peter Horst wrote on Sunday 30 September 2007:
I have a Fedora machine I'm using as a home server, without a keyboard
or monitor. I'd like to set it up such that upon rebooting it first
checks to see if there is a DHCP server on the network, and if so,
grabs an ip address from it. But if there isn't one, it assigns itself
a static address. Is this doable?
Yes, it's possible, but I agree with Jacques and Ed, that it is not
desirable. A server should use a static address. So much for an advise.
What you want is possible using dhclient hooks. Those are scripts called
by dhclient. Depending on the status dhclient provides to them they can
do anything a script can do. "man dhclient-script" is your friend.
I use those scripts on my notebook to setup IPv4LL addresses (local link
adresses, 169.254.0.0) if there is no DHCP server available. Together
with Avahi they make ad-hoc networks really easy.
I attach both dhclient-hooks as example how to use hooks. They both live
in /etc and should be executable.
--
Bye,
Adalbert
"Mach was the greatest intellectual fraud in the last ten years." "What
about X?" "I said `intellectual'." ;login, 9/1990
Attachment:
dhclient-enter-hooks
Description: application/shellscript
Attachment:
dhclient-exit-hooks
Description: application/shellscript
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
- Follow-Ups:
- Re: basic question about assigning ip address
- From: Peter Horst
- Re: basic question about assigning ip address
- References:
- basic question about assigning ip address
- From: Peter Horst
- basic question about assigning ip address
- Prev by Date: Re: F7 funny things on USB ports
- Next by Date: Re: basic question about assigning ip address
- Previous by thread: Re: basic question about assigning ip address
- Next by thread: Re: basic question about assigning ip address
- Index(es):
Relevant Pages
|