Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

need two nics to run at the sametime , ubuntu server

Posted on 2009-07-06
23
Medium Priority
?
912 Views
Last Modified: 2013-12-23
Hello

I have a server with two nic cards running with jaunty .
both nics have public pppoe static address's from my ISP. i have managed to get both nics activated with the appropriate ip .
The default interface is eth0 .My issue is when i try to ping my eth1 nic it comes back unsuccessful , however i can see that the  eth1 nic is getting the packets ok but just not sending them back .

When I disable eth0 , all connections drop . I have tried taking down both nics and setting them up one by one and everything works perfert until I try and use them at the same time .

My goal is get have both interfaces to be able to send and receive ok .

 Please let me know if you need more info

Here is a copy of my ineterfaces file

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth0
iface eth0 inet ppp
provider dsleth0

auto eth1
iface eth1 inet ppp
provider dsleth1

pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
pre-up /sbin/ifconfig eth1 up
0
Comment
Question by:dereckd
[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
  • 11
  • 4
  • 2
  • +3
23 Comments
 
LVL 2

Expert Comment

by:sorrillo
ID: 24788873
It might be a routing problem (default gateway might be configured twice). Could you post the result of this command when both interfaces are up ?

sudo route -n
0
 

Author Comment

by:dereckd
ID: 24790127
Hello Sorrillo

Here are the results

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
142.161.133.209 0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
142.161.133.202 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
206.45.95.156   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp1
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
0
 

Author Comment

by:dereckd
ID: 24796594
Please can someone look into this for me  
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 10

Expert Comment

by:Andrew Doades
ID: 24806738
I think this might help you...

http://ubuntuforums.org/archive/index.php/t-1001682.html

Andrew
0
 

Author Comment

by:dereckd
ID: 24806954
Hello

That is helpful . however in this post , the guy is using dhcp and i am on a pppoe connection . I have tested this out previously and both nics work through dhcp . Its trying to get them towork on a pppoe connection.
0
 
LVL 10

Expert Comment

by:Andrew Doades
ID: 24807094
Ah, I have little experience with pppoe I'm afraid...
I don't think I can be of much help with the pppoe setup

Sorry,
Andrew
0
 
LVL 2

Expert Comment

by:martino87r
ID: 24807446
What you want to do is called "Bonding"... check out this article:
http://www.howtoforge.com/network_bonding_ubuntu_6.10

It is for ubuntu 6.10 but the principles are the same...

The problem in your case is just bond them for failover, so it might work.
Otherwise check this distro:

http://zeroshell.net/eng/

It has a very easy integrated web interface for configuring failover and load balancing for PPPoE connections
0
 

Author Comment

by:dereckd
ID: 24807613
i currently have direct admin installled on my servers , would you know if i could install zeroshell without affecting direct admin .

 how would my interfaces file look like . I guess where would the below comment get placed and more so what would i place in there for an ip &  hardware address

auto bond0
iface bond0 inet static
   address 192.168.0.120
   netmask 255.255.255.0
   network 192.168.0.0
   broadcast 192.168.0.255
   gateway 192.168.0.1
   hwaddress ether 00:03:B3:48:50:2C
   post-up ifenslave bond0 eth0 eth1


0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 24807863
I think you want to have multiple paths to the internet (two).

your problem is routing, since there can be only one default gateway to the internet. which one of your two interfaces could be that one?

Solution is simple, however, because linux provided for that with iproute2 package.

in the Linux Advanced Routing howto, they show you how to setup as many routing tables as you need.
ok, to the matter:
http://lartc.org/howto/lartc.rpdb.multiple-links.html

hope this help
0
 

Author Comment

by:dereckd
ID: 24808022
My default would be eth0 interface . I need both interfaces to be able to send and receive . However the default connection at the terminal would be eth0 .
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 24808360
you cannot have a "default" when you have two different interfaces being the default gateway to the network 0.0.0.0/0.0.0.0.

you can, however, mark which traffic you want to go to each interfase.
i.e.

you can mark traffic coming from the first interfase, to go out on that same interfase. the same with the second interfase.

you can also mark OUTPUT traffic to go on a specific interfase, like "all the web traffic go to the second, and the ssh traffic go to the first one"

just give the guide a try.
0
 

Author Comment

by:dereckd
ID: 24808838
ok will i'll give it a go  , i'll let you know
0
 

Author Comment

by:dereckd
ID: 24813453
ok , so i think i am doing somthing wrong . After i used the below commands , nothing happened . Please have a look and tell me what i am doing wrong here


ip route add 206.45.95.156 dev ppp0 src 206.45.95.156 table 1
ip route add default via 206.45.95.1 table 1
ip route add 206.45.95.174 dev ppp1 src 206.45.95.174 table 2
ip route add default via 206.45.95.1 table 2


          ip rule add from 206.45.95.156 table 1
          ip rule add from 206.45.95.174 table 2

ip route add 206.45.95.156     dev eth0 table 1
ip route add 206.45.95.156     dev ppp0 table 1
ip route add 127.0.0.0/8 dev lo   table 1
ip route add 206.45.95.174     dev eth1 table 2
ip route add 206.45.95.174    dev ppp1 table 2
ip route add 127.0.0.0/8 dev lo   table 2
0
 
LVL 2

Assisted Solution

by:martino87r
martino87r earned 200 total points
ID: 24813751
Try the following:


ip route add 206.45.95.156 dev ppp0 src 206.45.95.156 table 1
ip route add default via 206.45.95.1 table 1
ip route add 206.45.95.174 dev ppp1 src 206.45.95.174 table 2
ip route add default via 206.45.95.1 table 2


          ip rule add from 206.45.95.156 table 1
          ip rule add from 206.45.95.174 table 2

ip route add 206.45.95.156     dev ppp0 table 1
ip route add 127.0.0.0/8 dev lo   table 1
ip route add 206.45.95.174    dev ppp1 table 2
ip route add 127.0.0.0/8 dev lo   table 2
0
 

Author Comment

by:dereckd
ID: 24816668
ok , so i did that and now ppp0 and ppp1 is no longer ion my ifconfig , if i try and bring them up with pon dsleth0 and pon dsleth1 nothing happens . There is nothing showing in route - n command .

is there any way i could reset my routing to the way they were and retry
0
 
LVL 16

Assisted Solution

by:The--Captain
The--Captain earned 200 total points
ID: 24819286
>your problem is routing, since there can be only one default gateway to the internet.

I will translate this to its numeric equivalent:  "There can only be one routing entry that specifies how to reach 0.0.0.0/0"

I often respect your advice, Redimido, but in this case you are wrong. 0.0.0.0/0 is in no way special (other than that it is the least-specific route in ipv4).  

One thing troubling me is this routing table entry:

206.45.95.156   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1

Why is there no additional IP associated with ppp0?  Something seems odd here...

In any case, you can solve this using iproute2, using the link Redimido mentioned.

Cheers,
-Jon

0
 

Author Comment

by:dereckd
ID: 24826301
ok , i am going to give it another shot . I'll let you know how i make out.
0
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 24826857
Hi The--Captain, I'm sorry but I tried to keep things simple. I understand you can have as many redundant routes to any other network as you want, provided they have a priority. Also you can have as much as 32,767 routing tables created using iproute2, which is a great feature to do whatever you want with routing in linux.

however in this case I think dereckd tried to do bonding or other setup before we started advising on how to do the correct routing.

dereckd, would you mind to post here the output of

route -n

ifconfig

?

and maybe restat what you want to do at this very moment?
0
 

Author Comment

by:dereckd
ID: 24827870
Thank you all for your patience

At the moment route -n results in nothing ,just the column names appear .

Ifconfig brings up eth0 ,eth1 and lo  . No ppp0 or ppp1 .

I would like to reset my routing table and start from scratch .
0
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 1600 total points
ID: 24854824
then please post the results of

ip route show
0
 

Author Comment

by:dereckd
ID: 24869424
Hello

Thank you all for your responses . I have decided to do away with this problem by getting a iframe route from my ISP .

0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

721 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