Solved

need two nics to run at the sametime , ubuntu server

Posted on 2009-07-06
23
905 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
  • 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
 
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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 50 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 50 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 400 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cisco Access point 6 60
OpenView NNM: Global Manager to Regional Manager connection fails 7 56
VIRL IP adress 3 58
Guest Wi-Fi Marketing solution required 8 64
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

920 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

13 Experts available now in Live!

Get 1:1 Help Now