|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Getting a specific IPv6 address using DHCP (or not)
Hello,
I've managed to do what I wanted but I'd like to know if this is the correct way. Some context: I have a OpenBSD box behind a modem/router that provides both IPv4 address (LAN) and IPv6 address (DHCPv6 stateless). In order to always get the same IPv6 even after reboot I've put this in my /etc/hostname.nfe0: Code:
dhcp rtsol inet6 my_ip6_here But what is/was rtsol? I found out that it was removed in the 5.7 release. However, if I remove the line I can't access my box from the outside. I'm not sure what "ICMPv6 Router Solicitations" are but my guess is that's what's being used to communicate with the DHCPv6 server of my modem, correct? Strange name though... So, if rtsol was removed is it correct for me to use this line? (I found it in man hostname.if) Then, the inet6 line is what I use to add my "fixed" IPv6 address. It works correctly so this line must somehow be telling the DHCPv6 server I'm requesting this IPv6 address, correct? Another thing that's bothering me is that my nfe0 interface still has other IPv6 addresses, is there a way to only have one? (the one I specify in hostname.if) Thanks a lot! |
|
|||
I don't necessarily want to use DHCP to get my IPv6 but I don't know how else to do it. I need a fixed IPv6 so I can access my OpenBSD from outside my home network.
My ISP also gives me a /64 and I'd like to chose a specific one for my OpenBSD box. Are you saying I shouldn't be using DHCP in my case? Concerning rtsol, that means I could replace it by inet6 autoconf? |
|
||||
Quote:
One assigns a global /128 and uses prefix delegation to assign a separate /64. This is a residential connection, and I treat the /128 as dynamic, while I consider the /64 a permanent delegation. I am not currently assigning any inbound static addresses on this network, I'm only using it outbound. But if I did, I would use "inet6 alias [my.chosen.alias.address]" in my hostname.if file, selecting one of the 18-and-a-half septillion addresses within my allocated /64. The other ISP merely handed me an IPv6 address within a /64, and said, "this is your base address, and you may allocate whatever you wish within your /64." The base address is derived from the EUI64 translation of the NIC's 48-bit MAC address. Quote:
DHCP (version 6, of course) has its place, and its uses, but it is not typically used for individual address assignments in IPv6, either dynamic, which is built into SLAAC, or static, where I just use an alias or a statically assigned address, such as with my commercial ISP. Quote:
Last edited by jggimi; 11th February 2017 at 12:30 AM. Reason: typo |
|
||||
I'll add that I see three current uses for DHCPv6. At least, in any use case I can foresee the possibility of needing.
|
|
||||
A follow-on post to try to add a little clarity.
The commercial ISP and its /64 are the simplest. I have an externally facing server with a single NIC, and no internal network. At the moment, there are 10 IPv6 addresses assigned to the NIC: 1 local link, 2 static addresses, and 7 dynamic, private addresses.
My router is configured differently. There are two NICs that are used to forward IPv6: an internally facing NIC, and the egress NIC. As noted previously, wide-dhcpv6 is used for /64 delegation. The server uses rtadvd(8) to apply the delegation on the local network.
The last piece of the puzzle is DHCPv6. The client configuration accepts the prefix delegation by communicating on the egress NIC, and assigns the prefix delegation to the inner NIC, so that it can be used by rtadvd(). Last edited by jggimi; 11th February 2017 at 04:10 PM. Reason: typos. always. |
|
|||
Well thanks for detailed answers! I'll add the alias keyword then, but what's the practical difference if I don't use the keyword? The ifconfig output seems to be the same. Also, is there a way for my OpenBSD box not to use rtsol and directly inform my ISP of which IPv6 (within the /64 I'm assigned) I want to use?
|
|
||||
A NIC can have multiple IP addresses assigned simultaneously. OpenBSD IPv4 treats one address as the primary, and any additional addresses as alias addresses. The NIC will respond to all of them. For IPv6, as there are always multiple addresses, I let NDP set the primary address and set my secondary static addresses as aliases.
I will guess that if you did not set a primary address in your hostname.if(5) file, NDP SLAAC would assign the address for you. That assumes your ISP is using SLAAC for your /64, as one of my ISPs does. --- The only listening addresses I use are addresses that either I have assigned with an alias, or the unique /64 address assigned by an ISP. As my rtadvd(8) service has assigned such a "base" address to the workstation when it configures with SLAAC, I could use that for any listening services, but I have nothing configured to listen to it. All other unique local addresses I have are for outgoing traffic, using autoconfprivacy. I am not using any unique local addresses (fd00::/8), but if I were I would set them via aliases also. Unique local addresses are somewhat equivalent to the private addresses in IPv4 (10/8, 192.168/16, 172.16/12). Their purpose is for local network communications, as they cannot be routed over the Internet. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
IPv6 and address reputation management: blocklists, &c. | jggimi | General software and network | 3 | 18th January 2017 08:01 PM |
Specific DHCP config on OpenBSD | avayax | OpenBSD General | 3 | 8th January 2016 11:37 PM |
5.6 ifconfig add IPv6 address no longer adds route for whole subnet. | SlyM | OpenBSD General | 6 | 4th November 2014 02:05 PM |
With World IPv6 Launch, IPv6 on by default will be the new normal | J65nko | News | 0 | 29th March 2012 07:59 PM |
Asking about IPv6 address | berlowin | Off-Topic | 2 | 9th July 2008 02:39 AM |