Another cisco question - when using 'conf t'
jibbajabba
Member Posts: 4,317 ■■■■■■■■□□
in Off-Topic
I am wondering... when queueing up commands, such as
I can see that the input changes from
(config)
to
(config-if)
and so on .. Normally I just paste the whole shebang seen in the code box in, exit exit out job done ...
Some poeple exit out once (to end the (config-if) part) for the next command and so on ...
Do you know what I mean ? (sorry, Cisco n00b) ...
So what is the difference if any ?
interface GigabitEthernet1/0/33 no desc no ip access-group 197 in interface FastEthernet2/0/33 no desc no access-list 197 access-list 197 remark ***** Generic ACL for xxx Servers ***** access-list 197 permit ip any 192.168.xx.0 0.0.9.255 access-list 197 remark Allow Server YYY access-list 197 permit ip any host 192.168.xx.xx access-list 197 deny ip any any
I can see that the input changes from
(config)
to
(config-if)
and so on .. Normally I just paste the whole shebang seen in the code box in, exit exit out job done ...
Some poeple exit out once (to end the (config-if) part) for the next command and so on ...
Do you know what I mean ? (sorry, Cisco n00b) ...
So what is the difference if any ?
My own knowledge base made public: http://open902.com
Comments
-
wirerat Member Posts: 251As you see when pasting in your setup to configure a IOS device you do not have to have an "exit" command to exit from something like an interface config mode back to global config mode.
I assume IOS has some capability to see that the command you are entering does not work in the sub-config mode and goes up a level or two and sees if the command is valid there and if it is then is applies it.
Never really researched this but know it works something like this. -
Claymoore Member Posts: 1,637IOS accepts global commands in any of the sub command levels. The 'interface' command is global command so you can switch from configuring one interface to another without needing to exit from the sub-level.
Because of this feature, sometimes commands have to be different at differerent levels. One example is enabling CDP (Cisco Discovery protocol). To enable it globally, you use 'cdp run'. To enable it on an interface, you use 'cdp enable'. Since IOS accepts global commands anywhere you could enable (or disable) CDP for the whole device instead of the interface if you enter the wrong command. -
EdTheLad Member Posts: 2,111 ■■■■□□□□□□As said before sometimes you need to go back a level so you will need to use and "exit" here and there, otherwise you will see an error pop up as the command is unknown.
One important thing to look at are the line and character send delay options on your terminal emulator, if you copy and paste too much the emulator some lines can be lost.
Better to increase these values if you plan on pasting large configs, it will take a little longer to paste but at least you will know you have everything.
I like to seperate config sections using "!".
i.e.
config t
inter e0
ip address x.x.x.x
!
router rip
!Networking, sometimes i love it, mostly i hate it.Its all about the $$$$ -
jibbajabba Member Posts: 4,317 ■■■■■■■■□□Cheers guys
All clear now ....:pMy own knowledge base made public: http://open902.com