A better option would be to use: ip route add default via 1.2.3.4 Also, I would define the interface with this: ip addr add 192.168.1.101/24 dev wlan0
You might also need to set the interface with: ip link set wlan0 up All of these can be set (including DNS) in /etc/network/interfaces so all you should need to do is "ifup wlan0" and "ifdown wlan0". This will also occur when booting up or shutting down/rebooting. I would also avoid using an IP that is in the range of IPs that your DHCP server issues. From looking at what you posted I am going to guess that your DHCP server is using 192.168.100 through 192.168.1.200. Try setting the IP to something else, like 192.168.1.20 or whatever makes sense to you. 2011/9/17 Meftah Tayeb <[email protected]>: > please try the following: > route add -net 0.0.0.0 netmask 0.0.0.0 gw 1.2.3.4 > while 1.2.3.4 is your Gateway > fidback please ;) > Thank you > > > ----- Original Message ----- > From: mad qwerty > To: [email protected] > Sent: Saturday, September 17, 2011 8:34 PM > Subject: [Voyage-linux] Voyage 0.8.0 - "Route add" command doesn't work > Hi list, > i'm running Voyage MPD into an Asus AMD E-350, using only Wi-Fi WEP > connection with static IP > > /etc/network/interfaces defines only loopback interface > ---------------------------------------------------------------------------------------------- > # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or > # /usr/share/doc/ifupdown/examples for more information. > auto lo > iface lo inet loopback > ---------------------------------------------------------------------------------------------- > > and i define wlan interface, IP , gateway and DNS > running commands on boot with /etc/init.d/bootmisc.sh > ---------------------------------------------------------------------------------------------- > iwconfig wlan0 essid Alice-3xxxxxxx7 key s:1xxxxxxxmho rate auto mode > managed > ifconfig wlan0 192.168.1.101 netmask 255.255.255.0 up > route add default gw 192.168.0.1 wlan0 > cp /my_resolv.conf /etc/resolv.conf > ---------------------------------------------------------------------------------------------- > (my_resolv.conf was copied from /etc/resolv.conf when using DHCP services) > > with 0.7.5 release this is perfectly working, > in 0.8.0 "route add" is not working, > both into bootmisc.sh nor by manual typing in console > ---------------------------------------------------------------------------------------------- > root@voyage:~# route add default gw 192.168.0.1 wlan0 > SIOCADDRT: No such process > ---------------------------------------------------------------------------------------------- > > i'm not able to obtain this "route -n" output > ---------------------------------------------------------------------------------------------- > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > wlan0 > 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 > wlan0 > ---------------------------------------------------------------------------------------------- > > but only this > ---------------------------------------------------------------------------------------------- > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > wlan0 > ---------------------------------------------------------------------------------------------- > > so no ping, traceroute or Web Streaming is possibile :-( > > any idea? > thanks and regards > Marco > > ________________________________ > > _______________________________________________ > Voyage-linux mailing list > [email protected] > http://list.voyage.hk/mailman/listinfo/voyage-linux > > > > __________ Information provenant d'ESET NOD32 Antivirus, version de la base > des signatures de virus 6472 (20110917) __________ > > Le message a iti virifii par ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information provenant d'ESET NOD32 Antivirus, version de la base > des signatures de virus 6472 (20110917) __________ > > Le message a été vérifié par ESET NOD32 Antivirus. > > http://www.eset.com > > _______________________________________________ > Voyage-linux mailing list > [email protected] > http://list.voyage.hk/mailman/listinfo/voyage-linux > > _______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
