LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2012, 02:32 PM   #1
maverickpaaras
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Facing problem with the following networking set up in linux


Hi all,

I am trying to create the following set up

I have following linux networking set up.


Machine A Ip-10.8.11.100 (Source machine)
Machine B ip-10.8.11.1 (acting as a gateway for 10.5.0.0 network )
Machine C ip-10.8.11.2 (acting as a gateway for 192.68.11.0 network )
Machine D ip-10.5.0.1 (Dest machine)
Machine E ip-192.168.11.1 (Dest machine)
Machine F ip-10.8.11.5 (default agteway)

Now I want to add both the destination networks into Machine A so that I should able to ping ip address of both the networks from it.


The rules and routes that I ave added on machine A a below :-

$ip rule add from 10.8.11.100 table 2
$ip route add 10.5.0.0/24 via 10.8.11.1 dev eth0 src 10.8.11.100 table 2
$ip route add 192.168.11.1 via 10.8.11.2 dev eth0 src 10.8.11.100 table 2
$ip route add default via 10.8.11.5 table 2
$ip route flush cache


Here the rules on the Machine A

$ip rule show
0: from all lookup local
32763: from 10.8.11.100 lookup 2
32766: from all lookup main
32767: from all lookup default



Here are the routes in table 2 of machine A

$ip route show table 2
192.168.11.0/24 via 10.8.11.2 dev eth0 src 10.8.11.100
10.5.0.0/24 via 10.8.11.1 dev eth0 src 10.8.11.100
default via 10.8.11.5 dev eth0



Now what is happening is when I trying to ping any destination from Machine A, I am not getting any ping reply from any of the network and I think the packet is also not reaching to destination machine as I am not seeing anything in the tcpdump traces at the destination.(Machine D & Machine E).



Now when I am adding the same rules to the main table of linux everything is working fine . I can able to ping all the static as well as default networks from machine A.

I don't know whts was happening when I am adding the same routes to table 2.

A part from that I am directly using the table index 2 without adding its entry in /etc/iproute2/rt_tables file.
Is it necessary to add the table name into that file.?

I did that as well but looks like it is not working out.
How can we know which routing table currently linux is using.?

Please help me here

Last edited by maverickpaaras; 08-02-2012 at 02:39 PM.
 
Old 08-03-2012, 11:19 PM   #2
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 45
did you try:
Code:
route
 
1 members found this post helpful.
Old 08-04-2012, 01:37 AM   #3
maverickpaaras
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
No my requiremnt is to achieve this using ip command..Please help me

No my requiremnt is to achieve this using ip command..Please help me
 
Old 08-04-2012, 01:45 AM   #4
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 45
If you run the route command it will show the info
 
  


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
Facing installation problem for LibreOffice on linux 5 Shailendra28 Linux - Software 3 01-09-2012 06:00 PM
facing problem ie6 with linux ganeshbonal Linux - Newbie 4 08-20-2008 03:00 AM
facing problem in increment operator of set :infinite LOOP ashwinipahuja Programming 0 06-03-2004 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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