[clug-talk] ifconfig

Gustin Johnson gustin at echostar.ca
Mon May 15 16:14:50 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jon wrote:
> Does ifup actually request an IP from the dhcp server?
> 
It depends.  On Debian based distros it will so as long as you have the
interface configured for DHCP in /etc/network/interfaces

ifconfig -a will show a list of available interfaces

ifconfig down will take down an interface.

If you are manually setting an IP, a better tool is ip addr and ip route

So to manually set an ip of 192.168.10.101  with a gateway of
192.168.10.1 I would do the following.

ip addr add 192.168.10.101 dev eth0
ip route add default via 192.168.10.1

For wireless "iwconfig" by itself will list available interfaces and
their wireless capabilities, if any.

For wireless there are two steps.  The first is authenticating to an AP,
the second is the network configuration (usually IP).

So, to answer Kin's original question, the following should do the trick
(wlan0 is assumed to be the wireless interface, change this if neccesary):
iwconfig wlan0 mywlanessid commit
dhclient wlan0

Cheers,
> 
> On Mon May 15 12:14:17 PDT 2006, Mitchell Brown <mbgb14 at gmail.com> 
> wrote:
> 
>> ifdown eth0 ifup eth0
>> 
>> On 5/15/06, Kin Wong <kwong at csa-pdk.com> wrote:
>>> Finally got around to replacing the wireless router that blew up
>>>  and configured it as an access point.  I am just putting the 
>>> documentation together for the group and am stuck in trying to
>>> use Linux commands.
>>> 
>>> I know the command ifconfig is roughly equivalent to ipconfig in 
>>> windoze, however both google and man are not providing adequate 
>>> clarity (and I forgot my trusty book at home).
>>> 
>>> What I need is the equivalent to ipconfig /release and ipconfig 
>>> /renew? I suspect there is a more elegant way to do this that I
>>> am totally missing.
>>> 
>>> Thanks in advance
>>> 
>>> Kin
>>> 
>>> _______________________________________________ clug-talk mailing
>>> list clug-talk at clug.ca 
>>> http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List
>>> Guidelines (http://clug.ca/ml_guidelines.php) **Please remove
>>> these lines when replying
>>> 
>> 
>> 
>> -- pub 1024D/9091C422 02/05/2006 Mitchell Brown <mbgb14 at gmail.com> 
>> Primary key fingerprint:  812B 94BC EA0D 345A CC1C 2ED9 F7F6 5CCF
>> 9091 C422
>> 
>> _______________________________________________ clug-talk mailing
>> list clug-talk at clug.ca 
>> http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List
>> Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these
>> lines when replying
>> 
>> ------------------------------------------------------------------------
>> 
>> 
>> _______________________________________________ clug-talk mailing
>> list clug-talk at clug.ca 
>> http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List
>> Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these
>> lines when replying
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEaQtqwRXgH3rKGfMRAk3pAJ0e3C5XoV2Uj9ojBSMqE7wrsfJI2gCeKxfr
LfobPb/rQWzs+BiMR8ABxjY=
=mjer
-----END PGP SIGNATURE-----



More information about the clug-talk mailing list