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

static IP when you can't easily modify the router

Discussion in 'Mods and Upgrades' started by supercazzola, Feb 8, 2018.

  1. supercazzola

    supercazzola Active Member

    Joined:
    Jun 1, 2017
    Messages:
    399
    Likes Received:
    106
    Has anyone ever wanted the network on the Pi to have a static wireless IP when you can't just tell the router to reserve the IP for it?

    I have a P.o.S. ARRIS router from my ISP that freezes up every time when I try to get the list of IPs on the DHCP client list. That same tab is where I could assign the reserved DHCP addresses. I do, however have DHCP only from 192.168.1.100 - 192.168.1.199, so I wanted to get into the R2's Rasp Pi and tell it to use .200, for example.

    looking online at the raspbian help, I stumbled upon this jewel:
    https://raspberrypi.stackexchange.c...networking-wifi-static-ip-address/74428#74428

    If the forum moderators feel this is helpful, maybe it could get added to the proper R2 mods section?

    There are two methods described on that page. I used the dhcpcd method

    Basically, you modify the /etc/dhcpcd.conf file:

    Code:
           interface wlan0
           static ip_address=192.168.1.200/24
           static routers=192.168.1.1
           static domain_name_servers=192.168.1.1
    Note: your desired static IP may be different, as may your router's.
     
    mark tomlinson likes this.
  2. Geof

    Geof Volunteer Moderator
    Staff Member

    Joined:
    Nov 9, 2015
    Messages:
    6,729
    Likes Received:
    2,330
    Very good info! Thanks. I'll leave it for @WheresWaldo to decide to move or not as that is his thread.
     
    supercazzola likes this.
  3. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Moved and added to the Mod sticky.
     
    supercazzola and Geof like this.

Share This Page