how do you add comments in a router configuration

hitmenhitmen Banned Posts: 133
i realize that in textbooks, there is an exclamation mark ! folowed by the comment. how do they do it?

Comments

  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    If you type an exclamation mark before something, the router will ignore it. You can comment a saved configuration, but your comments will not show in the running-configuration on the router.
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • mikeybinecmikeybinec Member Posts: 484 ■■■□□□□□□□
    hitmen wrote: »
    i realize that in textbooks, there is an exclamation mark ! folowed by the comment. how do they do it?


    How about the description command?
    Cisco NetAcad Cuyamaca College
    A.S. LAN Management 2010 Grossmont College
    B.S. I.T. Management 2013 National University
  • lrblrb Member Posts: 526
    The IOS parser simply passes over lines starting with !

    BGP allows you to assign descriptions to specific neighbours and peer groups if this is what you mean?
    R4(config)#router bgp 4
    R4(config-router)#neighbor 1.1.1.1 description ?
      LINE  Up to 80 characters describing this neighbor
    
    R4(config-router)#neighbor 1.1.1.1 description ANOTHER ROUTER
    
  • Jon_CiscoJon_Cisco Member Posts: 1,772 ■■■■■■■■□□
    theodoxa wrote: »
    If you type an exclamation mark before something, the router will ignore it. You can comment a saved configuration, but your comments will not show in the running-configuration on the router.

    I didn't know that. That could be useful when using a text editor and writing configs.
  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    Jon_Cisco wrote: »
    I didn't know that. That could be useful when using a text editor and writing configs.

    Just like writing code (software). You can add comments to remind yourself or explain to other programmers what something does, but those comments will simply be ignored by the compiler/assembler.
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
Sign In or Register to comment.