how do i set a static ip address?
hi,
i have a ubuntu 9.10 server on a wlan behind a debian server/router/firewall. i have had dhcp assigning the ip address to the server and then accessing the server through a port forward that has been working okay. i want to assign a static ip address to the server so that i wont have to worry about checking that as i reboot the system and so forth. subsequently on the ubuntu server i have /etc/network/interfaces that looks like this... Quote:
on the debian server/router/firewall i have added... Quote:
then i change the port forward rule to give it the new static ip address:192.168.10.2 after that i am still not able to ping the new server but i can see it using lookup. also, i have observed that the old dhcp address is still leased to oznola after all the above. am i leaving something out? please advise. ps. the /etc/network/interfaces on the debian server/router/firewall looks like this... Code:
iface eth1 inet static |
Hi, I generally set my static ip's directly to the ifcfg file for the device.
/etc/sysconfig/network-scripts/ifcfg-eth0... Code:
DEVICE=eth0 But I've been using the same rsync script for a few years now, and the only changes are when I switch ISP's (Internet service providers)Namely, DNS1 and 2, Gateway and Domain. /etc/sysconfig/network Code:
HOSTNAME=GamesBox.GlennsPref.net A web-page I have found usefull... http://www.linuxhomenetworking.com/ Regards Glenn |
If this were the desktop version I'd suspect Network Manager had a hand in the odd behaviour. However, you've pointed out that it's the server version - so I don't *think* it would be an issue.......
Checking the basics here, on the Ubuntu server what is the output of: Quote:
|
Quote:
It has these similar offerings: Quote:
Also check to make sure the box is not running a DHCP server itself that is tied to eth0. Look for this file: '/etc/default/dhcp3-server' |
I began to think as much, But for as fedora sys, it may have been true.
Thank you for your efforts. Glenn |
hi,
i have the ubuntu desktop installed on the ubuntu server. network manager is present on the machine. here is the output of ifconfig -a... Code:
af@oznola:~$ ifconfig -a here is the contents of /etc/default... Code:
af@oznola:/etc/default$ ls -alh |
my bad!
here is the contents of /etc/network/if-up.d/...
Code:
af@oznola:/etc/network/if-up.d$ ls -alh |
wpa-supplicant is used for 802.11 wireless networking.
try without it, unless you're sure you need it to connect to the internet. regards Glenn |
Quote:
With regards to the original issue - I suspect the trouble is being caused by Network Manager. It used to have a habit of 'helpfully' overwriting /etc/network/interfaces (and resolv.conf for that matter) each time you restarted networking. I guess it still does something retarded like that. A quick look at Google reveals a couple of suggestions (one is to remove Network Manager - but that may be overkill, you should be able to set a static IP with it). Take a look at these and see if they help: http://ubuntuforums.org/showthread.php?t=1309835 http://ubuntuforums.org/showthread.php?t=1304848 |
True, I also disable resolv.conf most of the time.
Because my usb-modem offers 10.11.12.13/14 as dns servers, but linux never could connect. strange, I guess it's linux VS window$ configs. Cheers, Glenn |
okay!
hi,
i have ~used~ the network manager to setup the static ip address and now it seems to be working okay. http://alonzofretwell.com:1234 with the port forward rule set to 192.168.10.2. however, the lan is still showing that oznola has the dhcp lease on 192.168.10.53. it is set to expire tonight at midnight thirty-five or about 24 hours after i started to change things last night. so do i just wait for that lease to expire? obviously it should eventually be freed for the purpose of dhcp. i know this is out of scope of the thread. :) thank you for all your help.:hattip: |
All times are GMT -5. The time now is 06:26 PM. |