Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 914
  • Last Modified:

need two nics to run at the sametime , ubuntu server

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
dereckd
Asked:
dereckd
  • 11
  • 4
  • 2
  • +3
3 Solutions
 
sorrilloCommented:
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
 
dereckdAuthor Commented:
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
 
dereckdAuthor Commented:
Please can someone look into this for me  
0
Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

 
Andrew DoadesCommented:
I think this might help you...

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

Andrew
0
 
dereckdAuthor Commented:
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
 
Andrew DoadesCommented:
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
 
martino87rCommented:
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
 
dereckdAuthor Commented:
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
 
Gabriel OrozcoSolution ArchitectCommented:
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
 
dereckdAuthor Commented:
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
 
Gabriel OrozcoSolution ArchitectCommented:
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
 
dereckdAuthor Commented:
ok will i'll give it a go  , i'll let you know
0
 
dereckdAuthor Commented:
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
 
martino87rCommented:
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
 
dereckdAuthor Commented:
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
 
The--CaptainCommented:
>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
 
dereckdAuthor Commented:
ok , i am going to give it another shot . I'll let you know how i make out.
0
 
Gabriel OrozcoSolution ArchitectCommented:
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
 
dereckdAuthor Commented:
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
 
Gabriel OrozcoSolution ArchitectCommented:
then please post the results of

ip route show
0
 
dereckdAuthor Commented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 11
  • 4
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now