cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1347
Views
0
Helpful
8
Replies

Vlan 2 and 3 can not communicate - Whats the configuration

Cisco10956
Level 1
Level 1

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. 

 

 

2 Accepted Solutions

Accepted Solutions

Hello,

 

below is a sample config (IP addressing an interfaces used are arbitrary). Attached also a Packet Tracer file (version in case you have that...

 

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

View solution in original post

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.

HTH

Rick

View solution in original post

8 Replies 8

Hello,

 

post the configs of the router and the switches, and indicate which interfaces are used to connect them.

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?

HTH

Rick

Sorry I do not have a configuration - Thats why I am asking for one

Hello,

 

below is a sample config (IP addressing an interfaces used are arbitrary). Attached also a Packet Tracer file (version in case you have that...

 

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

Ok – I think I get it now – I would need to use the same default gateway on the desktop --------Is the following correct ??

If I have a computer connected in Vlan 2 and another connected into Vlan 3.

The computer connected into Vlan 2 will have the nic configured with the following

192.168.2.5 - Dhcp address

172.16.1.1

255.255.255.0

The computer connected into Vlan 3 will have the nic configured with the following

192.168.3.6 - Dhcp address

172.16.1.1

255.255.255.0

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.

HTH

Rick

I am asking for a configuration to because I don't have one. 

balaji.bandi
Hall of Fame
Hall of Fame

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.)

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help