LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing with multiple linux routers (https://www.linuxquestions.org/questions/linux-networking-3/routing-with-multiple-linux-routers-4175476909/)

Gil@LQ 09-12-2013 03:21 PM

routing with multiple linux routers
 
Hi all,

A 0 ---- B 0 ----- C 0 ------ D 0

in the above network there are 4 routers, if they are cisco all the 4 routers will share the routes and will be aware of rest of the networks, but if i want to connect 4 linux routers how can i do it. clients attached to router A will reach router B via A as gateway(local ip), but if want to reach router C, it can go via router B, but to reach D via C, how can i add route since router C IP and router A ip are not in the same subnet ?

can't we do this kind of routing with out cisco rotuer.

thanks in advance.

Shadow_7 09-12-2013 05:07 PM

Two ways basically. Bridging, or double+ NAT. Bridging can be quirky since kernels > 2.6.32 in my experience. And double NAT should use different subnets for each interface, and probably ebtables to NAT the MAC addresses. Since routing has gotten more strict in recent years.

My setup has my desktop connected to my laptop via a cat5e crossover cable on a static IP. The laptop connects to the wireless router via DHCP, and uses a combination of iptables and ebtables to forward the desktops packets. The wireless router connects to the ISP. Overly complex in my opinion, but all existing hardware in my case.

gdejonge 09-13-2013 04:24 AM

Yes, you can use linux servers as replacement for your routers. Take a look at quagga, which is a software suite that implements the most common routing protocols.

Cheers

Gil@LQ 09-21-2013 02:30 PM

hi gdejonge,

thanks man, you relly helped me a lot , i even don't know that there is package with this kind of capability.

thanks. im marking as solved.

Shadow_7... you too thanks for your time.


All times are GMT -5. The time now is 06:22 PM.