Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Ubuntu Server Static Networking

  1. #1
    Join Date
    Jun 2010
    Location
    /home/TX
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Ubuntu Server Static Networking

    To the Ubuntu Forums Community,

    I'm using an Ubuntu server 10.04 that I set up on an external 2TB USB harddrive. I'm trying to get a static ip on it because I don't have to keep physically going to the computer to find the IP address so i can SSH and configure apache, mediawiki, and all the other cool stuff Ubuntu can do. I can't (aka really don't want to) use an Ethernet b/c its kinda far, but I don't think thats the problem - wifi vs. ethernet. It's connected to a laptop, so it has wifi built-in. I set up some static IP stuff in /etc/network/interfaces as posted here:

    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # eth1 with dhcp
    auto eth1
    iface eth1 inet dhcp
    
    # eth1 with static IP
    #auto eth1
    #iface eth1 inet static
    #    address 192.168.2.106
    #    netmask 255.255.255.0
    #    network 192.168.2.0
    #    broadcast 192.168.2.255
    #    gateway 192.168.2.200
    
    # wlan0 base (don't comment out the line below)
    auto wlan0
    # wlan0 with DHCP
    #iface wlan0 inet dhcp
    # wlan0 with static IP
    iface wlan0 inet static
        address 192.168.2.101
        netmask 255.255.0.0
        network 192.168.2.0
        broadcast 192.168.2.255
        gateway 192.168.2.200
    wireless-essid *removed*
    wireless-key *removed*
    wireless-mode managed
    Where "*removed*" means that I have taken the text out of this post for security. At the top, I WAS going to do static ethernet, but I decided I wasn't really going to use and and set it back to DHCP (that what the commented part is).

    My laptop (and all other computers, actually) are on DHCP and for some reason switch between 192.168.2.* and 192.168.1.* because some configuration is messed up in my router (I can't fix it; no permissions). Now, I'm pretty noobish when it comes to networking, so I was hoping that you guys here in the forums can help. I have a samba and apache server on the server and want full-time access to it without ssh-ing and changing the ip to the 192.168.1 or 192.168.2 networks every time my laptop switches networks, respectively. I can't access the server with my laptop when they're on different "networks". Can you please help? Post if you need clarification or something.

    Thanks in advance.

    Sincerely,
    kroq-gar78
    "The secret to creativity is knowing how to hide your sources." -Albert Einstein

    Ubuntu User #32977; Linux User #528876

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu Server Static Networking

    Before getting into details, What is your router brand and model?

    The easiest way to set up an static IP for a machine in a LAN is to set it up on the router. Either using reservation or the static range. This way you don't need to modify anything in your computer.

    Regards.

    BTW, not all routers supports that.

  3. #3
    Join Date
    Jun 2010
    Location
    /home/TX
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server Static Networking

    Its a Verizon one, but I can't do anything with it; I don't have permissions to modify it (aka no password). I really want to use WiFi ot do the static IP. Whenever my laptop goes to a different "network", I can't see the server anymore, so would broadcast or network have something to do with that?
    Last edited by kroq-gar78; June 15th, 2011 at 05:56 AM.
    "The secret to creativity is knowing how to hide your sources." -Albert Einstein

    Ubuntu User #32977; Linux User #528876

  4. #4
    Join Date
    Dec 2005
    Location
    Tucson, AZ
    Beans
    1,365

    Re: Ubuntu Server Static Networking

    So Verizon locks you out of the router, that is no fun.

    What do you mean you mean by you mean by when you leave your network you can't see your server anymore? Do you mean when you leave home you have no access?

  5. #5
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu Server Static Networking

    According to the Verizon/FIOS support forums, their routers can be reset and after that it is the usual suspects:

    Upon reset, the user account will be "admin" and the password will be one of:

    password
    password1
    the router's serial number (upper case)

    You should change the password immediately upon login as there are several known security exploits associated with routers that use the default passwords.

  6. #6
    Join Date
    Jun 2010
    Location
    /home/TX
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server Static Networking

    Nonononono, I don't think you understand what I mean. I don't manage my home network, and that person who does is currently away (and probably won't bother to do the static thing anyway); he won't give me the password/credentials required to loginto the router.
    "The secret to creativity is knowing how to hide your sources." -Albert Einstein

    Ubuntu User #32977; Linux User #528876

  7. #7
    Join Date
    Jun 2010
    Location
    /home/TX
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server Static Networking

    Quote Originally Posted by crispy_420 View Post
    So Verizon locks you out of the router, that is no fun.

    What do you mean you mean by you mean by when you leave your network you can't see your server anymore? Do you mean when you leave home you have no access?
    yeah sorry, I'm not too good at explaining this.... When I say "network", I mean the 3rd byte in the IP address. So, when I switch from 192.168.2.* to 192.168.1.*, I call it "switching networks". I know, bad terminology, but I don't know what to call it otherwise

    When my laptop (as in non-server) tries to log into the server when my toshiba (non-server) is on 192.168.1 and my server is on 192.168.2, I can't log in, and vice versa.
    "The secret to creativity is knowing how to hide your sources." -Albert Einstein

    Ubuntu User #32977; Linux User #528876

  8. #8
    Join Date
    Dec 2005
    Location
    Tucson, AZ
    Beans
    1,365

    Re: Ubuntu Server Static Networking

    What is you subnet? Most home setups are 255.255.255.0 so it would be impossible that 192.168.1.X and 192.168.2.X could ever connect anyway.

  9. #9
    Join Date
    Jun 2010
    Location
    /home/TX
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server Static Networking

    oh, this I did not know...

    Regardless - If by subnet you mean the subnet in my server's /etc/network/interfaces file, it's 255.255.0.0
    "The secret to creativity is knowing how to hide your sources." -Albert Einstein

    Ubuntu User #32977; Linux User #528876

  10. #10
    Join Date
    May 2008
    Location
    Berks, UK
    Beans
    1,387

    Re: Ubuntu Server Static Networking

    I think you need to make sure the netmasks are uniform for your local network at 255.255.0.0 rather than 255.255.255.0, then, if there are still problems it would be something in the routing.
    However, getting the detail using DHCP may well set netmask to 255.255.255.0 automatically, as that is what it would expect as default setting.
    Derek

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •