LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-16-2005, 12:14 AM   #1
scott4957
LQ Newbie
 
Registered: Oct 2005
Posts: 24

Rep: Reputation: 15
Static Network settings


Forgive the newbie questions, but i have to compare it to windows.

How do i set up a static ip address and other settings that go along with it on my wireless adapter in the linux shell?

I am going to enable MAC filtering and static ip's on my wireless router, but i do not know how to set up my Mandrake box for the static settings like i did on my windows boxes. I suppose i need to set the ipaddress, subnet mask, the default gateway, and the dns server "not all are necessary for my network" I would like to do it all at the shell, i was told that was the best way to learn it. Then possibly i can write a shell script that would load all these settings rather then have them saved in the config file for my adapter because I use it at work as well. Thanks in advance for any help.

RS
 
Old 11-16-2005, 01:10 AM   #2
SaxyWeed
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
The commands you are looking for are ifconfig and route (see man pages) for setting the ip address and the default route. But there is an easier way to do this. Distros already have all teh scripts in place for this. You just need to edit the configuration files:

/etc/sysconfig/networking/devices/ifcfg-wlan0 - (where wlan0 is your interface) - on Fedora this has ip and gateway configuration. I'm not sure about mandrake

/etc/resolv.conf - this holds the DNS server info.

-Matt
 
Old 11-16-2005, 10:58 AM   #3
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
I don't have wireless, and haven't played with it on linux. That said, you should also investigate "iwconfig".

Example lines:
# Show ipaddress, netmask, etc
ifconfig
# Show gateway, other routes
route
# activate the first ethernet card(eth0) and assign it an address
# (note that the syntax is not too strict with ifconfig. Things can be placed in different orders)
ifconfig eth0 up 192.168.0.2
# set a default gateway (after changing your ip address)
route add default gw 192.168.0.1
# line in resolv.conf to set a nameserver
# (good idea to do this first. You're box may not see a chage until you take the card down and back up again)
# Note that many, but not all, routers will handle dns for you.
nameserver 192.168.0.1

Again, it usually is best to set these in the config files. (I don't remeber which one off the top of my head)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to config. network settings for having a static ip with a router kkeith Linux - Newbie 2 10-19-2005 06:00 AM
Network Changes from Static to DHCP RemusX2 Linux - Networking 5 06-15-2005 02:15 PM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 01:01 PM
Static IP settings carlosinfl Linux - Networking 4 07-01-2004 07:29 AM
vnc and static settings... pablovschby Linux - Networking 15 12-07-2003 04:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 03:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration