In the present invention, packets are routed in a distributed and dynamic
manner via an internal packet-switched telecommunication network
comprising edge devices. A data packet is received from an external
telecommunication network to a source edge device, wherein there is
determined the address of the next-hop corresponding to the destination
address prefix of the received data packet. The address and network
interface of the target edge device corresponding to the determined next
hop are determined and there is generated a transmission packet addressed
to the determined target edge device, the transmission packet comprising
the received data packet and the determined address of the next hop and
the determined network interface of the target edge device. The generated
transmission packet is transmitted from the source edge device to the
target edge device via one or more internal telecommunication networks at
the data link layer level. The data packet is sent further via the
network interface of the target edge device based on the next-hop address
in question.