Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

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

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

12 REPLIES
New Member

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

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

New Member

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

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

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

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

New Member

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

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

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

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

Purple

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

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.

New Member

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

hi thanks for ur reply

can u explain me in deep what u mean?

New Member

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

I think you need a little bit of theory on subnetting:

IP Addressing and Subnetting for New Users

http://www.cisco.com/warp/public/701/3.html

New Member

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

thanks for ur reply

i need understanding on subnets

that link will help

Hall of Fame Super Bronze

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

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.

New Member

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

thanks for ur reply

so vlan7,4 17 have subnet/30

so are these vlans in same subnet then

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

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

Mark

1845
Views
30
Helpful
12
Replies
CreatePlease to create content