LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2008, 02:16 PM   #1
DeeCodeUh
LQ Newbie
 
Registered: Jan 2008
Distribution: Arch
Posts: 16

Rep: Reputation: 0
Question Quick question about wireless gateways


To connect to a wireless network I type in the command line:
1. iwlist wlan0 scan (Wich finds a wireless network)
2. iwconfig wlan0 essid NETGEAR
3. route add default gateway 192.168.0.1 wlan0

About that last statement, is there some way that I can replace 192.168.0.1 with something so that it automatically detects the gateway. (I'm not always going to be on a wireless network where I know what the gateway is.)
 
Old 04-17-2008, 06:03 PM   #2
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Which Distro?

Would you post a little bit about the distro and version?
 
Old 04-17-2008, 08:24 PM   #3
DeeCodeUh
LQ Newbie
 
Registered: Jan 2008
Distribution: Arch
Posts: 16

Original Poster
Rep: Reputation: 0
Sure...I thought the commands for linux were universal...

My Distro: Arch Linux
Version: Uh, I just did a complete system update so I have the latest of everything.
 
Old 04-18-2008, 06:36 AM   #4
marquardl
Member
 
Registered: Apr 2008
Posts: 100

Rep: Reputation: 15
mango-gw (see man route)

Code:
route add default gw mango-gw
    adds  a default route (which will be used if no other route matches).  All packets using this route will be gate-
    wayed through "mango-gw". The device which will actually be used for that route  depends  on  how  we  can  reach
    "mango-gw" - the static route to "mango-gw" will have to be set up before.
You can substitute a name for the gateway, but that one has to be set up as well.

I would rather write a shell script for all those commands and replacing the gateway IP with the first input parameter, even if it's only that "mango-gw" name.

If the gateway router has an internal web serving applications, then you could iterate through the entire subnet and check/scrape for any web output to find out which IP has the gateway. Needs a shell script. Gateways are often among the first or last entries in the range.

GWN

Last edited by marquardl; 05-01-2008 at 04:53 AM.
 
Old 04-18-2008, 11:04 AM   #5
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Network Managers

Quote:
Originally Posted by DeeCodeUh View Post
Sure...I thought the commands for linux were universal...

My Distro: Arch Linux
Version: Uh, I just did a complete system update so I have the latest of everything.
Different distros handle network management slightly differently. That's why I asked.
 
  


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
A quick wireless question Jorophose General 5 06-04-2007 07:56 AM
Quick (i hope) wireless question: ultimatenoob Linux - Newbie 3 01-09-2006 09:14 PM
quick question - wireless cards greenmuzz Linux - Wireless Networking 1 09-20-2005 10:01 AM
quick wireless networking question PorFavor Linux - Wireless Networking 2 09-17-2005 09:51 PM
Slackware peeps: Quick wireless question Wiggy Linux - Wireless Networking 4 04-14-2004 05:54 AM


All times are GMT -5. The time now is 03:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration