03-08-2021 07:32 AM - edited 03-08-2021 08:00 AM
I have a router connected to switch 1 – vlan 2, vlan 3 : switch 2 – vlan 3, vlan 2. Vlan 2 and 3 are their own separate subnet, and have computers communicating within their own vlans.
Currently VLan 2 computers can not communicate with Vlan 3
How can I make computers on vlan 2 communicate with vlan 3.
What would the configuration look like ??? - Can you send me a configuration because I don't have one.
Solved! Go to Solution.
03-08-2021 08:16 AM
Hello,
below is a sample config (IP addressing an interfaces used are arbitrary). Attached also a Packet Tracer file (version
Switch 1
hostname Switch_1
!
interface FastEthernet0/1
description Computer_1_Vlan_2
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
description Uplink to Router interface GigabitEthernet0/0
switchport mode trunk
!
interface Vlan1
ip address 172.16.1.2 255.255.255.0
!
ip default-gateway 172.16.1.1
Switch 2
hostname Switch_2
!
interface FastEthernet0/1
description Computer_1_Vlan_2
switchport access vlan 3
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
description Uplink to Router interface GigabitEthernet0/1
switchport mode trunk
!
interface Vlan1
ip address 172.16.1.3 255.255.255.0
!
ip default-gateway 172.16.1.1
Router
hostname Router
!
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.3.1
!
ip dhcp pool VLAN2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
ip dhcp pool VLAN3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
!
interface GigabitEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.3
encapsulation dot1Q 3
ip address 192.168.3.1 255.255.255.0
03-08-2021 01:07 PM
Not quite correct. 172.16.1.1 is configured on both switches as their default gateway which enables the switches to communicate with remote subnets. But 172.16.1.1 would not be the gateway configured on the desktop. The default gateway for the desktop needs to be an IP address in the same subnet as the desktop address. So for desktop in vlan 2 the gateway should be 192.168.2.1 and for the desktop in vlan 3 the gateway should be 192.168.3.1.
03-08-2021 07:37 AM
Hello,
post the configs of the router and the switches, and indicate which interfaces are used to connect them.
03-08-2021 07:51 AM
I agree that a copy of the configuration would be helpful. I also think we need to see some type of drawing that shows the topology. The original post says router connects to switch1 and connects to switch2. Is that connection on 2 router interfaces? Do switch1 and switch2 have any direct connection with each other or is the connection between switches only through the router?
03-08-2021 07:58 AM
Sorry I do not have a configuration - Thats why I am asking for one
03-08-2021 08:16 AM
Hello,
below is a sample config (IP addressing an interfaces used are arbitrary). Attached also a Packet Tracer file (version
Switch 1
hostname Switch_1
!
interface FastEthernet0/1
description Computer_1_Vlan_2
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
description Uplink to Router interface GigabitEthernet0/0
switchport mode trunk
!
interface Vlan1
ip address 172.16.1.2 255.255.255.0
!
ip default-gateway 172.16.1.1
Switch 2
hostname Switch_2
!
interface FastEthernet0/1
description Computer_1_Vlan_2
switchport access vlan 3
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
description Uplink to Router interface GigabitEthernet0/1
switchport mode trunk
!
interface Vlan1
ip address 172.16.1.3 255.255.255.0
!
ip default-gateway 172.16.1.1
Router
hostname Router
!
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.3.1
!
ip dhcp pool VLAN2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
ip dhcp pool VLAN3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
!
interface GigabitEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.3
encapsulation dot1Q 3
ip address 192.168.3.1 255.255.255.0
03-08-2021 08:37 AM
03-08-2021 01:07 PM
Not quite correct. 172.16.1.1 is configured on both switches as their default gateway which enables the switches to communicate with remote subnets. But 172.16.1.1 would not be the gateway configured on the desktop. The default gateway for the desktop needs to be an IP address in the same subnet as the desktop address. So for desktop in vlan 2 the gateway should be 192.168.2.1 and for the desktop in vlan 3 the gateway should be 192.168.3.1.
03-08-2021 07:59 AM
I am asking for a configuration to because I don't have one.
03-08-2021 07:51 AM
Make a small diagram of how this Router connected to Switch 1 and Switch2
is the Layer 3 Gateway on the router or their own switches? ( possible post all 3 devices configuration so we can suggest best to achieve what you looking to do.)
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