On the internet every organisation (provider, university, large company) runs its own autonomous system (AS) with an AS number. Inside it uses OSPF or similar. Between the autonomous systems BGP runs: it announces which networks are reachable via which AS and lets every organisation decide by its own rules.
Sequence
Two routers are configured as neighbours and open a TCP connection to port 179.
OPEN: they exchange AS number, router ID and hold time.
KEEPALIVE: keeps the connection alive.
UPDATE: announces networks (or withdraws them), each with the AS path: the list of autonomous systems via which the network is reachable.
NOTIFICATION: reports an error and closes the connection.
With several paths, the shortest AS path wins in leyoNET. If a router finds its own AS number in the path, it discards the route: this prevents loops. Between different ASes the connection is called eBGP, within one iBGP.
Setting up
Router(config)# router bgp 65001
Router(config-router)# neighbor 172.16.12.2 remote-as 65002
Router(config-router)# network 10.1.0.0/16
Router# show ip bgp summary
Router# show ip bgp
AS numbers from 64512 to 65534 are reserved for private use, like private IP addresses. In the data centre BGP also serves as the underlay for leaf-spine (Network design: core, distribution, access).
How to do it in leyoNET
The same text as in the app’s help (F1 key).
BGP
BGP connects autonomous systems (AS) such as providers and companies. Neighbours are configured by hand and talk over TCP port 179: OPEN, KEEPALIVE, then UPDATE with announced networks and the AS path.
eBGP between different ASes, iBGP within one
The shortest AS path wins
CLI: router bgp 65001, neighbor 10.0.0.2 remote-as 65002, show ip bgp summary.
See an example
BGP between autonomous systems
Three providers (AS 65001–65003) exchange their networks.
BGP sessions over TCP 179, OPEN and UPDATE with a growing AS path, then a ping across all three systems.
A data centre like those of large providers: two spines, three leafs, every leaf connected to both spines. The underlay routes with eBGP (one AS per leaf), the overlay extends VLAN 10 (web) and VLAN 20 (database) over all leafs with VXLAN.
First the switches set up their BGP sessions and learn the loopbacks. Then Web 1 pings Web 2 and DB 1 pings DB 2 – both within the same subnet, but across two routed hops. Filter “vxlan” or “bgp”.