A class representing the IPv6 protocol that allows managing IPv6 settings, running IPv6 commands and accessing attached protocols. More...
Methods | |
Description.Get | |
Returns a textual description of the object. | |
Destructor | |
Gateway.Advertised.Get | |
Returns the current (preferred) gateway of this IPv6 protocol, set either manually or by performing DHCP or SLAAC. More... | |
Gateway.Manual.Get | |
Returns the current manual configured gateway of this IPv6 protocol. More... | |
Gateway.Manual.Set | |
configures the manual gateway. More... | |
Ip.Add address | |
Adds a manual IPv6 address to the port. More... | |
Ip.Clear | |
Removes all manually added IP addresses from this port. More... | |
Ip.Dhcp.Get | |
Returns all IPv6 addresses that where obtained by the DHCPv6 protocol. More... | |
Ip.LinkLocal.Get | |
Returns the linklocal address which is based on the MAC address of the port. More... | |
Ip.Manual.Add address | |
Adds a manual IPv6 address to the port. More... | |
Ip.Manual.Clear | |
Removes all manually added IP addresses from this port. More... | |
Ip.Manual.Get | |
Returns all IPv6 addresses that where manually added by the user. More... | |
Ip.Manual.Remove address | |
Removes a specified manually added IP address from this port. More... | |
Ip.Remove address | |
Removes a specified manually added IP address from this port. More... | |
Ip.Stateless.Get | |
Returns all IPv6 addresses that where obtained by stateless autoconfiguration. More... | |
Parent.Get | |
Returns the parent object. | |
Protocol.Dhcp.Get | |
Returns the DHCPv6 protocol attached to this protocol through which DHCP can be performed. More... | |
Protocol.Icmp.Get | |
Returns the ICMPv6 protocol attached to this protocol that allows starting ICMP sessions. More... | |
Protocol.Mld.Get | |
Returns the MLD protocol. More... | |
Protocol.NeighborDiscovery address | |
Resolves a destination IPv6 address by explicitly performing Neighbor Discovery. More... | |
Resolve address | |
Resolves a destination IPv6 address by looking in the neighbour cache or performing Neighbor Discovery. More... | |
SelectSourceAddressFor address | |
Selects an appropriate IPv6 source address for a given destination address. More... | |
StatelessAutoconfiguration.Async | |
Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address. More... | |
StatelessAutoconfiguration | |
Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address. More... | |
A class representing the IPv6 protocol that allows managing IPv6 settings, running IPv6 commands and accessing attached protocols.
Each ByteBlowerPort must be configured with a layer 3 protocol through the method ByteBlowerPort::Layer3.IPv6.Set. If the IPv6 protocol is selected, this object is returned. Through it, the IPv6 protocol instance on that port can be configured.
It provides the following functionality:
Layer3.IPv6::Destructor |
Layer3.IPv6::Gateway.Advertised.Get |
Returns the current (preferred) gateway of this IPv6 protocol, set either manually or by performing DHCP or SLAAC.
The first time an IP address is added (either manually or by performing DHCP or SLAAC) the preferred gateway is also automatically detected. From that moment on, it can be retrieved by this method.
When no gateway is found when the IP is set (manually, through DHCP or SLAAC) the gateway is set to the null address (::). Every time this getter is called, IPv6 will look for router advertisements. If one is found, it will be updated automatically.
Once the preferred gateway is set using Gateway.Manual.Set, this value remains the preferred gateway until it is explicitly replaced. Performing DHCP or SLAAC again will not replace the manually set value. This may change in the future.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example retrieves the current gateway.
Returns:
fe80:0000:0000:0000:0290:0eff:fe1c:e44d
Layer3.IPv6::Gateway.Manual.Get |
Returns the current manual configured gateway of this IPv6 protocol.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example retrieves the current gateway.
Returns:
fe80:0000:0000:0000:0290:0eff:fe1c:e44d
Layer3.IPv6::Gateway.Manual.Set |
configures the manual gateway.
The current IPv6 implementation is limited to a single gateway. This is the preferred gateway. This may change in the future.
ByteBlower.Protocol.InvalidValue | Setting one of the port's own IP addresses as gateway is not possible and causes this exception. |
ByteBlower.Protocol.AddressUnavailable | Explicitly setting an unresolvable IPv6 address as gateway causes this exception. |
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example sets the current gateway.
Layer3.IPv6::Ip.Add | address | ||
Adds a manual IPv6 address to the port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method adds such a manual IP address to the port. Note this method also adds the prefix derived from the specified address to the list of on-link prefixes.
If the IPv6 protocol is not yet initialized, calling this method the first time will do so. This initialization causes the host's link-local address to be generated and looks for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::).
address | The IPv6 address you want to add. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... A custom prefix length can be provided by appending this argument with '/<prefix length>', where <prefix length> can be a number between 0 and 128. If no such prefix length is appended, the default length of 64 is taken. |
This examples adds a global address address using default prefix length 64.
Returns:
2001:1234:0000:0000:0000:0000:0000:0001/64
This examples adds a global address address using prefix length 56.
Returns:
2001:1234:0000:0000:0000:0000:0000:0002/56
Layer3.IPv6::Ip.Clear |
Removes all manually added IP addresses from this port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method removes all addresses in the first category.
This example removes all manually added addresses from the port.
Returns:
Layer3.IPv6::Ip.Dhcp.Get |
Returns all IPv6 addresses that where obtained by the DHCPv6 protocol.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method returns all DHCP IPv6 addresses on the port. They are configured by retrieving the DHCP protocol using Protocol.Dhcp.Get and executing Layer5.Dhcpv6::Perform.
Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example returns the list of IPv6 addresses obtained by DHCP.
Returns:
fdec:5ef9:84b7:4100:0000:ffff:0000:5a38/64
Layer3.IPv6::Ip.LinkLocal.Get |
Returns the linklocal address which is based on the MAC address of the port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method returns the link-local IPv6 address on the port. It uses the dedicated fe80::/64 prefix as the first half of the address and the modified EUI-64 number (based on the Ethernet MAC address) as the last half of the address.
Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example returns the link-local address of a port.
Returns:
fe80:0000:0000:0000:02ff:25ff:fe00:0001
Layer3.IPv6::Ip.Manual.Add | address | ||
Adds a manual IPv6 address to the port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method adds such a manual IP address to the port. Note this method also adds the prefix derived from the specified address to the list of on-link prefixes.
If the IPv6 protocol is not yet initialized, calling this method the first time will do so. This initialization causes the host's link-local address to be generated and looks for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::).
address | The IPv6 address you want to add. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... A custom prefix length can be provided by appending this argument with '/<prefix length>', where <prefix length> can be a number between 0 and 128. If no such prefix length is appended, the default length of 64 is taken. |
This examples adds a global address address using default prefix length 64.
Returns:
2001:1234:0000:0000:0000:0000:0000:0001/64
This examples adds a global address address using prefix length 56.
Returns:
2001:1234:0000:0000:0000:0000:0000:0002/56
Layer3.IPv6::Ip.Manual.Clear |
Removes all manually added IP addresses from this port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method removes all addresses in the first category.
This example removes all manually added addresses from the port.
Returns:
Layer3.IPv6::Ip.Manual.Get |
Returns all IPv6 addresses that where manually added by the user.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method returns all manual IPv6 addresses on the port.
Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example returns the list of manual IPv6 addresses.
Returns:
2001:1234:0000:0000:0000:0000:0000:0001/64 2001:1234:0000:0000:0000:0000:0000:0002/56
Layer3.IPv6::Ip.Manual.Remove | address | ||
Removes a specified manually added IP address from this port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method removes the specified IPv6 address from the port if it was added manually before. If the address was not added manually, nothing is done.
address | The IPv6 address you want to add. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... No prefix length suffix (e.g. '/64') may be included! |
This example removes the specified address from the port if it was previously added.
Layer3.IPv6::Ip.Remove | address | ||
Removes a specified manually added IP address from this port.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method removes the specified IPv6 address from the port if it was added manually before. If the address was not added manually, nothing is done.
address | The IPv6 address you want to add. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... No prefix length suffix (e.g. '/64') may be included! |
This example removes the specified address from the port if it was previously added.
Layer3.IPv6::Ip.Stateless.Get |
Returns all IPv6 addresses that where obtained by stateless autoconfiguration.
An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: manually added addresses, addresses obtained through the DHCP protocol, addresses obtained using stateless address autoconfiguration (SLAAC) and linklocal addresses.
This method returns all SLAAC IPv6 addresses on the port. They are configuredby calling the StatelessAutoconfiguration function.
Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.
ByteBlower.Protocol.Unavailable | This protocol is not initialized until a first IP is set (by adding an IP address manually, performing SLAAC or performing DHCP). Calling this method before that is done causes this exception. |
This example returns the list of IPv6 addresses obtained by Stateless Autoconfiguration.
Returns:
fdec:5ef9:84b7:4100:02ff:25ff:fe00:0001/64
Layer3.IPv6::Protocol.Dhcp.Get |
Returns the DHCPv6 protocol attached to this protocol through which DHCP can be performed.
See Layer5.Dhcpv6 for more configuration options. To actually perform DHCP, execute the Layer5.Dhcpv6::Perform method on the returned object.
If the IPv6 protocol is not yet initialized, performing DHCP the first time will do so. This initialization causes the host's link-local address to be generated and looks for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::) and no address is set.
This example returns the DHCP object.
Returns:
<Layer5.Dhcpv6 object>
This example immediately performs DHCP. Nothing is returned, but a DHCP IP address and preferred gateway are set or the relevant exception is thrown.
Layer3.IPv6::Protocol.Icmp.Get |
Returns the ICMPv6 protocol attached to this protocol that allows starting ICMP sessions.
See Layer3.Icmpv6Protocol for more information on creating ICMP sessions.
This example returns the ICMP object.
Returns:
<Layer3.Icmpv6Protocol object>
Layer3.IPv6::Protocol.Mld.Get |
Returns the MLD protocol.
This example gets the MLD protocol object.
Returns:
<Layer4.Mld object>
Layer3.IPv6::Protocol.NeighborDiscovery | address | ||
Resolves a destination IPv6 address by explicitly performing Neighbor Discovery.
To use the neighbor cache first when resolving an IPv6 address, execute the Resolve method. This may return significantly faster then this method.
address | The IPv6 address that must be resolved. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... No prefix length suffix (e.g. '/64') may be included! |
ByteBlower.Protocol.Arp.NoReply | When nobody replies to the Neighbour Discovery request (i.e. neither the host itself or a forwarding router), this exception is thrown. |
This simple example resolves a link-local IPv6 address. This example clearly shows that the host part of a link-local address is based on its layer 2 MAC address.
Returns:
00:FF:25:00:00:01
Layer3.IPv6::Resolve | address | ||
Resolves a destination IPv6 address by looking in the neighbour cache or performing Neighbor Discovery.
To force this host to perform the Neighbor Discovery algorithm and thus bypass the cache, execute the Protocol.NeighborDiscovery method.
address | The IPv6 address that must be resolved. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, .... No prefix length suffix (e.g. '/64') may be included! |
ByteBlower.Protocol.Arp.NoReply | When the item is not present in the neighbor cache and nobody replies to the Neighbour Discovery request (i.e. neither the host itself or a forwarding router), this exception is thrown. |
This simple example resolves a link-local IPv6 address. This example clearly shows that the host part of a link-local address is based on its layer 2 MAC address.
Returns:
00:FF:25:00:00:01
Layer3.IPv6::SelectSourceAddressFor | address | ||
Selects an appropriate IPv6 source address for a given destination address.
The ByteBlower implements source address selection according to the rules specified in RFC 6724 Section 5.
address | The destination address for which we want to select an appropriate source address. |
Here we select a source address for a given link-local IPv6 destination address. The returned address will also be a link-local address because this matches the scope of the destination address.
Returns:
fe80:0000:0000:0000:02ff:25ff:fe00:0002
Layer3.IPv6::StatelessAutoconfiguration |
Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address.
The stateless address autoconfiguration (SLAAC) is done in an asynchronous manner. It works through the IPv6 Neighbor Discovery Protocol (NDP). It creates an IP address based on the prefix information from incoming router advertisements (first 64 bits) and the hosts MAC address (last 64 bits).
Note that SLAAC and the NDP is also used to create the link-local IP address. This address has a fixed prefix (fe80::/64) and the same host part. This address is immediately generated when the IPv6 protocol is initialized and is not part of this call.
If the IPv6 protocol is not yet initialized, calling this method the first time will do so. This initialization sets the link-local address described above and listens for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::).
When no routing advertisement is found, no address is added.
This example performs stateless address autoconfiguration on this host.
Layer3.IPv6::StatelessAutoconfiguration.Async |
Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address.
This is a asynchronous call so it will return immediately. If you want to wait until it has finished then call the StatelessAutoconfiguration method after having called this method. This will also rethrow any exceptions that may have occured on the server side.
Returns immediately.
This example performs stateless address autoconfiguration on this host.