Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been trying for almost a week to make it work but without success. I start to be hopeless.

I have 4 ethernet adapters :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 30:85:a9:ad:54:1e brd ff:ff:ff:ff:ff:ff
    inet 10.100.36.2/29 brd 10.100.36.7 scope global eth0
    inet6 fe80::3285:a9ff:fead:541e/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether a0:f3:c1:04:64:40 brd ff:ff:ff:ff:ff:ff
    inet 69.70.164.242/30 brd 69.70.164.243 scope global eth1
    inet6 fe80::a2f3:c1ff:fe04:6440/64 scope link
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether a0:f3:c1:04:a0:2f brd ff:ff:ff:ff:ff:ff
    inet 10.45.13.1/24 brd 10.45.13.255 scope global eth2
    inet6 fe80::a2f3:c1ff:fe04:a02f/64 scope link
       valid_lft forever preferred_lft forever
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 28:10:7b:c9:58:76 brd ff:ff:ff:ff:ff:ff
    inet 10.45.15.1/24 brd 10.45.15.255 scope global eth3
    inet6 fe80::2a10:7bff:fec9:5876/64 scope link
       valid_lft forever preferred_lft forever

This is the default route my linux server (Debian) give me at startup :

69.70.164.240/30 dev eth1  proto kernel  scope link  src 69.70.164.242
10.100.36.0/29 dev eth0  proto kernel  scope link  src 10.100.36.2
10.45.15.0/24 dev eth3  proto kernel  scope link  src 10.45.15.1
10.45.13.0/24 dev eth2  proto kernel  scope link  src 10.45.13.1
default via 10.45.15.254 dev eth3
default via 10.45.13.254 dev eth2
default via 69.70.164.241 dev eth1
default via 10.100.36.1 dev eth0

Here's what I want to do. eth0 is my VDSL line and eth1 is my cable line. I want to:

  • Forward all traffic from 10.45.13.0 (eth2) to the gateway 10.100.36.1 (eth0)
  • Forward all traffic from 10.45.15.0 (eth3) to the gateway 69.70.164.241 (eth1)

If I make this work, I would be happy enough but I would also like to make 10.45.13.0 invisible from 10.45.15.0 and vice-versa.

Thanks you for any help in advance.

share|improve this question
1  
YOu have far too many 'default' routes. You should have only one default route per route table. Remove the others. –  Zoredache May 14 '13 at 16:20

1 Answer 1

here you have a clear explanation and setup for this, try it:

http://lartc.org/howto/lartc.rpdb.html

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  TheCleaner May 14 '13 at 13:57
    
From my understand, I have to leave as "default" the main connection I want (my VDSL) and create a table for my cable connection ? –  David Bélanger May 14 '13 at 14:35
    
If my understanding is correct, you should only have on default route with the same metric. Reorder these using metrics, or create a multipath routes using weights of your choosing for the default route. You still need routes, a default no less, in the main table for when your source address is unspecified (e.g., because it is not a reply and you haven't called bind()). See my answer to a nearly identical question. I just don't have enough rep to mark this as a duplicate. –  pilona Aug 22 '13 at 20:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.