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
## Current Configuration State
37
38
### R1 (Edge Router)
39
40
interface GigabitEthernet0/0
41
ip address 192.168.1.1 255.255.255.0
42
!
43
interface GigabitEthernet0/1
44
ip address 203.0.113.1 255.255.255.252
45
!
46
ip route 0.0.0.0 0.0.0.0 203.0.113.2
47
48
- Inside and outside interfaces have IPs
49
- Default route toward ISP
50
- No NAT configuration whatsoever
51
- No inside/outside interface designation (`ip nat inside` / `ip nat outside`)
52
- No ACL to define interesting traffic
53
- No NAT pool, static mapping, or overload statement
54
55
### ISP Router
56
57
interface GigabitEthernet0/0
58
ip address 203.0.113.2 255.255.255.252
59
!
60
interface GigabitEthernet0/1
61
ip address 198.51.100.1 255.255.255.0
62
!
63
ip route 203.0.113.0 255.255.255.0 203.0.113.1
64
65
- Both interfaces addressed
66
- Static route back toward the 203.0.113.0/30 transit link
67
- No default route or route to 192.168.1.0/24 — ISP does not know the private network (expected; NAT will hide it)
68
69
### SW1
70
71
- Default config, all ports in VLAN 1
72
- Gi0/1 is up/up toward R1; access ports came up when PCs connected
73
- No VLANs, no inter-VLAN routing needed (flat Layer 2 domain)
74
75
### PCs / Web-Server
76
77
- All statically addressed with correct gateways
78
- No configs to apply
79
80
## What the Lab Requires
81
851cb2 Francesco 2026-10-15 05:37:16
82
This is a "complete NAT lab" — the start file provides only base IP connectivity.
83
You must implement NAT on R1.
84
85
Typical CCNA objectives for this topology:
490ee0 Francesco 2026-10-15 05:34:48
86
87
### 1. Static NAT (one-to-one)
88
89
Map an inside host to a fixed public address — e.g., publish PC1 or an internal server.
90
91
ip nat inside source static 192.168.1.10 203.0.113.5
92
93
### 2. Dynamic NAT (pool-based)
94
95
Translate inside hosts to a pool of public addresses.
96
97
ip nat pool PUBLIC_POOL 203.0.113.5 203.0.113.6 netmask 255.255.255.248
98
access-list 1 permit 192.168.1.0 0.0.0.255
99
ip nat inside source list 1 pool PUBLIC_POOL
100
101
### 3. NAT with Overload (PAT)
102
103
Allow all inside hosts to share R1's outside interface address — the most common real-world scenario.
104
105
access-list 1 permit 192.168.1.0 0.0.0.255
106
ip nat inside source list 1 interface GigabitEthernet0/1 overload
107
108
### 4. Port Forwarding (if a static PAT is needed)
109
110
Expose an internal service on a specific port:
111
112
ip nat inside source static tcp 192.168.1.10 80 203.0.113.1 8080
113
114
### 5. Interface Designation (required for any NAT to work)
115
116
interface GigabitEthernet0/0
117
ip nat inside
118
!
119
interface GigabitEthernet0/1
120
ip nat outside
121
122
## Verification Commands
123
124
show ip nat translations
125
show ip nat statistics
126
debug ip nat ! use cautiously in production
127
show ip interface brief
128
show ip route
129
130
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.
131
132
## Key Troubleshooting Points
133
134
1. NAT not translating: Check `ip nat inside` / `ip nat outside` on the correct interfaces — a missing designation is the #1 cause.
135
2. ACL mismatch: The `source list` ACL must match the inside subnet; verify with `show access-lists`.
136
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.
137
4. Overlapping networks: Ensure the NAT pool does not overlap with 192.168.1.0/24 or 203.0.113.0/30.
138
5. `ip nat inside source` vs `ip nat inside destination`: For outbound internet access, use `source`.
139
140
## Suggested Lab Flow
141
142
1. Verify baseline connectivity: PC to R1 (ping 192.168.1.1), R1 to ISP (ping 203.0.113.2).
143
2. Confirm PC to Web-Server fails (no NAT, no return route).
144
3. Configure NAT overload on R1 with an ACL permitting 192.168.1.0/24.
145
4. Apply `ip nat inside` / `ip nat outside`.
146
5. Re-test PC to Web-Server — should succeed.
147
6. Run `show ip nat translations` to observe the translation entries.
148
7. Optional: add a static NAT entry for a "published" internal server and verify from the ISP side.
149
8. Save configs with `write memory` on R1, ISP, and SW1.