|
| 1 | +# 13 – Configuring a Default Route (Gateway of Last Resort) |
| 2 | + |
| 3 | +This tutorial is the thirteenth in our Cisco Packet Tracer series and focuses on **default routing**—also known as configuring a **gateway of last resort**. This type of route is essential in smaller or **stub networks**, where routers only have one exit path for unknown destinations. |
| 4 | + |
| 5 | +We will build a small branch-office style topology and configure the branch router to forward all unknown traffic to a main router using a static default route. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Part 1 – Network Topology Overview |
| 10 | + |
| 11 | +This network includes: |
| 12 | + |
| 13 | +* **Two routers** (R0 = Branch, R1 = Main) |
| 14 | +* **One switch per router** (S0, S1) |
| 15 | +* **Two PCs per switch** (4 total PCs) |
| 16 | + |
| 17 | +The branch site will have no knowledge of external networks, so it will use R1 as its **gateway of last resort**. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Part 2 – Device Placement and Cabling |
| 24 | + |
| 25 | +### Step 2.1 – Add Devices to the Workspace |
| 26 | + |
| 27 | +From **Network Devices** and **End Devices**, place: |
| 28 | + |
| 29 | +* **2 Routers** (Router-PT-Empty) |
| 30 | +* **2 Switches** (2960) |
| 31 | +* **4 PCs** |
| 32 | + |
| 33 | +Label the devices: |
| 34 | + |
| 35 | +* Routers: **R0** (Branch), **R1** (Main) |
| 36 | +* Switches: **S0** (for R0), **S1** (for R1) |
| 37 | +* PCs: **PC0–PC3** |
| 38 | + |
| 39 | +### Step 2.2 – Add Network Modules to Routers |
| 40 | + |
| 41 | +Add: |
| 42 | + |
| 43 | +* **1x PT-ROUTER-NM-1S** |
| 44 | +* **1x PT-ROUTER-NM-1CFE** |
| 45 | + |
| 46 | +Turn off each router, insert modules, then power back on. |
| 47 | + |
| 48 | +If you need help with this, refer to the steps in [How to Customise the Router-PT in Packet Tracer](../handy-tips/tip5.md) |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +### Step 2.3 – Cabling |
| 53 | + |
| 54 | +Use **Copper Straight-Through** for PC to switch and switch to router connections. Use **Serial DCE** for the R0 ↔ R1 link. |
| 55 | + |
| 56 | +| From | To | Port/Interface | |
| 57 | +| ---- | -- | -------------- | |
| 58 | +| PC0 | S0 | fa0/1 | |
| 59 | +| PC1 | S0 | fa0/2 | |
| 60 | +| S0 | R0 | fa0/24 → fa2/0 | |
| 61 | +| PC2 | S1 | fa0/1 | |
| 62 | +| PC3 | S1 | fa0/2 | |
| 63 | +| S1 | R1 | fa0/24 → fa2/0 | |
| 64 | +| R0 | R1 | se0/0 ↔ se0/0 | |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Part 3 – IP Addressing Scheme |
| 69 | + |
| 70 | +Now we will assign IP addresses to all devices, ensuring they can communicate across the network. |
| 71 | + |
| 72 | +### Subnet Allocation |
| 73 | + |
| 74 | +For this tutorial, we will use the following subnets: |
| 75 | + |
| 76 | +| Subnet | Devices | Subnet Mask | |
| 77 | +| --------------- | ------------ | ------------- | |
| 78 | +| 192.168.10.0/24 | PC0, PC1, R0 | 255.255.255.0 | |
| 79 | +| 192.168.20.0/24 | PC2, PC3, R1 | 255.255.255.0 | |
| 80 | +| 10.0.0.0/30 | R0 ↔ R1 | 255.0.0.0 | |
| 81 | + |
| 82 | +### Assign IPs to PCs |
| 83 | + |
| 84 | +Go to **Desktop > IP Configuration** on each PC: |
| 85 | + |
| 86 | +| PC | IP Address | Subnet Mask | Default Gateway | |
| 87 | +| --- | ------------ | ------------- | --------------- | |
| 88 | +| PC0 | 192.168.10.11 | 255.255.255.0 | 192.168.10.1 | |
| 89 | +| PC1 | 192.168.10.12 | 255.255.255.0 | 192.168.10.1 | |
| 90 | +| PC2 | 192.168.20.13 | 255.255.255.0 | 192.168.20.1 | |
| 91 | +| PC3 | 192.168.20.14 | 255.255.255.0 | 192.168.20.1 | |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## Part 4 – Router Configuration |
| 100 | + |
| 101 | +In this part, we will configure the routers to enable communication between the PCs and set up a default route on R0. |
| 102 | + |
| 103 | +```{admonition} Note |
| 104 | +:class: note |
| 105 | +To ensure all unknown traffic from the branch site is forwarded to the main router, we configure a default route on R0. This is done with the command `ip route 0.0.0.0 0.0.0.0 10.0.0.2`, which instructs R0 to send any traffic destined for networks it doesn't know about to R1. On R1, we add a static route pointing back to the branch network, allowing two-way communication. |
| 106 | +``` |
| 107 | + |
| 108 | +### Step 4.1 – R0 (Branch Router) |
| 109 | + |
| 110 | +```bash |
| 111 | +enable |
| 112 | +configure terminal |
| 113 | +hostname R0 |
| 114 | + |
| 115 | +interface fa1/0 |
| 116 | +ip address 192.168.10.1 255.255.255.0 |
| 117 | +no shutdown |
| 118 | +exit |
| 119 | + |
| 120 | +interface se0/0 |
| 121 | +ip address 10.0.0.1 255.0.0.0 |
| 122 | +clock rate 64000 |
| 123 | +no shutdown |
| 124 | +exit |
| 125 | + |
| 126 | +ip route 0.0.0.0 0.0.0.0 10.0.0.2 |
| 127 | +exit |
| 128 | +write memory |
| 129 | +``` |
| 130 | + |
| 131 | +> This is the **default route**. It says: "Send all unknown traffic to `10.0.0.2` (R1)." |
| 132 | +
|
| 133 | + |
| 134 | + |
| 135 | +### Step 4.2 – R1 (Main Router) |
| 136 | + |
| 137 | +```bash |
| 138 | +enable |
| 139 | +configure terminal |
| 140 | +hostname R1 |
| 141 | + |
| 142 | +interface fa1/0 |
| 143 | +ip address 192.168.20.1 255.255.255.0 |
| 144 | +no shutdown |
| 145 | +exit |
| 146 | + |
| 147 | +interface se0/0 |
| 148 | +ip address 10.0.0.2 255.0.0.0 |
| 149 | +no shutdown |
| 150 | +exit |
| 151 | + |
| 152 | +ip route 192.168.10.0 255.255.255.0 10.0.0.1 |
| 153 | +exit |
| 154 | +write memory |
| 155 | +``` |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## Part 5 – Verification and Testing |
| 162 | + |
| 163 | +### Step 5.1 – Check Routing Tables |
| 164 | + |
| 165 | +On **R0**: |
| 166 | + |
| 167 | +```bash |
| 168 | +show ip route |
| 169 | +``` |
| 170 | + |
| 171 | +You should see a route labeled with `S*` – this is the static default route. |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | +On **R1**: |
| 176 | + |
| 177 | +```bash |
| 178 | +show ip route |
| 179 | +``` |
| 180 | + |
| 181 | +You should see a static route to `192.168.10.0` via `10.0.0.1` |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | +### Step 5.2 – Ping Tests |
| 186 | + |
| 187 | +From **PC0**, try: |
| 188 | + |
| 189 | +```bash |
| 190 | +ping 192.168.20.10 |
| 191 | +ping 192.168.20.13 |
| 192 | +``` |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | +From **PC3**, try: |
| 197 | + |
| 198 | +```bash |
| 199 | +ping 192.168.20.13 |
| 200 | +ping 192.168.10.11 |
| 201 | +``` |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +## Summary |
| 208 | + |
| 209 | +In this tutorial, you: |
| 210 | + |
| 211 | +* Created a simple two-router topology |
| 212 | +* Assigned IP addresses and connected all devices |
| 213 | +* Configured a **default route** on the branch router |
| 214 | +* Verified full connectivity using `ping` and `show ip route` |
| 215 | + |
| 216 | +Default routes are vital in small or remote networks where only one path leads to the rest of the network or the internet. |
0 commit comments