Skip to content

Commit efde389

Browse files
committed
Chore: Doc
1 parent 0b3eafb commit efde389

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,25 @@ Resut:
481481
```
482482
---
483483

484+
## IPv6 Unique Local Address (ULA)
485+
486+
Unique Local Addresses are IPv6 addresses in the range fc00::/7 that are not routed on the public Internet. They are the IPv6 equivalent of private IPv4 addresses (e.g. 10.0.0.0/8, 192.168.0.0/16).
487+
488+
```C#
489+
// Generate a random ULA prefix
490+
var randomUla = UniqueLocalAddress.GenerateUlaPrefix();
491+
Console.WriteLine($"Random ULA: {randomUla}"); // e.g., fd12:3456:789a::/48
492+
493+
// Create subnets with int subnet IDs (CLS-compliant)
494+
var subnet1 = UniqueLocalAddress.CreateUlaSubnet(randomUla, 1);
495+
var subnet2 = UniqueLocalAddress.CreateUlaSubnet(randomUla, 2);
496+
var maxSubnet = UniqueLocalAddress.CreateUlaSubnet(randomUla, UniqueLocalAddress.MaxSubnetId);
497+
498+
Console.WriteLine($"Subnet 1: {subnet1}"); // e.g., fd12:3456:
499+
```
500+
501+
---
502+
484503
## IPNetwork utility command line
485504

486505
IPNetwork utility command line take care of complex network, ip, netmask,

0 commit comments

Comments
 (0)