A method of managing connectivity between a cellular network and a plurality of devices (26A, 26B, 34) in one or more multi-hop capillary networks, wherein one or more gateways (24A, 24B) connect the one or more multi-hop capillary networks to the cellular network, the method implemented in a management node of the cellular network and comprising: determining, at the management node, a topology of the one or more multi-hop capillary networks based on reachability information received from at least one of the plurality of devices (26A, 26B, 34), wherein the topology indicates which devices are within communication range of other devices and gateways in the one or more capillary networks, wherein the plurality of devices (26A, 26B, 34) use short-range radio access technology, wherein the cellular network uses long-range radio access technology, and wherein the one or more gateways (24A, 24B) use long-range radio access technology and short-range radio access technology; for a first device that is within communication range of at least one gateway: determining, at the management node, which gateway the first device should use to connect to the cellular network based on the determined topology; and transmitting a notification to the first device that indicates the determined gateway; and for a second device that is not within communication range of any gateway: determining, at the management node, a set of one or more of the plurality of devices, including at least one device that is within communication range of at least one gateway, to relay traffic between the second device and a gateway, based on the determined topology; and transmitting a notification to the second device that indicates the determined set, wherein the determining which gateway the first device should use to connect to the cellular network is further based on constraint information indicating one or more properties of the first device and/or constraint information indicating one or more properties of the at least one gateway of which the first device is within communication range, wherein the determining of the set of one or more of the plurality of devices to relay traffic is further based on constraint information indicating one or more properties of the devices in the set and/or constraint information indicating one or more properties of at least one gateway that is within communication range of a device in the set, wherein the determining which gateway the first device should use to connect to the cellular network, the determining of the set of one or more of the plurality of devices to relay traffic, or both, is further based on a policy of the management node that comprises a set of rules defining how to connect the plurality of devices to the cellular network based on the constraint information. determining, at the management node, a topology of the one or more multi-hop capillary networks based on reachability information received from at least one of the plurality of devices (26A, 26B, 34), wherein the topology indicates which devices are within communication range of other devices and gateways in the one or more capillary networks, wherein the plurality of devices (26A, 26B, 34) use short-range radio access technology, wherein the cellular network uses long-range radio access technology, and wherein the one or more gateways (24A, 24B) use long-range radio access technology and short-range radio access technology; for a first device that is within communication range of at least one gateway: determining, at the management node, which gateway the first device should use to connect to the cellular network based on the determined topology; and transmitting a notification to the first device that indicates the determined gateway; and determining, at the management node, which gateway the first device should use to connect to the cellular network based on the determined topology; and transmitting a notification to the first device that indicates the determined gateway; and for a second device that is not within communication range of any gateway: determining, at the management node, a set of one or more of the plurality of devices, including at least one device that is within communication range of at least one gateway, to relay traffic between the second device and a gateway, based on the determined topology; and