Border Gateway Protocol exchanges reachability information between routing domains called autonomous systems. It is a policy-driven path-vector protocol: operators decide which prefixes to accept, prefer, and advertise rather than relying on a single shortest-path metric.
eBGP and iBGP serve different scopes
| Session type | Where it runs | Primary purpose |
|---|---|---|
| eBGP | Between autonomous systems | Exchange routes with external networks |
| iBGP | Inside one autonomous system | Distribute externally learned and policy-controlled routes internally |
BGP uses TCP port 179. A stable TCP session, matching neighbor parameters, correct autonomous-system numbers, reachable peer addresses, and compatible address families are prerequisites for route exchange.
Important path attributes
- LOCAL_PREF influences outbound selection inside an autonomous system; higher is commonly preferred.
- AS_PATH records traversed autonomous systems and helps prevent loops.
- ORIGIN indicates how a route entered BGP.
- MED can suggest a preferred entry point to a neighboring autonomous system.
- NEXT_HOP identifies the address used to reach the advertised prefix.
- Communities attach policy labels that simplify consistent routing decisions.
Path selection is implementation-specific
Most platforms evaluate attributes in a defined sequence, but exact order and tie-breakers vary. Verify the vendor decision process before predicting a winner. Policy set by weight, local preference, route maps, and filtering can be more important than raw AS-path length.
Session states and diagnosis
Start with the neighbor state, then work outward. Idle or Active often points to reachability, addressing, TCP, or configuration problems. An Established session proves the control channel is up, but it does not prove that useful routes are accepted or installed.
- Verify peer IP reachability and the expected source address.
- Confirm local and remote autonomous-system numbers.
- Check TCP 179 and any authentication configuration.
- Verify address-family activation and import/export policy.
- Inspect received, accepted, selected, and advertised routes separately.
- Confirm next-hop reachability and routing-table installation.
Safety and route hygiene
Apply explicit prefix limits, inbound and outbound filters, maximum-prefix thresholds, bogon filtering, and RPKI-based origin validation where appropriate. Use change control for policy updates; a syntactically valid route map can still create a large outage.
Join the discussion
0 CommentsAsk questions, add context, or share what worked.
More from Melochip Editorial
Learn what Playwright testing is, why modern QA teams use it, how testers can get started, and the major types...
7 min read · Sep 19, 2026
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes security best practices with RBAC, Secrets, ServiceAccounts, Pod securityContext, NetworkPoli...
6 min read · Sep 17, 2026Related articles
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes monitoring and logs with kubectl logs, events, metrics-server, top commands, Prometheus, Graf...
5 min read · Sep 17, 2026
Learn Kubernetes Ingress with controllers, IngressClass, host and path routing, TLS, DNS, annotations, redirec...
8 min read · Sep 17, 2026
Troubleshoot Kubernetes issues including Pending Pods, CrashLoopBackOff, ImagePullBackOff, service routing, in...
7 min read · Sep 17, 2026Stay in the loop. Get new Melochip articles
Receive Melochip article updates when new articles are available. Explicit opt-in only.
No comments yet. Start the discussion.