Introduces the fundamental concepts, purpose and applications of computer networks.
Explores different network classifications based on geographical coverage, purpose and architecture.
Introduces different physical and logical network structures and how network devices are organised.
Provides practical knowledge of the hardware used to build and connect computer networks.
Introduces the physical and wireless technologies used to transmit data across networks
Explains how network communication is structured using standard models and protocols.
Introduces Ethernet technology and the role of MAC addresses in local network communication
Develops practical understanding of IPv4 addressing and network identification
Teaches learners how to divide networks into smaller subnets and introduces IPv6 addressing.
Introduces network switching and provides practical skills for configuring and managing switches.
Teaches learners how to logically separate networks and carry traffic between network segments.
Introduces routing and explains how routers forward traffic between different networks.
Explores essential network services that support addressing, name resolution and internet connectivity.
Provides practical knowledge of wireless networks and access point configuration.
Introduces fundamental techniques for protecting networks, devices and network traffic.
Develops practical skills for managing, monitoring and troubleshooting computer networks.
Introduces modern networking technologies and the role of networking in cloud and virtualised environments.
Enables learners to apply their networking knowledge by designing, configuring, testing and documenting a complete network solution
Routing is one of the most important functions in computer networking.
When a computer sends data to another device on the same local network, the communication can usually take place directly through the local network. However, when the destination is located on a different network, the data needs to be forwarded through one or more routers.
Routing is the process of determining a path for network traffic to travel from a source network to a destination network.
For example, when a computer in Kampala communicates with a server located in another network, routers examine the destination IP address and determine where the packet should be forwarded.
Routing is therefore essential for:
Local networks communicating with other networks
Internet communication
WANs
Inter-VLAN communication
Enterprise networks
Cloud connectivity
Branch-office communication
By the end of this lesson, the learner should be able to:
Define routing.
Explain why routing is necessary.
Explain the role of a router.
Describe how routers forward packets.
Explain routing tables.
Identify the components of a routing table.
Explain directly connected networks.
Explain static routing.
Explain dynamic routing.
Explain default routes.
Describe routing metrics.
Explain next-hop addresses.
Distinguish between routing and switching.
Explain the relationship between routing and IP addressing.
Perform basic routing configuration in a network simulator.
Troubleshoot basic routing problems.
Routing is the process of selecting and using a path through a network to deliver packets from a source to a destination.
Consider two networks:
Network A: 192.168.10.0/24
Network B: 192.168.20.0/24
If a computer on Network A needs to communicate with a computer on Network B, a router can connect the two networks.
The router examines the destination IP address and forwards the packet toward Network B.
A router is a networking device that connects different IP networks and forwards packets between them.
For example:
Computer Network A
↓
Router
↓
Computer Network B
A router can have multiple interfaces, with each interface connected to a different network.
A typical router may connect:
LAN
WAN
Internet
Another branch
Server network
Guest network
VLANs
Without routing, separate IP networks would not be able to communicate with one another.
For example:
PC1: 192.168.10.10
PC2: 192.168.20.10
If PC1 wants to communicate with PC2, the traffic must cross between two different IP networks.
A router or Layer 3 device is required to forward the traffic.
Routing therefore makes communication between different networks possible.
Routing is primarily associated with Layer 3 of the OSI model.
Layer 3 is the Network Layer.
The Network Layer is responsible for functions such as:
Logical addressing
IP addressing
Routing
Packet forwarding
Routers operate primarily at Layer 3.
Routers use destination IP addresses to determine where packets should go.
For example:
Source:
192.168.10.25
Destination:
192.168.30.15
The router examines the destination address.
It determines which route should be used to reach the 192.168.30.0/24 network.
Understanding whether a destination is on the same network is important.
Suppose a computer has:
IP address: 192.168.10.10
Subnet mask: 255.255.255.0
Destination:
192.168.10.20
Both addresses belong to the same /24 network.
The computer can communicate through the local network.
Now consider:
Source:
192.168.10.10
Destination:
192.168.20.20
These addresses belong to different /24 networks.
The source device normally sends the traffic to its default gateway.
A default gateway is the router or Layer 3 device that a host uses to reach destinations outside its local network.
For example:
PC IP: 192.168.10.20
Subnet mask: 255.255.255.0
Default gateway: 192.168.10.1
If the PC needs to communicate with another network, it can send the packet to 192.168.10.1.
The router then determines where the packet should go.
A simplified routing process is:
A host creates a packet.
The host determines the destination IP address.
If the destination is on another network, the host sends the packet toward its default gateway.
The router receives the packet.
The router examines the destination IP address.
The router searches its routing table.
The router selects the best matching route.
The router forwards the packet through the appropriate interface.
Another router may repeat the process.
The packet eventually reaches the destination network.
A routing table is a data structure maintained by a router that contains information about available routes.
A simplified routing table might contain:
| Destination Network | Subnet Mask | Next Hop | Interface |
|---|---|---|---|
| 192.168.10.0 | /24 | Direct | G0/0 |
| 192.168.20.0 | /24 | Direct | G0/1 |
| 192.168.30.0 | /24 | 192.168.20.2 | G0/1 |
| 0.0.0.0 | /0 | 192.168.20.1 | G0/1 |
The router uses this information to make forwarding decisions.
The destination network identifies the network that the router can reach.
For example:
192.168.30.0/24
This means the route applies to addresses within that network.
The next hop is the next router or device to which a packet should be forwarded.
For example:
Destination network: 192.168.30.0/24
Next hop: 10.0.0.2
The router sends the packet to 10.0.0.2.
That router then continues the forwarding process.
The routing interface identifies the router interface through which traffic should leave.
For example:
Destination: 192.168.30.0/24
Outgoing interface: GigabitEthernet0/1
The router forwards traffic through that interface.
A router automatically knows about networks directly connected to its active interfaces.
For example:
Router interface G0/0:
192.168.10.1/24
Router interface G0/1:
192.168.20.1/24
The router knows that:
192.168.10.0/24 is directly connected.
192.168.20.0/24 is directly connected.
No additional route is required for these directly connected networks.
Static routing involves manually configuring routes.
The administrator tells the router where a particular network can be reached.
For example:
Destination:
192.168.30.0/24
Next hop:
192.168.20.2
The administrator creates the route manually.
Static routing is useful for:
Small networks
Simple network designs
Specific routes
Backup routes
Networks where predictable paths are required
Static routing provides:
Simple operation in small networks
Predictable paths
Low protocol overhead
Greater administrator control
No dynamic routing protocol traffic
Static routing can become difficult to manage when the network becomes large.
Disadvantages include:
Manual configuration
More administration
Risk of configuration errors
Difficult maintenance in large networks
Routes may not automatically change when a link fails
Suppose there are two routers:
Router A:
192.168.10.0/24
Router B:
192.168.20.0/24
The routers are connected through:
10.0.0.0/30
Router A can be configured with a route to:
192.168.20.0/24
through Router B.
Router B can similarly be configured with a route to:
192.168.10.0/24
through Router A.
Dynamic routing allows routers to learn routes automatically through routing protocols.
Instead of manually entering every route, routers exchange routing information.
Examples of routing protocols include:
RIP
OSPF
EIGRP
IS-IS
BGP
Different protocols are designed for different network environments.
Dynamic routing can:
Automatically learn routes
Adapt to network changes
Reduce manual configuration
Support large networks
Select alternative paths
Improve scalability
Dynamic routing can involve:
Greater configuration complexity
Additional processing
Routing protocol traffic
More advanced troubleshooting
Security considerations
A routing protocol is a set of rules that routers use to exchange information about available networks and paths.
Examples include:
RIP – Routing Information Protocol
OSPF – Open Shortest Path First
EIGRP – Enhanced Interior Gateway Routing Protocol
BGP – Border Gateway Protocol
RIP is an older distance-vector routing protocol.
It uses hop count as its primary metric.
A router can use the number of routers that a packet must pass through to compare routes.
RIP is simple but has significant limitations compared with modern routing protocols.
It is mainly useful for understanding basic routing concepts.
OSPF stands for Open Shortest Path First.
It is a widely used link-state routing protocol.
OSPF allows routers to build a view of the network topology and calculate suitable paths.
It is commonly used in enterprise networks.
EIGRP stands for Enhanced Interior Gateway Routing Protocol.
It is a dynamic routing protocol developed by Cisco and has been widely used in Cisco-based environments.
It can use multiple factors when selecting routes.
BGP stands for Border Gateway Protocol.
BGP is the major routing protocol used to exchange routing information between autonomous systems on the Internet.
It is important for understanding how large Internet networks exchange routing information.
BGP is considerably more advanced than the routing concepts covered at beginner level.
A routing metric is a value used to help select between possible routes.
Depending on the routing protocol, metrics may consider factors such as:
Hop count
Bandwidth
Delay
Cost
Reliability
Path characteristics
The specific metric depends on the routing protocol.
If a router knows multiple routes to the same destination, it must determine which route is preferred.
Routing protocols and routing rules help determine the best available route.
For example:
Route A → 3 hops
Route B → 5 hops
A protocol using hop count might prefer Route A.
However, another routing protocol may use different criteria.
Routers can have multiple routes that match a destination.
The router generally selects the route with the longest matching network prefix.
For example:
10.0.0.0/8
10.10.0.0/16
10.10.10.0/24
For a destination such as:
10.10.10.50
The /24 route is the most specific matching route.
This principle is called longest prefix match.
A default route is used when a router does not have a more specific route for a destination.
The IPv4 default route is:
0.0.0.0/0
A common example is a router sending unknown Internet destinations toward an ISP.
Conceptually:
Internal Network → Router → ISP → Internet
The router may use a default route pointing toward the ISP.
An administrator can manually configure a default route.
Conceptually:
Destination: 0.0.0.0/0
Next hop: ISP router
This tells the router where to send traffic for destinations not otherwise listed in the routing table.
Routing is required when devices in different VLANs need to communicate.
For example:
VLAN 10 – Administration
VLAN 20 – Students
VLAN 30 – Staff
If Administration needs to access a server in the Staff VLAN, inter-VLAN routing is required.
This can be performed using:
Router-on-a-stick
Layer 3 switch
WANs depend heavily on routing.
Consider:
Kampala → Mbarara → Masaka
Routers determine how traffic moves between these networks.
If one path fails, dynamic routing protocols can potentially select another available path when the network has alternative links.
The Internet consists of many interconnected networks.
Routers operate throughout this infrastructure.
When a user accesses a website, packets may pass through multiple routers before reaching the destination.
Routing protocols allow networks to exchange information about how destinations can be reached.
At the global Internet level, BGP plays a major role in exchanging routing information between autonomous systems.
Routing and switching are related but different.
| Feature | Switching | Routing |
|---|---|---|
| Main Layer | Layer 2 | Layer 3 |
| Main Address | MAC address | IP address |
| Main Device | Switch | Router |
| Main Purpose | Connect devices within networks/VLANs | Connect different networks |
| Example | PC to printer in same VLAN | Office LAN to Internet |
Modern Layer 3 switches can perform both switching and routing.
Although routers make forwarding decisions using IP information, Ethernet networks also require MAC addresses for local frame delivery.
A router removes the incoming Layer 2 frame information and creates a new Layer 2 frame for the next network segment.
Therefore:
IP addresses help determine the destination network.
MAC addresses are used for local Ethernet delivery.
Suppose:
PC A:
IP: 192.168.10.10
Gateway: 192.168.10.1
Destination:
192.168.30.20
The PC determines that 192.168.30.20 is outside its local subnet.
It sends the traffic to its default gateway:
192.168.10.1
The router examines its routing table.
If it has a route to:
192.168.30.0/24
it forwards the packet toward that network.
A simplified routing table could look like:
| Route | Type | Next Hop |
|---|---|---|
| 192.168.10.0/24 | Connected | Direct |
| 192.168.20.0/24 | Connected | Direct |
| 192.168.30.0/24 | Static | 192.168.20.2 |
| 0.0.0.0/0 | Default | 192.168.20.1 |
The router uses this information to forward packets.
A routing loop occurs when packets repeatedly travel between routers without reaching their destination.
For example:
Router A → Router B → Router C → Router A
Routing protocols contain mechanisms designed to prevent or reduce routing loops.
Incorrect static routes can also create loops.
Routing can fail because of:
Incorrect IP addresses
Incorrect subnet masks
Missing routes
Incorrect next-hop addresses
Failed interfaces
Incorrect VLAN configuration
Routing protocol problems
Firewall rules
Physical link failures
Incorrect default gateway
A technician can follow these steps:
Check physical connectivity.
Check interface status.
Verify IP addresses.
Verify subnet masks.
Verify default gateways.
Test the local gateway.
Check the routing table.
Test the next-hop router.
Test the destination network.
Check firewall rules.
Check routing protocol status.
Check for routing loops.
On many network devices and operating systems, commands such as the following can help:
ping
traceroute
tracert
ipconfig
ip addr
route
Cisco IOS devices commonly provide commands such as:
show ip route
show ip interface brief
show running-config
The exact commands depend on the operating system and network equipment.
Ping is commonly used to test IP connectivity.
For example:
ping 192.168.20.1
A successful response indicates that communication is possible between the source and destination under the tested conditions.
Ping does not prove that every network service is working.
Traceroute can help identify the path packets take toward a destination.
Windows commonly uses:
tracert
Linux and many network devices commonly use:
traceroute
It can help identify where communication is failing or where latency is introduced.
Using a network simulator, create:
PC1 → Switch → Router → Switch → PC2
Assign different IP networks to each side.
Identify:
Source IP
Destination IP
Default gateway
Router interfaces
Destination network
Create two routers.
Router 1:
LAN: 192.168.10.0/24
Router 2:
LAN: 192.168.20.0/24
Connect the routers.
Configure static routes so that computers on both LANs can communicate.
Test the configuration using ping.
Create a small network containing:
PC
Switch
Router
ISP router
Configure a default route toward the ISP router.
Test connectivity to the simulated external network.
Create:
VLAN 10 – Administration
VLAN 20 – Students
Connect both VLANs to a Layer 3 device.
Configure routing between them.
Test communication.
Create a network with an intentional routing problem.
Examples:
Incorrect default gateway
Missing static route
Wrong subnet mask
Incorrect next-hop address
Ask learners to identify and correct the problem.
What is routing?
What is the purpose of a router?
At which OSI layer does routing primarily operate?
What is a routing table?
What is a next-hop address?
What is a default gateway?
What is a directly connected network?
What is static routing?
What is dynamic routing?
Name four routing protocols.
What is a routing metric?
What is a default route?
What is inter-VLAN routing?
Explain the difference between switching and routing.
What is longest prefix match?
What is a routing loop?
Give five possible causes of routing failure.
What is the purpose of the ping command?
What is the purpose of traceroute?
Explain how a router forwards a packet from one network to another.
Design a network containing:
Two LANs
Two routers
Two switches
Four computers
Use different IP networks for the two LANs.
Your assignment should include:
Network diagram.
IP addressing table.
Default gateways.
Router interfaces.
Static routes.
Routing table.
Connectivity tests.
Explanation of how packets travel between the two LANs.
Routing – Process of selecting and using paths for network traffic.
Router – Device that forwards packets between networks.
Routing Table – Information used by a router to determine where packets should be forwarded.
Route – Information describing how to reach a network or destination.
Next Hop – The next router or device to which traffic is forwarded.
Default Gateway – Device used by a host to reach networks outside its local network.
Static Route – Manually configured route.
Dynamic Route – Route learned through a routing protocol.
Routing Protocol – Rules used by routers to exchange routing information.
Metric – Value used to compare routes.
Default Route – Route used when no more specific route exists.
Inter-VLAN Routing – Routing between different VLANs.
Longest Prefix Match – Selection of the most specific matching route.
Routing is the process of determining how packets move from one network to another.
Routers use IP addresses and routing tables to make forwarding decisions.
Important routing concepts include:
Default gateways
Routing tables
Directly connected networks
Static routes
Dynamic routes
Default routes
Next-hop addresses
Routing metrics
Routing protocols
Inter-VLAN routing
Routing is essential for LAN-to-LAN communication, WANs, enterprise networks, cloud connectivity and the Internet.
Understanding routing provides the foundation for more advanced topics such as OSPF, RIP, BGP, route summarisation, routing protocols and enterprise routing design.
More learning will be delivered through the Senior ICT Academy Campus by either a physical instructor or an online instructor.
Learners can continue with practical routing configuration, static routing, dynamic routing, OSPF, inter-VLAN routing, routing troubleshooting and enterprise network design.
Campus: https://campus.seniorictacademy.com/login
Senior ICT Academy: https://seniorictacademy.com