Courseiva
SystemGlobal Config

snmp-server contact [text]

Sets the SNMP system contact information for the device, used to identify the responsible person or team for network management.

Definition: snmp-server contact [text] is a Cisco IOS global config command. Sets the SNMP system contact information for the device, used to identify the responsible person or team for network management.

Overview

The `snmp-server contact` command is a fundamental configuration in Cisco IOS that sets the Simple Network Management Protocol (SNMP) system contact information for a network device. This contact string identifies the responsible person or team for network management, typically including an email address, phone number, or name. While seemingly simple, this command plays a critical role in operational networks by ensuring that anyone querying the device via SNMP can quickly identify who to contact for issues.

The contact information is stored in the device's MIB (Management Information Base) under the sysContact object (OID 1.3.6.1.2.1.1.4.0). When an NMS (Network Management System) polls the device, it retrieves this information, which is invaluable during troubleshooting or when a device is discovered on the network. Without proper contact details, network administrators may waste time tracking down ownership, especially in large enterprises with multiple teams.

The command is typically used in conjunction with other SNMP configurations like `snmp-server location` and `snmp-server community` to provide a complete management context. It is one of the first commands applied when setting up SNMP on a device, as it establishes administrative accountability. The contact string is visible in the running configuration and can be viewed via `show running-config | include snmp-server contact` or by querying the SNMP agent.

There are no alternatives for setting the contact via CLI; however, some NMS platforms can set it via SNMP writes if the community string has write access. The command is straightforward but often overlooked, leading to incomplete SNMP configurations. In terms of IOS behavior, the contact string is stored in the running configuration and can be saved to startup configuration.

There are no privilege level requirements beyond global configuration mode (privilege level 15). The command does not affect device performance or generate any immediate output; it simply updates the MIB object. When troubleshooting, verifying the contact information helps confirm that the device is properly managed and that the SNMP agent is responding.

Overall, this command is a small but essential part of a robust SNMP deployment, ensuring that network devices are not anonymous and that administrators can be reached promptly.

Syntax·Global Config
snmp-server contact [text]

When to Use This Command

  • Configuring the contact information for the network administrator on a core switch for SNMP-based monitoring.
  • Setting a help desk email as the SNMP contact on a router to facilitate troubleshooting by NOC teams.
  • Updating contact details after a personnel change to ensure accurate SNMP system information.
  • Standardizing contact strings across multiple devices for consistent SNMP management.

Parameters

ParameterSyntaxDescription
textTEXTA string that specifies the contact information for the device. This can include the name, email address, phone number, or any other identifying text. The string can contain spaces and special characters, but it is recommended to keep it concise. Common mistakes include leaving the contact blank or using ambiguous text that does not clearly identify the responsible party. The maximum length is typically 255 characters, but it is advisable to stay under 128 characters for readability.

Command Examples

Setting SNMP contact to an email address

snmp-server contact admin@example.com
Router(config)# snmp-server contact admin@example.com
Router(config)#

The command is entered in global configuration mode. No output is shown upon success; the prompt returns without error.

Setting SNMP contact with a name and phone number

snmp-server contact John Doe, +1-555-1234
Router(config)# snmp-server contact John Doe, +1-555-1234
Router(config)#

The contact string can include spaces and special characters. The command executes silently if accepted.

Understanding the Output

This command does not produce any output on success. To verify the configured contact, use 'show snmp contact' or 'show running-config | include snmp-server contact'. The contact string appears in the SNMP MIB-II sysContact object (OID 1.3.6.1.2.1.1.4.0).

A missing or incorrect contact may indicate incomplete SNMP configuration.

Configuration Scenarios

Setting SNMP Contact for a Core Router

A network administrator needs to configure SNMP on a core router (R1) to ensure that the NMS can identify the responsible team. The contact should include the network operations center (NOC) email and phone number.

Topology

R1(Gi0/0)---10.0.0.0/30---(Gi0/0)R2

Steps

  1. 1.Step 1: Enter global configuration mode: R1> enable
  2. 2.Step 2: Enter global configuration mode: R1# configure terminal
  3. 3.Step 3: Set the SNMP contact: R1(config)# snmp-server contact NOC@example.com +1-555-0100
  4. 4.Step 4: Verify the configuration: R1(config)# do show running-config | include snmp-server contact
  5. 5.Step 5: Save the configuration: R1(config)# end
  6. 6.Step 6: Save to startup: R1# copy running-config startup-config
Configuration
! Full IOS config block
R1# configure terminal
R1(config)# snmp-server contact NOC@example.com +1-555-0100
R1(config)# end

Verify: Use `show snmp contact` or `show running-config | include snmp-server contact`. Expected output: `snmp-server contact NOC@example.com +1-555-0100`

Watch out: If the contact string contains spaces, it must be enclosed in quotes? No, IOS does not require quotes; the entire line after the command is taken as the contact string. However, ensure that the string does not include leading/trailing spaces that might be misinterpreted.

Updating SNMP Contact for a Distribution Switch

A distribution switch (SW1) was previously configured with an outdated contact. The administrator needs to update it to reflect the new team responsible for the campus network.

Topology

SW1(Gi1/0/1)---192.168.1.0/24---(Gi0/0)R1

Steps

  1. 1.Step 1: Enter global configuration mode: SW1> enable
  2. 2.Step 2: Enter global configuration mode: SW1# configure terminal
  3. 3.Step 3: Overwrite the existing contact: SW1(config)# snmp-server contact Campus-Network-Team@university.edu
  4. 4.Step 4: Verify the change: SW1(config)# do show snmp contact
  5. 5.Step 5: Exit and save: SW1(config)# end
  6. 6.Step 6: Save configuration: SW1# copy running-config startup-config
Configuration
! Full IOS config block
SW1# configure terminal
SW1(config)# snmp-server contact Campus-Network-Team@university.edu
SW1(config)# end

Verify: Use `show snmp contact`. Expected output: `Contact: Campus-Network-Team@university.edu`

Watch out: The command overwrites any existing contact; there is no way to append. Ensure the new contact is complete. Also, the contact is case-sensitive as stored in the MIB, so use consistent formatting.

Troubleshooting with This Command

When troubleshooting SNMP-related issues, the `snmp-server contact` command is primarily used to verify that the device is properly configured for management. A healthy output from `show snmp contact` displays a meaningful string that identifies the responsible party. If the output is blank or shows a default value like 'Unknown' or 'Not set', it indicates that the contact has not been configured.

This can lead to delays in incident response because the NMS cannot provide contact information to administrators. Common symptoms that this command helps diagnose include: (1) SNMP polls returning incomplete system information, (2) inability to identify device ownership during audits, and (3) automated alerts lacking contact details. To diagnose, follow this step-by-step flow: First, check the SNMP contact using `show snmp contact` or `show running-config | include snmp-server contact`.

If the contact is missing, configure it with the appropriate details. Next, verify that the SNMP agent is responding by using `snmpget` from an NMS: `snmpget -v2c -c public <device-ip> 1.3.6.1.2.1.1.4.0`. The expected response should include the contact string.

If the SNMP get fails, check other SNMP configurations like community strings and ACLs. Correlate the contact output with `show snmp location` and `show snmp community` to ensure all system information is populated. In some cases, the contact may be set correctly but not visible due to SNMP view restrictions; verify with `show snmp view`.

Additionally, if the device is part of a stack or cluster, ensure the contact is configured on the master or each member as needed. The contact information is also used by Cisco Discovery Protocol (CDP) and LLDP in some implementations, so incorrect contact can affect neighbor discovery. Finally, if the contact appears correct but SNMP queries still fail, check for ACLs blocking SNMP traffic or incorrect SNMP versions.

The `debug snmp packets` command can help trace SNMP requests and responses, but use it cautiously in production. In summary, the `snmp-server contact` command is a simple yet vital part of SNMP troubleshooting, ensuring that network devices are identifiable and manageable.

CCNA Exam Tips

1.

CCNA exam tip: Remember that 'snmp-server contact' is configured in global config mode, not interface config.

2.

CCNA exam tip: The contact string is informational only and does not affect SNMP functionality; it's part of MIB-II system group.

3.

CCNA exam tip: You may be asked to verify the contact using 'show snmp contact' or 'show running-config'.

4.

CCNA exam tip: The command does not validate the format; any text string is accepted.

Common Mistakes

Mistake 1: Typing 'snmp contact' instead of 'snmp-server contact' — the command will be rejected.

Mistake 2: Forgetting to enter global configuration mode — the command will fail.

Mistake 3: Using quotes around the contact string — quotes are not needed and may become part of the string.

snmp-server contact [text] vs snmp-server location [text]

Both snmp-server contact and snmp-server location configure SNMP system variables (sysContact and sysLocation) and are often confused because they are defined in the same MIB-II system group and are commonly set together for device identification in NMS.

Aspectsnmp-server contact [text]snmp-server location [text]
ScopeSets sysContact (administrative contact)Sets sysLocation (physical location)
Configuration ModeGlobal configurationGlobal configuration
PersistenceSaved to running and startup configSaved to running and startup config
PrecedenceNo precedence; independentNo precedence; independent
Typical UseIdentify responsible person/teamIdentify physical location (e.g., rack, data center)

Use snmp-server contact [text] when you need to specify the network administrator or support team responsible for the device.

Use snmp-server location [text] when you need to describe where the device is physically installed for inventory or troubleshooting purposes.

Platform Notes

In IOS-XE, the `snmp-server contact` command syntax and behavior are identical to classic IOS. The output from `show snmp contact` is the same. However, in IOS-XE, the configuration is stored in the running configuration and can be part of a configuration replace operation.

For NX-OS, the equivalent command is `snmp-server contact <text>` under global configuration mode, but the syntax may require quotes if the text contains spaces. For example: `switch(config)# snmp-server contact "NOC@example.com"`. NX-OS also supports `show snmp contact` to display the information.

On ASA firewalls, the command is `snmp-server contact <text>` as well, but it is used in the context of ASA's SNMP agent. The ASA also has `snmp-server location` and `snmp-server community`. In IOS-XR, the equivalent command is `snmp-server contact <text>` under the SNMP server configuration submode: `RP/0/RP0/CPU0:router(config)# snmp-server contact <text>`.

The show command is `show snmp contact`. There are no significant differences between IOS versions 12.x, 15.x, and 16.x for this command; it has remained consistent. However, in newer IOS versions, the maximum length of the contact string may be enforced more strictly.

Always check the specific platform documentation for any nuances. Overall, the command is universally supported across Cisco platforms with minimal variation.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions