how do you add comments in a router configuration

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

Comments

  • theodoxatheodoxa Posts: 1,340Member
    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 CCNA 200-120 Posts: 484Member ■■■□□□□□□□
    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 Posts: 526Member
    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 Posts: 1,772Member ■■■■■■■■□□
    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 Posts: 1,340Member
    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.