Link to home
Start Free TrialLog in
Avatar of mortar
mortar

asked on

Linux Question - 2 Network Cards

I'm going to rebuild my Linux machine.  At the moment with the current set up I have only one network card, connected to the rest of my network and an adsl modem through the one switch.  As there any specific advantage to having two network cards in a computer?

Regards

Ash
Avatar of MarkDozier
MarkDozier

Good question. And the answer is Yes and No.
It really depends of the prupose of the box.
If it is a router then 2 NICS are a benifit.
If this is an IPTABLES filrewall then two NICs are a benifit
If this is a IDS device 2 nics are benifit

If this is a workstation attached to a swit ch 1 nic is sufficent in most cases

Again it all depepnd on the purpose of the box.
Single Network Card

Linux Box default gateway is the ADSL modem/router. I will also assume that all other workstations will have the default gateway set to the ADSL modem/router also.

Two Network Cards

1 Network card runs to the Switch
1 Network card runs direct to the ADSL Router.
Benefits are that no workstation is in direct contact with the ADSL/Modem Router.   Workstations Route through the Linux Box to the ADSL/Router.
 Now you have the option of playing with your IPTABLES/IPCHAINS (Linux Firewall). You can set port forwards such as HTTP, DNS, SSH, TELNET etc.

So in summary option 2 has alot more security benefit. You are reliant on the Linux Box to access the internet. Again this really depends on your purposes of your Linux Box.




I thinh that if You have a free network card You may safely install it in linux box. If You will not use it, You can - simply - not install drivers for it - or keep it in down state (i rather preffer the second solution), but in a future when You want to either experiment or use your linux box for some of tasks mentioneg above it will be much faster then installing the card from the beginning.
For me You shold install it just to have some test environment.

Hope this helps
Regards
Marcin
Avatar of mortar

ASKER

I already have IP Chains, and port forwarding options set up on the current configuration.. So basically the only real advantage is that you can seperate the ADSL modem from the clients?  I just wondered if it was better for network throughput, reduced packet loss or network errors or anything like that because it's seems a waste to have two network cards, one basically reserved for the ADSL modem when you can basically perform the job with one less card and run the ADSL modem back to the switch with a crossed cat5 cable.
ASKER CERTIFIED SOLUTION
Avatar of master_chris
master_chris

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
additionally if You will run linux as a router You can use some kind of shaper. I've seen magic when that kind of configuration was running in connection with wondershaper (HTB)
wondershaper home: http://lartc.org/wondershaper/
HTB home (see performance analysys): http://luxik.cdi.cz/~devik/qos/htb/

Additionaly You can configure it to act as a speed limiter for various users

Regards
Marcin
Also one of the benifits i missed is you can run the ADSL modem in PPPOE mode and set up eth interfaces with external ip's. If you have more than 1 ip address you can set up several interfaces. and you can do what you like with these extra ips.