Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-21-2009, 02:08 PM
|
#1
|
Member
Registered: Jun 2002
Location: L.A.
Distribution: Fedora
Posts: 46
Rep:
|
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.
|
|
|
01-21-2009, 07:56 PM
|
#2
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep:
|
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.
|
|
|
01-24-2009, 11:55 AM
|
#3
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep:
|
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.
|
|
|
01-24-2009, 12:21 PM
|
#4
|
Member
Registered: Jun 2002
Location: L.A.
Distribution: Fedora
Posts: 46
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|