Configure Replace (How to remove vlans ? )

Hello guys.
As you know we can remove vlans without reload, just with the command "no vlan 1-4094. For example:
SW1(config)#vlan 15
SW1(config-vlan)#no vlan 1-4094
%Default VLAN 1 may not be deleted.
%Default VLAN 1002 may not be deleted.
%Default VLAN 1003 may not be deleted.
%Default VLAN 1004 may not be deleted.
%Default VLAN 1005 may not be deleted.
SW1(config)#do sh vlan
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/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup
As you can see VLAN15 was succesfully removed!
There is good command to clear our device configuration. #configure replace dir:filename.cfg
Take a look what happens when we wan't to remove VLANs. Our new configuration ( we will replace running config with this):
SW1#more flash:config.cfg
version 15.0
no service pad
service timestamps debug datetime localtime
service timestamps log datetime msec localtime
service timestamps log uptime
no service password-encryption
hostname SW1
boot-start-marker
boot-end-marker
enable password cisco
no aaa new-model
clock timezone GMT+2 2
clock summer-time GMT+2 recurring last Sun Mar 2:00 last Sun Oct 3:00
system mtu routing 1500
ip subnet-zero
vtp mode transparent
no vlan 2-1000
end
When we run "configure replace" command:
SW1#configure replace flash:config.cfg list force
<...>
% Default interface VLAN 1 may not be deleted.
% Default interface VLAN 1 may not be deleted.
00:07:26: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
<...>
Rollback aborted after 5 passes
The following commands are failed to apply to the IOS image.
no interface Vlan1
<...>
Mhm, VLAN 1 may not be deleted? That's ok. But why VLAN15 is still there?
SW1#sh vlan
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/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
15   VLAN0015                         active   
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup
Is it possible to use configure replace command and succesfully remove VLANs? Which command I am missing in my new configuration file?
Thank you very much for your time and your help!

This is also interesting. I can't remove VLANs with TCL script too, please take a look guys:
Switch(tcl)#puts [open "flash:no_vlan.tcl" w+] {
+>puts [ios_config "no vlan 1-4094" "end"]
+>}
Switch(tcl)#tclquit
Switch#sh vlan
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/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
10   VLAN0010                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup
Switch#tclsh flash:no_vlan.tcl
%Default VLAN 1 may not be deleted.
%Default VLAN 1002 may not be deleted.
%Default VLAN 1003 may not be deleted.
%Default VLAN 1004 may not be deleted.
%Default VLAN 1005 may not be deleted.
Switch#sh vlan
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/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gi0/1, Gi0/2
10   VLAN0010                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

Similar Messages

  • Desired State Configuration (DSC) : How to remove it ???

    Hello all,
    I would agree that DSC is a great feature, but is it me or it is very badly documented ??
    Anyhow, what I am looking for is a way to remove a pushed configuration without having to push an "inverse" one.
    Is there an official and clean way to do this ?  Is my server doomed to run this DSC config even if it does not require it ? 
    Please Microsoft, You need to provide all the tools, not only part of them.
    Thanks for any ideas or solutions.
    Chantal

    -->Is there an official and clean way to do this ?  Is my server doomed to run this DSC config even if it does
    not require it ? 
    seems no...
    how push work... http://blogs.msdn.com/b/powershell/archive/2013/11/26/push-and-pull-configuration-modes.aspx
    Best,
    Howtodo

  • [b3 replacement] How to remove old hardware?

    After I replaced my board windows recognized new hardware, however my b3 was bad (multiplier stuck in idle mode) so I replaced it again. Again new hardware detected.
    Now the issue is that I have some scripts to disable my lan connection etc and that now everything is named with the addition of 2. I cannot rename it back to normal because it says that name is in use.
    How can I clean up the old hardware?

    Quote from: Mark on 22-May-11, 04:34:27
    Personally, I'd suggest simply installing Windows again. However, in the registry you may be able to locate and remove the repeat entries. Enter regedit and search for 'realtek'. If the device is listed under Network Cards several times you should be able to remove the repeat entry. Might be worth uninstalling the device from device manager first and then removing the entries in the registry.
    Back-up the registry first in case something goes wrong, but understand editing the registry is at your own risk. If you're not confident editing the registry then leave it be.
    Any ideas how to find the lan connection?
    Windows reinstall is too time consuming given the amount of software that is installed (e.g 60 games).

  • How to remove data guard broker configuration when  ORA-16625?

    I setup data guard broker for a standby database. However, we recreate the database and re-setup the standby database. But find the earlier broker configuration still exists. But I cannot remove or disable the configuration or any database within the configuration. When I try to do so I got the error, although all network settings are correct:
    Error: ORA-16625: cannot reach the database
    How to remove the configuration at this stage?
    Thanks for help,

    Hi, I saw same issue when doing switchover testing in my lab environment.prerequisite is primary role and standby role switched and og can be applied without data guard broker.
    Here is the step I resolved the issue
    1)on both primary and standby database
    SQL> alter system set dg_borker_start=false;
    on primary DB:
    SQL>alter system set dg_broker_config_file1='?/dbs/dr1afterswichoverpry.dat';
    SQL>alter system set dg_broker_config_file1='?/dbs/dr2afterswichoverpry.dat';
    on standby DB:
    SQL>alter system set dg_broker_config_file1='?/dbs/dr1afterswichoverstby.dat';
    SQL>alter system set dg_broker_config_file1='?/dbs/dr2afterswichoverstby.dat';
    2) enable dg_borker_start on both primay and sandbby db
    SQL> alter system set dg_borker_start=true;
    3)on primary database to create configuration
    Hope this can help you!
    email: [email protected]

  • How to remove logical standby database configuration cleanly

    Hello,
    We are on RHL with 11.2.0.3 DB version. Due to various unknown reasons we would like to recreate logical standby database and for that purpose I would like to cleanly remove/uninstall/drop LOGICAL STANDBY DATABASE from the DATA GUARD configuration we have.
    The DG setup already has 1 PHYSICAL STANDBY DATABASE which is working fine. PRIM,PHYSICAL, and LOGICAL all are on different HOSTS. Could you please guide or suggest us exact MOS Doc id regarding this? I have found one MOS Doc id which is close enough but its steps include removing dg configuration completely which I don't want. Only Logical Standby database needs to be remove cleanly so that it can be installed again properly.
    We are using GRID CONTROL and DATA GUARD BROKER.
    Bundle of thanks in advance.
    Best Regards

    Hello;
    I would review this Oracle note:
    How to remove a Data Guard Configuration from Primary Database (Doc ID 733794.1)
    Best Regards
    mseberg

  • How to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve

    how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve
    lr45149

    select your iMac from here: http://www.ifixit.com/Browse/iMac_Intel and click on "hard drive replacement" for step by step instruction.

  • How to remove and replace keyboard on HP Touchsmart Notebook 15-D020NR

    I spilled a drink on my keyboard and now I cannot get the Caps Lock to turn off and a number of keys do not work. I need the instructions on how to remove and replace this no frame keyboard. Thank you.    

    On your Support page- look for Maintenance and Service Guide under Manuals. http://support.hp.com/us-en/product/HP-15-d000-TouchSmart-Notebook-PC-series/6627588/model/6761859/manuals

  • Satellite A30-921: How to remove and replace the memory?

    hi, can anyone help me how to remove and replace the memory of sat A30-921. and also, please give a detailed instruction.
    thank you in advance.

    Hi
    There is no much to explain. At the bottom side in the middle there is placed memory cover (fixed with two screws). Remove the cover and you will see 2 slots there. I dont know how much memory has you there but as Stefan said you can use max 2 GB of RAM (2x PC2700 1024MB - PA3313U-1M1G). How to remove memory modules you can see on http://www.hardwaresecrets.com/article/189/5
    Bye

  • I want to change my apple id primary e-mail from a .msn address to a .gmail address. The problem is that currently my .gmail address is my cover address and I cannot figure out how to remove and replace my gmail recovery address.

    I want to change my apple id primary e-mail from a .msn address to a .gmail address. The problem is that currently my .gmail address is my recovery address; I cannot figure out how to remove and replace my gmail recovery address with a new e-mail address.  I want to do this because I no longer use my .msn address.

    You should be able to change your rescue address by going to My Apple ID, signing in to manage your ID, then selecting the the Password and Security section, and answering the two security questions.  If you have trouble with this, contact the Apple account security team for your country to verify your identity and ask for assistance: Apple ID: Contacting Apple for help with Apple ID account security.  If your country isn't listed, contact iTunes store support by filling out this form: https://www.apple.com/emea/support/itunes/contact.html.

  • How to configure a port channel with VLAN trunking (and make it work..)

    We're trying to configure a port channel group with trunked ports to connect a NetApp HA pair. We want to create two data LIFs and connect them to the switch stack.  We are trying to create 2 data lifs, one for cifs and one for nfs that are on different vlans.
    We want the same ports to be able to allow multiple vlans to communicate. (trunked)
    These data lifs should be able to fail over to different nodes in the HA pair and still be able to communicate on the network.
    What this means is that we have to connect 4 ports each for each node in the NetApp HA Pair to the switches and create a port channel of some type that allows for trunked vlans. When we configure the ports, the configuration is as follows (below):
    We are only able to configure an IP on one of the vlans.
    When we configure an IP from another vlan for the data lif, it does not respond to a ping.
    Does anyone have any idea what I'm doing wrong on the Cisco switch?
    interface GigabitEthernet4/0/12
    description Netapp2-e0a
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    channel-protocol lacp
    channel-group 20 mode active
    end
    interface GigabitEthernet4/0/13
    description Netapp2-e0c
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    channel-protocol lacp
    channel-group 20 mode active
    end
    interface GigabitEthernet6/0/12
    description Netapp2-e0b
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    channel-protocol lacp
    channel-group 20 mode active
    end
    interface GigabitEthernet6/0/13
    description Netapp2-e0d
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    channel-protocol lacp
    channel-group 20 mode active
    end
    interface Port-channel20
    description Netapp2-NFS
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    spanning-tree portfast
    spanning-tree bpduguard enable
    end

    Our problem was fixed by the storage people.  They changed the server end to trunk, and the encapsulation / etherchannel.
    I like all the suggestions, and they probably helped out with the configuration getting this to work.
    Thanks!
    interface Port-channel20
    description Netapp2-NFS
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    switchport mode trunk
    interface GigabitEthernet4/0/12
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    switchport mode trunk
    channel-protocol lacp
    channel-group 20 mode active
    interface GigabitEthernet4/0/13
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    switchport mode trunk
    channel-protocol lacp
    channel-group 20 mode active
    interface GigabitEthernet6/0/12
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    switchport mode trunk
    channel-protocol lacp
    channel-group 20 mode active
    interface GigabitEthernet6/0/13
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 10,20,511,519
    switchport mode trunk
    channel-protocol lacp
    channel-group 20 mode active

  • How to Remove Jar File name from the screen of nokia 40 series

    hi
    i have the problem with running midlet.
    the jar file jame is always visible on the screen, how to remove that ?

    >
    Prasanna Kumar wrote:
    > Hi ALL
    >
    > I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    > But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    > So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    >
    > Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    > 2) Dynamic Configuration code is also not use full as I am using 1:n file creation
    does the time stamp with the ":" a part of your output file?
    else use a replaceAll function in your mapping and replace the : with empty string then use the value in the variable substitution
    Another option is use the normal BPM for 1: N message flow. The use a simple java mapping that will introduce a dynamic configuration and you can create the file name as you want. the java mapping will be used in the flow of messages from BPM to target system.
    ref: /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

  • How to remove jar file name from screen of nokia 40 series

    hi,
    anybody know please tell.
    jar file name always appear on the screen, while running the midlet in nokia 40 series siut.
    how to remove that.

    >
    Prasanna Kumar wrote:
    > Hi ALL
    >
    > I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    > But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    > So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    >
    > Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    > 2) Dynamic Configuration code is also not use full as I am using 1:n file creation
    does the time stamp with the ":" a part of your output file?
    else use a replaceAll function in your mapping and replace the : with empty string then use the value in the variable substitution
    Another option is use the normal BPM for 1: N message flow. The use a simple java mapping that will introduce a dynamic configuration and you can create the file name as you want. the java mapping will be used in the flow of messages from BPM to target system.
    ref: /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

  • How to remove % sign from List of Values

    Hi ,
    I have shared list of values thats is based on SQL query. At runtime the select list default value is showing as "%". Can someone suggest how to remove % and replace with null (blank)
    Thanks
    Aali

    In ist of Values region, if you select display null as 'Yes', in 'null display value' area use space tab or type something like ' - Select-' to replace %. Or, choose Display null as 'No.

  • How to remove the '#'symbols for infoobject movement types in bex reporting

    Hi All,
      I have a problem in Bex reporting. The problem is when ever executing the report  that time some of the characteristic values is shown in layout '#' Symbols. i want to remove the '#' valuse in report.
    is it possible please give me step by step procedure for how to remove the '#' Symbols in reporing layout.
    this is very urgent please help to me on this issue.
    Thanks & Regards,
    Guna.

    Hi Guna,
    To achieve this issue, we need to replace the value of ‘#’, we need to change the description while retrieving the data from tables. So we need to write some ABAP code in SE38. Go to RSA1 transaction and go to Info objects tab. Then go to context menu for ‘cProject Key Figures’ as shown below. Click on the ‘Object Overview’ to get the overview of all the info objects. Here you can see the field names which are used to know the table names.
    In SE11, type the table name in ‘Database Table’ field. Now press ‘F4’, then you will get the next screen to select one of the P/Q/S/T tables.
    Now click on the button rounded in the below screen to view the data in the table.
    Now click the execute button or press ‘F8’ to view the records.
    Now go to Tcode: SE38. Create a source code and give some program name for that source code. To write code, you need access key. Contact your BASIS for this.
    Now write the below code for that particular table in which you want to change the value ‘#’ to description ‘Blank’. In the below source code, we are updating particular table, setting the field as ‘Blank’ where it is null or no value. Here the field will automatically get updated to ‘#’ if there is no value or null.
    update /BIC/PXXXXX set /BIC/ZXXXX = 'Blank' where /BIC/ZXXXXX is null or /BIC/ZXXXX = ''.
    if sy-subrc eq 0.
    write 'successful'.
    commit work.
    else.
    write 'unsuccessful'.
    endif.
    OR
    If this # is because of the missing master data than,
    right click that IO -> maintain master
    you will see first row as a blank.
    whatever value you maintain in this row that will come in the report for all Not assigned # values of the master data in the report.
    maintain it according to your requirement, save and activate the master data
    Hope this helps u...
    Regards,
    KK.

  • How to remove the standard Exit and Help buttons from the iviews

    Hi All,
    We migrated the ESS application from standalone ITS based on 4.6c to ECC 6 based Integrated one.  After converting that into ICF service and when we created the iview for it in the portal(EP 7)  It is showing two hyperlink items EXIT and HELP by default at the top of every iview.  So, Can anybody tell me how to remove them from visibility.
    And also, the iviews are not showing the table grids etc in the integrated environment.  Is there any change that need to be done, for getting the table grids and all to look as it is in the previous envoronment.
    Thanks & Regards,
    Ravi

    Hello Ravi,
    You should be aware that many of the ESS transaction are not supported on the Integrated ITS, see note 870126 for more details.
    To remove the "Exit" and "Help" you can use the ~webgui_simple_toolbar parameter, please see note 1010519. 
    Some tables have an option to show the gridlines or not.  Please see if there is a table options icon in the upper right of the table to change the configuration.  I'm not sure if what kind of table you're referring to so it may or may not be available.
    Edgar

Maybe you are looking for