Results 1 to 10 of 10

Thread: keeping the same internal IP address

  1. #1
    Join Date
    Jul 2012
    Location
    Elmira, NY
    Beans
    283
    Distro
    Ubuntu 14.04 Trusty Tahr

    keeping the same internal IP address

    I was running a server and noticed that every time I reboot, I have to reset all my port forwards in the router to adjust to my new internal IP address each time I reboot my PC, making it a hassle.

    Is there a way to keep or maintain the same internal IP address for a specific computer on a network regardless of reboots, etc.?

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: keeping the same internal IP address

    if your router has the option to assign fixed ip to a given mac address, use that - it should be somewhere in dhcp options. If that's not the case, you always have an option to disable dhcp autoconfiguration and set ip by hand.
    Last edited by Vaphell; October 1st, 2012 at 01:44 AM.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  3. #3
    Join Date
    Jan 2010
    Location
    TN USA
    Beans
    398
    Distro
    Xubuntu

    Re: keeping the same internal IP address

    I am on 10.04 so YMMV, but right clicking on the network icon in the top bar allows you to edit connections. There you can edit the IPv4 settings to set a manual IP address and DNS

  4. #4
    kjohri is offline Gee! These Aren't Roasted!
    Join Date
    Dec 2008
    Location
    Ghaziabad, India
    Beans
    133

    Re: keeping the same internal IP address

    Instead of DHCP, you can use static IP address set manually. Just click the networking applet icon, edit connections and in the IPV4 settings, change Method to Manual. Enter the address, netmask and gateway.

  5. #5
    Join Date
    Jul 2012
    Location
    Elmira, NY
    Beans
    283
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: keeping the same internal IP address

    I just recently got a new router and not sure of how to navigate through it to find the dhcp settings. IT is a Netgear using Geany wnr2000v3

    I don't see an option for DHCP

    I do see an option for internal ip addres to either get dynamically from ISP or use static IP address. But none of the options allow a mac address

    EDIT:
    what is the ip address, ip subnet mask, and gateway ip address differences in:

    Code:
    metulburr@ubuntu:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr aa:00:04:00:0a:04  
              inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a800:4ff:fe00:a04/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:20111 errors:0 dropped:0 overruns:0 frame:0
              TX packets:17243 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:16878537 (16.8 MB)  TX bytes:3114815 (3.1 MB)
              Interrupt:53 Base address:0xa000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:903 errors:0 dropped:0 overruns:0 frame:0
              TX packets:903 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:88976 (88.9 KB)  TX bytes:88976 (88.9 KB)
    
    metulburr@ubuntu:~$
    the default ip's on the router settings show the public ip address, a subnet mask ip, and a number i have never seen before in the gateway
    Last edited by micahpage; October 1st, 2012 at 02:10 AM.

  6. #6
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: keeping the same internal IP address

    http://screenshots.portforward.com/N...eservation.htm

    i'd check this options page, if i were to guess, i'd say it can be used to make the router assign fixed ip to devices that match the criteria.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  7. #7
    Join Date
    Jul 2012
    Location
    Elmira, NY
    Beans
    283
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: keeping the same internal IP address

    that is what my old netgear software (v2) looked like, but this new software for it, looks totally different (v3). I looked through each section possible and couldn't find a page that looked like that or somewhat looked like that.

  8. #8
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: keeping the same internal IP address

    Most newer routers let you set a fixed it there. But be sure if configuring from PC that you do not select a address that is inside the default DHCP range.

    Also do not mix gui methods and command line file edits as they conflict.

    Most of us use the gui to set a fixed IP. But if you have a server without gui then you have to edit files or manually set each reboot.

    Changing IP Addresses and Routes at command line:
    http://linux-ip.net/html/basic-changing.html

    Last option is to configure the more old-school way. You edit /etc/network/interfaces to look a bit like this (making sure you avoid addresses that the DHCP server might lease to other PCs but still using addresses in the same network number):
    Quote:
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.1.20
    netmask 255.255.255.0
    gateway 192.168.1.1
    and edit /etc/resolv.conf to have an entry for your name server like this:
    Quote:
    nameserver 192.168.1.1

    route -n
    Example: 192.168.1.1 UG
    U indicates if its up and G tells you its your gateway!

    fred@fred-Precise:~$ ifconfig
    eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX
    inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::224:1dff:fe20:e2a6/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:101947 errors:0 dropped:0 overruns:0 frame:0
    TX packets:66928 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:128108111 (128.1 MB) TX bytes:8822777 (8.8 MB)
    Interrupt:45

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:6956 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6956 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:705838 (705.8 KB) TX bytes:705838 (705.8 KB)

    fred@fred-Precise:~$ route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
    169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
    192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #9
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: keeping the same internal IP address

    The two main methods I'm aware of for setting a fixed address have been mentioned. On my newest modem/router (not a NetGear), the relevant option is found under "Home Network", and requires clicking on the entry relevant for the machine you are interested in, then clicking on "Configure."
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  10. #10
    Join Date
    Apr 2012
    Beans
    7,256

    Re: keeping the same internal IP address

    on my Netgear WNDR3800 the procedure via the routerlogin.net web interface is this:

    1. select the ADVANCED tab

    2. select Setup --> LAN Setup

    3. static IPs can be set via the Address Reservation section at the bottom

    This is the same page you would need to go to to make sure any client-side static address you set is outside the DHCP range

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •