Cisco Packet Tracer: VLANs + DHCP + Inter-VLAN Routing

Praktisches Netzwerkprojekt aus Umschulung Systemintegration (GFN)

ProjektĂźbersicht

4 PCs + 1 Laptop | 2 VLANs | DHCP Server | Internet-Zugang via NAT

Netzwerk Topology

Netzwerk Topology

GerätVLANPortIP Range
PC1, Laptop10Gi0/1-2192.168.10.10-50
PC310Gi0/3192.168.10.10-50
PC4, PC520Gi0/4-5192.168.20.10-50
Server-Gi0/6192.168.10.100

Switch1 Konfiguration (Access + Trunk)

enable
conf t
vlan 10
 name Admin
vlan 20
 name Users

! Access Ports
interface range gi0/1 - 5
 switchport mode access
exit
int range gi0/1 - 3
 switchport access vlan 10
int range gi0/4 - 5
 switchport access vlan 20

! Trunk zu Switch2
int gi0/24
 switchport mode trunk
 switchport trunk encapsulation dot1q
end
write memory

Switch2 Konfiguration (L3 Routing)

enable
conf t

! Trunk Port
int gi0/24
 switchport mode trunk

! SVI Interfaces (Virtual Routing)
int vlan 10
 ip address 192.168.10.254 255.255.255.0
 no shutdown
int vlan 20
 ip address 192.168.20.254 255.255.255.0
 no shutdown

! Enable IP Routing
ip routing
end
write memory

Router Konfiguration (NAT Internet)

enable
conf t

! LAN Interface
int gi0/0
 ip address 203.0.113.1 255.255.255.0
 ip nat inside
 no shutdown

! WAN zu Cloud
int gi0/1
 ip address 8.8.8.8 255.255.255.0
 ip nat outside
 no shutdown

! Default Route
ip route 0.0.0.0 0.0.0.0 8.8.8.1

! NAT ACL
access-list 1 permit 192.168.10.0 0.0.0.255
access-list 1 permit 192.168.20.0 0.0.0.255
ip nat inside source list 1 interface gi0/1 overload

end
write memory

DHCP Server Konfiguration

PoolNetworkGatewayDNS Server
Admin_VLAN10192.168.10.0192.168.10.254192.168.10.254
Users_VLAN20192.168.20.0192.168.20.254192.168.20.254

Test Ergebnisse

TestVon → ZuErgebnis
Intra-VLANPC1 → Laptop (VLAN10)✅ 1ms
Inter-VLANPC1 → PC4 (VLAN20)✅ 2ms (L3 Routing)
InternetLaptop → 8.8.8.8✅ NAT funktioniert
DHCPAlle Endgeräte✅ Auto IP Assignment
Vollständige Netzwerk-Topology

Quellen

← Zurück zu Projekten GitHub Repository