Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Wireless Internet > Setting up a static IP on a wireless router

Forgot Password?
 Wireless Internet   Anything related to getting wireless set up in Linux. WLAN, WiFi, etc.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 02-09-2009   #1 (permalink)
Just Joined!
 
Join Date: Feb 2009
Posts: 3
Setting up a static IP on a wireless router

I wasn't sure whether to put this under Ubuntu help, or Networking, or here, so forgive me if this is the wrong forum for this.

I'm running Ubuntu 8.10 and I want to set up a static IP on it. There's apparently a bug in Network Manager that makes it so that I can't use static IPs with Network Manager, so I need a different solution.

I know I need to edit my interfaces file and my /etc/network/interfaces file and my /etc/resolv.conf file, but I can't get it working reliably.

Here is the output of ifconfig:
Code:
$ ifconfig
ath0      Link encap:Ethernet  HWaddr 00:1b:2f:c0:e0:6b  
          inet addr:192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:2fff:fec0:e06b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32970 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30505 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:33515771 (33.5 MB)  TX bytes:4601464 (4.6 MB)

eth0      Link encap:Ethernet  HWaddr 00:1f:c6:67:f8:26  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:252 

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:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:88 (88.0 B)  TX bytes:88 (88.0 B)

wifi0     Link encap:UNSPEC  HWaddr 00-1B-2F-C0-E0-6B-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:103549 errors:0 dropped:0 overruns:0 frame:17127
          TX packets:31334 errors:54 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199 
          RX bytes:44491265 (44.4 MB)  TX bytes:5313034 (5.3 MB)
          Interrupt:16
Can someone help me figure out he proper settings that I should be adding to the files so that I can use static IP on my computer?
Amablue is offline  


Reply With Quote
Old 02-09-2009   #2 (permalink)
Trusted Penguin
 
waterhead's Avatar
 
Join Date: Jul 2004
Location: Franklin, Wisconsin
Posts: 3,957
The best way to accomplish this is to leave the wireless set for DHCP, and set the router to assign a static IP address using DHCP. Since wireless cards are usually in mobile devices, setting a static IP address will make it difficult to connect outside of your home, if not impossible.
__________________
Paul

Please do not PM me with requests for help. I will not reply.
waterhead is offline   Reply With Quote
Old 02-09-2009   #3 (permalink)
Just Joined!
 
Join Date: Feb 2009
Posts: 3
I don't want to change the settings of the router, just my computer. In Windows (which I'm dual booting) I can change the settings in the control panel to use a static IP so I can use things like Bittorrent properly. That's all I really want to do here. This computer is a desktop, I don't intend to use it on other routers or anything.
Amablue is offline   Reply With Quote
Old 02-10-2009   #4 (permalink)
Just Joined!
 
Join Date: Feb 2009
Posts: 3
I think I found part of the problem. NetworkManager was still running, even though nm-applet was disabled. I removed NetworkManager and played with the settings for a while, but I can't get it to work reliably. It will work for a few seconds sometimes after I run sudo /etc/init.d/networking restart, but it craps out shortly after that.

If it helps, here is my /etc/network/interfaces file:

Code:
auto ath0
address 192.168.1.50
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
wireless-essid TheHatch
And my /etc/resolv.conf:

Code:
domain hsd1.ca.comcast.net.
search hsd1.ca.comcast.net.
nameserver 68.87.76.178
nameserver 68.87.78.130
nameserver 68.87.69.146
Edit:
Nevermind!
After resetting the computer it seems to be working reliably now. I wonder what made the difference?
Amablue is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:57 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2