networkx.generators.internet_as_graphs.random_internet_as_graph

networkx.generators.internet_as_graphs.random_internet_as_graph(n, seed=None)[source]

Generates a random undirected graph resembling the Internet AS network

Parameters:
  • n (integer in [1000, 10000]) – Number of graph nodes

  • seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness.

Returns:

G – A randomly generated undirected graph

Return type:

Networkx Graph object

Notes

This algorithm returns an undirected graph resembling the Internet Autonomous System (AS) network, it uses the approach by Elmokashfi et al. [1] and it grants the properties described in the related paper [1].

Each node models an autonomous system, with an attribute ‘type’ specifying its kind; tier-1 (T), mid-level (M), customer (C) or content-provider (CP). Each edge models an ADV communication link (hence, bidirectional) with .. attribute:: - type

transit|peer, the kind of commercial agreement between nodes;

- customer

<node id>, the identifier of the node acting as customer (‘none’ if type is peer).

References