LinuxQuestions.org
Register a domain and help support LQ
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 01-30-2011, 09:03 PM   #1
rookie7799
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
Unable to ping where using ip rules


Hello all,

I have the following routes:

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.1.96 * 255.255.255.240 U 0 0 0 eth1
10.1.0.0 * 255.255.255.0 U 0 0 0 eth0

The following rules:
ip rule show
0: from all lookup 255
32764: from 10.0.1.109 lookup admin
32765: from all to 10.0.1.109 lookup admin
32766: from all lookup main
32767: from all lookup default

and the following table:
ip route list table admin
10.0.1.96/28 dev eth1 scope link src 10.0.1.109
default via 10.0.1.110 dev eth1

when I do:
ping yahoo.com
ping: unknown host yahoo.com


However if I add the following default gw:
route add default gw 10.0.1.110 dev eth1

So that the route looks like this:
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.1.96 * 255.255.255.240 U 0 0 0 eth1
10.1.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.1.110 0.0.0.0 UG 0 0 0 eth1

PING:
ping yahoo.com
PING yahoo.com (98.137.149.56) 56(84) bytes of data.
64 bytes from ir1.fp.vip.sp2.yahoo.com (98.137.149.56): icmp_seq=1 ttl=50 time=95.5 ms


Makes no sense to me
Anyone has any suggestions - i'm pretty sure i'm just missing something minor as always - just can't see it

Thank you!
 
Old 01-31-2011, 10:34 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
When there is no default gateway entered, how should the target be reached? So the setup with the gateway is working as it should, or I got your question in the wrong way.
 
Old 01-31-2011, 10:51 AM   #3
rookie7799
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I think you r right, but from my understanding of IP RULEs and different tables I sort of thought that the following:
ip route list table admin
10.0.1.96/28 dev eth1 scope link src 10.0.1.109
default via 10.0.1.110 dev eth1

would allow eth1 to use 10.0.1.110 as its default gateway

The reason i'm doing all of this is because i'm actually trying to use two connections simultaneously, which requires two default gateways.
 
  


Reply

Tags
route, rule


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
[SOLVED] unable to ping divyashree Linux - Newbie 3 01-13-2011 01:50 PM
Unable to ping : ping: unknown host PKumar Linux - Networking 4 10-31-2007 01:43 AM
Unable to use wget and unable to ping machine from external source grunshaw Linux - Networking 3 10-24-2006 09:46 AM
unable to ping anything ektor Linux - Networking 1 01-23-2006 09:39 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration