cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2193
Views
0
Helpful
7
Replies

Communication between VLAN’s

marko.srpak
Level 1
Level 1

Hello everyone,

 

I have one question. Situation is that we have few VLAN's.

 

VLAN 1

VLAN 2

Etc.

 

Default IP addresses in VLAN 1 are 192.168.30.0/24, and VLAN 2 are 192.168.31.1/24.. etc.. (DHCP)

 

Because of needs we have in VLAN 1 server (gateway) that have IP address 172.31.1.1 (172.31.1.0/24)

 

I configure manual IP address (IP 172.31.1.2, mask:255.255.255.0, gateway 172.31.1.1) on client computer in VLAN 1 and computer can communicate with that server and everything is working.

Now, I would like that users from VLAN 2 can communicate with that server (gateway) in VLAN 1 too. When I configure IP address from range 172.31.1.0/24 on client computer in VLAN 2, I can't reach that server (gateway).

 

What I have to do (what to configure) on Cisco switch?

 

Thanks,

Best Regards.

7 Replies 7

Raja_D
Level 1
Level 1

confirm below details :

Is vlan 1 pool configured as 172.31.1.1/24 or 192.168.30.1/24

what is the vlan 2 ip address configured as in the switch ?

chrihussey
VIP Alumni
VIP Alumni

Please clarify:

You state VLAN 1 is the 192.168.30.0/24 network and you have a server and configured a host on that same VLAN with the 172.3.1.0.24 network?

And VLAN 2 is the 192.168.31.0/24 network and you want to configure hosts in that VLAN with the same 172.31.1.0/ network?

However, based on your answers, you really can't have hosts in the same IP network in different VLANs.

 

Diana Karolina Rojas
Cisco Employee
Cisco Employee

Hello Marko,

You can't have two VLANs with the same subnet. I recommend you that you put your Server in another vlan (vlan 3) and use a layer three device as gateway to gain comunication between the vlans. If you server have to be the Gateway (with only one IP) for all the devices so you have to put all your devices in the same Vlan.

Regards,

devils_advocate
Level 7
Level 7

As others have said, if VLAN1 utilises the 172.31.1.0/24 address space, you can't assign hosts one of these addresses and have them in VLAN2.

VLAN 2 needs to be something other than 172.31.1.0/24.

What switch do you have?

In order to have multiple VLAN's, you are going to need either a Layer 3 capable switch or a Layer 3 capable device somewhere on the network to route the traffic between your subnets.

Unless the server is running some sort of Linux and you have setup subinterfaces, you won't be able to natively use this as your 'Router'. 

Jigar Dave
Level 3
Level 3

Hi Marko

Which kind of switch you have in your case?

You have to run one command - ip routing - on your switch

conf t

ip routing

exit

By this command, your vlans will talk to each other.

Also make sure, your server and user switchport is in correct vlan.

like, server is connected to Gig0/10 of switch - make sure , that port is vlan member of server-vlan

user is connected to Gig0/20 of switch - make sure, that port is vlan member of user-vlan

please post results after this test

Thanks

Jigar Dave
Level 3
Level 3

Hi Marko,

let's say you have Cisco 3750-X switch

in order to have your set up work as the way you want, you need to do below configuration

ssh to switch

conf t
#enable IP Routing
ip routing

#Create Vlans
vlan 10
name Data-Vlan
vlan 20
name User-Vlan

#Create Layer-3 vlans
int vlan 10
description ** Data-Vlan **
ip add 10.10.10.1
no shut

int vlan 20
descriptio ** User-Vlan **
ip add 10.10.20.1
no shut

#Connect Server to Switchport-10 and do below config

int Gig0/10
switchport mode access
switchport access vlan 10
descriptio ** Server **
no sh

#Connect Server to Switchport-20 and do below config

int Gig0/20
switchport mode access
switchport access vlan 20
descriptio ** User **
no sh

exit
wr mem


**********************************************
once this is done, change server ip as
ip - 10.10.10.10
mask - 255.255.255.0
gateway - 10.10.10.1

change user ip as
ip - 10.10.20.20
mask - 255.255.255.0
gateway - 10.10.20.1

***********************************************
post your results.

Hope this help. rate the helpful posts for motivation

Thanks

lpassmore
Level 1
Level 1

Hi Marko

The other respondents are basically correct.  Devices in different VLANs but in the same IP range cannot communicate with one another.  It is a basic network law that prevents traffic in different VLANs from being able to communicate directly.  They have to communicate via a router and a router cannot have two interfaces in the same IP subnet.

If you need the devices in VLANs 2+ to be able to communicate with the 172.31.1.1 device which is in VLAN 1 then you have a couple of options:

1.  Move the server into a different VLAN completely (as anaid_30kadi said) with a 172.31.1.x address

2. Put a secondary address on the VLAN 1 interface (e.g. 172.31.1.x) and ensure the default gateway on the server is set to that address.

Hopefully this will help you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card