BGP (Border Gateway Protocol)
→is the routing protocol that makes the internet work. It’s used to exchange routing information between different networks (Autonomous Systems), not within a single network.
Simple words mein ,:-
→BGP decide karta hai ki internet traffic ek network se dusre network tak kaunsa raasta le.
1.When you visit a website:
*Your traffic may cross dozens of independent networks,
*BGP tells routers which network to forward traffic to next,
*It selects paths based on policy, not just distance,
*Without BGP, ISPs wouldn’t know how to reach each other.
Get Soni_Madhav’s stories in your inbox
Join Medium for free to get updates from this writer.
2.Autonomous Systems (AS):-
BGP operates between Autonomous Systems (AS),
An AS is:
→A large network under a single administrative control
→Examples: ISPs, cloud providers, universities
Each AS has a unique ASN (Autonomous System Number)
Example:
— Google: AS15169
— Cloudflare: AS13335
3. How BGP Chooses Routes:-
*BGP is a path-vector protocol.
*>It chooses routes based on attributes, not speed.
Common attributes:
*AS_PATH — list of ASes traffic passes through (shorter preferred)
*LOCAL_PREF — internal preference (higher wins)
*MED — suggests preferred entry point
*NEXT_HOP — where to send traffic next
* This allows ISPs to enforce routing policy, not just shortest path.
4.Why BGP Is Critical (and Dangerous)? or BGP dangerous kyun ho sakta ?
BGP Has NO Built-in Authentication
This leads to(Is wajah se):
*BGP Hijacking ho sakta hai
*Route leaks(Traffic galat jagah chala jaata hai)
*Traffic interception (Data intercept ho sakta hai)
Famous Incidents:
*YouTube outage (2008)
*Facebook outage (2021)
*Cryptocurrency thefts via traffic hijacking





