1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

OctoPrint IP Address keeps changing

Discussion in 'Software' started by Ed Ferguson, Jun 28, 2017.

  1. Ed Ferguson

    Ed Ferguson Active Member

    Joined:
    Sep 21, 2016
    Messages:
    272
    Likes Received:
    220
    My OctoPrint IP Address keeps changing. Sometimes it's 192.168.1.15, other times I start the printer it's 192.168.1.14 for example. Drives me crazy because I have my Chrome browser bookmarked for 192.168.1.15, and when it doesn't load I have to go to the Robo LCD and look up the new IP. My router has not powered down.
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,138
    Likes Received:
    6,997
    You can configure the pi for a fixed ip (that is what I did) or tell your router to always hand that MAC address the same ip which ends up having the same effect.
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,138
    Likes Received:
    6,997
    Since all of my printers use octoprint now I couldnt have them all hopping around :)
     
    Ed Ferguson likes this.
  4. Ed Ferguson

    Ed Ferguson Active Member

    Joined:
    Sep 21, 2016
    Messages:
    272
    Likes Received:
    220
    Thanks Mark - I'll give it a try.
     
  5. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    497
    Likes Received:
    332
    OutsourcedGuru likes this.
  6. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,806
    Likes Received:
    3,521
    @Ed Ferguson If you don't want to edit files on the rPi you can do what I do on my home network. Static IP leases. Basically you can assign an IP address at your router so that the exact same specified IP goes to the exact same MAC address. I have all my printers set up that way as well as the media server. I do not have to go to any individual PC to change any parameters. Generally speaking the default for network services is to use DHCP. I leave it exactly like that on every machine. But at the router I know that my Robo R1 attached to an rPi will always be at 192.168.1.36 and my network laser printer will be at 192.128.1.31 and my server at it's specific IP all because the router always assigns the same IP address to that specific NIC.
     
    Ed Ferguson likes this.
  7. SuperS

    SuperS New Member

    Joined:
    Mar 2, 2018
    Messages:
    3
    Likes Received:
    1
    hi mark tomlinson! would you be so kind to tell me how you were able to do this? my router is unable to set ip reservations, so this sounds like my only hope for my octoprint setup..
    your help would be highly appreciated.
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,138
    Likes Received:
    6,997
    Sure. Look here: https://raspberrypi.stackexchange.c...networking-wifi-static-ip-address/74428#74428

    and here: https://raspberrypi.stackexchange.c...do-i-set-up-networking-wifi-static-ip-address

    (although the first one has the details).

    If your router can't assign static you want to make sure that the IP address you choose is well out of the range for normal ones assigned. For example if you normally are assigned DCHP addresses like 192.168.1.xxx where xxx is say in the 020/030/040s then use something above 100 (155 of so). Stay away from ...255 and ...127 and ...1 those are poor choices :)
     
  9. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,806
    Likes Received:
    3,521
    @SuperS, what router do you own? Most times you can instruct your router to lease a single IP address to the printer, and you may even be able to extend the lease beyond 24 hours (the default lease time).
     
  10. SuperS

    SuperS New Member

    Joined:
    Mar 2, 2018
    Messages:
    3
    Likes Received:
    1
    Yessss. I am a noob to linux but this did the trick! Thank you very much. Finally I can leave my printer home alone without being scared :)
     
    mark tomlinson likes this.
  11. SuperS

    SuperS New Member

    Joined:
    Mar 2, 2018
    Messages:
    3
    Likes Received:
    1
    its a tmobile-huawei-e5170. other people owning the same router told me that this is not possible with this router and I couldn't found a setting for that in the router settings.
     
  12. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,806
    Likes Received:
    3,521
    Never mind then.
     
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,138
    Likes Received:
    6,997
    Some ISPs use really (stupid) and restrictive hardware. I actually have a subnet (with some netgear routers) below the ISP router to allow me to handle more complex things than what the ISP router allows and just use theirs as a pass-through :)

    I completely understand it being not configurable. Glad you got it sorted!
     
  14. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    497
    Likes Received:
    332
    That's why I always decline all these "upgrades" from ISPs to all-in one modem/router/younameit boxes, just give me a dumb modem and I'll put my own router of choice behind.
    Unfortunately it becomes harder with time, wouldn't be surprised if when my current cable modem craps out the only offer will be those combo things.
     
    mark tomlinson likes this.
  15. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,806
    Likes Received:
    3,521
    In the US, Broadband ISPs cannot restrict access to ISP supplied modems. So right now I have had my own Cable Modem for several iterations of service, then like both @mark tomlinson and @Kilrah I put my own hardware behind it so I have full control of my internal home network. I understand the lure of having everything come for the ISP, they support it and you don't have to learn anything about how your network is set up. Plus, sometimes they are reluctant to tell you that you can supply your own modem/router.

    In addition, I hate reconfiguring devices as they change on a regular basis, so I can do MAC filtering and assignments and leases. makes the router the central place for all network configuration. All other devices can be set to their defaults (usually DHCP).
     
  16. JeffreyB

    JeffreyB Member

    Joined:
    Mar 25, 2016
    Messages:
    68
    Likes Received:
    29
    It's called a DHCP reservation. Your printer needs to be set to DHCP and you give the router the MAC address of the printer. Then it will serve out the same IP address every time but is still technically using DHCP.

    Jeff
     
    Dan Verdi likes this.

Share This Page