aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: report multiple ip to server?  (Read 6597 times)

1boor

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
report multiple ip to server?
« on: March 11, 2007, 08:45:15 PM »

Hello,

I have two different WAN access via two differrent ISP, each interface has a WAN ip address.

I do multi-path route on my linux box. But I find out that the traffic splitting doesn't work very well with amule, since I believe it just reports only one of my WAN ip addresses to the server, so all other clients connect my amuled with only one of my two WAN ip addresses. It turns out one of the WAN interface takes much more traffic than the other, they can't be balanced because of amule.

On the other hand, "rtorrent" works very well with my traffic splitting. It has some command-line options letting me to set it switching between the two ip addresses every 5 seconds.

So I'm wondering if amule can do something similar to what rtorrent can do, maybe some command-line options? Or could I have some key information so I can impelement it myself, even by dig into the code? Although I'm not familiar with amule's C++ code, but I believe I have a lot of time to try, if given some right directions.

Regards,
Paul
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #1 on: March 12, 2007, 12:59:46 PM »

I don't really understand what you asking for. amule listening on all interfaces on your box (by default). So, if some client connects to address X (interface X) he will be talking thru this interface. On the other side, you can't connect to server twice. 2 different IP's will be considered as 2 different clients.

Talking about traffic split, can you explain how you set up routing table? I'm asking this because IMHO you can't effectively split outgoing requests. What you can - is split your services between interfaces, like ftpd on one and httpd on another. Correct me if I'm wrong.
Logged

1boor

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: report multiple ip to server?
« Reply #2 on: March 12, 2007, 08:16:35 PM »

I don't really understand what you asking for. amule listening on all interfaces on your box (by default). So, if some client connects to address X (interface X) he will be talking thru this interface. On the other side, you can't connect to server twice. 2 different IP's will be considered as 2 different clients.

All I want is let some of the clients connect address A, and some of them connect address B, so then the traffic can be balanced upon my two WAN interfaces. What I'm asking for is could there be an amuled command-line option which I can specify the address A and address B in it? If this request is too weird or unnecessary for most people, could you give me some right directions of how can I do it myself?

I guess the ed2k protocol don't allow reporting 2 differernt ip's for one client. If so, then yes, can we trick the server let it consider my one amule client as two different clients, but actually, after routing, all the clients just connect to the same amuled running on my box? Or, inform the server periodically, telling that "My ip address has changed to A." "Now, my ip address has changed to B.", and so on... Do you see what I mean? Does the protocol allow this?

Talking about traffic split, can you explain how you set up routing table? I'm asking this because IMHO you can't effectively split outgoing requests. What you can - is split your services between interfaces, like ftpd on one and httpd on another. Correct me if I'm wrong.

Yes, I believe we can split outgoing requests. It requeirs the option "CONFIG_IP_ROUTE_MULTIPATH" set to y at linux kernel compile time.

Here are my routing table settings:
#ip route ls
24.24.24.24 dev ppp0  proto kernel  scope link  src 61.173.166.194
24.24.24.24 dev ppp1  proto kernel  scope link  src 61.173.166.201
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.250
default equalize
        nexthop dev ppp0 weight 1
        nexthop dev ppp1 weight 1
# ip route ls table T1
24.24.24.24 dev ppp0  scope link  src 61.173.166.194
192.168.0.0/24 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default dev ppp0  scope link
# ip route ls table T2
24.24.24.24 dev ppp1  scope link  src 61.173.166.201
192.168.0.0/24 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default dev ppp1  scope link
# ip rule ls
0:      from all lookup local
32764:  from 61.173.166.201 lookup T2
32765:  from 61.173.166.194 lookup T1
32766:  from all lookup main
32767:  from all lookup default

I learn it from "http://lartc.org". You can reffer to it if you like.

Oh, and sorry about my English language, if you are confused reading it. There isn't a "Chinese" section in the forum, so I have no option but get a dictionary and scratch some sentences which I 'm not really sure what they mean... May be you want to learn some Chinese?  ;D
« Last Edit: March 12, 2007, 08:34:06 PM by 1boor »
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #3 on: March 12, 2007, 08:32:46 PM »

Quote
All I want is let some of the clients connect address A, and some of them connect address B
Like I already said, amule listen on all interfaces, so clients can connect from any address. Discovering this address is, however, another issue.

Quote
What I'm asking for is could there be an amuled command-line option which I can specify the address A and address B in it?
See above.

Quote
I guess the ed2k protocol don't allow reporting 2 differernt ip's for one client.
Exactly.

Quote
If so, then yes, can we trick the server let it consider my one amule client as two different clients
Theoretically speaking, yes (IMHO). On practice, this would require complete rewrite of amule core, since it's not designed to do this trick.

Quote
Or, inform the server periodically, telling that "My ip address has changed
I don't think protocol support such requests.

Quote
Yes, I believe we can split outgoing requests. It requeirs the option "CONFIG_IP_ROUTE_MULTIPATH" set to y at linux kernel compile time.
Never late to learn smthing new :)

Quote
May be you want to learn some Chinese?
May be you want to learn some Hebrew and/or Russian instead :) ?
« Last Edit: March 12, 2007, 08:35:36 PM by lfroen »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: report multiple ip to server?
« Reply #4 on: March 13, 2007, 06:16:14 PM »

It's unfair to use one client as two different ones - you would be twice on queues, etc. Not gonna happen.
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #5 on: March 13, 2007, 08:33:31 PM »

This discussion is completly theoretical, but anyway.

Quote
It's unfair to use one client as two different ones - you would be twice on queues, etc
Sorry, Kry, but that's bullshit. Actually this IS 2 clients, the fact that both are served by one program is irrelevant. This case is no different from situation where guy owns 2 lines and 2 machines w/ amule on each one and common directory for shared files.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: report multiple ip to server?
« Reply #6 on: March 15, 2007, 11:45:01 PM »

Uh... no. Temp files.
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #7 on: March 16, 2007, 07:51:49 PM »

Uh... no. Temp files.
Uh ... no. Doesn't matter either.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: report multiple ip to server?
« Reply #8 on: March 16, 2007, 09:31:13 PM »

Uh... yes it does.
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #9 on: March 17, 2007, 10:47:34 AM »

Uh... yes it does.
You will be twice in queues, but since you are seen as 2 clients, other people will be twice in your queue for the very same reason. So, situation is symmetric or <fare> :)
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: report multiple ip to server?
« Reply #10 on: March 17, 2007, 11:25:21 AM »

But it is pretty hard to sync the temp files from to aMules running at the same time. This would require a way to communicate (maybe using EC) between two cores. Thinking about it, it sound like a cool feature 'distributed downloading'. But there are only a few people who have multiple outgoing lines or multiple computeres connected through a non-Internet line with different Internet connections.
Logged

lfroen

  • Guest
Re: report multiple ip to server?
« Reply #11 on: March 18, 2007, 05:29:08 AM »

This discussion is completly theoretical, but anyway.
Logged