Want a static IP address

Forum Forums General Software Want a static IP address

Tagged: ,

  • This topic has 5 replies, 4 voices, and was last updated Feb 22-4:50 am by rayluo.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #54655
    Member
    Avatarluker

    Hi forum,

    my antiX box shall serve other computers in our home network as mythtv master server. Therefore, a static IP address for it would be preferable over DHCP.
    So I started ceni from within the control center and changed eth0 to a static address outside the DHCP server’s IP range. That worked well for the next minutes.

    But after rebooting, this computer had been given the DHCP IP address again that it had used for the last days. That means DHCP kicked in again. ceni still holds the settings I put in there, but obviously does get overruled by something.

    What do I need to change to keep my static IP address?

    #54657
    Member
    skidooskidoo

    Unsure whether this is a definitive “fix”, but the manpage for ceni mentions:

           --file filename
               Use filename as alternative /etc/network/interfaces

    At launch, ceni typically reads
    /etc/network/interfaces

    After using ceni to adjust your settings, view /etc/network/interfaces
    to verify that it now (for this session at least, eh) reflects your customized settings
    then SaveAs to a new filename e.g. interfaces_mystatic.

    During subsequent sessions, launch “ceni –file /etc/network/interfaces_mystatic” to invoke your customized settings.

    ___________________________________________
    When requesting help, pasting the output from inxi -Fzr command will provide important relevant details:
    antiX version//edition ~~ stable vs testing repos ~~ live vs installed vs virtualbox ~~ hardware specs

    #54666
    Member
    Avatarluker

    I just tested to reboot with settings in /etc/network/interfaces. They survived the power cycle. I think that means that another file won’t be necessary.

    There’s a comment in that file saying that ceni uses it, but connman doesn’t. I have the connman icon in my system tray and can switch the network connection off and on with it. I have the impression though that connman is primarily for wireless connections, correct? Since this is a tower with loads of cable connections and won’t be moved anywhere, a wireless connections manager seems unnecessary here.

    Can we prevent connman from starting and see whether that causes the settings in /etc/network/interfaces to be used?
    Or is it necessary to deliberately start ceni in order to use these settings?
    If it is the latter, where do the settings come from that are now in effect (eth0 uses DHCP)?

    #54740
    Member
    Avatarluker

    For now, this seems to work:

    1) Start Control Centre. Go to System – Startup Services
    2) Disable connman and resolvconf
    3) Start Control Centre – Network – Ceni. Insert correct settings there.
    4) remove /etc/resolv.conf (it is a link to /run/connman/resolv.conf)
    and create a new /etc/resolv.conf containing only the line
    nameserver ip.address.of.nameserver

    So far, that seems to work here. After a reboot, this machine still has the IP address that I entered in ceni. And it can still access the internet.

    #54750
    Member
    ileile

    hello skidoo and luker
    mythtv master server.
    Sounds very importantly cool.

    survived the power cycle.
    Pull the plug on both, The machine rebooting + Reset router include. re lease re assign. multiple devices. trial that too(?)
    router inside firmware settings may offer a reservation, assigned seat number, exclusive whatever they name it… for the target machine device. (?)

    #54754
    Member
    rayluorayluo

    But after rebooting, this computer had been given the DHCP IP address again that it had used for the last days. That means DHCP kicked in again.

    In fact, would you consider a solution the other way around? Go to your home router, there is typically a feature named something similar to “Reserved IP”. You can easily create a record there to say “whenever a device with this MAC address connects in, give it that IP address”. It works for me every time.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.