# A worked example; the fields are documented in
# crates/server/proto/config.proto.
router_id: "10.0.0.1"
local_asn: 65000

# Where to accept BGP connections. Port 179 needs privileges; pick another
# port to run unprivileged against a peer that dials a custom port.
listen_endpoints { address: "127.0.0.1" port: 179 }
listen_endpoints { address: "::1" port: 179 }

# A peer we connect to (and accept connections from).
peers {
    name: "r1"
    endpoint { address: "127.0.0.1" port: 1791 }
    remote_asn: 65001
    hold_time_seconds: 30
    # Offer only these families to the peer. Left out, all are offered.
    address_families: IPV4_UNICAST
    address_families: IPV6_UNICAST
}
connect_retry_seconds: 5

# Let a restarted peer replace a stale Established session immediately
# (RFC 4271 CollisionDetectEstablishedState). Default false.
collision_detect_established_state: false

# Routes this router originates, announced to every peer.
originate { prefix: "10.100.0.0/16" }
originate {
    prefix: "2001:db8:100::/48"
    med: 50
    communities: "65000:100"
    large_communities: "65000:1:2"
}

# Read-only status page, JSON API and metrics. It has no authentication:
# keep it on loopback or behind a reverse proxy.
http_endpoint { address: "127.0.0.1" port: 8080 }
