01-08-2009 05:58 PM - edited 03-06-2019 03:20 AM
Hi every body!
I understand Cisco'S recommendation about one-to-one correspondence between vlan and ip subnet.
MY book says though it is not good pratice but one vlan can have more than one ip subnet.
For example two host h1 and h2 are connected to hub which is connected to multilayer switch.
sw f0/1------------hub----h1(1.1.1.1)
----h2(2.2.2.2)
sw' fo/1 is vlan 1.
h1 is in subnet 1.1.1.0/24
h2 is in subnet 2.2.2.0/24
Can we configur interface vlan 1 as 1.1.1.2 and also as 2.2.2.3?
I feel there is no way we can configure two ip address on single interface.
Then h1 can not communicate with h2 .
Let say h1 pings h2 which should be unsuccessful . Here is why:
1) h1 sends ping packet with destination mac= switch's vlan 1 interface.
2) sw receives the packet and finds its own mac address. Sw concludes this packet is meant for layer-3 switching.
3)Sw checks the destination subnet 2.2.2.0 in its routing table and find there is no match( that would be the case if my assumption about interface not having two ip address is correct).
sw simply drops the packet. The result is no communication between h1 and h2.
If my understanding is correct,then what is the point of recommendation by Cisco about one-to-one correspondence between vlan and ip subnet as having more than ip subnet per vlan would not result in communication between the hosts in vlan.
Any thoughts?
thanks a lot!
Solved! Go to Solution.
01-08-2009 06:04 PM
01-08-2009 06:07 PM
yup just use a secondary address on the same SVI , as far as I know there are no limitations on how many you can add , its just not good practice at all to have more than 1 or 2 , preferably 1 per SVI.
01-08-2009 06:33 PM
Sarah,
As others have indicated you can use the secondary option when inserting the IP address under the SVI for additional IP subnets.
You may find this kind of configuration on production networks in the process of re-ipn'g the network.
To ping a device from one IP subnet to the other IP subnet in the same Layer2 Vlan, just use the same thought process as if they were in different Layer2 Vlans - that is, point their default gateway to the SVI in their respective IP subnet.
For instance,
2.2.2.0/24 will point to 2.2.2.3
1.1.1.0/24 will point to 1.1.1.2
HTH
__
Edison.
01-08-2009 06:04 PM
int vlan 1
ip add 2.2.2.3 255.255.255.0 secondary
01-08-2009 06:07 PM
yup just use a secondary address on the same SVI , as far as I know there are no limitations on how many you can add , its just not good practice at all to have more than 1 or 2 , preferably 1 per SVI.
01-08-2009 06:33 PM
Sarah,
As others have indicated you can use the secondary option when inserting the IP address under the SVI for additional IP subnets.
You may find this kind of configuration on production networks in the process of re-ipn'g the network.
To ping a device from one IP subnet to the other IP subnet in the same Layer2 Vlan, just use the same thought process as if they were in different Layer2 Vlans - that is, point their default gateway to the SVI in their respective IP subnet.
For instance,
2.2.2.0/24 will point to 2.2.2.3
1.1.1.0/24 will point to 1.1.1.2
HTH
__
Edison.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: