LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2008, 08:38 PM   #1
SaraiKhan
LQ Newbie
 
Registered: Nov 2008
Posts: 28

Rep: Reputation: 15
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.
 
Old 12-04-2008, 11:35 PM   #2
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

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

Last edited by hasanatizaz; 12-05-2008 at 12:03 AM.
 
Old 12-05-2008, 05:19 AM   #3
SaraiKhan
LQ Newbie
 
Registered: Nov 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by geniushasan View Post
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
 
Old 12-05-2008, 07:37 AM   #4
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
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

Last edited by hasanatizaz; 12-05-2008 at 07:41 AM.
 
Old 12-05-2008, 09:34 AM   #5
SaraiKhan
LQ Newbie
 
Registered: Nov 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by geniushasan View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
Routes Obie Linux - Networking 16 04-28-2005 10:15 PM
routes himyuza *BSD 6 08-03-2004 10:41 AM
I need some routes |Drakehash| Linux - Newbie 1 06-08-2003 12:22 AM
I need some routes |Drakehash| Linux - Networking 1 06-07-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration