BGP peering is a TCP session on port 179 between two routers that exchange routing information. eBGP peers are in different autonomous systems (inter-provider). iBGP peers are in the same AS (intra-network). Peering requires explicit configuration on both sides – BGP does not auto-discover neighbors.
BGP peering establishes a routing relationship between two autonomous systems (eBGP) or within one AS (iBGP). Peers negotiate session parameters, exchange full routing tables, then send incremental updates as routes change. eBGP peers are typically directly connected (TTL=1) at Internet Exchange Points or private interconnects. iBGP peers can be any two routers in the same AS – often using route reflectors to avoid full-mesh requirements (N routers need N*(N-1)/2 iBGP sessions without reflectors). BGP peering types determine commercial relationships: transit (paying an upstream for full table), peering (free exchange of customer routes), and paid peering (payment for traffic ratio imbalance). A misconfigured or malicious peer can inject false routes affecting global internet traffic – route filtering and RPKI validation prevent this.
Gateway (Default Gateway)
A default gateway is the router a host sends packets to when the destination is not on the local subnet. Every host needs a default gateway to reach the internet or other networks. If the gateway is unreachable, all off-subnet communication fails – even if the host has a valid IP and DNS.
Routing Table
A routing table is a data structure in a router or host that maps destination network prefixes to next-hop addresses and interfaces. Longest prefix match determines which route applies. Routes come from static configuration, DHCP (default route), or dynamic protocols (BGP, OSPF). An empty routing table means no connectivity.