Patent ID: 7706374

Claim:
A method for assigning an IP address to at least one terminal device connected to a router through a layer-2 device network, comprising: transmitting, from the router to the layer-2 device network, a Router Advertisement message which carries routing prefix information comprising a routing prefix; receiving, at the layer-2 device network, the Router Advertisement message via an uplink, wherein the layer-2 device network comprises a plurality of downlink ports; extending, at the layer-2 device network, the routing prefix for each of the plurality of downlink ports of the layer-2 device network so as to generate a plurality of extended routing prefixes which identify respective downlink ports uniquely within the broadcast domain of the subnet where the layer-2 device network is located according to the routing prefix information in the received Router Advertisement message, each of the plurality of extended routing prefixes having a different extended part as well as the routing prefix in the Router Advertisement message; and transmitting, from the layer-2 device network to a terminal device corresponding to one of the plurality of downlink ports, a Router Advertisement message which carries extended routing prefix information comprising an extended routing prefix via the port corresponding to the terminal device; and generating, at the terminal device, an IP address of the terminal device according to the extended routing prefix information in the received Router Advertisement message and an interface ID of the terminal device.