Solved

Enabling two network interfaces

Posted on 2001-09-04
4
157 Views
Last Modified: 2010-03-17
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
0
Comment
Question by:pitagoras
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
BlackDiamond earned 50 total points
Comment Utility
I'll assume that you are using RedHat.  If not, let me know (this is pretty similar in any case).

1.
  copy /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-eth1 ...  The edit the ifcfg-eth1 file and change the DEVICE to "eth1" and the IPADDR to "132.147.160.19"

2.
  This sounds like you set the 2nd ip address for a virtual instead of a physical interface.  The above should solve that problem for you.  If in fact it is set as a virtual interface, and you run "ifconfig" you would see interfaces like "eth0", "eth0:1", and "lo".  If it is actually defined as a physical interface, you would see "eth0", "eth1", and "lo".

Let us know what ifconfig looks like, but I think #1 will solve your problems.

Cheers,
BD
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 
LVL 5

Expert Comment

by:BlackDiamond
Comment Utility
Yikes, I didn't even notice that. :->  Nice catch jlevie.  You would have to use a virtual interface for this to work...
0
 

Author Comment

by:pitagoras
Comment Utility
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
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now