LinHES Forums
http://forum.linhes.org/

madwifi + static IP
http://forum.linhes.org/viewtopic.php?f=14&t=7266
Page 1 of 1

Author:  jayb282 [ Wed Dec 07, 2005 8:02 pm ]
Post subject:  madwifi + static IP

(knoppmyth R5A22).

I've been running the madwifi drivers on a DLINK G520 for almost a year without out any significant problems.

Only one remaining annoyance...

I cannot assign a static IP.... it always runs to the DHCP server and gets one there. This is a small problem because every so often when the DHCP lease expires the myth box will end up with a different address.... which makes using mythweb a pain.

(unfortunately my Belkin wifi router doesn't support setting fixed MAC<->IP mappings).

If you've been able to give yourself a static IP with madwifi, could you please post your config file?

thx! j

Author:  elgordo123 [ Thu Dec 08, 2005 11:48 am ]
Post subject: 

When I was using it (and if I remember right) I created a bash script called ath0. Saved it in /etc/init.d and then chmod a+x ath0. Then make a symlink to that in /etc/rc5.d ln -s /etc/init.d/ath0 /etc/rc5.d/S25ath0 (or similar - someone may need to clarify where to put it) so it starts the network. But if you know how the config setup works then you can use that.
This is my ath0 script from my laptop that uses madwifi:

iwconfig ath0 essid linksys (your essid)
ifconfig ath0 192.168.0.5 netmask 255.255.255.0 (your ip and netmask)
route add default gw 192.168.0.254 (your router's ip)
ifconfig ath0 up
echo "nameserver 4.2.2.2" > /etc/resolv.conf (your dns server's IP)

To test before you do this, do Alt-X and type each command (as root).

Author:  aovermy [ Sat Dec 10, 2005 1:59 am ]
Post subject: 

On debian, you have the handy /etc/network/interfaces file. Here's mine:

Code:
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo eth0 ath0
iface lo inet loopback


iface eth0 inet static
address 192.168.4.10
netmask 255.255.255.0

iface ath0 inet dhcp
wireless_key 6e6f746d797265616c6b65792e
wireless_mode managed
wireless_essid "default"


So I went with dhcp for my ath0, but you could choose static by simply changing the iface statement to say static and providing a minimum of address and netmask (broadcast, network, and gateway are some other options). man interfaces gives a whole lot of information.

And before anyone recoils in horror about revealing my wep key... it spells out notmyrealkey. :wink: [/code]

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/