When you boot up your switch, the DHCP client is invoked and requests configuration information from a DHCP server when the configuration file is not present on the switch. If the configuration file is present and the configuration includes the ip address dhcp interface configuration command on specific routed interfaces, the DHCP client is invoked and requests the IP address information for those interfaces.
With this message, the client and server are bound, and the client uses configuration information received from the server. The DHCP server assigned the parameters to another client. However, the server usually reserves the address until the client has had a chance to formally request the address. If the switch accepts replies from a BOOTP server and configures itself, the switch broadcasts, instead of unicasts, TFTP requests to obtain the switch configuration file.
The configuration files on all clients are identical except for their DHCP-obtained hostnames. If a client has a default hostname the hostname name global configuration command is not configured or the no hostname global configuration command is entered to remove the hostname , the DHCP hostname option is not included in the packet when you enter the ip address dhcp interface configuration command. In this case, if the client receives the DCHP hostname option from the DHCP interaction while acquiring an IP address for an interface, the client accepts the DHCP hostname option and sets the flag to show that the system now has a hostname configured.
You can use the DHCP image upgrade features to configure a DHCP server to download both a new image and a new configuration file to one or more switches in a network. This helps ensure that each new switch added to a network receives the same image and configuration.
The downloaded configuration file becomes the running configuration of the switch. It does not over write the bootup configuration saved in the flash, until you reload the switch.
You can use DHCP auto-image upgrade with DHCP autoconfiguration to download both a configuration and a new image to one or more switches in your network. The switch or switches downloading the new configuration and the new image can be blank or only have a default factory configuration loaded.
If the new configuration is downloaded to a switch that already has a configuration, the downloaded configuration is appended to the configuration file stored on the switch. Any existing configuration is not overwritten by the downloaded one. Note: To enable a DHCP auto-image update on the switch, the TFTP server where the image and configuration files are located must be configured with the correct option 67 the configuration filename , option 66 the DHCP server hostname option the TFTP server address , and option description of the file settings.
After you install the switch in your network, the auto-image update feature starts. The downloaded configuration file is saved in the running configuration of the switch, and the new image is downloaded and installed on the switch.
When you reboot the switch, the configuration is stored in the saved configuration on the switch. Follow these guidelines if you are configuring a device as a DHCP server:. If the IP address and the subnet mask are not in the reply, the switch is not configured.
Unavailability of other lease options does not affect autoconfiguration. These features are not operational. If you did not specify the configuration filename, the TFTP server, or if the configuration file could not be downloaded, the switch attempts to download a configuration file by using various combinations of filenames and TFTP server addresses. The files include the specified configuration filename if any and these files: network-config, cisconet. For the switch to successfully download a configuration file, the TFTP server must contain one or more configuration files in its base directory.
The files can include these files:. For more information, see Relay Device. The preferred solution is to configure the DHCP server with all the required information.
The TFTP server contains the configuration files for the switch. If it is on a different LAN, the switch must be able to access it through a router. You must configure a relay device, also referred to as a relay agent , when a switch sends broadcast packets that require a response from a host on a different LAN.
You must configure this relay device to forward received broadcast packets on an interface to the destination host. If the relay device is a Cisco router, enable IP routing ip routing global configuration command , and configure helper addresses by using the ip helper-address interface configuration command.
For example, in Figure 3 , configure the router interfaces as follows:. Figure 3 Relay Device Used in Autoconfiguration. Depending on the availability of the IP address and the configuration filename in the DHCP reserved lease, the switch obtains its configuration information in these ways:.
The switch sends a unicast message to the TFTP server to retrieve the named configuration file from the base directory of the server and upon receipt, it completes its boot-up process. The switch sends a broadcast message to a TFTP server to retrieve the named configuration file from the base directory of the server, and upon receipt, it completes its boot-up process.
The configuration filename is not provided two-file read method. The switch sends a unicast message to the TFTP server to retrieve the network-confg or cisconet.
If the network-confg file cannot be read, the switch reads the cisconet. The default configuration file contains the hostnames-to-IP-address mapping for the switch. The switch fills its host table with the information in the file and obtains its hostname. If the hostname is not found in the file, the switch uses the hostname in the DHCP reply.
If the hostname is not specified in the DHCP reply, the switch uses the default Switch as its hostname. After obtaining its hostname from the default configuration file or the DHCP reply, the switch reads the configuration file that has the same name as its hostname hostname -confg or hostname. If the cisconet. If the switch cannot read the network-confg, cisconet. If the switch cannot read the router-confg file, it reads the ciscortr.
Unplug the switch power cord, and press the switch Mode button while reconnecting the power cord. You can release the Mode button a second or two after the LED above port 1 turns off. Then the boot loader switch: prompt appears. The switch boot loader software provides support for nonvolatile environment variables, which can be used to control how the boot loader or any other software running on the system behaves. Static unicast routes are user-defined routes that cause packets moving between a source and a destination to take a specified path.
Static routes can be important if the router cannot build a route to a particular destination and are useful for specifying a gateway of last resort to which all unroutable packets are sent. The switch retains static routes until you remove them. When an interface goes down, all static routes through that interface are removed from the IP routing table.
When the software can no longer find a valid next hop for the address specified as the forwarding router's address in a static route, the static route is also removed from the IP routing table. Displays the administrative and operational status of all interfaces or a specified interface. The following sections provide references related to switch administration:. Configuring SDM Templates. No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco. Subject-based addressing conventions define a simple, uniform namespace for messages and their destinations. Configuration Engine includes NameSpace Mapper N SM , which provides a lookup service for managing logical groups of devices based on application, device or group ID, and event.
You can use the namespace mapping service to designate events by using any desired naming convention. When you have populated your data store with your subject names, NSM changes your event subject-name strings to those known by Cisco IOS. For a subscriber, when given a unique device ID and event, the namespace mapping service returns a set of events to which to subscribe. Similarly, for a publisher, when given a unique group ID, device ID, and event, the mapping service returns a set of events on which to publish.
Configuration Engine assumes that a unique identifier is associated with each configured switch. This unique identifier can take on multiple synonyms, where each synonym is unique within a particular namespace. The event service uses namespace content for subject-based addressing of messages.
Configuration Engine intersects two namespaces, one for the event bus and the other for the configuration server. Within the scope of the configuration server namespace, the term ConfigID is the unique identifier for a device.
Because Configuration Engine uses both the event bus and the configuration server to provide configurations to devices, you must define both ConfigID and Device ID for each configured switch. Within the scope of a single instance of the configuration server, no two configured switches can share the same value for ConfigID. Within the scope of a single instance of the event bus, no two configured switches can share the same value for DeviceID. Each configured switch has a unique ConfigID, which serves as the key into the Configuration Engine directory for the corresponding set of switch CLI attributes.
The ConfigID is fixed at startup time and cannot be changed until the device restarts, even if the switch hostname is reconfigured.
Each configured switch participating on the event bus has a unique DeviceID, which is analogous to the switch source address so that the switch can be targeted as a specific destination on the bus. All switches configured with the cns config partial global configuration command must access the event bus. However, the DeviceID variable and its usage reside within the event gateway adjacent to the switch. The logical Cisco IOS termination point on the event bus is embedded in the event gateway, which in turn functions as a proxy on behalf of the switch.
The event gateway represents the switch and its corresponding DeviceID to the event bus. The switch declares its hostname to the event gateway immediately after the successful connection to the event gateway.
The event gateway caches this DeviceID value for the duration of its connection to the switch. The DeviceID is fixed at the time of the connection to the event gateway and does not change even when the switch hostname is reconfigured.
When changing the switch hostname on the switch, the only way to refresh the DeviceID is to break the connection between the switch and the event gateway. Enter the no cns event global configuration command followed by the cns event global configuration command. When the connection is reestablished, the switch sends its modified hostname to the event gateway. The event gateway redefines the DeviceID to the new value.
In standalone mode, when a hostname value is set for a switch, the configuration server uses the hostname as the DeviceID when an event is sent on hostname. In server mode, the hostname is not used. In this mode, the unique DeviceID attribute is always used for sending an event on the bus. If this attribute is not set, you cannot update the switch.
The tar-filename. You can also specify an optional list of files or directories within the source directory to write to the new tar file. If none are specified, all files and directories at this level are written to the newly created tar file.
This example shows how to create a tar file. This command writes the contents of the new-configs directory on the local flash device to a file named saved. To display the contents of a tar file on the screen, use this privileged EXEC command:.
For source-url , specify the source URL alias for the local or network file system. You can also limit the display of the files by specifying an optional list of files or directories after the tar file; then only those files appear. If none are specified, all files and directories appear. This example shows how to display the contents of a switch tar file that is in flash memory:.
To extract a tar file into a directory on the flash file system, use this privileged EXEC command:. For source-url , specify the source URL alias for the local file system. If none are specified, all files and directories are extracted. This example shows how to extract the contents of a tar file located on the TFTP server at This command extracts just the new-configs directory into the root directory on the local flash file system.
The remaining files in the saved. This example shows how to display the contents of a configuration file on a TFTP server:. This section describes how to create, load, and maintain configuration files.
Configuration files contain commands entered to customize the function of the Cisco IOS software. A way to create a basic configuration file is to use the setup program or to enter the setup privileged EXEC command. For more information, see Performing Switch Setup Configuration.
You might want to perform this for one of these reasons:. For example, you might add another switch to your network and want it to have a configuration similar to the original switch. By copying the file to the new switch, you can change the relevant parts rather than recreating the whole file. You might perform this task to back up a current configuration file to a server before changing its contents so that you can later restore the original configuration file from the server.
The protocol you use depends on which type of server you are using. Creating configuration files can aid in your switch configuration. Configuration files can contain some or all of the commands needed to configure one or more switches. For example, you might want to download the same configuration file to several switches that have the same hardware configuration. Use these guidelines when creating a configuration file:. If you are accessing the switch through a network connection instead of through a direct connection to the console port, keep in mind that some configuration changes such as changing the switch IP address or disabling ports can cause a loss of connectivity to the switch.
The switch does not erase the existing running configuration before adding the commands. If a command in the copied configuration file replaces a command in the existing configuration file, the existing command is erased. For example, if the copied configuration file contains a different IP address in a particular command than the existing configuration, the IP address in the copied configuration is used.
However, some commands in the existing configuration might not be replaced or negated. In this case, the resulting configuration file is a mixture of the existing configuration file and the copied configuration file, with the copied configuration file having precedence. Startup configuration files are used during system startup to configure the software.
Running configuration files contain the current configuration of the software. The two configuration files can be different. For example, you might want to change the configuration for a short time period rather than permanently. In this case, you would change the running configuration but not save the configuration by using the copy running-config startup-config privileged EXEC command. When creating a configuration file, you must list commands logically so that the system can respond appropriately.
This is one method of creating a configuration file:. Copy an existing configuration from a switch to a server. Extract the portion of the configuration file with the desired commands, and save it in a new file. Copy the configuration file to the appropriate server location.
Make sure the permissions on the file are set to world-read. You can configure the switch by using configuration files you create, download from another switch, or download from a TFTP server. You can copy upload configuration files to a TFTP server for storage. Before you begin downloading or uploading a configuration file by using TFTP, do these tasks:. To restart the daemon, either stop the inetd process and restart it, or enter a fastboot command on the SunOS 4.
For more information on the TFTP daemon, see the documentation for your workstation. The switch and the TFTP server must be in the same subnetwork if you do not have a router to route traffic between subnets.
Check connectivity to the TFTP server by using the ping command. The permission on the file should be world-read. To create an empty file, enter the touch filename command, where filename is the name of the file you will use when uploading it to the server. Permissions on the file should be world-write. To configure the switch by using a configuration file downloaded from a TFTP server, follow these steps:.
Copy the configuration file to the appropriate TFTP directory on the workstation. Log into the switch through the console port or a Telnet session. Download the configuration file from the TFTP server to configure the switch. The configuration file downloads, and the commands are executed as the file is parsed line-by-line.
This example shows how to configure the software from the file tokyo-confg at IP address To upload a configuration file from a switch to a TFTP server for storage, follow these steps:. Upload the switch configuration to the TFTP server. This example shows how to upload a configuration file from a switch to a TFTP server:. You can copy configuration files to or from an FTP server.
When you copy a configuration file from the switch to a server by using FTP, the Cisco IOS software sends the first valid username in this list:. The switch sends the first valid password in this list:. The variable username is the username associated with the current session, switchname is the configured hostname, and domain is the domain of the switch. The username and password must be associated with an account on the FTP server.
Use the ip ftp username and ip ftp password commands to specify a username and password for all copies. Include the username in the copy command if you want to specify only a username for that copy operation.
If the server has a directory structure, the configuration file is written to or copied from the directory associated with the username on the server. For example, if the configuration file resides in the home directory of a user on the server, specify that user's name as the remote username. For more information, see the documentation for your FTP server.
Before you begin downloading or uploading a configuration file by using FTP, do these tasks:. The switch and the FTP server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the FTP server by using the ping command. You can enter the show users privileged EXEC command to view the valid username. If you do not want to use this username, create a new FTP username by using the ip ftp username username global configuration command during all copy operations.
If you are accessing the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the FTP username.
Include the username in the copy command if you want to specify a username for only that copy operation. This step is required only if you override the default remote username or password see Steps 4, 5, and 6. Using FTP, copies the configuration file from a network server to the running configuration or to the startup configuration file.
This example shows how to copy a configuration file named host1-confg from the netadmin1 directory on the remote server with an IP address of This example shows how to specify a remote username of netadmin1. The software copies the configuration file host2-confg from the netadmin1 directory on the remote server with an IP address of Using FTP, copies the switch running or startup configuration file to the specified location.
This example shows how to copy the running configuration file named switch2-confg to the netadmin1 directory on the remote host with an IP address of This example shows how to store a startup configuration file on a server by using FTP to copy the file:. The RCP provides another method of downloading, uploading, and copying configuration files between remote hosts and the switch. The RCP copy commands rely on the rsh server or daemon on the remote system.
You only need to have access to a server that supports the remote shell rsh. Most UNIX systems support rsh. Because you are copying a file from one place to another, you must have read permission on the source file and write permission on the destination file. If the destination file does not exist, RCP creates it for you.
0コメント