code: func (b *BGP) network(n *net.IPNet, advertise bool) error {
  	var prefix string
  	if !advertise {
  		prefix = "no "
  	}
  	family := "ipv4 unicast"
  	if n.IP.To4() == nil {
  		family = "ipv6"
  	}
  	prefixLen, _ := n.Mask.Size()
  	cmds := []string{
  		"configure terminal",
  		fmt.Sprintf("router bgp %d", b.asn),
  		fmt.Sprintf("address-family %s", family),
  		fmt.Sprintf("%snetwork %s/%d", prefix, n.IP, prefixLen),
  		"end",
  	}
  	bgpConfigLock.Lock()
  	defer bgpConfigLock.Unlock()
  	return b.vty.Commands(cmds)
  }
docs: // network adds or removes a network statement from the BGP configuration.