02-15-2018 01:27 AM - edited 03-08-2019 01:51 PM
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
Solved! Go to Solution.
02-16-2018 01:46 PM
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
02-15-2018 12:48 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide