Welcome to Module Three of Networking Basics Level Three!
In the previous module, you learned about IP addresses, IPv4, IPv6, subnet masks, CIDR notation, and subnetting. You discovered how computers use IP addresses to identify themselves and communicate with other devices.
But have you ever wondered how information travels from your computer to another computer in a different country? How does a message from Lagos reach a computer in London? How does a video travel from a website to your smartphone?
The answer involves something called routing.
Routing is the process of choosing a path for information to travel from one network to another. Routers help make this communication possible.
In this module, we will explore how routers work, how they choose paths, and how routing protocols help networks communicate efficiently.
At the end of this module, learners should be able to:
Routing is the process of selecting a path through which data travels from one network to another.
Imagine you live in Lagos and want to send a package to someone in Abuja.
The package needs to travel through different roads and possibly different delivery centres before reaching Abuja.
Computer networks work in a similar way. When information travels from one network to another, routers help determine where the information should go.
COMPUTER A
|
|
ROUTER 1
|
|
ROUTER 2
|
|
ROUTER 3
|
|
COMPUTER B
Data travels through routers
to reach its destination.
In this example, Computer A wants to communicate with Computer B.
The information passes through routers that help move it towards the destination network.
Routing is important because it helps to:
Imagine sending a letter from Lagos to Kano. The letter may pass through several postal centres. Each centre helps direct the letter towards its destination.
In networking, routers perform a similar job. They examine destination IP addresses and decide where to forward data packets.
Imagine a company has offices in Lagos, Ibadan, and Abuja. Each office has its own computer network.
The company wants employees in Lagos to communicate with employees in Abuja. Routers can connect these different office networks and help information travel between them.
Routing is the process of choosing paths for data to travel between different networks.
A router is a networking device that connects different IP networks and forwards data packets between them.
A router helps devices communicate with destinations outside their local network.
For example, when you use your home Wi-Fi to visit a website, your router helps send your request towards the internet.
A router performs several important functions:
Let us imagine that your computer wants to open a website.
The following steps explain the process:
LAPTOP
|
|
WIFI
|
|
ROUTER
|
|
INTERNET
|
|
WEB SERVER
The router acts as a connection point between the local network and other networks.
There are different types of routers.
A home router connects devices such as smartphones, laptops, smart televisions, and tablets to a home network. It often provides Wi-Fi access.
Enterprise routers are used by organisations that need to connect larger networks, offices, and data centres.
A wireless router provides network connectivity using wireless technology such as Wi-Fi. Many home routers combine routing and wireless access point functions.
A core router operates within the central part of a large network. It helps move large amounts of traffic between different network sections.
An edge router connects one network to another network, often connecting an organisation's network to an internet service provider.
| Router | Modem |
|---|---|
| Connects different IP networks. | Connects a customer to an internet service provider's access network. |
| Forwards packets using routing information. | Converts signals according to the access technology. |
| May provide Wi-Fi and local network services. | Provides the connection to the service provider's network. |
Some modern devices combine modem, router, and Wi-Fi functions in one box.
A router connects different networks and forwards packets towards their destinations.
A data packet is a small unit of information transmitted across a computer network.
When you send an email, browse a website, or watch a video, the information is usually divided into smaller units for transmission.
These units are called packets.
Imagine sending a large textbook through the post. Instead of sending everything as one enormous package, you could divide it into smaller packages.
This makes it easier to transport and manage the information.
Computer networks use packets for similar reasons.
An IP packet contains a header and a payload.
+----------------------------------+ | IP HEADER | | | | Source IP Address | | Destination IP Address | | Other Control Information | +----------------------------------+ | | | PAYLOAD | | | | Actual Data Content | | | +----------------------------------+
A source IP address identifies the IP address of the device sending a packet.
A destination IP address identifies the intended IP destination of the packet.
Source IP: 192.168.1.10 Destination IP: 192.168.2.20
This example shows a packet travelling from a device with the source address 192.168.1.10 towards a device with the destination address 192.168.2.20.
A packet is a unit of information sent across a network. Its header contains information that helps networks process and deliver it.
A routing table is a collection of information that a router uses to decide where to forward packets.
Think about a road map. When travelling to another city, you may check the map to determine which road leads to your destination.
A router uses its routing table in a similar way. It checks the destination IP address and looks for the best matching route.
A routing table may contain:
| Destination Network | Next Hop | Interface |
|---|---|---|
| 192.168.1.0/24 | Directly Connected | Ethernet 0 |
| 192.168.2.0/24 | 192.168.1.2 | Ethernet 1 |
| 10.0.0.0/8 | 192.168.1.3 | Ethernet 2 |
| 0.0.0.0/0 | 192.168.1.254 | Ethernet 3 |
This is a simplified example of a routing table. The actual information and display format depend on the router.
Imagine a router receives a packet with this destination:
192.168.2.20
The router examines its routing table and looks for a route that matches the destination address.
If it finds the route 192.168.2.0/24, it knows that the packet should be forwarded towards that network.
Routers generally use the most specific matching route. This is called longest prefix match.
Longest prefix match is the process of selecting the matching routing table entry with the largest number of matching network prefix bits.
For example, if a destination matches both a /16 route and a /24 route, the /24 route is more specific.
Route 1: 192.168.0.0/16 Route 2: 192.168.1.0/24 Destination: 192.168.1.20 Selected route: 192.168.1.0/24
A routing table helps a router decide where packets should go. The router normally chooses the most specific matching route.
Static routing is a method of routing in which a network administrator manually enters routes into a router.
This means the router does not automatically learn these static routes from another routing protocol.
Imagine you always travel from your home to school using the same road. You already know the route and do not need someone to choose a different road for you every day.
Static routing works in a similar way. The administrator manually tells the router which path to use for a particular network.
The general process is:
NETWORK A
|
ROUTER A
|
|
ROUTER B
|
NETWORK B
The administrator manually
configures the route between
the networks.
Static routing is useful in situations such as:
Static routing uses manually configured routes. The network administrator decides which destinations should use particular paths.
Dynamic routing is a method of routing in which routers automatically exchange network information using routing protocols.
Unlike static routing, where routes are manually entered, dynamic routing allows routers to learn about available networks from other routers.
Imagine travelling to school and discovering that your usual road is closed. A navigation application may suggest another available route.
Dynamic routing provides a similar ability to learn about network paths and respond to certain network changes.
ROUTER A
/ \
/ \
ROUTER B ---- ROUTER C
\ /
\ /
ROUTER D
Routers exchange network
information using routing protocols.
| Static Routing | Dynamic Routing |
|---|---|
| Routes are manually configured. | Routes are learned through routing protocols. |
| Simple for small networks. | Useful for larger and changing networks. |
| Does not automatically learn alternative routes. | Can learn alternative routes when available. |
| Requires manual updates when paths change. | Can update routes automatically. |
| Does not use routing protocol updates. | Uses routing protocol messages. |
Static routing uses manually configured routes, while dynamic routing allows routers to learn routes automatically through routing protocols.
A routing protocol is a set of rules that routers use to exchange information about networks and determine suitable paths for data.
Imagine students from different schools communicating using an agreed language. The shared language helps them understand one another.
Routing protocols provide rules that routers follow when sharing network information.
There are several routing protocols used in computer networks. Some important examples include:
RIP stands for Routing Information Protocol. It is a distance-vector routing protocol.
RIP uses hop count to measure how far away a destination network is.
A hop is one router that a packet passes through on its way towards a destination.
Example:
ROUTER A ---- ROUTER B ---- ROUTER C 1 hop 1 hop From Router A to Router C: 2 hops
RIP normally supports a maximum usable path of 15 hops. A distance of 16 hops is treated as unreachable.
OSPF stands for Open Shortest Path First. It is a link-state routing protocol.
OSPF allows routers to build information about the network topology and calculate suitable paths.
Think of it as having a map showing the roads between different towns. The map helps you understand how the towns are connected.
OSPF uses the Shortest Path First algorithm, also known as Dijkstra's algorithm, to calculate routes.
EIGRP stands for Enhanced Interior Gateway Routing Protocol. It is an advanced distance-vector routing protocol.
It uses multiple factors when calculating routes, including bandwidth and delay.
EIGRP uses an algorithm called DUAL to help calculate loop-free routes and support route selection.
BGP stands for Border Gateway Protocol. It is the main routing protocol used to exchange routing information between autonomous systems on the internet.
An autonomous system is a collection of networks operated under a common routing policy.
Imagine different internet service providers operating their own networks. BGP helps these networks exchange information about which IP address destinations they can reach.
IS-IS is a link-state routing protocol used within large networks and service provider environments.
It allows routers to exchange information about network connections and calculate suitable routes.
| Protocol | Type | Main Use |
|---|---|---|
| RIP | Distance Vector | Smaller networks and learning environments. |
| OSPF | Link State | Enterprise and larger internal networks. |
| EIGRP | Advanced Distance Vector | Enterprise network routing. |
| BGP | Path Vector | Routing between autonomous systems. |
| IS-IS | Link State | Large enterprise and service provider networks. |
Routing protocols help routers exchange network information and select suitable paths. RIP, OSPF, EIGRP, BGP, and IS-IS are important examples.
A routing metric is a value used by a routing protocol to compare different routes to a destination.
Think about travelling from Lagos to Abuja. You may compare different roads based on:
Routers also use measurements to compare network paths. These measurements are called metrics.
Hop count measures the number of routers a packet passes through to reach a destination.
Bandwidth describes the data-carrying capacity of a network connection. A link with greater bandwidth can carry more data per second.
Delay refers to the time it takes for data to travel through a network path.
Some routing protocols use a calculated cost to compare different paths. For example, OSPF uses cost values.
Reliability describes how dependable a network connection is. Some routing systems can consider reliability when evaluating routes.
Imagine a router has two possible paths to a destination.
PATH A:
Router 1 -> Router 2 -> Router 3
Total: 2 router hops
PATH B:
Router 1 -> Router 4 -> Router 5
-> Router 6 -> Router 3
Total: 4 router hops
If a routing protocol uses hop count as its metric, Path A would normally be preferred because it has fewer hops.
However, fewer hops do not always mean a faster or better path. A path with fewer routers may have slower network links.
Administrative distance is a value used by some routing systems, such as Cisco routers, to compare the trustworthiness of different sources of route information.
It is not the same as a routing metric.
A lower administrative distance is generally preferred when comparing routes to the same destination from different routing sources.
Routing metrics help routers compare paths. Different routing protocols use different methods to calculate the best route.
A default route is a route used when a router does not have a more specific matching route for a destination.
Think about asking for directions to a place that is not shown on your local map. You may follow a general road towards a larger town where more directions are available.
A default route works in a similar way. It provides a general forwarding direction for destinations that do not match a more specific route.
The IPv4 default route is written as:
0.0.0.0/0
The /0 means that the route has no fixed network prefix bits. It can match any IPv4 destination when no more specific route is available.
Route summarisation is the process of representing multiple network routes using one larger address block, where possible.
Imagine a school has four departments, each with a separate network. Instead of sharing four individual network routes, the organisation may be able to advertise one summary route.
Consider these networks:
192.168.0.0/24 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24
They can be represented by this summary:
192.168.0.0/22
This reduces the number of separate routes that need to be advertised when the address blocks are correctly aligned.
A default route provides a general path for destinations without a more specific matching route. Route summarisation combines suitable routes into a larger network summary.
Switching is the process of forwarding data within a local network, commonly using MAC addresses.
A network switch connects devices such as computers, printers, and servers within a local area network.
Imagine students sitting in different classrooms in the same school building. A school communication system can help messages reach the correct classroom.
A switch performs a similar job by forwarding Ethernet frames to the correct network port.
| Routing | Switching |
|---|---|
| Connects different IP networks. | Connects devices within a local network. |
| Uses IP addresses for route decisions. | Traditional Layer 2 switching uses MAC addresses. |
| Commonly performed by routers. | Commonly performed by switches. |
| Forwards IP packets. | Forwards Ethernet frames. |
INTERNET
|
ROUTER
|
|
SWITCH
/ | \
/ | \
PC 1 PC 2 PRINTER
In this example:
Yes. Some switches are called Layer 3 switches. They can perform both traditional switching and routing between IP networks or VLANs.
Routing connects different IP networks, while traditional Layer 2 switching forwards frames within a local network.
Network troubleshooting is the process of finding and solving problems that prevent devices from communicating properly.
Imagine your school computer cannot connect to the internet. You need to investigate the problem instead of guessing what is wrong.
A computer may have an incorrect IP address or an address that does not belong to the intended subnet.
An incorrect subnet mask can cause a device to misunderstand which addresses belong to its local network.
If the default gateway is incorrect, a computer may be unable to reach devices outside its local network.
A router may stop working because of a hardware problem, power failure, or configuration issue.
A missing or incorrect route can prevent packets from reaching their intended destinations.
A damaged or disconnected cable can interrupt network communication.
Some commands help network administrators examine network connections.
Used on Windows to display IP configuration information.
ipconfig
Used to test whether another IP destination can be reached.
ping 192.168.1.1
Used on Windows to show the route taken by packets towards a destination.
tracert example.com
Used on Linux systems to display and manage IP routing information.
ip route
A command available on many Linux and Unix-like systems for examining the path towards a destination.
traceroute example.com
Only perform network tests on devices and networks you own or have permission to examine.
Troubleshooting helps identify and solve network problems. Always check basic network settings before assuming that the router is faulty.
You have learned how routers forward packets and how routing tables help them select paths. Now let us practise these ideas using a simple network design.
Imagine a company has two offices:
Each office has its own local network. The company wants computers in both offices to communicate.
LAGOS OFFICE
Network A
192.168.1.0/24
|
SWITCH
|
ROUTER A
|
|
ROUTER CONNECTION
|
|
ROUTER B
|
SWITCH
|
ABUJA OFFICE
Network B
192.168.2.0/24
| Device | IP Address |
|---|---|
| Lagos Router LAN | 192.168.1.1 |
| Lagos Computer | 192.168.1.10 |
| Abuja Router LAN | 192.168.2.1 |
| Abuja Computer | 192.168.2.10 |
The router-to-router connection also needs its own IP addressing plan.
When the Lagos computer sends information to the Abuja computer:
Cisco Packet Tracer is a network simulation tool that allows learners to create and test virtual computer networks.
For this activity:
The purpose of this activity is to understand how separate networks communicate through routers.
| Term | Meaning |
|---|---|
| Routing | The process of selecting paths for data between networks. |
| Router | A device that connects IP networks and forwards packets. |
| Packet | A unit of information transmitted across a network. |
| Routing Table | A collection of routes used to forward packets. |
| Next Hop | The next router or device towards a destination. |
| Static Routing | Routing using manually configured routes. |
| Dynamic Routing | Routing that learns routes through routing protocols. |
| Routing Protocol | A set of rules routers use to exchange routing information. |
| RIP | Routing Information Protocol. |
| OSPF | Open Shortest Path First. |
| EIGRP | Enhanced Interior Gateway Routing Protocol. |
| BGP | Border Gateway Protocol. |
| IS-IS | Intermediate System to Intermediate System. |
| Metric | A value used to compare network paths. |
| Default Route | A general route used when no more specific route matches. |
| Route Summarisation | Combining suitable network routes into a larger summary. |
| Switching | Forwarding frames within a local network. |
| Next Hop | The next forwarding destination along a route. |
| Hop Count | The number of routers crossed to reach a destination. |
| Longest Prefix Match | Selecting the most specific matching route. |
1. What is routing?
2. Which device connects different IP networks?
3. What is a routing table?
4. Which type of routing uses manually configured routes?
5. Which type of routing learns routes through routing protocols?
6. What does RIP stand for?
7. Which routing protocol uses hop count?
8. What does OSPF stand for?
9. Which protocol is mainly used to exchange routing information between autonomous systems?
10. What is a routing metric?
11. Which command displays IP configuration on Windows?
12. Which command can display the route towards a destination on Windows?
13. What is the main purpose of a default route?
14. Which device commonly forwards Ethernet frames using MAC addresses?
15. What does BGP stand for?
Question 1:
A computer has the IP address 192.168.1.10 and wants to communicate with a computer at 192.168.2.10. Are these addresses in the same /24 network? Explain your answer.
Question 2:
A router has two possible paths to a destination. Path A has two hops, while Path B has four hops. If the routing protocol uses hop count, which path will normally be preferred?
Question 3:
A company has offices in Lagos and Abuja. Each office has a separate IP network. Explain how routers can help the two offices communicate.
Question 4:
Explain what happens when a computer sends information to a destination outside its local network.
Question 5:
Write down three commands that can help an administrator examine network connectivity or routing information.
Activity One: Explore Your Network
Activity Two: Test Network Communication
Activity Three: Design a Small Network
Design a network for a small school with:
Draw a diagram showing how the router, switches, and computers will be connected.
Activity Four: Explore Routing in Packet Tracer
Using Cisco Packet Tracer under instructor guidance, create a small network containing two routers and two separate local networks. Observe how the routers help the networks communicate.
In this module, you learned that routing is the process of selecting paths for data to travel between different computer networks.
You discovered how routers receive packets, examine destination IP addresses, consult routing tables, and forward packets towards their destinations.
You also learned about static routing and dynamic routing. Static routes are manually configured, while dynamic routing allows routers to exchange information using routing protocols.
You explored important routing protocols such as RIP, OSPF, EIGRP, BGP, and IS-IS. You also learned about routing metrics, default routes, route summarisation, and the difference between routing and switching.
Finally, you explored basic troubleshooting commands and practised designing a small network.
The internet is made up of many connected networks. Routers help these networks communicate by directing information towards its destination.
Understanding routing is an important step towards becoming a network engineer, network administrator, or cybersecurity professional.
Remember: A computer creates and sends information, but routers help that information find its way across networks.
Congratulations! You have completed Module Three.
Get ready for Module Four: Network Switching, VLANs and Network Segmentation, where you will learn how switches connect devices and how large networks can be divided into smaller, organised sections.