Ipv6 support #15

Merged
skx merged 9 commits from ipv6-support into master 2019-02-24 01:19:12 -05:00
skx commented 2019-02-23 00:52:13 -05:00 (Migrated from github.com)

This pull-request is a toy to add IPv6 support.

  • The way addresses are assigned handles IPv6-addresses to clients and the server.
  • The handling of packets is conditional on the IPv4 vs. IPv6 type.
  • I've tested with Linux clients and hosts.
  • It needs more testing, and the configuration/readme needs updated to mention IPv6.

Compare with #14 , this closes #12.

This pull-request is a toy to add IPv6 support. * The way addresses are assigned handles IPv6-addresses to clients and the server. * The handling of packets is conditional on the IPv4 vs. IPv6 type. * I've tested with Linux clients and hosts. * It needs more testing, and the configuration/readme needs updated to mention IPv6. Compare with #14 , this closes #12.
skx commented 2019-02-23 05:16:05 -05:00 (Migrated from github.com)

I believe this is complete, tested, and working now:

  • For IPv4
  • For IPv6

Will merge tomorrow unless there are any surprising results.

I believe this is complete, tested, and working now: * For IPv4 * For IPv6 Will merge tomorrow unless there are any surprising results.
samridh90 commented 2019-02-25 11:51:26 -05:00 (Migrated from github.com)

I'll test this out sometime today...
For my own curiosity, what would it take to get unicast to work fro IPv6? It wasn't obvious to me why v6 is harder to implement than v4.

I'll test this out sometime today... For my own curiosity, what would it take to get unicast to work fro IPv6? It wasn't obvious to me why v6 is harder to implement than v4.
samridh90 commented 2019-02-27 17:58:02 -05:00 (Migrated from github.com)

@skx : ☝️

@skx : ☝️
skx commented 2019-02-28 05:46:18 -05:00 (Migrated from github.com)

A detailed explanation would take longer time than I have to spare.

But you need to think about routing and IP-headers. For IPv4 you get the MAC address of the source and the destination in the packet. Using those you can lookup the appropriate socket and write the whole packet down the correct socket.

For IPv6 if you want to do it properly you need to do that, but you'd also want to handle other things such as router advertisements and neighbour solications.

In short think of IPv4 and think about how ARP requests are handled; here we cheat and don't handle them. If you want to do "stuff properly" you should. And that's whats missing for the IPv6 side. (Only ARP isn't involved, instead it's neighbour solicatation and RA.)

Feel free to experiment in your fork. It'll be fiddly and annoying, but also educational.

A detailed explanation would take longer time than I have to spare. But you need to think about routing and IP-headers. For IPv4 you get the MAC address of the source and the destination in the packet. Using those you can lookup the appropriate socket and write the whole packet down the correct socket. For IPv6 if you want to do it properly you need to do that, but you'd also want to handle other things such as router advertisements and neighbour solications. In short think of IPv4 and think about how ARP requests are handled; here we cheat and don't handle them. If you want to do "stuff properly" you should. And that's whats missing for the IPv6 side. (Only ARP isn't involved, instead it's neighbour solicatation and RA.) Feel free to experiment in your fork. It'll be fiddly and annoying, but also educational.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skx/simple-vpn!15
No description provided.