-2

The Problem

I know how to add block to interface. But I really don't know how to use specific address dynamically.

What I want

For example:

  • I have a block fe80::/32 for my application.
  • I will let my user access server by one single ipv4 address with credential.
  • I will send hook with IPV6
  • I want to give every user a specific address to send.
  • userA: fe80::1 userB:fe80::2

I have a whole block for it, so there will be tons of user using this service.

What I have done

But I find that I cannot bind request with specific address, that will cause errno99.

I was using curl to test the linux supports the functions I want, but I find that I can't.

How I test it:

Test Server With range

server

python3 -m http.server --bind ::

client

curl -vvv -6  "http://[fe80::3]:8000"
curl -vvv -6  "http://[fe80::4]:8000"

This will works find. Because server is listening on all address. So you can access with anyone of them.

Test Client with Range

Server

python3 -m http.server --bind ::

client

curl -vvv -6 -i "fe80::2" "http://[fe80::1]:8000"
curl -vvv -6 -i "fe80::3" "http://[fe80::1]:8000"

This will not work. Curl will throw errno99

Bind every ip to interface

I have a whole range of ip, how CRAZY I have to bind each ip under /32. So I am finding a better solution.

About the discussion

There's a little discussions been deleted. And I cannot find the history of it.

Disclaimer:

  • I typed "For example:" on "What I want"
  • If you check this problem's edit history You will find the "For example:" is here at very first time.
  • This problem comes out with the clients requested feature.
  • I want to solve it simply, I don't want to talk about this anymore.
  • I don't know why I am getting fired just because I have to satisfying the clients who host the service on IPV6 only VPS.
  • The problem I have is just I don't know should I have set something up on hardware or software to solve this, but I think this is a server problem, this cause off-topic. And I find the solution.
yagmoth555
  • 17,495

2 Answers2

5

You need a reality check and - cough - some RTFM.

  • The address block FE80 is link local. It is meant as a last resort. Every endpoint on an ethernet segment has an address there if it has IPv6 active. Grats.
  • Which means first, you can not use ALL addresses because computers randomly have addresses in that. That is random - based on their MAC.
  • Because this prefix is link local and automatically assigned on every link - it is also NOT ROUTED. So, unless your users are local - THEY CAN NOT SEND TO IT.
  • Finally, you do a big architectural stupidity. You terminate users on an IPv4 address - which is nice, users thus have an IPv4 access - and then give them an IPv6 to reach - ASSUMING (and that is a REALLY stupid idea) that they even have IPv6 active. This is not likely the case. Get ipv4, STICK to ipv4. Get Ipv6, STICK to IPv6. But irrelevant in this case due - non routing. But generally you should NOT switch protocols - you assume dual stack, that is not the case for 99.9% of the people.
TomTom
  • 52,109
  • 7
  • 59
  • 142
-3

You could consider creating a cluster with corosync and pacemaker, and using two nodes and a couple of services with a virtual ip from your block. The ip would be virtual because the service is going to be used by node 1 and node 2, and thus node1 and node2 should be able to use it.

Turdie
  • 2,945