Solved

Enabling two network interfaces

Posted on 2001-09-04
4
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
BlackDiamond earned 50 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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