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-25-2015, 09:42 PM   #1
karish
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Rep: Reputation: Disabled
Routing between two subnets through Debian PC


Hi all,
I have a following network scenario where Debian PC #1 needs reachability to 30.0.0.0/30 network and vice-versa:

DEBIAN#1(eth0:10.0.0.50/24)------(eth1:10.0.0.51/24)DEBIAN#2(eth1:20.0.0.1/24)------(Fa0/0:20.0.0.2/24)ROUTER#1(Fa0/1:30.0.0.1/30)----------(Fa0/1:30.0.0.2/30)ROUTER#2

I was planning to use DEBIAN#2 (I have to ) as a router and route between 10 and 30 networks but not having any luck. Can someone plz help me in solving this? Thank you!

Last edited by karish; 01-25-2015 at 09:44 PM.
 
Old 01-25-2015, 10:00 PM   #2
thekraken99
LQ Newbie
 
Registered: Jan 2015
Posts: 6

Rep: Reputation: Disabled
how are you trying to route it through debian #2 more info on that would be helpful.
 
Old 01-25-2015, 10:02 PM   #3
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
You have 3 networks
10.x
20.x
30.x

Debian #1 knows only about 10.x but is connected to Debian #2 which can get us closer so you would have a routing entry on Debian #1 for the network 30.x going via Debian #2

Debian #2 knows about 10.x and 20.x but not about 30.x so it too would require a routing entry to 30.x via the Router #1 (assuming of course that it doesn't have a default route via it anyway)

Debian #2 also needs routing to be turned on (check the Debian docs for the preferred method)

Router #1 knows about 20.x and 30.x but not 10.x so it will need a route back to 10.x via Debian #2

If you want Router #2 to know about the 10.x network then it too would need an entry to 10.x via Router #1
 
Old 01-25-2015, 10:30 PM   #4
karish
LQ Newbie
 
Registered: Jan 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
All the relevant routing is configured on the Router #1 and Router #2. On Router #1, there is static route for 10.x network pointing to Debian #2 PC and this static route is redistributed into IGP.
On Debian#1 PC, I have a static router to network 30.
route add -net 30.0.0.0 netmask 255.255.255.0 dev eth0
route add -net 20.0.0.0 netmask 255.255.255.0 dev eth0

On Debian#2, also I have a static route to 30.x network pointing out of eth1.

As, suggested in other forums, i have turned on "ipv4 forwarding" on Debian#2 (echo 1 > /proc/sys/net/ipv4/ip_forward).

My challenge is to route between 10 network and 30 network on Debian#2 PC.

Following pings are successful:

1 - From Debian#1 to Debian#2 eth1 (20.0.0.1)
2 - From Debian#2 to R1 or R3

But the ping from Debian#1 to R3 (30.0.0.1 or .2) and vice-versa is not successful even though I have a static route for 30 network on Debian #2 pointing to Router#1.

Last edited by karish; 01-25-2015 at 10:46 PM.
 
Old 01-26-2015, 12:22 AM   #5
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by karish View Post
route add -net 30.0.0.0 netmask 255.255.255.0 dev eth0
route add -net 20.0.0.0 netmask 255.255.255.0 dev eth0
You need to point these at an IP address not a physical network.
 
  


Reply



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] Routing two Subnets Lord_Devi Linux - Networking 5 07-10-2010 02:54 PM
subnets and routing evilted Linux - Networking 19 08-20-2009 05:16 AM
Routing between two subnets ScottReed Linux - Networking 22 10-24-2006 10:32 PM
Routing problem with subnets G-Fox Linux - Networking 3 01-24-2006 05:20 AM
Routing between different subnets ... suvajit Linux - Networking 1 05-15-2003 07:07 AM

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

All times are GMT -5. The time now is 07:49 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
Open Source Consulting | Domain Registration