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
Bookmarks