?
Solved

Enabling two network interfaces

Posted on 2001-09-04
4
Medium Priority
?
170 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 200 total points
ID: 6455056
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
ID: 6455306
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
ID: 6457774
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
ID: 6457791
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

850 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