Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Questions regarding deleting a VLAN.

Hi All,

I know that we should not delete a VLAN direclty (But i'm not sure why). Since i'm practicing for my CCNA, i just deleted a VLAN it to see what issues will arise.

I deleted my VLAN2 which is having ports Fa0/11 to Fa0/20  and i confirmed that it was deleted and then saved the configuration and reloaded the switch. Once the switch booted up i'm seeing VLAN2 again.

switch0(config)#no vlan 2                         // Deleted vlan2

switch0(config)#end

%SYS-5-CONFIG_I: Configured from console by console

switch0#show vlan brief                               // Output doen't showed any vlan2

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                                Fa0/9, Fa0/10, Fa0/21, Fa0/22

                                                Fa0/23, Fa0/24, Gig1/1, Gig1/2

3    VLAN0003                         active   

1002 fddi-default                     active   

1003 token-ring-default               active   

1004 fddinet-default                  active   

1005 trnet-default                    active   

switch0#wr                                                  // Saved config

Building configuration...

[OK]

switch0#

switch0#reload                                             // Reloaded switch

switch0#show vlan brief                              //Thought to cross check.. and got afraid that VLAN2 is back

VLAN Name                             Status         Ports

---- -------------------------------- --------- -------------------------------

1    default                          active         Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                          Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                                          Fa0/9, Fa0/10, Fa0/21, Fa0/22

                                                          Fa0/23, Fa0/24, Gig1/1, Gig1/2

2    VLAN0002                         active    Fa0/11, Fa0/12, Fa0/13, Fa0/14

                                                Fa0/15, Fa0/16, Fa0/17, Fa0/18

                                                Fa0/19, Fa0/20

3    VLAN0003                         active   

1002 fddi-default                     active   

1003 token-ring-default               active   

1004 fddinet-default                  active   

1005 trnet-default                    active   

switch0#

Can someone please explain this?

Here is my topology diagram:

vlans.PNG

Regards,

Chandu

Regards, Chandu
Everyone's tags (1)
11 REPLIES
Silver

Re: Questions regarding deleting a VLAN.

Hi Chandu,

I deleted my VLAN2 which is having ports Fa0/11 to Fa0/20  and i  confirmed that it was deleted and then saved the configuration and  reloaded the switch. Once the switch booted up i'm seeing VLAN2 again. 

Configuration save does not matter in this case. That's because the VLAN database is not stored in configuration file, but rather in separate file named vlan.dat. If you want to permanently delete all VLANs you need to delete that file as well.

CAUTION: DO NOT EXECUTE IN PRODUCTION NETWORK

Switch#delete flash:vlan.dat

CAUTION: DO NOT EXECUTE IN PRODUCTION NETWORK

But if you want to delete just one vlan, no vlan X command should suffice. Are you trying this in packet tracer? Maybe it is one of its many bugs.

Best regards,

Jan

New Member

Questions regarding deleting a VLAN.

Yes. I'm using PT.

So my question is if normally if i  delete a vlan with "no vlan" command will it erase that vlan even though there are some ports assigned to that vlan ?

REgards,

Chandu

Regards, Chandu
VIP Purple

Re: Questions regarding deleting a VLAN.

Please try to remove the config for vlan 2 from both ports which are in vlan 2.

Config t

int range fa0/11-12

no switchport access vlan 2

then

config t

no vlan 2

save it ...reload it.

then again see the sh vlan brief

Reagrds

Dont forget to rate helpful posts.

New Member

Questions regarding deleting a VLAN.

I believe it will delete because along with vlan2 i created vlan3 but didn't places any ports in vlan3... when i deleted vlan2 & vlan3 and saved the config .. vlan3 got deleted but not vlan2

Regards, Chandu
New Member

Questions regarding deleting a VLAN.

Sandeep,

If i remove the ports from vlan2, then the vlan2 is deleting.

So does it mean.. if i've any ports assigned for a vlan.. then i cannot delete that vlan.

I even asked the same question to the n/w engg in our company, he said that once we delete any vlan, then all the ports assigned to that vlan will be redirected to the native vlan.. vlan1.

Regards,

Chandu

Regards, Chandu
VIP Purple

Re: Questions regarding deleting a VLAN.

Hi chandu,

They are right , normally if u delete a vlan then all the port assigned to that vlan will automatically goes in vlan1.

Again this is the problem of PT ;)
Now I know u will again give some gali to PT .


Regards

Sent from Cisco Technical Support iPhone App

New Member

Questions regarding deleting a VLAN.

-------

Now I know u will again give some gali to PT .

-------

Already de diya... 

Regards, Chandu
New Member

Questions regarding deleting a VLAN.

And just got another simpe question.

How the switch assigns the VLAN name by default ?

By default switch assigned name as VLAN0002 for VLAN2.

switch0#show vlan id 2                                                                

VLAN     Name                                   Status                                   Ports

---- -------------------------------- --------- -------------------------------

2             VLAN0002                        active  

VLAN     Type     SAID       MTU     Parent  RingNo    BridgeNo    Stp  BrdgMode  Trans1    Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

2   e       net        100002     1500         -           -                 -             -          -                 0         0

switch0#

I read some theory about it but i forgot it.. there was some technical explanation for this.

Thanks in advance.

Regards,

Chandu

Regards, Chandu
Silver

Re: Questions regarding deleting a VLAN.

Hi Chandu

I believe it will delete because along with vlan2 i created vlan3 but  didn't places any ports in vlan3... when i deleted vlan2 & vlan3 and  saved the config .. vlan3 got deleted but not vlan2

Looks like a bug. You should be able to delete any VLAN apart from VLAN1,VLAN1002-1005 without the switch bringing it back.

How the switch assigns the VLAN name by default ?

The default value is VLANxxxx where xxxx represent four numeric digits (including leading zeroes) equal to the VLAN ID number.

New Member

Questions regarding deleting a VLAN.

Hi Jan,

------

Looks like a bug. You should be able to delete any VLAN apart from VLAN1,VLAN1002-1005 without the switch bringing it back.

------

Actually i'm able to delete all the vlans that are empty but if there are any ports assigned to a particular vlan and if try to delete that particular vlan.. then after a swtich reboot.. that particular vlan is coming back.

Regards,

Chandu

Regards, Chandu
New Member

Questions regarding deleting a VLAN.

And guys just now i observed a weird thing.... as i said you that vlan2 is coming back even after deleting..... i was doing it again and agian and i observered one thing here....

I named vlan2 as LAB2 and then save config and reloaded the switch.. then everything looked fine.. vlan2 is showing name as LAB2.

But

When i deleted vlan2 and saved the config and then reloaded the switch the vlan2 is coming back but with the default name.. vlan0002... whereas it has be LAB2

2    VLAN0002                         active    Fa0/11, Fa0/12, Fa0/13, Fa0/14

                                                Fa0/15, Fa0/16, Fa0/17, Fa0/18

                                                Fa0/19, Fa0/20

Regards,

Chandu

Regards, Chandu
343
Views
5
Helpful
11
Replies
CreatePlease login to create content