4.5.1 packet tracer - inter-vlan routing challenge
Table of Contents
Introduction
In this tutorial, we will guide you through the process of configuring inter-VLAN routing using Cisco Packet Tracer. This challenge is essential for understanding how to enable communication between different VLANs in a network. By the end of this tutorial, you will have practical skills in setting up inter-VLAN routing, which is a crucial concept in network design and management.
Step 1: Set Up the Network Topology
- Open Cisco Packet Tracer and create a new project.
- Add Devices
- Include at least one switch (e.g., 2960).
- Include a router (e.g., 1941).
- Add multiple PCs (at least two) for different VLANs.
- Connect Devices
- Use appropriate cables (copper straight-through for PC to switch, serial or crossover for router to switch).
- Make sure each PC is connected to the switch ports.
Step 2: Configure VLANs on the Switch
- Access Switch CLI
- Click on the switch and go to the CLI tab.
- Enter privileged EXEC mode by typing
enable
. - Create VLANs
- Use the following commands to create VLANs:
vlan 10 name Sales vlan 20 name Marketing
- Assign Ports to VLANs
- Enter interface configuration mode for each port connected to the PCs:
interface range fa0/1 - 2 switchport mode access switchport access vlan 10
- Repeat for other ports as needed, changing VLAN numbers accordingly.
Step 3: Configure the Router for Inter-VLAN Routing
- Access Router CLI
- Click on the router and go to the CLI tab.
- Enter privileged EXEC mode by typing
enable
. - Enable Routing
- Turn on routing by entering global configuration mode and using:
ip routing
- Create Subinterfaces
- For each VLAN, create a subinterface on the router:
interface gig0/0.10 encapsulation dot1Q 10 ip address 192.168.10.1 255.255.255.0 interface gig0/0.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0
- Ensure the IP addresses match the subnet for the respective VLANs.
Step 4: Configure PCs with IP Addresses
- Access Each PC
- Click on each PC and go to the Desktop tab.
- Select IP Configuration.
- Assign IP Addresses
- For PCs in VLAN 10, use
- IP Address: 192.168.10.2 (for PC1)
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.10.1
- For PCs in VLAN 20, use
- IP Address: 192.168.20.2 (for PC2)
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.20.1
Step 5: Test Connectivity
- Ping Between PCs
- Open the command prompt on each PC.
- Use the command
ping
followed by the IP address of the other PC (e.g., from PC1, ping 192.168.20.2). - Verify Routing
- Check that pings are successful to confirm that inter-VLAN routing is functioning.
Conclusion
You have successfully configured inter-VLAN routing in Cisco Packet Tracer. Key points include setting up VLANs on the switch, creating subinterfaces on the router, and ensuring proper IP assignments on the PCs. This foundational knowledge will aid you in understanding more complex networking concepts. As a next step, consider experimenting with additional VLANs or integrating other networking features such as DHCP.