i am trying to set static ip for my ubuntu desktop using wireless card.

2 days ago i edit "/etc/network/interfaces" and added stuffs like:

auto wlan0
iface wlan0 inet static
     address 192.168.1.11
     netmask 255.255.255.0
     network 192.168.1.0
     broadcast 192.168.1.255
     gateway 192.168.1.1

then

/etc/init.d/networking restart

then ip was changed to 192.168.1.11 and i was happy.....

yesterday my ubuntu desktop network was completely down (wireless networks not managed) .. after some googling, i did managed to fix the problem that i could see the static ip and everything correctly. however,, INTERNET IS STILL NOT AVAILABLE.

i kinda ran out of idea so i did

dhclient

to get another ip from dhcp then everything is fine.

my question is.. how do i set a static ip? did i do anything wrong?
it seems like simply editing /etc/network/interfaces and restart /etc/init.d/networking isn't the right way.

thanks

I usually edit /etc/network/interfaces then ifdown eth0; ifup eth0 . I'm not at a console so i'm leery of messing around with the network settings. Let me know if that doesn't work for you.

i believe that would work for the wired network. i am using wireless network for this box. simply editing /etc/network/interfaces and restart the network doesn't help in my case. i can only use dhcp now... = (

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.