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.

Having a debian server with multiple NICs (eth0 and eth1) acting as a gateway. How would I be able to configure these NICs, so they can route the traffic from one to another.

Network layout:

DSL-router(192.168.1.1) ----> Debian gateway ----> Network 1 (10.10.10.10
                                             |
                                             |---> Network 2 (20.20.20.20

In the current situation the servers are connected all to the switch.. which then is connected to the uplink(Fiber).

Configuring debian as a gateway is mainly for back-up purposes. If the fiber fails.. I somehow should be able to connect one of the cables to (eth0 or eth1) to the switch and route the traffic there. All machines already connected to the switch have gateway 10.10.10.1

Anyone any idea how could I establish such thing?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There are 2 ways to solve this problem.

  1. install an extra network card so you get eth0,1 and 2 connect 0 to the DSL Router, 1 and 2 respectively to network 1 and 2.

  2. Set up VLANS on eth1, configure your switch to allow vlans going over the port where eth1 is connected and basically split your network like that. In order to that that you need at least a layer 2 managed switch.

share|improve this answer
    
Can't I use an alias for eth1 or 2? e.g eth1:0 How would I configure the IP addresses? What should get what and what handles what? Thanks. –  holasz Aug 23 '13 at 8:26
    
physically (or virtually) splitting your networks is safer as it allows you to assign PC's to one or the other subnet. In linux vlans on interfaces look like: eth1.1 eth1.2 (for vlan 1 and 2 resp.). –  Flash Aug 23 '13 at 8:30
    
Thanks I will give it a try. –  holasz Aug 23 '13 at 8:45

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.