Questions

Vlan and subnet

Tags:
+
0 Votes
Locked

Vlan and subnet

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.
  • +
    0 Votes
    geo85

    could anyone reply plz.

    +
    0 Votes
    CG IT

    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.

    +
    0 Votes
    geo85

    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.

    +
    0 Votes
    CG IT

    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.

    +
    0 Votes
    TobiF

    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.

  • +
    0 Votes
    geo85

    could anyone reply plz.

    +
    0 Votes
    CG IT

    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.

    +
    0 Votes
    geo85

    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.

    +
    0 Votes
    CG IT

    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.

    +
    0 Votes
    TobiF

    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.