1. A computer-implemented method for forwarding a packet with a hierarchically structured variable-length identifier (HSVLI) in a network, comprising: performing a lookup for a packet based on an HSVLI in a local forwarding information base (FIB) to determine forwarding information for the packet, wherein the packet comprises an interest for a piece of content expressed using the HSVLI; wherein the HSVLI indicates the content and is hierarchically structured, and comprises contiguous components ordered from a most general level to a most specific level, and wherein the length of a respective HSVLI is not fixed; in response to not finding a match for the HSVLI in the local FIB: determining, by a connectivity agent, a forwarding decision and the forwarding information for the HSVLI; and configuring an entry in the FIB to contain the HSVLI associated with the determined forwarding decision and forwarding information; forwarding the packet based on the forwarding information; and in response to receiving a second packet containing at least a prefix of the HSVLI and to identifying, via a second lookup in the local FIB that the HSVLI is a longest match for the prefix having a largest number of matched name components, forwarding the second packet based on the forwarding information.