LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Messed up my routes (https://www.linuxquestions.org/questions/linux-networking-3/messed-up-my-routes-688421/)

SaraiKhan 12-04-2008 08:38 PM

Messed up my routes
 
Hello, I installed ubuntu and chose not to configure the network at that time, however, I did not realized that this option meant I did not had any routes added in the routing table.
My machine has a wireless card designated as eth1 and a LAN card designated as eth0. I went over the man pages of the route command and tried my best at it. I added this :

route add default gw 192.168.8.1 metric 100 dev eth1
since I want to use the machine to connect via airwaves.
However ... it does not work, this routing table still wont allow me to connect to my gateway at all. Any idea of what im doing wrong? I do not want to erase my whole system over this issue.

hasanatizaz 12-04-2008 11:35 PM

your router ip is 192.168.8.1 ?????
post the output of netstat -nr and ifconfig -a

SaraiKhan 12-05-2008 05:19 AM

Quote:

Originally Posted by geniushasan (Post 3365092)
your router ip is 192.168.8.1 ?????
post the output of netstat -nr and ifconfig -a

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface


eth0 Link encap:Ethernet HWaddr 00:1b:38:2b:19:62
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:18

eth1 Link encap:Ethernet HWaddr 00:1c:26:5c:88:22
inet6 addr: fe80::21c:26ff:fe5c:8822/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:20
TX packets:0 errors:6 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9824 (9.8 KB) TX bytes:9824 (9.8 KB)

pan0 Link encap:Ethernet HWaddr 82:fb:8b:64:f1:92
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

The eth1 is the wireless device which will be primarly used. The gateway is 192.168.8.1, yes, the router ip.
As you can see, no ruting table :(

hasanatizaz 12-05-2008 07:37 AM

set ip like this
ifconfig eth1 192.168.8.2 netmask 255.255.255.0 up

then add a gateway

route add -net default gw 192.168.8.1 dev eth1

go to /etc/resolv.conf
nameserver 192.168.8.1

SaraiKhan 12-05-2008 09:34 AM

Quote:

Originally Posted by geniushasan (Post 3365395)
set ip like this
ifconfig eth1 192.168.8.2 netmask 255.255.255.0 up

then add a gateway

route add -net default gw 192.168.8.1 dev eth1

go to /etc/resolv.conf
nameserver 192.168.8.1

Thanks, it worked.


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