Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-02-2006, 08:09 PM   #1
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
What does ifup do to bring up an interface?

Hi there, mostly out of curiosity, I've been playing around with my wireless connection and trying to create a simple program to scan networks and connect to whichever one I choose. This doesn't directly tie in with my question, but when trying to bring up a connection manually, I'm having trouble and I don't think I'm doing everything needed. ifup works seemlessly and gives me a nicely configured wireless interface with the ESSID and such things all set automatically.

So what stages does ifup go through to get to that stage? I'm using Debian which seems to have an executable program for ifup whereas by googling it appears that other distros have a script to do it. This would be handy as I could just have a peek myself. If anyone has an ifup script that would do nicely .

The manpages for ifup make referance to it using ifconfig and route, which makes sense. I have a feeling it is the routing part I am not doing correctly. Also, does it detect that it is configuring a wireless interface and also use iwconfig to set things up?

Does it get the ESSID and access point information via DHCP once it is connected or some other means (perhaps by scanning and picking the first/strongest access point?)

Sorry for the long waffle, I think you should gather the sort of information I'm looking for by now. Any help would be much appreciated.

Thank You, James
Old 07-04-2006, 02:00 AM   #2
Registered: Dec 2004
Posts: 125

Rep: Reputation: 15
Most wireless routers are set to dhcp. Those scritpts you talk about only need to be a few lines just to set the interfaces ip, default gateway, and dns server. If you were on what most default wireless routers give something like this should work

ifconfig eth0
route add default gw
echo nameserver > /etc/resolv.conf

the first line sets eth0s ip ( its set to a high ip as to stay out of the most likely dhcp pool range to avoid conflicts ).
the second line would route all the traffic through the router
the third line sets your dns server.

you dont really need much more then that for a simple connection.


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
Can't bring up eth0 Interface at boot robertmenezes Linux - Networking 8 02-21-2005 02:13 AM
Allow Users to bring ifup and ifdown ? striker7 Mandriva 2 09-08-2004 02:44 AM
pppd: how to bring up an interface? J_Szucs Linux - Networking 2 08-08-2004 09:02 AM
How to bring eth interface up correctly? cold Linux - Networking 2 06-18-2004 03:40 AM
couldn't bring up interface eth0 mikez Linux - Networking 9 02-28-2002 01:02 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:05 AM.

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