What Is Internal Gateway Protocol in Networking?
Also known as: Internal Gateway Protocol, IGP routing, OSPF vs RIP, CCNA routing protocols, Network+ routing
This page mentions older exam versions. See the Current Exam Context and Legacy Exam Context sections below for the updated mapping.
On This Page
Quick Definition
An Internal Gateway Protocol is a set of rules that routers inside one organization use to share information about how to reach different networks. Think of it like the internal mail system of a large company, where employees have their own way to sort and deliver letters within the building. This protocol helps routers automatically learn the best paths to send data packets without needing a human to update them manually.
Must Know for Exams
Internal Gateway Protocols are a core topic in both the CompTIA Network+ and Cisco CCNA certification exams. In Network+ (N10-008 or N10-009), the exam objectives include comparing and contrasting routing protocols, specifically distinguishing between distance-vector and link-state protocols. You must know the characteristics of IGPs like RIP, OSPF, and EIGRP, including their metrics, convergence times, and administrative distances. The exam often asks about the basic operation of these protocols without requiring deep configuration skills.
For the CCNA (200-301), IGPs are covered in depth. The exam objectives explicitly list OSPFv2 for IPv4 and OSPFv3 for IPv6, as well as EIGRP (though EIGRP is less emphasized in recent versions). You are expected to understand the OSPF neighbor state machine, the role of designated routers (DR) and backup designated routers (BDR) on multi-access networks, and how to configure single-area OSPF on Cisco routers. The CCNA exam also tests your ability to interpret show commands (e.g., "show ip ospf neighbor", "show ip route") to verify IGP operation and troubleshoot routing issues.
Both exams require you to know the advantages and disadvantages of IGPs compared to static routing and EGP (BGP). You might face multiple-choice questions asking which protocol is best for a specific scenario, such as a small office with simple needs versus a large enterprise with redundancy requirements. Scenario-based questions often describe a network topology with a link failure and ask which IGP would converge fastest or which command reveals the next hop. Mastery of IGPs is essential for passing these certifications because routing is a fundamental networking concept that appears in many other exam domains, such as WAN technologies, network security, and troubleshooting.
Simple Meaning
Imagine you work in a giant office building with hundreds of rooms, each containing a different department. You need to send a package from the Marketing department on floor 3 to the IT department on floor 10. There are many possible routes: you could take the main elevator, use a service staircase, or walk through the cafeteria. Some routes are fast but might be blocked during lunch, while others are longer but always open. You need a way to decide the best path every time you send a package.
An Internal Gateway Protocol is like a set of rules that all the building's security guards and mailroom staff follow to decide which route to use for each delivery. These rules are designed to work only within your building (your organization's network). They automatically update when a new hallway is built or when an elevator breaks down. The protocol ensures that every package arrives as quickly as possible without anyone having to stand at a map and manually choose the route each time.
In computer networking, the "building" is called an Autonomous System (AS), which could be a company, a university, or an ISP. The "packages" are data packets, and the "guards" are routers. Internal Gateway Protocols like OSPF and EIGRP let these routers talk to each other, sharing information about the network's layout and any changes that occur. This is how your email knows to travel from your laptop to a server across the building without getting lost.
Full Technical Definition
An Internal Gateway Protocol (IGP) is a routing protocol that operates within a single Autonomous System (AS). An AS is a collection of networks under a common administrative domain, such as a corporation, a university campus, or an internet service provider. IGPs are responsible for discovering and maintaining the most efficient paths for forwarding IP packets within that AS. They are classified as either distance-vector protocols or link-state protocols.
Distance-vector protocols, such as Routing Information Protocol (RIP) and Enhanced Interior Gateway Routing Protocol (EIGRP), work by having each router share its entire routing table with directly connected neighbors. Each router then applies a mathematical algorithm (like the Bellman-Ford algorithm) to select the best path based on a metric, typically hop count or composite metrics. These protocols are simple to configure but can suffer from slow convergence and routing loops if not carefully tuned.
Link-state protocols, such as Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (IS-IS), take a different approach. Each router independently builds a complete map of the network topology by exchanging "link-state advertisements" (LSAs) with all other routers in the same area. Using Dijkstra's Shortest Path First (SPF) algorithm, each router calculates the shortest path to every destination. This method converges faster and is more scalable than distance-vector protocols, making it suitable for larger enterprise networks.
In real-world implementations, network engineers configure IGPs on routers using commands specific to the protocol. For example, in OSPF, an administrator enables the OSPF process on the router, assigns it to an area (e.g., area 0 for the backbone), and advertises connected networks. The routers then form neighbor relationships, exchange LSAs, and build a Link State Database (LSDB). Convergence time is a critical factor; IGPs are designed to react quickly to link failures or topology changes, recalculating paths within seconds or milliseconds. IGPs are contrasted with Exterior Gateway Protocols (EGPs), such as BGP, which route between different Autonomous Systems. Understanding IGPs is essential for CCNA and Network+ certification exams, as they form the foundation of internal network routing.
Real-Life Example
Think of a large hospital with multiple wings, floors, and specialized departments. The hospital has its own internal mail delivery system to transport medical records, lab results, and supplies between departments. This internal system is completely separate from the national postal service that delivers mail from outside the hospital.
In this analogy, the hospital is your organization's network (the Autonomous System). The internal mail delivery system is the Internal Gateway Protocol. The mailroom staff and delivery carts are like routers. They don't rely on external delivery services; they only focus on moving items efficiently inside the hospital.
When a new wing is built (a new network segment), the mailroom manager updates the delivery map and tells all the delivery staff about the new corridors. If the elevator in the main building is out of service (a link failure), the staff immediately switch to using the stairs or the service elevator, rerouting deliveries automatically. The staff use a simple rule: always find the fastest path that avoids obstacles. This is exactly how an IGP (like OSPF) works. It constantly updates its internal map of the network and recalculates the best routes when changes happen.
Just as the hospital mail system doesn't interfere with the national postal service, an IGP operates entirely within the organization. When a package needs to leave the hospital, it is handed off to the national postal service (BGP), which handles external routing. This separation makes the internal system fast and responsive, while the external system deals with the complexity of the internet.
Why This Term Matters
Internal Gateway Protocols are the backbone of any organization's network. Without them, network administrators would have to manually configure static routes on every single router, which is impractical for networks with more than a handful of devices. IGPs automate the process of learning paths, adapting to changes, and ensuring data flows efficiently.
In real IT work, IGPs are critical for network reliability. If a link goes down, an IGP automatically recalculates routes so that traffic continues to flow, minimizing downtime. For example, in a university campus network with hundreds of switches and routers, a fiber cut in one building is handled seamlessly by OSPF, which quickly reroutes traffic through alternative paths. This prevents students and faculty from experiencing dropped connections.
From a cybersecurity perspective, IGPs can be exploited if not properly secured. Attackers may inject false routing information, a technique known as route spoofing. Network professionals must implement authentication mechanisms (e.g., MD5 or SHA authentication for OSPF neighbor relationships) to prevent unauthorized routers from joining the IGP domain.
In cloud infrastructure, understanding IGPs is essential when designing hybrid networks. For instance, an AWS Virtual Private Cloud (VPC) can be connected to an on-premises data center via VPN or Direct Connect. The on-premises routers and the cloud routers must run an IGP (like OSPF) to exchange routes and enable seamless communication between environments. Without IGPs, managing complex, multi-site networks would be error-prone and inefficient. For system administrators and network engineers, knowing how to configure and troubleshoot IGPs is a fundamental skill.
How It Appears in Exam Questions
In certification exams, Internal Gateway Protocols appear in three main question formats: conceptual multiple-choice, configuration-based, and troubleshooting scenarios.
A common conceptual question asks the candidate to identify the correct IGP for a given environment. For example: "A company with 50 routers and a need for fast convergence should use which routing protocol?" The answer choices might include RIP, OSPF, BGP, and static routes. The correct answer is OSPF because it is a link-state IGP with fast convergence, while RIP is slower and BGP is an EGP. Another pattern is: "Which of the following is a distance-vector routing protocol?" with options like OSPF, EIGRP (hybrid), RIP, and IS-IS. The correct answer is RIP.
Configuration-based questions on the CCNA often present a partial configuration and ask the candidate to identify the missing command. For example: "Router(config-router)# network 192.168.1.0 0.0.0.255 area 0" is part of which protocol? The answer is OSPF. You might also be asked to interpret the output of "show ip ospf neighbor" to determine the state of a neighbor relationship (e.g., FULL, 2WAY, INIT).
Troubleshooting questions often involve a scenario where users in one VLAN cannot reach a server in another VLAN, and the routing table shows no route. The candidate must identify that the IGP is not propagating the route, perhaps because the OSPF process is not enabled on the correct interfaces, or because of a mismatched area ID. Another common trouble scenario involves a router that is not forming neighbor adjacencies. The question will list possible causes, such as mismatched subnet masks, disabled interfaces, or incorrect authentication keys. The candidate must choose the most likely cause based on the given information.
Finally, comparison questions are popular: "What is the primary difference between an IGP and an EGP?" The answer focuses on the scope: IGP operates within an AS, while EGP operates between ASes. These question patterns ensure that candidates not only memorize facts but can apply their understanding to realistic network scenarios.
Practise Internal Gateway Protocol Questions
Test your understanding with exam-style practice questions.
Example Scenario
Scenario: A medium-sized retail company, ShopFast Inc., has two buildings: a headquarters (Building A) and a warehouse (Building B) located 2 kilometers apart. Each building has its own network with multiple switches and routers. The IT team connects the two buildings with a fiber optic line. They want to ensure that if the fiber line breaks, data can still flow between the buildings using a backup cellular link. However, the backup link is slower and costs more per megabyte.
Application of the term: The network administrator configures an Internal Gateway Protocol (specifically OSPF) on all routers within the company. OSPF automatically calculates the best path to send data. Under normal conditions, OSPF chooses the fiber link because it has a higher bandwidth and lower cost (a metric called cost in OSPF, which is derived from bandwidth). When the fiber link fails, OSPF detects the loss of the neighbor router on that interface and instantly recalculates routes, now using the backup cellular link. The routers update their routing tables, and traffic continues without manual intervention. Once the fiber link is restored, OSPF recognizes it and switches back, preferring the faster path. This automated failover and recovery is exactly why IGPs are essential: they maintain connectivity and optimize performance without requiring an administrator to manually change routes every time the network changes.
Common Mistakes
Confusing an IGP with an EGP and thinking both operate within a single organization's network.
An IGP (like OSPF) works inside one Autonomous System, while an EGP (like BGP) works between different Autonomous Systems. Using an EGP internally can cause unnecessary complexity and scaling issues.
Remember: IGP = inside the house, EGP = between houses. For internal routing, always use an IGP unless you are connecting to the internet or another organization.
Assuming that all IGPs use the same metric (like hop count).
RIP uses hop count as its metric, but OSPF uses cost (based on bandwidth), and EIGRP uses a composite metric based on bandwidth, delay, reliability, load, and MTU. Assuming all are the same leads to incorrect route selection understanding.
Learn the specific metric for each IGP. OSPF cost = 100,000,000 / bandwidth (in bps). EIGRP composite metric = (K1 * bandwidth + (K2 * bandwidth)/(256 - load) + K3 * delay) * 256. RIP just counts hops.
Believing that an IGP will automatically route traffic to the internet without additional configuration.
An IGP only routes within the organization. To reach the internet, a default route must be injected into the IGP (via a router that has a connection to the internet), or static routes must be configured. IGPs do not automatically know external networks.
Configure a default route on the border router (the one connected to the internet) and redistribute it into your IGP. This tells other routers: "If you don't know where to send a packet, send it to me."
Thinking that OSPF requires a designated router (DR) on every type of network.
OSPF only elects a DR and BDR on multi-access networks like Ethernet (broadcast) or Frame Relay (non-broadcast). On point-to-point links (like a direct fiber connection between two routers), no DR/BDR election occurs because there are only two routers.
Remember the network type. Point-to-point links use a simple adjacency. Multi-access links need DR/BDR to reduce LSA flooding. Always check the OSPF network type before troubleshooting neighbor issues.
Exam Trap — Don't Get Fooled
In an exam question, a scenario describes a network with multiple routers running OSPF. The question asks: "Which router will become the Designated Router (DR)?" and lists routers with various router IDs, such as 1.
1.1.1, 2.2.2.2, and 3.3.3.3. Many learners choose the router with the highest IP address, assuming that priority is irrelevant. Always recall the DR election process: first compare OSPF interface priority (0 means never DR), then the highest Router ID.
The Router ID can be set manually with the 'router-id' command or derived from the highest loopback IP address, or if no loopback, the highest physical IP address. In the exam, if the question provides Router IDs explicitly as part of OSPF configuration, use those directly. If only interface IPs are given, assume the highest loopback IP or the highest active interface IP is the Router ID.
Never assume the highest IP address among the interfaces is automatically the Router ID.
Commonly Confused With
An IGP routes within one organization (autonomous system), while an EGP routes between different organizations. BGP is the primary EGP used on the internet. IGPs prioritize speed and simplicity, while EGPs prioritize policy control and scalability across millions of routes.
Your company uses OSPF (an IGP) to route between its New York and Chicago offices. But to connect to the internet, it uses BGP (an EGP) to exchange routes with its internet service provider.
Static routing requires a network administrator to manually configure every route on every router. IGPs automatically learn and update routes. Static routes do not adapt to changes, while IGPs dynamically failover. Static routing is simpler for tiny networks but doesn't scale.
In a home network, you might manually set a default gateway on your PC (static). In a company with 200 routers, you would use OSPF (an IGP) so that when a link fails, routes update automatically.
Distance-vector protocols like RIP only know the direction and distance to a destination, while link-state protocols like OSPF know the entire network topology. Link-state protocols converge faster and are less prone to routing loops, but they are more complex to configure.
RIP is like a driver who only knows the next town and mile marker; OSPF is like a driver with a GPS map showing all roads and traffic. The GPS (OSPF) can find a better detour during a traffic jam.
Step-by-Step Breakdown
Initialization of the IGP Process
When a router boots up, if it is configured for an IGP like OSPF, the OSPF process starts. The router generates a Router ID (if not manually set, it uses the highest loopback IP, or the highest physical IP). This step ensures the router has a unique identifier to participate in the protocol.
Discovering Neighbors
The router sends hello packets out of all interfaces that have the IGP enabled. Neighboring routers running the same IGP (e.g., OSPF with matching area IDs) receive these packets and respond. This builds a list of neighbor routers. Without neighbors, the IGP cannot exchange routes.
Exchanging Routing Information
Once neighbors are discovered, the routers exchange routing information. In OSPF, they exchange Link State Advertisements (LSAs) containing information about directly connected networks. In RIP, they exchange entire routing tables. This step populates the router's database with topology information.
Computing the Best Paths
Using the collected information, the router runs an algorithm (Dijkstra for OSPF, Bellman-Ford for RIP) to calculate the shortest path to each destination network. The result is stored in the routing table. The metric (cost, hop count) determines which path is best.
Maintaining and Updating the Routing Table
IGPs continuously monitor the network. Routers send periodic hello packets to verify neighbors are still alive. If a link goes down or a new network is added, the IGP detects the change, updates the database, recalculates routes, and propagates the change to all other routers. This ensures the routing table is always accurate.
Convergence
After a topology change, all routers in the IGP domain recalculate and agree on the new best paths. The time taken for this process is called convergence time. A well-tuned IGP converges within seconds, minimizing downtime. This step is critical for network reliability.
Practical Mini-Lesson
An Internal Gateway Protocol is a fundamental tool for any network engineer. In practice, configuring an IGP like OSPF on a Cisco router involves entering global configuration mode, starting the OSPF process with a process ID, and advertising networks using the "network" command with a wildcard mask and area number. For example, "router ospf 1" followed by "network 10.0.0.0 0.255.255.255 area 0" enables OSPF on all interfaces that have an IP address starting with 10. The area number (0 for backbone) is critical because OSPF uses areas to scale large networks.
Professionals must understand that IGPs are not set-and-forget. Common issues include mismatched area IDs, incorrect wildcard masks, and authentication failures. Debugging commands like "debug ip ospf adj" can help verify neighbor relationships. For EIGRP, the command "show ip eigrp neighbors" displays the neighbor table. Monitoring the routing table with "show ip route" confirms that the IGP is installing routes with the correct administrative distance (e.g., 110 for OSPF, 120 for RIP).
What can go wrong? A misconfigured IGP can cause routing loops (where packets bounce between routers), black holes (where traffic is sent to a dead interface), or suboptimal routing (where traffic takes a longer path). To prevent loops, protocols like OSPF use split horizon and poison reverse mechanisms, while EIGRP uses the Diffusing Update Algorithm (DUAL).
For exam preparation, focus on understanding the neighbor formation process and the differences between OSPF network types (broadcast, point-to-point, non-broadcast). Practice configuring single-area OSPF and verifying it with show commands. Also, learn how administrative distance works: when multiple IGPs or static routes exist for the same destination, the one with the lowest administrative distance wins. This knowledge connects to broader concepts like routing table priority and path selection.
Finally, IGPs are not just for routers in data centers. They are used in software-defined networking (SDN) environments, in cloud virtual routers, and even in some IoT mesh networks. Understanding IGPs gives you the ability to design, troubleshoot, and optimize any internal network, making you a valuable asset in any IT role.
Memory Tip
IGP = Internal = Inside a Garden Perimeter. The garden is your organization. Only tools inside the garden (your routers) need to communicate about paths. Remember: IGP for internal gossip, EGP for external news.
Covered in These Exams
Current Exam Context
Current exam versions that test this topic — use these objectives when studying.
Legacy Exam Context
Older materials may mention these exam versions, but learners should use the current objectives for their target exam.
N10-008N10-009(current version)Related Glossary Terms
802.1Q is the networking standard that allows multiple virtual LANs (VLANs) to share a single physical network link by tagging Ethernet frames with VLAN identification information.
802.1X is a network access control standard that authenticates devices before they are allowed to connect to a wired or wireless network.
5G is the fifth generation of cellular network technology, designed to deliver faster speeds, lower latency, and support for many more connected devices than previous generations.
An A record is a DNS record that maps a domain name to the IPv4 address of the server hosting that domain.
Frequently Asked Questions
Is RIP still used in modern networks or should I only learn OSPF?
RIPv2 is rarely used in production today because it converges slowly and has a hop limit of 15. Most organizations use OSPF or EIGRP. However, you still need to understand RIP for certification exams (especially Network+) as a simple example of a distance-vector IGP.
Can I mix two different IGPs on the same network?
Yes, but it is called route redistribution. For example, you might run RIP in a small legacy area and OSPF in the main network. Redistribution must be carefully configured to avoid routing loops and suboptimal paths. It is not recommended for beginners.
What is the difference between OSPF and EIGRP?
OSPF is an open standard link-state protocol, while EIGRP is Cisco-proprietary but was partially open-sourced. OSPF requires careful area design for large networks, while EIGRP is simpler to configure. Both are IGPs, but EIGRP uses a distance-vector algorithm with advanced features.
Do I need to configure an IGP for a small home network?
No. Home networks typically use a single router with a default route to the ISP. IGPs are used when you have multiple routers that need to share routes, such as in a business with multiple floors or branch offices.
What does 'convergence' mean in the context of IGPs?
Convergence is the time it takes for all routers in the IGP domain to have consistent routing information after a change (like a link failure). Fast convergence is a key requirement for critical networks to minimize downtime.
Which IGP should I choose for a network with 500 routers?
OSPF with multiple areas (or IS-IS) is the standard choice for large networks. RIP cannot handle that many routers. EIGRP also scales well but is less common outside Cisco shops. OSPF is the most widely supported IGP across vendors.
Summary
An Internal Gateway Protocol is a routing protocol that operates exclusively within a single Autonomous System, such as a corporate or campus network. Its primary purpose is to automatically discover the best paths for data packets, adapt to network changes, and maintain connectivity without manual intervention. The key IGPs you need to know for certification exams are RIP (distance-vector), OSPF (link-state), and EIGRP (advanced distance-vector).
Understanding them involves grasping their metrics, neighbor discovery processes, and convergence behaviors. For exams like Network+ and CCNA, you will be tested on conceptual differences, configuration commands, and troubleshooting scenarios. Common mistakes include confusing IGPs with EGPs, assuming all IGP metrics are the same, and forgetting that DR/BDR election only occurs on multi-access networks.
By mastering IGPs, you build a critical foundation for network design, security, and troubleshooting. Remember: inside the organization, IGPs keep the data moving fast and reliably; outside, EGPs take over. Focus on OSPF as the most important IGP for modern networks and certification success.