Question

Locked

Vlan and subnet

By geo85 ·
hi everybody...

am new in the networking area.
I have a question : Can a Vlan handle two differint subnets like :

*switch 1

hostname "e - 8"
ip default-gateway 192.168.180.2
ip routing
snmp-server community "public" Unrestricted
vlan 1
name "DEFAULT_VLAN"
untagged 9-24,26
ip address 192.168.180.254 255.255.255.0
no untagged 1-8,25
exit
vlan 2
name "A"
untagged 1-8,25
ip address 192.168.188.254 255.255.255.0
exit
spanning-tree

*switch 2

hostname "e - 4"
ip default-gateway 192.168.144.2
ip routing
snmp-server community "public" Unrestricted
vlan 1
name "DEFAULT_VLAN"
untagged 9-24,26
ip address 192.168.144.254 255.255.255.0
no untagged 1-8,25
exit
vlan 2
name "A"
untagged 1-8,25

exit

==================================

the default Vlan has different subnets, can this config work in case we dont need Vlan 2 to communicate with default vlan

thank you very much in advanced.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

vlan & subnet

by geo85 In reply to Vlan and subnet

could anyone reply plz.

Collapse -

think you could answer your own question...

by CG IT In reply to vlan & subnet

the theory behind vlans is that only hots in the same vlan can communicate with each other. If there are 2 hosts on the same vlan but each on a different subnet, can they communicate with each other.

trunking on Cisco equipment is : by default, all vlans have access to the trunk line.

Collapse -

think you could answer.................

by geo85 In reply to think you could answer yo ...

sorry there was a mistake, iv changed the config, could u please take a look again.


you are sugesting that i check trunking?


thoses two switches are connected to a L3-switch, if two hosts are connected to the same same switch but on different vlans, they can see each other? in my case yes, but i dont want them to, could u plz explain more.

is the conf switch side is correct?

am little confused.

thank you very much.

Collapse -

humm you left out pertinent information... eg the layer 3 device

by CG IT In reply to think you could answer... ...

the rules for IP addressing/subnetting and switching doesn't change if you use a layer 2 device or a layer 3 device.

only hosts on the same subnet can communicate with each other unless there is a layer 3 device that can route.

so, if you have assigned an address on one subnet to one switchport, assigned a different address on a different subnet to a different switchport, the question is can hosts connected to the switchports communicate with each other if they are on different subnets ? regardless if they are in the same vlan or not.

that will answer your question.

Collapse -

Why not put the question the other way around?

by TobiF In reply to Vlan and subnet

Vlan is a technology to logically separate traffic, even though it travels through one physical network, so you may be on the right way.

Now.

Rather than asking people to analyze your setup and tell you all that setup can or cannot do, I think it's more straightforward address that question from a slightly different angle:

What do you want to achieve?
Just sorting traffic?
Prevent eavesdropping between the networks?
Force specific MAC addresses into one or the other network?
Or move a station between vlans depending on login?

The solution for you may need a wider approach than just looking at the vlan specification itself.

Back to Networks Forum
6 total posts (Page 1 of 1)  

Hardware Forums