cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2706
Views
5
Helpful
16
Replies

InterVlan noob problem help

WIZARD1325
Level 1
Level 1

PC1-192.168.10.2

PC2- 192.168.10.3

under Vlan 10

 

PC3-192.168.20.3

PC4. 192.168.20.4

under Vlan 20

 

Router default gateway

192.168.10.1. for vlan 10

192.168.20.1 for vlan 20

 

I can ping 1 and 2 and 2 and 4 in the same Vlan but I cant ping across from vlan 1 to vlan 2  see attachments how i have it set up

 

I did input the default gateway info under ipconfig on each pc

 

What am i doing wrong?

 

thanks in advance

16 Replies 16

Hello,

 

the link(s) between the switch and the router need to be trunks only when you use subinterfaces on the router (called router-on-a-stick), which you don't have configured. You are using the physical interfaces on the router, so the ports connecting the switch to the router need to be access ports.

 

Here is the correct switch and router configuration. For the sake of convenience, I have configured two DHCP pools, so if you set the PCs to DHCP, they will automatically get an IP address:

 

Switch

 

interface FastEthernet0/1
description Link to PC1
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/2
description Link to PC2
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/3
description Link to PC3
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/4
description Link to PC4
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/5
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 20
switchport mode access
spanning-tree portfast

 

Router

 

ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.20.1
!
ip dhcp pool VLAN10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool VLAN20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
!
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto

Hello,

 

for the sake of clarity, I recreated the lab (see attachment). Rename the .jpg to .pkt and open in Packet Tracer Version 7.1.1.