Introduction
Routing is a function of a router that enables communication between different networks. In this lab, we will configure static and default routes on routers using Cisco Packet Tracer.
Network Topology
The network consists of three routers (R1, R2, R3) connected to different networks. PC1 and PC2 must communicate using static routes. A default route will be configured for external network connectivity.

Types of Routes
Connected Route
Connected Route is the route that is automatically added to the routing table when an interface is assigned an IP address.
Connected route is indicated by the code C in cisco.
R1#show ip route | include C Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP C 192.168.1.0/24 is directly connected, GigabitEthernet0/0/0
Local Route
The Local Route represents the specific IP address of the router’s interface. The router will known when a message is addressed to itself.
Local Route is indicated by code L in cisco.
R1#show ip route | include L Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area L 192.168.1.1/32 is directly connected, GigabitEthernet0/0/0
Default Route
A default route (0.0.0.0/0) is used when no specific route is found in the routing table. This is also known as the gateway of last resort.
Static Route
There are three methods for configuring a static route:
- Specifying the next-hop IP address, which is known as a recursive static route.
- Specifying the exit interface, which is known as a directly connected static route.
- Specifying both the exit interface and the next-hop IP address, which is known as a fully specified static route
Configuration Steps
Assign IP Addresses
Let’s configure IP addresses on router interfaces. We will pick R1 to configure as a demonstration, and you may proceed with configuring R2 and R3 accordingly.
R1>enable R1#configure terminal R1(config)#interface GigabitEthernet 0/0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface gigabitEthernet 0/1 R1(config-if)#ip address 192.168.15.1 255.255.255.0 R1(config-if)#no shutdown
Verify the configuration:
R1#show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.1 YES manual up up GigabitEthernet0/1 192.168.15.1 YES manual up down GigabitEthernet0/2 unassigned YES unset administratively down down
Configure Static Routes
Static routes must be configured to allow communication between different networks. The following configurations enable proper routing between R1, R2, and R3.
Recursive Static Route (next-hop IP)
A recursive static route is configured by specifying the destination network address, the netmask, and the IP address of the next hop:
ip route destination-network netmask next-hop
Below is the configuration for R1, R2, R3
R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.15.2 R1#show ip route 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, GigabitEthernet0/0 L 192.168.1.1/32 is directly connected, GigabitEthernet0/0 S 192.168.2.0/24 [1/0] via 192.168.15.2 192.168.15.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.15.0/24 is directly connected, GigabitEthernet0/1 L 192.168.15.1/32 is directly connected, GigabitEthernet0/1
R2(config)#ip route 192.168.2.0 255.255.255.0 192.168.22.2 R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.15.1 R2#show ip route S 192.168.1.0/24 [1/0] via 192.168.15.1 S 192.168.2.0/24 [1/0] via 192.168.22.2 192.168.15.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.15.0/24 is directly connected, GigabitEthernet0/0 L 192.168.15.2/32 is directly connected, GigabitEthernet0/0 192.168.22.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.22.0/24 is directly connected, GigabitEthernet0/1 L 192.168.22.1/32 is directly connected, GigabitEthernet0/1
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.22.1 R3#show ip route S 192.168.1.0/24 [1/0] via 192.168.22.1 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.2.0/24 is directly connected, GigabitEthernet0/1 L 192.168.2.1/32 is directly connected, GigabitEthernet0/1 192.168.22.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.22.0/24 is directly connected, GigabitEthernet0/0 L 192.168.22.2/32 is directly connected, GigabitEthernet0/0
Directly Connected Static Route
A directly connected static route specifies only the exit interface. A disadvantage of this type of route is that the router will attempt to send packets directly to the destination rather than to the next hop. Also, this method rely on Proxy ARP to resolve the destination.
ip route destination-network netmask exit-interface
R1(config)#ip route 192.168.2.0 255.255.255.0 g0/0
R2(config)#ip route 192.168.2.0 255.255.255.0 g0/0 R2(config)#ip route 192.168.1.0 255.255.255.0 g0/1
R3(config)#ip route 192.168.1.0 255.255.255.0 g0/1
Fully Specified Static Route
A fully specified static route includes both the exit interface and the next-hop IP address, avoiding additional lookups.
ip route destination-network netmask exit-interface next-hop
R1(config)#ip route 192.168.2.0 255.255.255.0 g0/0 192.168.15.2
R2(config)#ip route 192.168.2.0 255.255.255.0 g0/0 192.168.22.2 R2(config)#ip route 192.168.1.0 255.255.255.0 g0/1 192.168.15.1
R3(config)#ip route 192.168.1.0 255.255.255.0 g0/1 192.168.22.1
Configure Default Route
A default route is a route to the least-specific destination possible: 0.0.0.0/0
This route matches all possible IP addresses and is only used when no other, more specific routes are available. A default route is often used to provide a path to the internet. The default route is also referred to as the “gateway of last resort”.
To configure a default route, the ip route command is used, with a destination network of 0.0.0.0 and a netmask of 0.0.0.0, along with the next-hop IP address or exit interface.
In this example, R3 has one static route to specific destination network and we will configure one default route to the Internet. Assuming the ISP’s IP is 306.0.142.5
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.22.1 R3(config)#ip route 0.0.0.0 0.0.0.0 306.0.142.5
Conclusion
In this lab, we configured static and default routes on routers using Cisco Packet Tracer. We demonstrated different types of static routes and their use cases. Proper route configuration ensures efficient network communication and connectivity to external networks.