LinuxQuestions.org
Help answer threads with 0 replies.
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 09-19-2012, 10:50 AM   #1
BRonkBMI
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Question setting up 2 routers


I'm working on setting up a new router system for work. I'm rebuilding it from scratch because one of our boxes needs replaced anyway. We're also adding another internet provider (the main reason all this started). Right now, I'm having trouble getting them talking correctly. It seems like my ping is dropping somewhere. Here's my setup:

ServA
eth0: 192.168.144.24 (router link)
eth1: 10.198.0.1 (local network)
eth2: 10.10.10.170 (internet provider 1)

ServF
eth0: 192.168.144.50 (router link)
eth1: 10.110.0.254 (local network)
eth2: 10.50.30.34 (internet provider 2)

Both servers have ip_forwarding set to 1. Both have their iptables --flush(ed)

I know I need to get policy routing setup, so I'm starting with that. Each has 2 tables setup in /etc/iproute2/rt_tables: 200 net1 / net2, and 205 routerLink.

To setup the routes on ServA:
Code:
ip route add 10.10.10.0 dev eth2 src 10.10.10.170 table net1
ip route add default via 10.10.10.254 table net1
ip route add 192.168.144.0 dev eth0 src 192.168.144.24 table routerLink
ip route add default via 192.168.144.50 table routerLink
ip route add 10.10.10.0 dev eth2 src 10.10.10.170
ip route add 192.168.144.0 dev eth0 src 192.168.144.24
ip route add default via 10.10.10.170
ip rule add from 10.10.10.170 table net1
ip rule add from 192.168.144.24 table routerLink
To setup the routes on ServF:
Code:
ip route add 10.50.30.32 dev eth2 src 10.50.30.32 table net2
ip route add default via 10.50.30.33 table net2
ip route add 192.168.144.0 dev eth0 src 192.168.144.50 table routerLink
ip route add default via 192.168.144.24 table routerLink
ip route add 10.50.30.32 dev eth2 src 10.50.30.34
ip route add 192.168.144.0 dev eth0 src 192.168.144.50
ip route add default via 192.168.144.24
ip rule add from 10.50.30.344 table net2
ip rule add from 192.168.144.50 table routerLink
The provider on ServA should handle all traffic by default. That's why I have default traffic for ServF going to the router link.

ServA can connect to the internet right now with no issues. I'm having a problem with ServF. I can ping 192.168.144.24 and 10.198.0.1 on ServA and get replies. When I try to ping 10.10.10.170, I get nothing. Using tcpdump, I see the packet going into ServA via the router link. I don't see any traffic on eth2 related to that ping. It seems like it's dropping off somewhere, but I don't know where.

Any help getting this working would be appreciated. Thanks all.
 
Old 09-19-2012, 01:38 PM   #2
BRonkBMI
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I solved part of this. I can now ping ServA: 10.10.10.170 from ServF. I removed the "ip rule from" lines from both servers. Can someone explain why this is?

My end result would be to have traffic that comes from either internet provider go back out the way it came in, hence the rules. I verified that it was the net1 and net2 rules (specifically net1 in this case) that caused the problem. But, I'll need those rules for policy routing, right?

In the mean time, forging ahead with getting ServF able to see the internet. I think I know the next step for that, at least.
 
  


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
Using multi-core/multiprocessor pc routers, vpn routers badkuk Linux - Networking 4 01-15-2011 06:55 AM
Setting up two different LANs using three routers mvidberg Linux - Networking 1 06-14-2010 12:14 PM
Do you have either of these routers? empty_net_goal Linux - Networking 4 06-06-2010 06:30 AM
Setting up multiple routers toejam Linux - Networking 3 06-09-2004 10:08 AM
Routers pradeep_nair Linux - Networking 1 03-29-2001 11:33 PM

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

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