What does ! do?

Hi,

If I'm in edit extended ACL mode and I type in ! and press enter, I get no error message, and apparently no changes are made to the ACL. But have I actually done anything? And what is the function of the ! anyway?

Thanks, SW

Reply to
S W
Loading thread data ...

I'm going to guess that you are referring to IOS.

! is the IOS comment character.

Reply to
Walter Roberson

Well sort of.

You can't actually use it to enter comments into the config

- unfortunately.

However anything you type after a "!" is ignored on the IOS comamnd line.

e.g.

conf t int fa 0/0 ip address 1.1.1.1 255.255.255.0 ! this bit after the "!" will be ignored.

! ip address 1.1.1.2 255.0.0.0 all of this line will be ignored ! this will be ignored too and will produce no error message

end

For some reason the config contains a number of lines that appear to be blank other then "!".

I use "!" to comment "paste" files that I intend to paste into router configs.

I really, really, really would find it VERY useful if the configs could actualy be decently commented.

Reply to
Bod43

Put the ! comments into your master copy. Copy the commented file to a file on devices that support files, and copy it directly to the startup config on devices that don't. Anything you copy directly into the startup config will be kept literally, and will not be interpreted until the configuration is parsed when you reload or power up or copy starting-config running-config or similiar, so to see the commented version, show start instead of show run .

Reply to
Walter Roberson

Thanks for your help, SW

Reply to
S W

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.