LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 08: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, 09:34 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
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, 09: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



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

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

All times are GMT -5. The time now is 06:54 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