code: func (d *driver) createNetwork(config *configuration) error {
  	networkList := d.getNetworks()
  	for _, nw := range networkList {
  		if config.Parent == nw.config.Parent {
  			return fmt.Errorf("network %s is already using parent interface %s",
  				getDummyName(stringid.TruncateID(nw.config.ID)), config.Parent)
  		}
  	}
  	if !parentExists(config.Parent) {
  		// if the --internal flag is set, create a dummy link
  		if config.Internal {
  			err := createDummyLink(config.Parent, getDummyName(stringid.TruncateID(config.ID)))
  			if err != nil {
  				return err
  			}
  			config.CreatedSlaveLink = true
  			// notify the user in logs they have limited communications
  			if config.Parent == getDummyName(stringid.TruncateID(config.ID)) {
  				logrus.Debugf("Empty -o parent= and --internal flags limit communications to other containers inside of network: %s",
  					config.Parent)
  			}
  		} else {
  			// if the subinterface parent_iface.vlan_id checks do not pass, return err.
  			//  a valid example is 'eth0.10' for a parent iface 'eth0' with a vlan id '10'
  			err := createVlanLink(config.Parent)
  			if err != nil {
  				return err
  			}
  			// if driver created the networks slave link, record it for future deletion
  			config.CreatedSlaveLink = true
  		}
  	}
  	n := &network{
  		id:        config.ID,
  		driver:    d,
  		endpoints: endpointTable{},
  		config:    config,
  	}
  	// add the *network
  	d.addNetwork(n)
  
  	return nil
  }
docs: // createNetwork is used by new network callbacks and persistent network cache