11-28-2013 06:29 AM - edited 03-07-2019 04:50 PM
I'm just practicing VLANs.
I created two subnets in VLAN1. And while trying to enable communication between the devices in both subnets, i configured Fa0/0 interface of router as 10.0.1.254/24 (But as i expected it didn't enabled communication). I believe i'm missing something.
Can someone please help me in this ?
Regards,
Chandu
Solved! Go to Solution.
11-28-2013 08:16 AM
Chandu
One of the things that you need to keep in mind when thinking about this environment is that a VLAN defines a broadcast domain. So if there is 1 VLAN then there is 1 broadcast domain.
We typically think of subnets in a similar way. We tend to assume that a subnet corresponds to a broadcast domain, and that is the way that it is usually implemented. But not always. And you have created an exception to that normal expectation.
When we think about a subnet corresponding to a broadcast domain then it is true that to communicate between subnets (between broadcast domains) you must have a router or other layer 3 device to route between subnets. But in this case there is a single VLAN and a single broadcast domain. This means that any host in the VLAN will receive broadcasts from every other host in the VLAN. So if 10.0.1.1 sends an arp request then 10.0.2.3 will receive the request and can send a response which 10.0.1.1 will receive. So any host in your network can communicate with any other host in your network - no router is required.
So the question becomes will 10.0.1.1 send an arp request for 10.0.2.3? And the answer is that it depends on how host 10.0.1.1 and 10.0.2.3 are configured. There are a couple of options in configuring the hosts so that they will arp for each other. And the suggestion from John about configuring secondary addresses would also probably work.
HTH
Rick
11-28-2013 06:59 AM
I know that i can make the subnet to /22 to enable communication. But i don't want to do like that..
Is there any other way to enable communication between two networks in one VLAN.
Regards,
Chandu
11-28-2013 07:34 AM
There's not a way to have two different subnets in a single vlan without routing some way for it. You can do the /22 as you stated, or you can put a secondary ip address on the vlan interface:
int vlan 1
ip addres 192.168.1.1 255.255.255.0
ip address 192.168.2.1 255.255.255.0 secondary
A vlan is a logically segmented network, so when you have an ip address on the svi, that's the subnet that svi will support. If it sees traffic from a different subnet come in on that vlan, the switch/router will drop the traffic.
HTH,
John
*** Please rate all useful posts ***
11-28-2013 08:16 AM
Chandu
One of the things that you need to keep in mind when thinking about this environment is that a VLAN defines a broadcast domain. So if there is 1 VLAN then there is 1 broadcast domain.
We typically think of subnets in a similar way. We tend to assume that a subnet corresponds to a broadcast domain, and that is the way that it is usually implemented. But not always. And you have created an exception to that normal expectation.
When we think about a subnet corresponding to a broadcast domain then it is true that to communicate between subnets (between broadcast domains) you must have a router or other layer 3 device to route between subnets. But in this case there is a single VLAN and a single broadcast domain. This means that any host in the VLAN will receive broadcasts from every other host in the VLAN. So if 10.0.1.1 sends an arp request then 10.0.2.3 will receive the request and can send a response which 10.0.1.1 will receive. So any host in your network can communicate with any other host in your network - no router is required.
So the question becomes will 10.0.1.1 send an arp request for 10.0.2.3? And the answer is that it depends on how host 10.0.1.1 and 10.0.2.3 are configured. There are a couple of options in configuring the hosts so that they will arp for each other. And the suggestion from John about configuring secondary addresses would also probably work.
HTH
Rick
11-28-2013 01:29 PM
Chandu
Each VLAN represents only one subnet, so when you say VLAN it is the logical meaning of a subnet ID, so let me give another definition.
10.1.1.0/24 (VLAN 1)
10.1.2.0/24 (VLAN 2)
So, for example, Subnets 10.1.1.0/24 and 10.1.2.0/24 can't be on the same VLAN, they have to be in 2 different VLANs, and to enable communication between different VLANs, there are 3 options.
a) Router on a stick: by configuring one FastEthernet Router port with sub interface commands:
Router(config)#interface FastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface FastEthernet 0/0.1
Router(config-if)#encapsulation dot1q "VLAN-ID" (for this example write only "1")
Router(config-if)#ip address 10.1.1.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface FastEthernet 0/0.2
Router(config-if)#encapsulation dot1q "VLAN-ID" (for this example write only "2")
Router(config-if)#ip address 10.1.2.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
b) Using a separate Router FastEthernet interface per VLAN and this option is not practical:
Router(config)#interface FastEthernet 0/0
Router(config-if)#ip address 10.1.1.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip address 10.1.2.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
c)Using a MultiLayer Switch with inter vlan commands:
Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.1.1.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 2
Switch(config-if)#ip address 10.1.2.254 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip routing (to enable routing on the MultiLayer Switch)
11-29-2013 01:39 AM
Rick,
Thanks for the info. Do you've any doc or link related to configuring arp request on hosts ?
Regards,
Chandu
11-29-2013 05:28 AM
Chandu
You are welcome. I do not have any convenient references or documents about configuring a host to arp for "remote" addresses. I believe that it probably varies by platform OS and sometimes perhaps by version of OS.
This is an interesting discussion about what is possible. I would also like to make a point about the difference between what we "could" do and what we "should" do. The other responses in this discussion have all come from the perspective that there should be a one to one relationship between vlan and subnet. And this is usually the better way to do it. But your question is about what we could do, and the answer is that we could have 2 subnets on the same vlan and they be able to communicate.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide