LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2009, 01:08 PM   #1
NaCo
Member
 
Registered: Jun 2002
Location: L.A.
Distribution: Fedora
Posts: 46

Rep: Reputation: 15
Same subnet VLAN question?


Hello community,

If I have a manageable layer 2 switch and I create 2 VLANs on the same subnet(eg: 172.16.10.0/24) connecting VLAN1 on switch port 1 and VLAN2 on switch port 2.

Each VLAN will have 8 hosts connected to its corresponding switch port using a hub:

VLAN1 host IP range: 172.16.10.2-172.16.10.10
VLAN2 host IP range: 172.16.10.20-172.16.10.28

If I am correct, the switch should have two collision domains(which is basically the main concept of VLANs) and should identify which MAC address is found on what VLAN (which MAC is in what switch port).



Questions:

If host 172.16.10.2 sends an ARP broadcast asking:

Who has 172.16.10.20? tell 172.16.10.2

1.-How will the switch react to such broadcast?

2.-If this broadcast gets isolated only to VLAN1,
could communication among VLAN1 and VLAN2 be accomplished with out a default-gateway/router nor a layer 3 switch?

3.-Does host 172.16.10.20 will only get a unicast from the switch?

I wish I had the right lab at home but I don't, being this the reason of this post.

I will appreciate any help.

Thank you
Angel.
 
Old 01-21-2009, 06:56 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by NaCo
VLAN1 host IP range: 172.16.10.2-172.16.10.10
VLAN2 host IP range: 172.16.10.20-172.16.10.28
...
If host 172.16.10.2 sends an ARP broadcast asking:

Who has 172.16.10.20? tell 172.16.10.2

1.-How will the switch react to such broadcast?
The switch should keep layer 2 traffic between the two VLANs segregated. So the ARP request should go unanswered.

You could easily confirm this with tcpdump (or perhaps management tools on your switch?).

Quote:
Originally Posted by NaCo
2.-If this broadcast gets isolated only to VLAN1,
could communication among VLAN1 and VLAN2 be accomplished with out a default-gateway/router nor a layer 3 switch?
A layer 3 switch is doing routing, so in the context of your question it might as well be a router. I don't know of a way for different networks to communicate without a path to traverse between them.
 
Old 01-24-2009, 10:55 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
A VLAN is a broadcast domain, i.e. it defines the extent to which broadcasts and unknown unicast macs are flooded.

Any broadcast sent to vlan 1 will remain in vlan 1. You can bridge between Vlan1 and 2, but what would be the point? you might just as well assign all ports to the same Vlan. The exception I suppose is that you could implement filtering between vlans by going via an external bridge. It's a lot of assing around for little gain. If you have a vlan capable switch but no router, you could use a linux box to route between the two.

To connect the two vlans you would normally use a router, this could be physical or virtual, i.e. a L3 switch, but its routing either way you look at it.

Obviously you would not be able to route between the IP ranges in your example as they are not valid subnets. In reality to cater for the number of devices you have listed you would need to use network 172.16.10.0 255.255.255.224 which gives you 14 hosts 1-14, and 172.16.10.16 255.255.255.224 which gives you 14 hosts 17-30.
 
Old 01-24-2009, 11:21 AM   #4
NaCo
Member
 
Registered: Jun 2002
Location: L.A.
Distribution: Fedora
Posts: 46

Original Poster
Rep: Reputation: 15
Thank you.

I realized a made a huge error. I was setting the same subnets for two VLANs, which is equally to having two physical subnets with the same IP range.

baldy3105, as you mention, a better approach is to have classless subnets.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ISC dhcp3 (ver. 3.04) vlan setup giving out of improper subnet addresses Valkyr1e Linux - Server 1 07-26-2008 11:15 AM
VLAN vs Subnet - too many ambiguous answers online Meson Linux - Networking 5 04-09-2008 04:35 PM
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 02:51 AM
VLAN Question teamchachi Linux - Networking 16 10-02-2005 05:09 PM
VLAN Question KevinGuy Linux - Networking 8 08-23-2005 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration