Okay. So, I've read up a lot on IPv6 addressing on the web, and I have a couple questions. Sorry, if they seem trivial. I'm just trying to learn, so that I can program this software for my job. I'll just specify the best source I found for each of my questions to make it easier, instead of linking all the pages I read.
After reading this:
https://www.iplocation.net/subnet-mask I came to the following conclusion, which is hopefully correct...
So if a subnet mask performs a bitwise AND operation on the IPv4/IPv6 address and I only need one IPv4/IPv6 address for each of my computers, can I just specify a subnet prefix length of 255.255.255.255 for IPv4 and /64 for IPv6, which should give me all bit 1 for each number, which means the bitwise AND operation would give me just one address i.e. the address that I specify when configuring my network? Then, I could just give one computer an address of fe80::000a/64 and the second one an address of fe80::000b/64
After reading this:
https://www.ipv6.com/general/ipv6-addressing/ I have a question.
For the link local addresses (specified in the above link by an IPv6 address of fe80::/10) shouldn't I be able to use any subnet prefix mask I want as long as my address starts with fe80::? Like, I should be able to use fe80::/64 not just fe80::/10 correct? A second question that I have is: Is it necessary to use these
special IPv6 addresses or is it just good practice and I can technically use whatever I want (other than these special addresses) and the IPv6 protocal should just work normally?
After reading this:
https://linux.die.net/man/8/ping6 I have a final question related to my C code.
The above link says that when using ping6 and a link-local address, I
have to specify the interface with the -I flag. Does this mean that when writing C code for IPv6, I have to also specify the interface in the C code, like Eth0 and Eth1, especially if my Linux computer has two ports?