Link to home
Start Free TrialLog in
Avatar of pitagoras
pitagoras

asked on

Enabling two network interfaces

I'm trying to use two network interfaces in my Linux machine. At this point i'v already setup both interfaces. But i have 2 problems:
1) The eth1 is not initialized when the machine boot. I'v to enable it manually.

2) When both interfaces are connected (i mean phisycal connection) i can ping or telnet to any of the interfaces. But if i unplugged the eth0 then i lost any communication with the network. I have to set down eth0 and then i can ping or telnet to eth1 again. What can be wrong? My network is 132.147.160.0, eth0=132.147.160.18, and eth1=132.147.160.19

Thanks very much,
Pitagoras
ASKER CERTIFIED SOLUTION
Avatar of BlackDiamond
BlackDiamond

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
Avatar of jlevie
jlevie

What are you trying to accomplish with two NIC's configured to be on the same network?

If you expect to double the bandwidth you'll be sorely disappointed as Linux networking doesn't work that way. And the way it works is why network connectivity is lost when you unplug eth0. When you have two NIC's in a system configured for two different IP's on the same network Linux will use the first NIC to for all traffic. Even if a a packet is received on the second interface the reply will be sent back out the first interface. So when you disconnect eth0 the network is down as far as the OS is concerned. Then when you ifconfig eth0 down, the system notices that and sees that eth1 is available and uses it.
Yikes, I didn't even notice that. :->  Nice catch jlevie.  You would have to use a virtual interface for this to work...
Avatar of pitagoras

ASKER

OK jlevie, now is clear for me, Thanks. I'm not expecting to double my bandwidth, but learning about Linux networking. I want to setup my Linux as a gateway but before go into subnets and all that stuff i'd just want to test both interfaces in the same network. Thank you again.

BD, your answer works and now both interfaces are initializaed at boot. Thank you.

Regards.
Pitagoras