Wiki DE Start in the browser

Wiki › Protocols

BGP

Routing between providers and organisations: autonomous systems, neighbours over TCP 179, announced networks and the AS path.

Layer
7 (über TCP 179)
Standard
RFC 4271, RFC 6793
See an example
2 demos

What for

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

  1. Two routers are configured as neighbours and open a TCP connection to port 179.
  2. OPEN: they exchange AS number, router ID and hold time.
  3. KEEPALIVE: keeps the connection alive.
  4. UPDATE: announces networks (or withdraws them), each with the AS path: the list of autonomous systems via which the network is reachable.
  5. 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

  • Demo “BGP between autonomous systems” in leyoNETDemo “BGP between autonomous systems” in leyoNET
    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.

    Watch live Project file

  • Demo “Data centre: leaf-spine with BGP and VXLAN” in leyoNETDemo “Data centre: leaf-spine with BGP and VXLAN” in leyoNET
    Data centre: leaf-spine with BGP and VXLAN

    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”.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★★★★★ Two autonomous systems with BGP · 3 goals · Worksheet (German)
  • ★★★★★ Data centre: leaf-spine with BGP and VXLAN · 5 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
BGP-47Binary over TCP 179: OPEN, KEEPALIVE, UPDATE, NOTIFICATION; path selection by AS path length; no policies

Standards

  • RFC 4271 – A Border Gateway Protocol 4 (BGP-4)
  • RFC 6793 – BGP Support for Four-Octet Autonomous System (AS) Number Space

Read on

Found a mistake or have an idea? Source of this page on GitHub.