A method of performing Internet Protocol Version 6, IPv6, stateless address auto-configuration, applied to a network device and comprising: sending (201; 501) a router advertisement, RA, message to a host, wherein the RA message comprises a prefix information option, the prefix information option comprises a prefix and a flag, and the prefix and the flag are used for IPv6 stateless address auto-configuration, wherein the flag is configured to indicate an address generation mode and an IPv6 address lifetime refresh mode, and the IPv6 stateless address auto-configuration comprises: generating an IPv6 address of the host; wherein the flag comprises a first field and a second field; the first field is configured to indicate the address generation mode; the second field is configured to indicate the IPv6 address lifetime refresh mode, wherein the first field and the second field occupy four bits in a reserved field comprised in the prefix information option; wherein, three consecutive bits of the four bits are occupied by the first field, and one bit is occupied by the second field; wherein the address generation mode comprises a mode in which the host generates an interface identifier of the host; characterized by the address generation mode being set according to an interface identifier generation mode pre-configured locally by the network device, or according to networking configuration of the network device, and wherein the first field carries any of the following information: first indication information indicating a first interface identifier generation mode, wherein the first interface identifier generation mode comprises: generating a random number, and determining the generated random number as the interface identifier of the host, second indication information indicating a second interface identifier generation mode, wherein the second interface identifier generation mode comprises: generating a random number, encrypting the generated random number, and determining the encrypted random number as the interface identifier of the host, and third indication information indicating a third interface identifier generation mode, wherein the third interface identifier generation mode comprises: generating the interface identifier of the host according to an interface identifier generation mode built in the host. sending (201; 501) a router advertisement, RA, message to a host, wherein the RA message comprises a prefix information option, the prefix information option comprises a prefix and a flag, and the prefix and the flag are used for IPv6 stateless address auto-configuration, wherein the flag is configured to indicate an address generation mode and an IPv6 address lifetime refresh mode, and the IPv6 stateless address auto-configuration comprises: generating an IPv6 address of the host; wherein the flag comprises a first field and a second field; the first field is configured to indicate the address generation mode; the second field is configured to indicate the IPv6 address lifetime refresh mode, wherein the first field and the second field occupy four bits in a reserved field comprised in the prefix information option; wherein, three consecutive bits of the four bits are occupied by the first field, and one bit is occupied by the second field; wherein the address generation mode comprises a mode in which the host generates an interface identifier of the host; characterized by the address generation mode being set according to an interface identifier generation mode pre-configured locally by the network device, or according to networking configuration of the network device, and wherein the first field carries any of the following information: first indication information indicating a first interface identifier generation mode, wherein the first interface identifier generation mode comprises: generating a random number, and determining the generated random number as the interface identifier of the host, second indication information indicating a second interface identifier generation mode, wherein the second interface identifier generation mode comprises: generating a random number, encrypting the generated random number, and determining the encrypted random number as the interface identifier of the host, and third indication information indicating a third interface identifier generation mode, wherein the third interface identifier generation mode comprises: generating the interface identifier of the host according to an interface identifier generation mode built in the host. first indication information indicating a first interface identifier generation mode, wherein the first interface identifier generation mode comprises: generating a random number, and determining the generated random number as the interface identifier of the host, second indication information indicating a second interface identifier generation mode, wherein the second interface identifier generation mode comprises: generating a random number, encrypting the generated random number, and determining the encrypted random number as the interface identifier of the host, and third indication information indicating a third interface identifier generation mode, wherein the third interface identifier generation mode comprises: generating the interface identifier of the host according to an interface identifier generation mode built in the host.