1755700 Members
3056 Online
108837 Solutions
New Discussion юеВ

Re: 1920s vlans

 
kentdeadpool
Occasional Visitor

1920s vlans

hello community i have a weird problem 

 

i have mikrotik router and create 2 vlans vlan20 and vlan30

vlan20 is 192.168.20.0/24  

vlan30 is  192.168.30.0/24

in my uplink port 45 i tagged and include this 2 vlans 

and port 15 i include and untagged the vlan20 and include and tagged vlan30 

so port 15 gives me ip 192.168.20.x . now when i try to put static ip 192.168.30.15 / 255.255.255.0 / 192.168.30.1

i cannot ping anything and nothing works.

Before you asked me i want to connect 2 devices from 1 port and use the 2 vlans in cisco switches is working fine . in hpe 1920s it gives me a lot o problem.

 

7 REPLIES 7
Ivan_B
HPE Pro

Re: 1920s vlans

Hi @kentdeadpool !

and port 15 i include and untagged the vlan20 and include and tagged vlan30 
so port 15 gives me ip 192.168.20.x . now when i try to put static ip 192.168.30.15 / 255.255.255.0 / 192.168.30.1
i cannot ping anything and nothing works.

The static IP is a good and correct idea, but the device that is connected to port 15 must tag its traffic with VLAN 30 tag in order to be able to use VLAN 30. Does it do it?

 

 

I am an HPE employee

Accept or Kudo

kentdeadpool
Occasional Visitor

Re: 1920s vlans

No it doesn't do it
Ivan_B
HPE Pro

Re: 1920s vlans

So, if it doesn't do it, then untagged frame sent by the device are placed to the untagged VLAN, the VLAN 15 in your case. And since the 192.168.30.0/24 subnet doesn't belong to VLAN 15, that's the cause why there is no communication in this case. 

"use the 2 vlans in cisco switches is working fine" - no, it doesn't, Cisco switches work the same way, I can assure you in that being double CCNP (-; Think about the situation - let's assume your device communicates in both VLAN 15 and 30 and sends traffic to the switch. Here is a simple question - if all frames are untagged, how the switch will differentiate frames that belong to VLAN 15 from frames that belong to VLAN 30? 

P.S. In fact there is a way, so called 'IP Subnet-based VLAN', but the Web interface is available only for port-based VLANs (normal VLANs, as in Cisco) and it is the only supported type for this model.

I am an HPE employee

Accept or Kudo

kentdeadpool
Occasional Visitor

Re: 1920s vlans

So If I understand correct I must separate the physical port to each vlans???
Also about cisco I have a similar setup and I can access all vlans from every device. In cisco I did trunk my uplink and access the vlan id that I want and everything went OK

kentdeadpool
Occasional Visitor

Re: 1920s vlans

My configuration is it correct? Because I thought if I setup static ip my laptop with vlan30 then I can see vlan10 and ping gateway but this not happening.

Sorry for my English and for vlans knowledge.
Ivan_B
HPE Pro

Re: 1920s vlans

Ok, so we need to separate Layer 2 forwarding, AKA Switching and Layer 3 forwarding, AKA Routing. I believe you want a PC (for example) to reside in ONE VLAN, but to be able to access other VLANs, then you need a routing. So a PC will belong to one single VLAN, but will use a default gateway (your switch in this example) to reach other VLANs.

Here is how it looks like. You need to set a switch port connected to a PC as Access port. For example in VLAN 20. 'Access' in VLAN 20 means all untagged traffic received on the port will belong to VLAN 20. And traffic from VLAN 20 will be sent untagged. This is what you typically use with PCs, Servers etc. So, let's proceed in a structured way and create a very simple routing configuration:

1. Create VLAN 20 and 30 (for example) in the switch.
2. Let's take two PCs - PC1 and PC2. PC1 will belong to VLAN 20. PC2 will belong to VLAN 30
3. Connect PC1 to port 1 and PC2 to port 2
4. In the switch web interface set port 1 to be 'Access' in VLAN 15 and port 2 to be 'Access' in VLAN 20
5. Create VLAN-Interfaces for VLAN 20 and 30. Assing IP addresses to those Vlan-interfaces as follows: Vlan-interface 20 will have IP address 192.168.20.1 with mask 255.255.255.0 ; Vlan-interface 30 will have IP address 192.168.30.1 with mask 255.255.255.0
6. Assign IP addresses and default Gateway for each PC:
PC1: 192.168.20.2 mask 255.255.255.0, default gateway 192.168.20.1 (IP address of the Vlan-interface20 on the switch)
PC2: 192.168.30.2 mask 255.255.255.0, default gateway 192.168.30.1 (IP address of the Vlan-interface30 on the switch)

Now PC1 should be able to ping its default GW 192.168.20.1 as well as 192.168.30.1 and PC2. Why is it possible? Because PC1 will send all traffic that is destined to other networks (networks different from VLAN 20) to its default gateway, the Vlan-interface20 on the switch. And since the switch has Vlan-interfaces in both VLAN 20 and 30, it knows how to route packets between them back and forth.

I am afraid you need to read more about VLANs and Vlan-interfaces (Cisco call them 'SVI') a little bit more to understand the concept, but in fact it's pretty simple as soon as you get the idea.

 

I am an HPE employee

Accept or Kudo

kentdeadpool
Occasional Visitor

Re: 1920s vlans

I appreciate your help very much.

But this scenario i did it and work fine without put static ip
The hp 1920s doesn't have access I assume in hp is untagged.

Now in port 10 for example I setup vlan20 as untagged and vlan30 as tagged and I have 1 pc , I the pc I put static from vlan30 that is tagged but I cannot ping anything probably the switch is lack from options? I think is not possible to pass 2 vlans in same port ?