1. Yes, it's a whole new look! Have questions or need help? Please post your question in the New Forum Questions thread Click the X to the right to dismiss this notice
    Dismiss Notice
  2. Seeing tons of unread posts after the upgrade? See this thread for help. Click the X to the right to dismiss this notice
    Dismiss Notice

Network question

Discussion in 'Community Broadband & Computers' started by Mike-and-Kim, Aug 3, 2010.

  1. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    I have a small python server running on my mac mini, that serves a web page for remote control of the lighting, alarm, stereo etc.

    Router goes to ethernet switch to mac mini.

    The IP address changes sometimes and I don't know how to fix this. I tried using the option "using DHCP with manual address" and typed in the address I wanted it to be. This worked for a day, then I cannot access the internet so put it back to "using DHCP". I can still access the web page however.

    Does anyone know how to set this up so the ip address of the mac mini does not change? Any help appreciated, I really don't know what I'm doing...

    Thanks, Mike
     
  2. flynnibus

    flynnibus Well-Known Member Forum Staff

    Joined:
    Oct 29, 2002
    Messages:
    5,358
    Likes Received:
    250
    I'm assuming the router is doing NAT so you have private IPs on the mac mini? (like 10.x or 192.168.x) right?

    It's odd because your mini should renew it's lease and there is no reason for the router to not allow it to renew using the same IP. It really should only change if

    a) the router rejects its renewal
    or
    b) the mini can't reach the router to renew, gives up and starts over

    What kind of router is it?

    The simple solution is to use a static IP outside of the DHCP scope. For instance, if your router uses the private subnet of 192.168.1.1-192.168.1.254 , see if your router has the ability to define the DHCP pool size. If so, limit it so the upper end of the subnet is not covered by DHCP, and then just assign your mini an IP from a IP in the subnet, that is not covered by DHCP.

    For instance, set the router to give up IPs from 192.168.1.100-192.168.1.254 and assign your mini an IP under 100, like 192.168.1.50

    When you setup the mini with a static IP, ensure the gateway, subnet, and DNS server are configured. for what settings to use, just look at the IP status of one of your machines getting their config from DHCP
     
  3. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    Router is a Linksys BEFW1154 Wireless B.

    The IP address on the mini is 192.168x

    I have no idea how to do what you are talking about but I can try reading up and playing around with the router.

    Thanks for the help!

    Mike
     
  4. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    OK, managed to reset the router and get it running again, since I did not know the password anymore (this thing is ancient).

    Here is what it ended up looking like on the setup tab:

    Local DHCP Server: Enable
    Start IP Address: 192.168.1.xy
    Number of Address: 100
    DHCP Address Range: 192.168.1.100 ~ 149

    I changed the start address on the router to xy, which is what the mac mini hits. However internet only works with DHCP, I can't get it to work with "using DHCP with manual address".
     
  5. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    Maybe the clue is in what you said "When you setup the mini with a static IP, ensure the gateway, subnet, and DNS server are configured. for what settings to use, just look at the IP status of one of your machines getting their config from DHCP" which only shows up under the "manual" option as opposed to the other thing I mentioned. I'll keep banging my head on this...
     
  6. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    Yep, putting all that stuff under "manual" worked! Thanks for the help, this would have taken me a long time on my own.

    Mike
     
  7. flynnibus

    flynnibus Well-Known Member Forum Staff

    Joined:
    Oct 29, 2002
    Messages:
    5,358
    Likes Received:
    250
    You want the Internet side of the box set to DHCP.. this is so it gets it's configuration from the ISP... but the 'lan' side of the box is where you would be configuring the DHCP settings like the address range you listed above.

    The PC (the mini) is what you configure to static/manual and configure the IP address, subnet (255.255.255.0), gateway (192.168.1.1 I believe is going to be your router's private IP) and DNS (could be the router's IP or another). Just looking at a PC that got it's config from the router as DHCP will show you all the correct settings to use. In your example, since the router is giving out 100-149 you can use any IP with the last octet being a number outside that range except .1 or .255.
     
  8. Mike-and-Kim

    Mike-and-Kim Member

    Joined:
    Feb 22, 2009
    Messages:
    584
    Likes Received:
    19
    Thanks! I think that is how I ended up with it setup, has worked thus far (one whole day).

    I.e. DHCP on the router, and "manual" on the mini with an IP picked outside that range. Really appreciate the help.

    Mike
     
  9. iamironman

    iamironman hoa member

    Joined:
    May 12, 2009
    Messages:
    27
    Likes Received:
    1

    cant use dhcp on a web server. need a permanent ip address.
     
  10. Mr. Linux

    Mr. Linux Senior Member & Moderator Forum Staff

    Joined:
    Jul 26, 2001
    Messages:
    3,277
    Likes Received:
    69
    No you don't. If that were true, we would be out of IP addresses years ago...
     
  11. iamironman

    iamironman hoa member

    Joined:
    May 12, 2009
    Messages:
    27
    Likes Received:
    1
    what about if it's accessed from the Internet? your entry DNS keeps changing...
     
  12. flynnibus

    flynnibus Well-Known Member Forum Staff

    Joined:
    Oct 29, 2002
    Messages:
    5,358
    Likes Received:
    250
    DHCP leases...
    Dyanmic DNS...
     
  13. iamironman

    iamironman hoa member

    Joined:
    May 12, 2009
    Messages:
    27
    Likes Received:
    1
    thanks! learned something about networking today...
     

Share This Page