LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   squeeze and 3nics (https://www.linuxquestions.org/questions/debian-26/squeeze-and-3nics-4175438875/)

binary_dreamer 11-27-2012 02:37 AM

squeeze and 3nics
 
hi. i am running squeeze in a machine and i need to have three different local networks on three different cards.
-first card will see a network 192.168.0.0/24. the IP of the card will be 192.168.0.20
-second card will see a network 192.168.5.0/24. the IP of the card will be 192.168.5.20
-third card will see a network 10.0.0.0/24. the IP of the card will be 10.0.0.20


in the /etc/network/interfaces when i have it as dhcp it works, but when i add a static entry for IPs, it does not work. it gets into my nerves, as i cannot see all three different networks.

there is no NAT/firewalling, or any other complexity. Simply one machine that it can see 3 networks in 3 different cards.

may i have a sample config?

jim_p 11-27-2012 04:27 AM

First of all you have to find out which card gets which interface from (eth0 to eth2). Assuming eth0 is the 1st card, eth1 the second and eth2 the third one, you will need something like this

Code:

iface eth0 inet static
address 192.168.0.20
netmask 255.255.255.0
gateway 192.168.0.1


iface eth1 inet static
address 192.168.5.20
netmask 255.255.255.0
gateway 192.168.5.1

iface eth2 inet static
address 10.0.0.20
netmask 255.255.255.0
gateway 10.0.0.1

auto eth0
auto eth1
auto eth2

(change the gateways as you need)

Plus, you will have to remove network manager or wicd so as they won't interfere with those.
And check /etc/udev/rules.d/70-persistent-net.rules to find out which device gets which interface.

binary_dreamer 11-27-2012 05:00 AM

really helpful.
thanks a lot


All times are GMT -5. The time now is 01:29 AM.