LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Adding a gateway (https://www.linuxquestions.org/questions/linux-wireless-networking-41/adding-a-gateway-244418/)

robotik 10-18-2004 09:03 PM

Adding a gateway
 
Hi

i m very new at all this but i have my D-link card up and recognized as ath0, haven t figured out dhcp yet but i can assign an ip + subnet mask manually but i m still getting a 0.0.0.0 for the gateway.
i can reach my wireless router , but not the internet.
how could i add a gateway of 192.168.2.1 to my ath0 wireless device?

thanks

masand 10-18-2004 11:32 PM

hi there

if u using redhat/fedora then run

setup

go to network settings and specify ur gateway there

or u can edit ur
/etc/sysconfig/network-scripts/ifcfg-eth0 script to specify the gateway

i do not have the porper syntax for that now woth me

also check for firewall settings on ur DHCP server

can u ping that machine?

regards

darkleaf 10-19-2004 03:13 AM

Command line:
Code:

route add default gw 0.0.0.0
change the 0.0.0.0 to your router's IP address.

robotik 10-19-2004 07:54 PM

It s weird it s like when i do that route add command it gives the default gateway to a 2nd instance of my wireless card>?!?!? result is the same i can ping and access my router but no internet.

here s how i brought the card "up"

root@darkstar:~# ifconfig ath0 192.168.2.99 netmask 255.255.255.0
root@darkstar:~# route add default gw 192.168.2.1 ath0
root@darkstar:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 ath0

masand 10-19-2004 10:36 PM

Quote:

Originally posted by robotik
It s weird it s like when i do that route add command it gives the default gateway to a 2nd instance of my wireless card>?!?!? result is the same i can ping and access my router but no internet.

here s how i brought the card "up"

root@darkstar:~# ifconfig ath0 192.168.2.99 netmask 255.255.255.0
root@darkstar:~# route add default gw 192.168.2.1 ath0
root@darkstar:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 ath0

hey !!!
what about my suggestions
did u try that out
and what OS are u using??

regards

darkleaf 10-20-2004 03:38 AM

Quote:

Originally posted by robotik
It s weird it s like when i do that route add command it gives the default gateway to a 2nd instance of my wireless card>?!?!? result is the same i can ping and access my router but no internet.

here s how i brought the card "up"

root@darkstar:~# ifconfig ath0 192.168.2.99 netmask 255.255.255.0
root@darkstar:~# route add default gw 192.168.2.1 ath0
root@darkstar:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 ath0

Cause the code was
Code:

route add default gw x.x.x.x
without ath0 behind it.


All times are GMT -5. The time now is 06:37 AM.