Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: ezconcept on October 03, 2010, 08:24:15 AM

Title: A (Simple) Newbie Question
Post by: ezconcept on October 03, 2010, 08:24:15 AM
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.
Title: Re: A (Simple) Newbie Question
Post by: allen4names on October 03, 2010, 09:15:17 AM
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.
Title: Re: A (Simple) Newbie Question
Post by: broquea on October 03, 2010, 11:50:25 AM
Indeed, especially since that would be 65k used out of 18+ quintillion.
Title: Re: A (Simple) Newbie Question
Post by: ezconcept on October 03, 2010, 09:46:53 PM
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") ?
Title: Re: A (Simple) Newbie Question
Post by: 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.

Title: Re: A (Simple) Newbie Question
Post by: ezconcept on October 04, 2010, 07:56:40 AM
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
Title: Re: A (Simple) Newbie Question
Post by: snarked on October 04, 2010, 11:21:44 AM
How to do that will depend on which operating system your machine uses.
Title: Re: A (Simple) Newbie Question
Post by: 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?
Title: Re: A (Simple) Newbie Question
Post by: 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...

Title: Re: A (Simple) Newbie Question
Post by: tjmao on October 04, 2010, 09:04:20 PM
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.
Title: Re: A (Simple) Newbie Question
Post by: ezconcept on October 04, 2010, 09:48:03 PM
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
Title: Re: A (Simple) Newbie Question
Post by: 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
Title: Re: A (Simple) Newbie Question
Post by: ezconcept on October 05, 2010, 06:19:23 AM
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?
Title: Re: A (Simple) Newbie Question
Post by: 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.

Title: Re: A (Simple) Newbie Question
Post by: ezconcept on October 05, 2010, 06:24:24 AM
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
Title: Re: A (Simple) Newbie Question
Post by: snarked on October 05, 2010, 11:53:50 AM
Re:  Reply #8.  You forgot one:

ip addr add <routed /64 prefix>::c001:babe/64 dev <nic>


I use about 20 IPv6 addresses - but I'm virtual hosting several domains, and each logical function (i.e. hostname) gets a separate address.
Title: Re: A (Simple) Newbie Question
Post by: grobe0ba on October 06, 2010, 03:24:28 PM
Another usage not mention, RDNS on addresses for us still addicted to IRC. I've got domains, so I may as well use them (and my 18 quintillion addresses) for something. :P