View previous topic :: View next topic |
Author |
Message |
alexjcg n00b
Joined: 16 Aug 2005 Posts: 45
|
Posted: Tue Jul 17, 2007 3:48 pm Post subject: two NIC´s in the same LAN |
|
|
Hi all;
I have the following scenario:
I´ve got a gentoo box with two nic´s but I want to use them in the same network. Thats because this machine is my file server, proxy, dhcp and radius. So my problem is that we transfer a lot of files to it per day and it congestion it´s nic so I want to put the two nic´s to work at the same lan but with diferent IP´s and diferen switch ports.
Like for my SMB server IP 192.192.192.60 and for de rest services IP 192.192.192.61 so when someone is tranfering a file (to IP 192.192.19260) there it doesnt uses the nic that is spcified to the other services (192.192.192.61).
How do I do this?
Thanks! |
|
Back to top |
|
|
vad3r Guru
Joined: 02 May 2004 Posts: 461 Location: Munich, Germany
|
Posted: Tue Jul 17, 2007 5:12 pm Post subject: |
|
|
You have to decide which interface is used to access the default gateway. Here's a config where eth0 is used as default gw:
Code: | config_eth0=( "192.168.1.1/24" )
config_eth0=( "192.168.1.2/24" )
routes_eth0=( "default via 192.168.1.254" ) |
|
|
Back to top |
|
|
embobo Guru
Joined: 19 May 2003 Posts: 311
|
|
Back to top |
|
|
vad3r Guru
Joined: 02 May 2004 Posts: 461 Location: Munich, Germany
|
Posted: Tue Jul 17, 2007 7:05 pm Post subject: |
|
|
Damn. embobo is right. I should start doing only one thing at a time. It was a long hard day |
|
Back to top |
|
|
alexjcg n00b
Joined: 16 Aug 2005 Posts: 45
|
Posted: Tue Jul 17, 2007 8:49 pm Post subject: |
|
|
Ok I agree with him if I do this I will receive a packege throw eth0 and send it back throw eth1. But bonding isnt like making two nic´s work like one (just raising bandwidth)? I need the two nic´s to work like they ware from diferent machines...
I was thinking here, isnt there a way (by iptables) to force if a package is received from a nic is forced to go out on the same nic? |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4735 Location: Angra do Heroísmo (PT)
|
Posted: Tue Jul 17, 2007 8:57 pm Post subject: |
|
|
Hi.
alexjcg wrote: | I was thinking here, isnt there a way (by iptables) to force if a package is received from a nic is forced to go out on the same nic? |
Yes, there is. You should take a look at http://www.lartc.org for some examples of advanced network configuration. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
alexjcg n00b
Joined: 16 Aug 2005 Posts: 45
|
Posted: Wed Jul 18, 2007 10:20 am Post subject: |
|
|
jmbsvicetto wrote: | Hi.
alexjcg wrote: | I was thinking here, isnt there a way (by iptables) to force if a package is received from a nic is forced to go out on the same nic? |
Yes, there is. You should take a look at http://www.lartc.org for some examples of advanced network configuration. |
I took a lokk there but I didnt find anything similar to my needs. Do you know the "key word" for what I am looking for, ´cause thats makes a lot easyer to find it? |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4735 Location: Angra do Heroísmo (PT)
|
Posted: Mon Jul 23, 2007 10:19 pm Post subject: |
|
|
Look at Section 4.2 Routing for multiple uplinks/providers of the lartc document available at http://www.lartc.org/#download. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
|