Re: basic question about assigning ip address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/29/07, Peter Horst <phorst@xxxxxxxxxxxxx> wrote:
> 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?
>
> Thank you.
>
I should have asked, do you have admin control over the dhcp server?
Are you able to have it assign a static IP to your server based on its
MAC address?  If so why not do that, then automatically assign it that
IP without worrying about the DHCP server knowing that the IP has been
reserved for your MAC so no danger of conflict on the subnet.

Another possible solution (I'd have to do some digging to figure this
one out but I'm sure it can be done) is to monitor traffic on your NIC
with tcpdump, filtering for DHCP response.  If none is captured then
assign a static IP.  Here again it would rely on a script that would
run at the end of the boot cycle to check the captured traffic and
examine for that DHCP response.  Much easier to simply check via
ifconfig if your card got an IP or not.  However if you are looking to
take it further than that to ascertain if it even spoke with the DHCP
server then tcpdump could assist you with that.

Jacques B.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux