• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Main Menu

A (Simple) Newbie Question

Started by ezconcept, October 03, 2010, 08:24:15 AM

Previous topic - Next topic

ezconcept

Should I add all IPs to make every IPs reachable?
Instead of adding {IP}/64 ?

Sorry - sometimes I'd mix up IPv4 and IPv6's concepts.

allen4names

Even if you had 65536 computers and assigned 65536 distinct IP addresses to each one you would barely have used a fraction of your /64 allocation.

broquea

Indeed, especially since that would be 65k used out of 18+ quintillion.

ezconcept

Sorry not to make my words clear.

I mean, if I want to have 10 IPs(from tunnelbroker) routed to my "server", do I need to add each of them to my NIC interface (ie. "sit1") ?

jimb

Best way to do this is to put your routed /64s on a LAN interface or loopback interface on the host in question.  You need to add them to the NIC.


ezconcept

Quote from: jimb on October 03, 2010, 10:25:26 PM
Best way to do this is to put your routed /64s on a LAN interface or loopback interface on the host in question.  You need to add them to the NIC.


Sorry I'm afraid that I'm not sure how to do that ??? - would you mind to explain further?  :o

snarked

#6
How to do that will depend on which operating system your machine uses.

ezconcept

Quote from: snarked on October 04, 2010, 11:21:44 AM
How to do that will depend on which oerating system your machine uses.
What about Debian?

jimb

Quote from: ezconcept on October 04, 2010, 01:00:24 PM
Quote from: snarked on October 04, 2010, 11:21:44 AM
How to do that will depend on which oerating system your machine uses.
What about Debian?

Like so:

ip addr add <routed /64 prefix>::1/64 dev <nic>
ip addr add <routed /64 prefix>::5/64 dev <nic>
ip addr add <routed /64 prefix>::dead:beef/64 dev <nic>
ip addr add <routed /64 prefix>::feed:f00d/64 dev <nic>
ip addr add <routed /64 prefix>::bad:c0de/64 dev <nic>

etc, etc...


tjmao

An IP address is just like a mailbox -- you won't be able to get a mail if you don't set it up.

Specifically in your case, if I understand your situation correctly, you have two computers on the network, one connected to tunnelbroker.net and acting as a router, the other computer running a server software but don't have an IPv6 connection already.

Suppose he-ipv6 is the interface used for IPv6-in-IPv4 tunneling, and eth0 the two Ethernet interfaces of the two computers that are attached to the same LAN,

Then on the computer that has tunneled IPv6 connection, do:

ip address add <routed-/64-prefix>::1/64 dev eth0
sysctl -w net.ipv6.conf.eth0.forwarding=1
sysctl -w net.ipv6.conf.he-ipv6.forwarding=1

On the "server" box, do:

ip address add <routed-/64-prefix>::2/64 dev eth0
ip address add <routed-/64-prefix>::3/64 dev eth0
...
ip address add <routed-/64-prefix>::b/64 dev eth0
ip route add ::/0 via <routed-/64-prefix>::1

So now basically you added a /64 to your LAN, and 10 address to the server computer. That's enough to make both machines IPv6-reachable, and there are 10 addresses reachable to the same "server".

You just don't configure them on the sit interface. sit is used for tunneling only. What you need instead is routing.

ezconcept

Quote from: jimb on October 04, 2010, 07:46:19 PM
Quote from: ezconcept on October 04, 2010, 01:00:24 PM
Quote from: snarked on October 04, 2010, 11:21:44 AM
How to do that will depend on which oerating system your machine uses.
What about Debian?

Like so:

ip addr add <routed /64 prefix>::1/64 dev <nic>
ip addr add <routed /64 prefix>::5/64 dev <nic>
ip addr add <routed /64 prefix>::dead:beef/64 dev <nic>
ip addr add <routed /64 prefix>::feed:f00d/64 dev <nic>
ip addr add <routed /64 prefix>::bad:c0de/64 dev <nic>

etc, etc...


So I'll be need to every IPs (not prefixes) right?

BTW, the command now I am using to "add" IP is:
ifconfig sit1 add inet6 ipv6/64

However it will only add one IP instead of whole block of /64

cholzhauer

Quote
However it will only add one IP instead of whole block of /64

I'm not sure why you want to do this?

AFAIK, there isn't a command to add 18 quintillion addresses at once

ezconcept

Quote from: cholzhauer on October 05, 2010, 06:16:56 AM
Quote
However it will only add one IP instead of whole block of /64

I'm not sure why you want to do this?

AFAIK, there isn't a command to add 18 quintillion addresses at once
Yea I got messed up - maybe I messed up some tutorials.
So I should add these up to my NIC one by one like IPv4, right?

cholzhauer

You can add as many IP's to an interface as you want with the method JimB posted, but again, I don't see the need for more than two or three.


ezconcept

Quote from: cholzhauer on October 05, 2010, 06:22:37 AM
You can add as many IP's to an interface as you want with the method JimB posted, but again, I don't see the need for more than two or three.


Okay - I get it  ;D