×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

how to check vlans if they are in same or different subnet

Unanswered Question
Mar 23rd, 2008
User Badges:

IOS (tm) MSFC2 Software (C6MSFC2-JSV-M), Version 12.1(8b)E9,


sh ip int brief

Interface IP-Address OK? Method Status Protocol

Vlan3 10.163.40.225 YES NVRAM up up

Vlan4 10.163.41.237 YES NVRAM up up

Vlan7 10.180.0.1 YES manual up up

Vlan9 10.180.0.6 YES manual up up

Vlan12 10.180.0.9 YES manual up up

Vlan17 10.180.0.18 YES manual up up

Vlan100 unassigned YES NVRAM administratively down down

Vlan101 192.168.0.174 YES manual up up

Loopback0 10.163.40.14 YES NVRAM up


can anyone tell me how we can check if vlans are in same subnet or different

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (6 ratings)
Loading.
Marcofbbr Sun, 03/23/2008 - 08:38
User Badges:

Probably I don't really understand what you are askyng....but try to copy and paste this command in your console

sh int | i Vlan|Internet address

mahesh18 Sun, 03/23/2008 - 08:52
User Badges:

Vlan3 is up, line protocol is up

Internet address is 10.163.40.225/28

Vlan4 is up, line protocol is up

Internet address is 10.163.41.237/30

Vlan7 is up, line protocol is up

Internet address is 10.180.0.1/30

Vlan9 is up, line protocol is up

Internet address is 10.180.0.6/30

Vlan12 is up, line protocol is up

Internet address is 10.180.0.9/29

Vlan17 is up, line protocol is up

Internet address is 10.180.0.18/30

Vlan100 is administratively down, line protocol is down

Vlan101 is up, line protocol is up

Internet address is 192.168.0.174/29

Internet address is 10.163.40.14/32


Istvan_Rabai Sun, 03/23/2008 - 08:45
User Badges:
  • Gold, 750 points or more

Hi Mahesh,


Issue the 'show ip route connected" command.


This will show you the subnets with masks for the vlan interfaces, and you can check which vlan interface belongs to which subnet.


Cheers:

Istvan

mahesh18 Sun, 03/23/2008 - 08:56
User Badges:

sh ip route connected

C 127.0.0.0/8 is directly connected, EOBC0/0

10.0.0.0/8 is variably subnetted, 748 subnets, 16 masks

C 10.163.40.224/28 is directly connected, Vlan3

C 10.163.41.236/30 is directly connected, Vlan4

C 10.163.40.14/32 is directly connected, Loopback0

C 10.180.0.16/30 is directly connected, Vlan17

C 10.180.0.8/29 is directly connected, Vlan12

C 10.180.0.4/30 is directly connected, Vlan9

C 10.180.0.0/30 is directly connected, Vlan7

192.168.0.0/29 is subnetted, 1 subnets

C 192.168.0.168 is directly connected, Vlan101



can u explain we what this mean

Istvan_Rabai Sun, 03/23/2008 - 10:38
User Badges:
  • Gold, 750 points or more

Hi Mahesh,


For example:

Interface vlan3 is in the 10.163.40.224 subnet with a 28 bit long subnet mask.

The same way you can check the subnet for other vlan interfaces.


The good thing with the "show ip route connected" command is that you don't have to calculate the subnet from the ip address and mask of the vlan interface.


This shows you the subnets and masks directly.


Cheers:

Istvan




glen.grant Sun, 03/23/2008 - 08:46
User Badges:
  • Purple, 4500 points or more

Just do a show runn and look at the layer 3 SVI's and see how they are masked adn that will tell you if they are in the same address range, they should not be . My guess by looking them is that they are connecting links with a /30 mask.

mahesh18 Sun, 03/23/2008 - 08:54
User Badges:

hi thanks for ur reply

can u explain me in deep what u mean?

mahesh18 Sun, 03/23/2008 - 09:20
User Badges:

thanks for ur reply

i need understanding on subnets

that link will help

Edison Ortiz Sun, 03/23/2008 - 09:00
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

The switch won't allow you to enter overlapping subnets on different SVIs, therefore all the IP addresses you've listed are on different subnets.


Example,


interface Vlan840

ip address 1.1.1.1 255.255.255.128

shutdown

!

interface Vlan841

ip address 1.1.1.3 255.255.255.128

shutdown



Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int vlan 840

Router(config-if)#no shut

Router(config-if)#int vlan 841

Router(config-if)#no shut

1.1.1.0 overlaps with Vlan840

Vlan841: incorrect IP address assignment

Router(config-if)#




HTH,


__


Edison.


mahesh18 Sun, 03/23/2008 - 09:16
User Badges:

thanks for ur reply

so vlan7,4 17 have subnet/30

so are these vlans in same subnet then


Mark Yeates Sun, 03/23/2008 - 18:49
User Badges:
  • Gold, 750 points or more

Your vlans are not on the same subnet. Your router will not allow you to have overlapping subnets.


Mark

Actions

This Discussion