The internet is not one network. It is tens of thousands of separately managed networks that agree to exchange traffic. To make that work, routing protocols fall into two main categories: protocols used inside one organization’s network, and protocols used between organizations. Understanding these routing protocol categories, and the idea of an autonomous system, makes it much easier to see how traffic crosses the internet.
Autonomous systems
An autonomous system (AS) is a network, or group of networks, under one administrative control with a single, clearly defined routing policy. ISPs, cloud providers, large companies and universities usually run their own AS.
Each public AS has a unique autonomous system number (ASN):
- 16-bit ASNs range from 1 to 65535;
- 32-bit ASNs extend the range to about 4.29 billion;
- private ranges, 64512 to 65534 and 4200000000 to 4294967294, are for internal use only.
In India, organizations get ASNs and IP addresses through IRINN or APNIC.
What is a routing policy?
An AS decides which routes it accepts, which it advertises and which paths it prefers. For example, an ISP might prefer routes from paying customers over routes from peers, and never pass routes between two upstream providers.
Interior gateway protocols (IGPs)
IGPs exchange routes inside one autonomous system. Their goal is to find the fastest or shortest path, and they trust all routers in the network.
| IGP | Type | Notes |
|---|---|---|
| RIP | Distance vector | Simple; maximum 15 hops; mostly legacy |
| EIGRP | Advanced distance vector | Fast convergence; mainly Cisco |
| OSPF | Link state | Open standard; most common in enterprises |
| IS-IS | Link state | Popular in large ISP networks |
Read more about OSPF and EIGRP.
Exterior gateway protocols (EGPs)
EGPs exchange routes between autonomous systems. Here, the goal is not just the shortest path but control: each AS applies its own policies and does not trust others blindly.
The term also refers to a specific historical protocol called EGP, used in the early internet. It could not handle the internet’s growth and complex topology, so BGP replaced it.

BGP: the protocol of the internet
The Border Gateway Protocol (BGP), version 4, is today’s only exterior gateway protocol in practical use. It is a path vector protocol: each route carries the list of autonomous systems it has passed through. Routers use this AS path to avoid loops and to apply policy.
BGP has two forms:
- eBGP runs between different autonomous systems, such as between a company and its ISP.
- iBGP runs inside one AS to share external routes between its own border routers.
BGP runs over TCP port 179 and chooses paths using attributes such as local preference, AS path length and the multi-exit discriminator (MED). The global BGP table now holds more than a million IPv4 prefixes. For a detailed guide, see what is BGP.
IGP vs EGP at a glance
| IGP | EGP (BGP) | |
|---|---|---|
| Scope | Inside one AS | Between ASes |
| Goal | Fast, efficient paths | Policy control and scale |
| Trust | Trusts internal routers | Filters and validates neighbours |
| Size | Thousands of routes | Over a million routes |
| Examples | OSPF, IS-IS, EIGRP, RIP | BGP-4 |
Why it matters for security
Because BGP relies on networks trusting each other’s announcements, mistakes or attacks can redirect traffic. These are called route leaks and BGP hijacks. Defences include route filtering, RPKI route origin validation and following the MANRS best practices.
Sources
Need help with network security? We test routers, firewalls, ACLs and segmentation as part of our VAPT services and hardening audits. Contact us for a quote.

Pingback: What is Routing Protocol? Explain its type. - Youngster Company