cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5756
Views
10
Helpful
12
Replies

Questions regarding deleting a VLAN.

chandra_rc16
Level 4
Level 4

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
12 Replies 12

Jan Hrnko
Level 4
Level 4

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

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

Sandeep Choudhary
VIP Alumni
VIP Alumni

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.

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

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

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

-------

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

-------

Already de diya... 

Regards, Chandu

chandra_rc16
Level 4
Level 4

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

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.

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

chandra_rc16
Level 4
Level 4

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

when you delete clan without assigning the ports to the default clan the deleted clan simply stays inactive, In other words to delete the vlan you need to move away the ports associated with it.

Getting Started

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:

Review Cisco Networking products for a $25 gift card