Blame

490ee0 Francesco 2026-10-15 05:34:48
1
# CCNA Lab: Complete NAT Lab
2
f35cd3 Francesco 2026-10-15 05:35:11
3
Writeups for https://www.pingmynetwork.com
4
490ee0 Francesco 2026-10-15 05:34:48
5
## Topology Overview
6
7
| Device | Role | Model |
8
|--------|------|-------|
9
| SW1 | Layer 2 switch | WS-C2960-24TT-L |
10
| PC1 / PC2 / PC3 | Inside hosts | PC |
11
| R1 | Edge router (NAT device) | ISR4331 |
12
| ISP | Service provider router | ISR4331 |
13
| Web-Server | Public server | Server |
14
15
### Physical Connectivity
16
17
PC1 (Fa0) -- Fa0/1 \
18
PC2 (Fa0) -- Fa0/2 >-- SW1 -- Gi0/1 -- Gi0/0 R1 Gi0/1 -- Gi0/0 ISP Gi0/1 -- Fa0 Web-Server
19
PC3 (Fa0) -- Fa0/3 /
20
21
## Addressing Plan
22
23
| Segment | Network | Notes |
24
|---------|---------|-------|
25
| Inside LAN | 192.168.1.0/24 | R1 Gi0/0 = 192.168.1.1 (default gateway for PCs) |
26
| WAN transit | 203.0.113.0/30 | R1 Gi0/1 = 203.0.113.1, ISP Gi0/0 = 203.0.113.2 |
27
| Server LAN | 198.51.100.0/24 | ISP Gi0/1 = 198.51.100.1, Web-Server = 198.51.100.10 |
28
29
Host details:
30
31
- PC1: 192.168.1.10/24, GW 192.168.1.1
32
- PC2: 192.168.1.11/24, GW 192.168.1.1
33
- PC3: 192.168.1.12/24, GW 192.168.1.1
34
- Web-Server: 198.51.100.10/24, GW 198.51.100.1
35
36
> Note: The diagram label reads `195.51.100.0/24`, but all actual device configs use `198.51.100.0/24`. The label is a typo — use `198.51.100.0/24`.
37
38
## Current Configuration State
39
40
### R1 (Edge Router)
41
42
interface GigabitEthernet0/0
43
ip address 192.168.1.1 255.255.255.0
44
!
45
interface GigabitEthernet0/1
46
ip address 203.0.113.1 255.255.255.252
47
!
48
ip route 0.0.0.0 0.0.0.0 203.0.113.2
49
50
- Inside and outside interfaces have IPs
51
- Default route toward ISP
52
- No NAT configuration whatsoever
53
- No inside/outside interface designation (`ip nat inside` / `ip nat outside`)
54
- No ACL to define interesting traffic
55
- No NAT pool, static mapping, or overload statement
56
57
### ISP Router
58
59
interface GigabitEthernet0/0
60
ip address 203.0.113.2 255.255.255.252
61
!
62
interface GigabitEthernet0/1
63
ip address 198.51.100.1 255.255.255.0
64
!
65
ip route 203.0.113.0 255.255.255.0 203.0.113.1
66
67
- Both interfaces addressed
68
- Static route back toward the 203.0.113.0/30 transit link
69
- No default route or route to 192.168.1.0/24 — ISP does not know the private network (expected; NAT will hide it)
70
71
### SW1
72
73
- Default config, all ports in VLAN 1
74
- Gi0/1 is up/up toward R1; access ports came up when PCs connected
75
- No VLANs, no inter-VLAN routing needed (flat Layer 2 domain)
76
77
### PCs / Web-Server
78
79
- All statically addressed with correct gateways
80
- No configs to apply
81
82
## What the Lab Requires
83
84
This is a "complete NAT lab" — the start file provides only base IP connectivity. You must implement NAT on R1. Typical CCNA objectives for this topology:
85
86
### 1. Static NAT (one-to-one)
87
88
Map an inside host to a fixed public address — e.g., publish PC1 or an internal server.
89
90
ip nat inside source static 192.168.1.10 203.0.113.5
91
92
### 2. Dynamic NAT (pool-based)
93
94
Translate inside hosts to a pool of public addresses.
95
96
ip nat pool PUBLIC_POOL 203.0.113.5 203.0.113.6 netmask 255.255.255.248
97
access-list 1 permit 192.168.1.0 0.0.0.255
98
ip nat inside source list 1 pool PUBLIC_POOL
99
100
### 3. NAT with Overload (PAT)
101
102
Allow all inside hosts to share R1's outside interface address — the most common real-world scenario.
103
104
access-list 1 permit 192.168.1.0 0.0.0.255
105
ip nat inside source list 1 interface GigabitEthernet0/1 overload
106
107
### 4. Port Forwarding (if a static PAT is needed)
108
109
Expose an internal service on a specific port:
110
111
ip nat inside source static tcp 192.168.1.10 80 203.0.113.1 8080
112
113
### 5. Interface Designation (required for any NAT to work)
114
115
interface GigabitEthernet0/0
116
ip nat inside
117
!
118
interface GigabitEthernet0/1
119
ip nat outside
120
121
## Verification Commands
122
123
show ip nat translations
124
show ip nat statistics
125
debug ip nat ! use cautiously in production
126
show ip interface brief
127
show ip route
128
129
From a PC, test with `ping 198.51.100.10`. Before NAT, the ping fails because ISP has no route to 192.168.1.0/24 and R1 has no translation. After NAT overload, the source appears as 203.0.113.1 and replies return correctly.
130
131
## Key Troubleshooting Points
132
133
1. NAT not translating: Check `ip nat inside` / `ip nat outside` on the correct interfaces — a missing designation is the #1 cause.
134
2. ACL mismatch: The `source list` ACL must match the inside subnet; verify with `show access-lists`.
135
3. No return path: ISP needs a route to the translated address (203.0.113.x). It already has 203.0.113.0/30 directly connected, so PAT to the interface IP works. Pool addresses must be routed by ISP.
136
4. Overlapping networks: Ensure the NAT pool does not overlap with 192.168.1.0/24 or 203.0.113.0/30.
137
5. `ip nat inside source` vs `ip nat inside destination`: For outbound internet access, use `source`.
138
139
## Suggested Lab Flow
140
141
1. Verify baseline connectivity: PC to R1 (ping 192.168.1.1), R1 to ISP (ping 203.0.113.2).
142
2. Confirm PC to Web-Server fails (no NAT, no return route).
143
3. Configure NAT overload on R1 with an ACL permitting 192.168.1.0/24.
144
4. Apply `ip nat inside` / `ip nat outside`.
145
5. Re-test PC to Web-Server — should succeed.
146
6. Run `show ip nat translations` to observe the translation entries.
147
7. Optional: add a static NAT entry for a "published" internal server and verify from the ISP side.
148
8. Save configs with `write memory` on R1, ISP, and SW1.
149
150
## Summary
151
152
The start file is a clean, correctly-addressed three-segment topology with full Layer 3 reachability up to the edge, but zero NAT configuration. The lab's purpose is to have you design and apply static NAT, dynamic NAT, and/or PAT overload on R1, then verify translations and end-to-end reachability to the public web server. The only pre-existing "gotcha" is the mislabeled `195.51.100.0/24` note — the real network is `198.51.100.0/24`.