[SOLVED] Static IP gets dropped

  • Having a problem with my static IP. I've set up my OMV box with a static IP address on my local network. Every couple days or so, when I try to access OMV I find that the static IP has been dropped, and reverted to a dynamic IP. Why is it doing this?? The relavant lines from the log (I think) are attached:



    I have set my static IP to 192.168.2.31, and set my DNS server up in the DNS setting to my main router 192.168.2.1 for primary, and 8.8.8.8 for secondary.


    To fix the problem, I go back into the DNS settings and re-enter my main router IP, save, and OMV goes back to using my static IP until it drops it again a few days later.


    Anyone got any ideas why this is happening??

  • Is the static IP 192.168.2.31 in the range of the DHCP of the router?


    I set my server IP outside of the routers DHP range. My OMV is at 192.168.1.21 and the routers DHCP range is 192.168.1.100 to 192.168.1.150. I also reserved the .21 IP by MAC in the LAN settings of my router.


    You can use omv-firstaid to set the static IP.

  • Zitat von "PhantomSens"

    Is the static IP 192.168.2.31 in the range of the DHCP of the router?


    I set my server IP outside of the routers DHP range. My OMV is at 192.168.1.21 and the routers DHCP range is 192.168.1.100 to 192.168.1.150. I also reserved the .21 IP by MAC in the LAN settings of my router.


    You can use omv-firstaid to set the static IP.


    Static IP (192.168.2.31) is outside the range of the Router's DHCP range (192.168.2.100-200). Only thing I haven't done that you mention is set the static IP in the router using the MAC. I will try that to see if it fixes the problem. But I don't understand why it works fine for a few days and then decides to drop the static IP in favour of an dynamic one.

  • Check the "lease time". I bet it is the same time as the server gets a new IP via DHCP.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Zitat von "davidh2k"

    Check the "lease time". I bet it is the same time as the server gets a new IP via DHCP.


    Do you mean the DHCP lease time on the router? Not sure why this would matter if my OMV was set up for static.

  • Zitat


    I forgot about the lease time. Failed to totally read the code. And when the router does that the OMV box shows up at .123 in the DHCP.

    Zitat von "yds"
    Code
    Sep 15 11:18:06 openmediavault avahi-daemon[1749]: New relevant interface eth0.IPv4 for mDNS.
    Sep 15 11:18:06 openmediavault avahi-daemon[1749]: Registering new address record for 192.168.2.123 on eth0.IPv4.
    Sep 15 11:18:06 openmediavault postfix/postfix-script[18794]: fatal: the Postfix mail system is not running
    Sep 15 11:18:06 openmediavault dhclient: bound to 192.168.2.123 -- renewal in 120886 seconds.
    Sep 15 11:18:26 openmediavault ntpd[1876]: Listen normally on 6 eth0 192.168.2.123 UDP 123
    Sep 15 11:18:26 openmediavault ntpd[1876]: Deleting interface #5 eth0, 192.168.2.31#123, interface stats: received=99, sent=99, dropped=0, active_time=97200 secs


    The 120886 seconds for the lease is about 33.5 hours.

  • Zitat von "yds"


    Do you mean the DHCP lease time on the router? Not sure why this would matter if my OMV was set up for static.


    Yes I mean the DHCP lease time.
    I was guessing that when OMV falls back to dhcp that it may had something to do with that the old dhcp lease was invalid.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Thanks for you help with this guys. But I still don't understand by OMV is even asking my router DNS for an IP, since I have OMV set up as static. The first part of this log is what mystifies me. Why is it even asking about an IP??

    Zitat von "yds"
    Code
    Sep 15 11:18:03 openmediavault dhclient: DHCPREQUEST on eth0 to 192.168.2.1 port 67
    Sep 15 11:18:03 openmediavault dhclient: DHCPNAK from 192.168.2.1
    Sep 15 11:18:03 openmediavault dhclient: suspect value in host_name option - discarded
    Sep 15 11:18:03 openmediavault postfix/postfix-script[18727]: fatal: the Postfix mail system is not running
    Sep 15 11:18:03 openmediavault avahi-daemon[1749]: Withdrawing address record for 192.168.2.31 on eth0.
    Sep 15 11:18:03 openmediavault avahi-daemon[1749]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.31.
    Sep 15 11:18:03 openmediavault avahi-daemon[1749]: Interface eth0.IPv4 no longer relevant for mDNS.


    I now have set up my router to assign the .31 address to my OMV's MAC address. Hopefully this resolves the issue. But if someone can explain what and why the above code indicates OMV is doing, it would help me understand. If you need me to post any files (eg: my network config or resolv config, let me know. But I did look at those and nothing seemed amiss to me).

  • Edit: Thanks to PhantomSens now corrected.


    Please post the output of the following commanda and I will have a look at it.


    Code
    ifconfig -a
    cat /etc/network/interfaces
    cat /etc/dhcp/dhclient.conf


    For the last file I'm not 100% sure about the correct path and filename, I'm just on my mobile phone right now...


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Thanks. Here's the output (I xx'd out my MAC address in the following):


  • I see nothing weird except that you didn't set your broadcast address in your /etc/network/interfaces for eth0.


    Greetings
    David


    Edit: I digged a bit through your error "Withdrawing address record" and found a bit and I would like to ask you if you noticed anything that may indicate how it reproduces. Whats irritating me is, that this error "should" apply when he uses DHCP, alltough you have nothing set to use DHCP. :?

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Zitat von "davidh2k"

    Edit: I digged a bit through your error "Withdrawing address record" and found a bit and I would like to ask you if you noticed anything that may indicate how it reproduces. Whats irritating me is, that this error "should" apply when he uses DHCP, alltough you have nothing set to use DHCP. :?


    Only thing that seemed reproduceable was that it seemed to occur after about the same number of days (though I can't be entirely sure of that since I didn't really note precisely how long between drops).


    I didn't see anything weird in those files either.


    As noted, I have set my router to provide a fixed IP to OMV now. I'll see if it drops again (and watch my logs to see if/when it drops whether it just reassigns the .31 address now since I have set the router to dish it out).


    Thanks for you assistance. You guys rock!

  • I think this may be issue with kernel and your nic. Have you upgraded to backports kernel?? The only other thing I think would cause this if there was something else on your network was set to same ip. But I doubt this. Must be a Realtek. If you upgrade to backports it may fix connection issue with your router/switch.


    tekkb

  • Zitat von "tekkbebe"

    Have you upgraded to backports kernel??


    How do I upgrade to backports kernel?? I'm running 0.4.37 Fedaykin right now (though I think I might have done the upgrade to this version recently - perhaps even after the issue of my dropped IP).

  • Just had a look in my log. For the past 10 hours, I've been getting these DHCP messages.


    I've seen these before just before losing my static IP. Why is there a dhclient running, when I have set up static IP??

  • "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Thanks guys. Yes, I had seen the How Tos/Tutorial pages, and did get some good information from them. Haven't gone through all the links yet though :)


    I guess I'll try the backport to see if that resolves the issue. Does anyone know why I'm getting those dhcpclient messages in the log file though, since I'm not supposed to be running dhcp on my OMV??

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!