How to add link local address for a virtual interface

We have implemented Network Extension with the capability of PacketTunnel. After setting the TunnelNetworkSettings it create a virtual interface. like utunX (X is a integer number)

Question/query

How can we add a custom link-local address for this virtual interface? is it any NEPacketTunnelProvider or other APIs to do this?

Via terminal we can do this with ifconfig cmd -> Like ifconfig utunname inet6 add fe80::2

Thanks

Answered by DTS Engineer in 749100022

I can’t see any good way to do this. You can add extra addresses by including them in the addresses property of the NEIPv6Settings but that wasn’t really designed for link-local addresses.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So you want a link-local address in addition to the address you’ve specified in the NETunnelNetworkSettings object?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Yes, we want a link-local address in addition to the address, that we have specified in the NETunnelNetworkSettings object

Accepted Answer

I can’t see any good way to do this. You can add extra addresses by including them in the addresses property of the NEIPv6Settings but that wasn’t really designed for link-local addresses.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to add link local address for a virtual interface
 
 
Q