banner



How To Change Automatic Dhcp Default Gateway

Table Of Contents

Assigning the Switch IP Address and Default Gateway

Understanding the Boot Process

Initial Configuration

Assigning Switch Information

Default Switch Data

Understanding DHCP-Based Autoconfiguration

DHCP Client Request Process

Understanding DHCP-based Autoconfiguration and Epitome Update

DHCP Autoconfiguration

DHCP Auto-Image Update

Limitations and Restrictions

Configuring DHCP-Based Autoconfiguration

DHCP Server Configuration Guidelines

Configuring the TFTP Server

Configuring the DNS

Configuring the Relay Device

Obtaining Configuration Files

Example Configuration

Configuring the DHCP Auto Configuration and Image Update Features

Configuring DHCP Autoconfiguration (Merely Configuration File)

Configuring DHCP Auto-Image Update (Configuration File and Image)

Configuring the Client

Manually Assigning IP Information

Checking and Saving the Running Configuration

Modifying the Startup Configuration

Default Boot Configuration

Automatically Downloading a Configuration File

Specifying the Filename to Read and Write the System Configuration

Booting Manually

Booting a Specific Software Prototype

Controlling Surroundings Variables

Scheduling a Reload of the Software Paradigm

Configuring a Scheduled Reload

Displaying Scheduled Reload Information


Assigning the Switch IP Accost and Default Gateway


This chapter describes how to create the initial switch configuration (for example, assigning the switch IP address and default gateway information) for the Cisco Metro Ethernet (ME) 3800X and 3600X switch past using a diversity of automatic and manual methods. It also describes how to modify the switch startup configuration.


Note For complete syntax and usage information for the commands used in this chapter, refer to the command reference for this release and to the Cisco IOS Software Documentation Command References, IP Addressing Services.


This chapter consists of these sections:

Understanding the Boot Procedure

Assigning Switch Data

Checking and Saving the Running Configuration

Modifying the Startup Configuration

Scheduling a Reload of the Software Image


Annotation Data in this chapter about configuring IP addresses and DHCP is specific to IP Version 4 (IPv4).


Understanding the Kick Procedure

To outset your switch, you lot need to follow the procedures in the hardware installation guide nigh installing and powering on the switch and setting up the initial configuration (IP address, subnet mask, default gateway, underground and Telnet passwords, and and so along) of the switch.

The normal boot process involves the operation of the kick loader software, which performs these functions:

Performs depression-level CPU initialization. It initializes the CPU registers, which command where concrete memory is mapped, its quantity, its speed, and and then forth.

Performs power-on self-test (Mail service) for the CPU subsystem. It tests the CPU DRAM and the portion of the flash device that makes up the flash file organisation.

Initializes the flash file organization on the system board.

Loads a default operating organisation software image into retention and boots the switch.

The boot loader provides access to the flash file system before the operating system is loaded. Normally, the kicking loader is used just to load, uncompress, and launch the operating system. After the boot loader gives the operating system control of the CPU, the kick loader is not active until the next arrangement reset or power-on.

The boot loader also provides trap-door admission into the system if the operating system has problems serious plenty that it cannot be used. The trap-door mechanism provides plenty access to the system so that if it is necessary, you tin can format the wink file organization, reinstall the operating system software prototype by using the XMODEM Protocol, recover from a lost or forgotten password, and finally restart the operating arrangement. For more information, encounter the "Recovering from a Lost or Forgotten Password" section.


Note You can disable password recovery. For more than information, see the "Disabling Password Recovery" section.


Before you tin assign switch information, brand sure you lot accept connected a PC or terminal to the console port, and configured the PC or final-emulation software baud rate and grapheme format to match these of the switch console port:

Baud charge per unit default is 9600.

Data bits default is 8.


Annotation If the data bits option is set to 8, gear up the parity option to none.


Finish bits default is 1.

Parity settings default is none.

Initial Configuration

The switch is gear up to automatically boot to the bootloader. When the bootloader is fully operational, the prompt appears:

Meet the "Boot Loader Commands" appendix in the command reference for this release for descriptions of the available commands. To manually boot an image from flash memory, enter:

switch:            boot flash:                        image name                      

If you lot do not know the epitome name on the flash memory, you can call up the name with this command:

2  -rwx  2072      <date>               multiple-fs          
            3  -rwx  five         <date>               private-config.text          
            4  -rwx  3045      <date>               config.text          
            v  drwx  512       <date>               me380x-universal-mz.122-52.one.127.EY          
16920593 bytes available (41011183 bytes used)          

If the dir flash command does non piece of work, enter:

This command initialize the wink and so the contents can be read, without erasing whatsoever of the flash memory contents.

After the switch becomes operational on an image, you can specify the image to boot from by using the kick global configuration command. See the "Modifying the Startup Configuration" section.

Assigning Switch Data

You can assign IP information through the switch setup program, through a DHCP server, or manually.

Use the switch setup program if you want to exist prompted for specific IP information. With this program, you can also configure a hostname and an enable cloak-and-dagger password. It gives you lot the option of assigning a Telnet password (to provide security during remote management). For more information well-nigh the setup program, encounter the "Configuring the Switch with the CLI-Based Setup Program" appendix in the hardware installation guide.

Use a DHCP server for centralized control and automatic assignment of IP information afterward the server is configured.


Annotation If you are using DHCP, exercise non respond to whatever of the questions in the setup program until the switch receives the dynamically assigned IP address and reads the configuration file.


If yous are an experienced user familiar with the switch configuration steps, manually configure the switch. Otherwise, use the setup program described previously.

These sections contain this configuration data:

Default Switch Information

Understanding DHCP-Based Autoconfiguration

Manually Assigning IP Information

Default Switch Information

Table iii-one shows the default switch information.

Table three-1 Default Switch Information

Characteristic

Default Setting

IP accost and subnet mask

No IP address or subnet mask are defined.

Default gateway

No default gateway is defined.

Enable secret password

No countersign is defined.

Hostname

The manufactory-assigned default hostname is Switch.

Telnet password

No countersign is divers.


Understanding DHCP-Based Autoconfiguration

DHCP provides configuration information to Internet hosts and internetworking devices. This protocol consists of two components: one for delivering configuration parameters from a DHCP server to a device and a machinery for allocating network addresses to devices. DHCP is congenital on a customer-server model, in which designated DHCP servers allocate network addresses and deliver configuration parameters to dynamically configured devices. The switch can act as both a DHCP client and a DHCP server.

During DHCP-based autoconfiguration, your switch (DHCP client) is automatically configured at startup with IP accost data and a configuration file.

With DHCP-based autoconfiguration, no DHCP client-side configuration is needed on your switch. However, you demand to configure the DHCP server for diverse lease options associated with IP addresses. If you are using DHCP to relay the configuration file location on the network, you might besides need to configure a Trivial File Transfer Protocol (TFTP) server and a Domain Name Organisation (DNS) server.

The DHCP server for your switch can be on the same LAN or on a different LAN than the switch. If the DHCP server is running on a different LAN, you should configure a DHCP relay device between your switch and the DHCP server. A relay device forwards broadcast traffic between 2 directly connected LANs. A router does not forward broadcast packets, but information technology forward packets based on the destination IP address in the received package.

DHCP-based autoconfiguration replaces the BOOTP customer functionality on your switch.

DHCP Client Request Procedure

When you boot your switch, the DHCP client is invoked and requests configuration data from a DHCP server when the configuration file is non present on the switch. If the configuration file is nowadays and the configuration includes the ip accost dhcp interface configuration command on specific routed interfaces, the DHCP client is invoked and requests the IP address data for those interfaces.

Figure 3-one shows the sequence of messages that are exchanged between the DHCP customer and the DHCP server.

Figure 3-1 DHCP Client and Server Message Exchange

The customer, Switch A, broadcasts a DHCPDISCOVER bulletin to locate a DHCP server. The DHCP server offers configuration parameters (such equally an IP address, subnet mask, gateway IP address, DNS IP accost, a lease for the IP address, and then forth) to the client in a DHCPOFFER unicast bulletin.

In a DHCPREQUEST broadcast message, the client returns a formal request for the offered configuration information to the DHCP server. The formal request is broadcast then that all other DHCP servers that received the DHCPDISCOVER broadcast bulletin from the client can reclaim the IP addresses that they offered to the client.

The DHCP server confirms that the IP address has been allocated to the client by returning a DHCPACK unicast message to the client. With this message, the client and server are leap, and the client uses configuration information received from the server. The amount of data the switch receives depends on how you configure the DHCP server. For more than information, run into the "Configuring the TFTP Server" section.

If the configuration parameters sent to the client in the DHCPOFFER unicast message are invalid (a configuration error exists), the customer returns a DHCPDECLINE broadcast message to the DHCP server.

The DHCP server sends the customer a DHCPNAK denial broadcast bulletin, which ways that the offered configuration parameters have not been assigned, that an error has occurred during the negotiation of the parameters, or that the client has been wearisome in responding to the DHCPOFFER bulletin (the DHCP server assigned the parameters to some other client).

A DHCP customer might receive offers from multiple DHCP or BOOTP servers and can accept any of the offers; however, the client usually accepts the kickoff offer it receives. The offering from the DHCP server is not a guarantee that the IP address is allocated to the client; however, the server usually reserves the accost until the client has had a run a risk to formally request the accost. 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 DHCP hostname choice allows a group of switches to obtain hostnames and a standard configuration from the cardinal management DHCP server. A client (switch) includes in its DCHPDISCOVER message an option 12 field used to request a hostname and other configuration parameters from the DHCP server. 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 control is non configured or the no hostname global configuration command is entered to remove the hostname), the DHCP hostname option is not included in the bundle when you enter the ip accost 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 prove that the system now has a hostname configured.

Understanding DHCP-based Autoconfiguration and Image Update

You tin utilize the DHCP image upgrade features to configure a DHCP server to download both a new paradigm 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 epitome and configuration.

There are ii types of DHCP image upgrades: DHCP autoconfiguration and DHCP auto-image update.

DHCP Autoconfiguration

DHCP autoconfiguration downloads a configuration file to one or more than switches in your network from a DHCP server. The downloaded configuration file becomes the running configuration of the switch. It does non over write the bootup configuration saved in the flash, until you reload the switch.

DHCP Auto-Image Update

You tin can use DHCP motorcar-image upgrade with DHCP autoconfiguration to download both a configuration and a new paradigm to one or more than switches in your network. The switch (or switches) downloading the new configuration and the new image tin can be blank (or only have a default manufacturing plant 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.)


Notation To enable a DHCP car-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) selection 150 (the TFTP server accost), and option 125 (description of the file) settings.

For procedures to configure the switch as a DHCP server, see the "Configuring DHCP-Based Autoconfiguration" section and the IP Addressing: DHCP Configuration Guide, Cisco IOS Release 15.x.


After you install the switch in your network, the auto-epitome 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.

Limitations and Restrictions

These are the limitations:

The DHCP-based autoconfiguration with a saved configuration process stops if there is not at least i Layer iii interface in an upwardly country without an assigned IP address in the network.

Unless y'all configure a timeout, the DHCP-based autoconfiguration with a saved configuration characteristic tries indefinitely to download an IP accost.

The auto-install process stops if a configuration file cannot be downloaded or it the configuration file is corrupted.


Annotation The configuration file that is downloaded from TFTP is merged with the existing configuration in the running configuration but is not saved in the NVRAM unless y'all enter the write retention or re-create running-configuration startup-configuration privileged EXEC command. Notation that if the downloaded configuration is saved to the startup configuration, the feature is not triggered during subsequent system restarts.


Configuring DHCP-Based Autoconfiguration

These sections contain this configuration information:

DHCP Server Configuration Guidelines

Configuring the TFTP Server

Configuring the DNS

Configuring the Relay Device

Obtaining Configuration Files

Example Configuration

If your DHCP server is a Cisco device, run into the IP Addressing: DHCP Configuration Guide, Cisco IOS Release 15.x. for boosted data about configuring DHCP.

DHCP Server Configuration Guidelines

Follow these guidelines if you are configuring a device as a DHCP server:

Y'all should configure the DHCP server with reserved leases that are bound to each switch past the switch hardware address.

If y'all want the switch to receive IP accost information, you must configure the DHCP server with these lease options:

IP address of the client (required)

Subnet mask of the customer (required)

DNS server IP address (optional)

Router IP address (default gateway address to be used by the switch) (required)

If you want the switch to receive the configuration file from a TFTP server, you must configure the DHCP server with these charter options:

TFTP server proper name (required)

Kick filename (the proper name of the configuration file that the customer needs) (recommended)

Hostname (optional)

Depending on the settings of the DHCP server, the switch can receive IP accost information, the configuration file, or both.

If you exercise not configure the DHCP server with the charter options described previously, it replies to client requests with only those parameters that are configured. If the IP address and the subnet mask are not in the respond, the switch is not configured. If the router IP accost or the TFTP server name are not plant, the switch might transport broadcast, instead of unicast, TFTP requests. Unavailability of other charter options does not touch autoconfiguration.

The switch tin can act every bit a DHCP server. By default, the Cisco IOS DHCP server and relay agent features are enabled on your switch but are not configured. These features are not operational. If your DHCP server is a Cisco device, for additional information near configuring DHCP, refer to the IP Addressing: DHCP Configuration Guide, Cisco IOS Release fifteen.x.

Configuring the TFTP Server

Based on the DHCP server configuration, the switch attempts to download i or more configuration files from the TFTP server. If y'all configured the DHCP server to respond to the switch with all the options required for IP connectivity to the TFTP server, and if you lot configured the DHCP server with a TFTP server proper name, accost, and configuration filename, the switch attempts to download the specified configuration file from the specified TFTP server.

If yous did not specify the configuration filename, the TFTP server, or if the configuration file could non exist downloaded, the switch attempts to download a configuration file past using various combinations of filenames and TFTP server addresses. The files include the specified configuration filename (if any) and these files: network-config, cisconet.cfg, hostname.config, or hostname.cfg, where hostname is the switch's electric current hostname. The TFTP server addresses used include the specified TFTP server address (if whatsoever) and the broadcast address (255.255.255.255).

For the switch to successfully download a configuration file, the TFTP server must comprise one or more configuration files in its base of operations directory. The files can include these files:

The configuration file named in the DHCP reply (the actual switch configuration file).

The network-confg or the cisconet.cfg file (known as the default configuration files).

The router-confg or the ciscortr.cfg file (These files contain commands mutual to all switches. Normally, if the DHCP and TFTP servers are properly configured, these files are non accessed.)

If you specify the TFTP server name in the DHCP server-charter database, you must also configure the TFTP server name-to-IP-address mapping in the DNS-server database.

If the TFTP server to be used is on a different LAN from the switch, or if it is to be accessed by the switch through the broadcast accost (which occurs if the DHCP server response does non incorporate all the required information described previously), a relay must exist configured to forward the TFTP packets to the TFTP server. For more than information, see the "Configuring the Relay Device" section. The preferred solution is to configure the DHCP server with all the required information.

Configuring the DNS

The DHCP server uses the DNS server to resolve the TFTP server proper noun to an IP address. You must configure the TFTP server name-to-IP accost map on the DNS server. The TFTP server contains the configuration files for the switch.

You tin configure the IP addresses of the DNS servers in the charter database of the DHCP server from where the DHCP replies volition think them. Y'all can enter upwards to 2 DNS server IP addresses in the lease database.

The DNS server can be on the same or on a different LAN equally the switch. If information technology is on a unlike LAN, the switch must be able to access it through a router.

Configuring the Relay Device

Y'all 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 unlike LAN. Examples of circulate packets that the switch might send are DHCP, DNS, and in some cases, TFTP packets. Yous must configure this relay device to frontwards 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-2, configure the router interfaces as follows:

On interface 10.0.0.2:

            router(config-if)#                          ip helper-accost xx.0.0.2                      
            router(config-if)#                          ip helper-address twenty.0.0.3                      
            router(config-if)#                          ip helper-accost twenty.0.0.4                      

On interface 20.0.0.1

            router(config-if)#                          ip helper-address 10.0.0.1                      


Note If the switch is acting as the relay device, configure the interface as a routed port. For more information, come across the "Routed Ports" department and the "Configuring Layer 3 Interfaces" department.


Effigy 3-2 Relay Device Used in Autoconfiguration

Obtaining Configuration Files

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 IP address and the configuration filename is reserved for the switch and provided in the DHCP reply (one-file read method).

The switch receives its IP address, subnet mask, TFTP server address, and the configuration filename from the DHCP server. 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-upwardly procedure.

The IP address and the configuration filename is reserved for the switch, but the TFTP server address is not provided in the DHCP respond (1-file read method).

The switch receives its IP address, subnet mask, and the configuration filename from the DHCP server. The switch sends a broadcast message to a TFTP server to think the named configuration file from the base of operations directory of the server, and upon receipt, it completes its boot-upwards process.

Only the IP address is reserved for the switch and provided in the DHCP reply. The configuration filename is non provided (two-file read method).

The switch receives its IP accost, subnet mask, and the TFTP server accost from the DHCP server. The switch sends a unicast message to the TFTP server to retrieve the network-confg or cisconet.cfg default configuration file. (If the network-confg file cannot exist read, the switch reads the cisconet.cfg file.)

The default configuration file contains the hostnames-to-IP-accost 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 respond. 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 aforementioned name as its hostname (hostname-confg or hostname.cfg, depending on whether network-confg or cisconet.cfg was read earlier) from the TFTP server. If the cisconet.cfg file is read, the filename of the host is truncated to eight characters.

If the switch cannot read the network-confg, cisconet.cfg, or the hostname file, information technology reads the router-confg file. If the switch cannot read the router-confg file, it reads the ciscortr.cfg file.


Notation The switch broadcasts TFTP server requests if the TFTP server is non obtained from the DHCP replies, if all attempts to read the configuration file through unicast transmissions neglect, or if the TFTP server name cannot be resolved to an IP address.


Case Configuration

Figure iii-3 shows a sample network for retrieving IP information by using DHCP-based autoconfiguration.

Figure 3-3 DHCP-Based Autoconfiguration Network Example

Table 3-2 shows the configuration of the reserved leases on the DHCP server.

Tabular array 3-2 DHCP Server Configuration

Switch A

Switch B

Switch C

Switch D

Binding key (hardware accost)

00e0.9f1e.2001

00e0.9f1e.2002

00e0.9f1e.2003

00e0.9f1e.2004

IP address

10.0.0.21

ten.0.0.22

10.0.0.23

10.0.0.24

Subnet mask

255.255.255.0

255.255.255.0

255.255.255.0

255.255.255.0

Router address

ten.0.0.x

10.0.0.10

ten.0.0.10

10.0.0.10

DNS server address

x.0.0.2

10.0.0.2

ten.0.0.two

10.0.0.ii

TFTP server proper name

tftpserver or 10.0.0.3

tftpserver or 10.0.0.3

tftpserver or x.0.0.3

tftpserver or x.0.0.3

Kick filename (configuration file) (optional)

switcha-confg

switchb-confg

switchc-confg

switchd-confg

Hostname (optional)

switcha

switchb

switchc

switchd


DNS Server Configuration

The DNS server maps the TFTP server proper name tftpserver to IP accost ten.0.0.three.

TFTP Server Configuration (on UNIX)

The TFTP server base of operations directory is set to /tftpserver/piece of work/. This directory contains the network-confg file used in the two-file read method. This file contains the hostname to be assigned to the switch based on its IP accost. The base directory also contains a configuration file for each switch (switcha-confg, switchb-confg, and and so forth) as shown in this display:

prompt>            cd /tftpserver/work/                      
prompt>            cat network-confg                      
ip host switcha 10.0.0.21          
ip host switchb x.0.0.22          
ip host switchc 10.0.0.23          
ip host switchd x.0.0.24          

DHCP Client Configuration

No configuration file is present on Switch A through Switch D.

Configuration Explanation

In Effigy three-3, Switch A reads its configuration file as follows:

It obtains its IP address ten.0.0.21 from the DHCP server.

If no configuration filename is given in the DHCP server respond, Switch A reads the network-confg file from the base of operations directory of the TFTP server.

It adds the contents of the network-confg file to its host table.

It reads its host table by indexing its IP address 10.0.0.21 to its hostname (switcha).

Information technology reads the configuration file that corresponds to its hostname; for example, it reads switch1-confg from the TFTP server.

Switches B through D retrieve their configuration files and IP addresses in the same way.

Configuring the DHCP Auto Configuration and Image Update Features

Using DHCP to download a new image and a new configuration to a switch requires that you configure at to the lowest degree two switches: One switch acts as a DHCP and TFTP server. The client switch is configured to download either a new configuration file or a new configuration file and a new epitome file.

Configuring DHCP Autoconfiguration (Only Configuration File)

Beginning in privileged EXEC mode, follow these steps to configure DHCP autoconfiguration of the TFTP and DHCP settings on a new switch to download a new configuration file.

Command

Purpose

Stride 1

configure terminal

Enter global configuration mode.

Stride 2

ip dhcp pool poolname

Create a proper noun for the DHCP Server address puddle, and enter DHCP pool configuration mode.

Step three

bootfile filename

Specify the name of the configuration file that is used equally a boot prototype.

Step 4

network network-number mask prefix-length

Specify the subnet network number and mask of the DHCP address pool.

Notation The prefix length specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

Stride 5

default-router address

Specify the IP address of the default router for a DHCP customer.

Pace 6

option 150 address

Specify the IP address of the TFTP server.

Step seven

exit

Return to global configuration style.

Pace 8

tftp-server flash:filename.text

Specify the configuration file on the TFTP server.

Step 9

interface interface-id

Specify the accost of the customer that volition receive the configuration file.

Step ten

no switchport

Put the interface into Layer three mode.

Step 11

ip address address mask

Specify the IP address and mask for the interface.

Step 12

end

Render to privileged EXEC mode.

Step thirteen

re-create running-config startup-config

(Optional) Save your entries in the configuration file.

This example shows how to configure a switch as a DHCP server and then that it will download a configuration file:

Switch#            configure last                      
Switch(config)#            ip dhcp pool            pool1                      
Switch(dhcp-config)#            network            10.ten.x.0 255.255.255.0                      
Switch(dhcp-config)#            bootfile            config-boot.text          
Switch(dhcp-config)#            default-router x.10.10.i                      
Switch(dhcp-config)#            pick 150 10.10.10.1                      
Switch(dhcp-config)#            exit                      
Switch(config)#            tftp-server flash:config-kick.text                      
Switch(config)#            interface gigabitethernet0/4                      
Switch(config-if)#            no switchport                      
Switch(config-if)#            ip accost 10.x.x.1 255.255.255.0                      

Configuring DHCP Auto-Epitome Update (Configuration File and Image)

Beginning in privileged EXEC mode, follow these steps to configure DHCP autoconfiguration to configure TFTP and DHCP settings on a new switch to download a new prototype and a new configuration file.


Note Before post-obit the steps in this table, you must create a text file (for case, autoinstall_dhcp) that will be uploaded to the switch. In the text file, put the proper noun of the paradigm that you want to download. This paradigm must be a tar and non a bin file.


Command

Purpose

Step one

configure final

Enter global configuration fashion.

Step ii

ip dhcp puddle poolname

Create a name for the DHCP server accost puddle and enter DHCP pool configuration mode.

Step 3

bootfile filename

Specify the proper name of the file that is used as a boot image.

Step 4

network network-number mask prefix-length

Specify the subnet network number and mask of the DHCP address puddle.

Annotation The prefix length specifies the number of $.25 that incorporate the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded past a forward slash (/).

Step 5

default-router accost

Specify the IP accost of the default router for a DHCP client.

Step half dozen

option 150 address

Specify the IP address of the TFTP server.

Footstep 7

option 125 hex

Specify the path to the text file that describes the path to the image file.

Step 8

re-create tftp wink filename.txt

Upload the text file to the switch.

Footstep 9

copy tftp flash imagename.tar

Upload the tarfile for the new image to the switch.

Step 10

leave

Return to global configuration mode.

Pace xi

tftp-server wink: config.text

Specify the Cisco IOS configuration file on the TFTP server.

Stride 12

tftp-server wink: imagename.tar

Specify the epitome name on the TFTP server.

Step 13

tftp-server flash: filename.txt

Specify the text file that contains the name of the epitome file to download

Step xiv

interface interface-id

Specify the address of the client that will receive the configuration file.

Step 15

no switchport

Put the interface into Layer 3 mode.

Stride xvi

ip address address mask

Specify the IP address and mask for the interface.

Step 17

end

Render to privileged EXEC mode.

Step 18

copy running-config startup-config

(Optional) Salve your entries in the configuration file.

This example shows how to configure a switch as a DHCP server so information technology downloads a configuration file:

Switch(config)#            ip dhcp pool            pool1                      
Switch(dhcp-config)#            network            10.x.10.0 255.255.255.0                      
Switch(dhcp-config)#            bootfile            config-boot.text                      
Switch(dhcp-config)#            default-router 10.10.10.1                      
Switch(dhcp-config)#            pick            150 10.x.x.one                      
Switch(dhcp-config)#            option 125 hex  0000.0009.0a05.08661.7574.6f69.6e73.7461.6c6c.5f64.686370                      
Switch(dhcp-config)#            exit                      
Switch(config)#            tftp-server wink:config-kick.text                      
Switch(config)#            tftp-server wink:-            image-proper noun            -mz.122-44.3.SE.tar                      
Switch(config)#            tftp-server wink:boot-config.text                      
Switch(config)#            tftp-server flash: autoinstall_dhcp                      
Switch(config)#            interface gigabitEthernet0/4                      
Switch(config-if)#            no switchport                      
Switch(config-if)#            ip address 10.ten.x.1 255.255.255.0                      

Configuring the Client

Beginning in privileged EXEC mode, follow these steps to configure a switch to download a configuration file and new image from a DHCP server:

Command

Purpose

Step 1

configure final

Enter global configuration mode.

Step 2

boot host dhcp

Enable autoconfiguration with a saved configuration.

Pace three

boot host retry timeout timeout-value

(Optional) Set the corporeality of time the system tries to download a configuration file.

Notation If you do non prepare a timeout the arrangement will indefinitely try to obtain an IP address from the DHCP server.

Step 4

banner config-save ^C warning-message ^C

(Optional) Create warning messages to exist displayed when yous try to save the configuration file to NVRAM.

Footstep 5

end

Return to privileged EXEC fashion.

Step 6

show kick

Verify the configuration.

This example uses a Layer 3 SVI interface on VLAN 99 to enable DHCP-based autoconfiguration with a saved configuration:

Switch#            configure terminal          
Switch(conf)#            kicking host dhcp                      
Switch(conf)#            kick host retry timeout 300                      
Switch(conf)#            banner config-salve ^C Caution - Saving Configuration File to NVRAM May Cause  You to Nolonger Automatically Download Configuration Files at Reboot^C                      
Switch(config-vlan)#            interface vlan 99                      
Switch(config-if)#              no shutdown                      
Config file:          flash:/config.text          
Private Config file:  flash:/private-config.text          
            via DHCP:       enabled (side by side boot: enabled)          


Note You should just configure and enable the Layer 3 interface. Do not assign an IP address or DHCP-based autoconfiguration with a saved configuration.


Manually Assigning IP Information

Offset in privileged EXEC manner, follow these steps to manually assign IP information to a switch virtual interface (SVI).You can likewise manually assign IP data to a port if yous get-go put the port into Layer 3 mode by using the no switchport control.

Control

Purpose

Step i

configure terminal

Enter global configuration mode.

Step 2

interface vlan vlan-id

Enter interface configuration mode, and enter the VLAN to which the IP data is assigned. The range is ane to 4094; do non enter leading zeros.

Step 3

ip address ip-address subnet-mask

Enter the IP address and subnet mask.

Step 4

exit

Render to global configuration manner.

Footstep 5

ip default-gateway ip-address

Enter the IP address of the adjacent-hop router interface that is directly connected to the switch where a default gateway is beingness configured. The default gateway receives IP packets with unresolved destination IP addresses from the switch.

Once the default gateway is configured, the switch has connectivity to the remote networks with which a host needs to communicate.

Note When your switch is configured to route with IP, it does non need to have a default gateway set.

Step six

end

Render to privileged EXEC mode.

Stride 7

testify interfaces vlan vlan-id

Verify the configured IP address.

Step 8

show ip redirects

Verify the configured default gateway.

Step 9

copy running-config startup-config

(Optional) Salvage your entries in the configuration file.

To remove the switch IP accost, use the no ip address interface configuration command. If you are removing the address through a Telnet session, your connection to the switch volition be lost. To remove the default gateway address, use the no ip default-gateway global configuration command.

For information on setting the switch organization name, protecting access to privileged EXEC commands, and setting fourth dimension and agenda services, encounter Chapter 5 "Administering the Switch."

Checking and Saving the Running Configuration

You can check the configuration settings you entered or changes you made past entering this privileged EXEC command:

Switch#            show running-config                      
Building configuration...          
Current configuration : 1817 bytes          
service timestamps debug datetime msec          
service timestamps log datetime msec          
no service password-encryption          
authentication mac-move permit          
license boot level AdvancedMetroIPAccess          
spanning-tree mode rapid-pvst          
spanning-tree extend system-id          
vlan internal resource allotment policy ascending          
interface GigabitEthernet0          
interface GigabitEthernet0/i          
interface GigabitEthernet0/ii          
interface GigabitEthernet0/three          
interface TenGigabitEthernet0/one          
interface TenGigabitEthernet0/two          

To store the configuration or changes y'all take fabricated to your startup configuration in flash memory, enter this privileged EXEC command:

Switch#            copy running-config startup-config                      
Destination filename [startup-config]?          
Building configuration...          

This command saves the configuration settings that you fabricated. If you fail to do this, your configuration will be lost the next time you reload the system. To display information stored in the NVRAM department of wink memory, use the show startup-config or more startup-config privileged EXEC command.

For more information almost alternative locations from which to copy the configuration file, see "Working with the Cisco IOS File System, Configuration Files, and Software Images."

Modifying the Startup Configuration

Default Kicking Configuration

Automatically Downloading a Configuration File

Booting Manually

Booting a Specific Software Image

Controlling Environment Variables

See likewise "Working with the Cisco IOS File System, Configuration Files, and Software Images," for information about switch configuration files.

Default Boot Configuration

Table three-3 Default Boot Configuration

Characteristic

Default Setting

Operating arrangement software image

The switch attempts to automatically boot the organization using information in the BOOT environment variable. If the variable is non set, the switch attempts to load and execute the first executable image it can by performing a recursive, depth-first search throughout the flash file system.

The Cisco IOS image is stored in a directory that has the same proper name every bit the epitome file (excluding the .bin extension).

In a depth-first search of a directory, each encountered subdirectory is completely searched before continuing the search in the original directory.

Configuration file

Configured switches use the config.text file stored on the organisation board in wink memory.

A new switch has no configuration file.


Automatically Downloading a Configuration File

You tin automatically download a configuration file to your switch by using the DHCP-based autoconfiguration feature. For more than data, run into the "Understanding DHCP-Based Autoconfiguration" department.

Specifying the Filename to Read and Write the Organisation Configuration

By default, the Cisco IOS software uses the file config.text to read and write a nonvolatile copy of the system configuration. However, you tin specify a different filename, which volition be loaded during the next boot cycle.

Starting time in privileged EXEC manner, follow these steps to specify a different configuration filename:

Command

Purpose

Step one

configure terminal

Enter global configuration way.

Footstep 2

boot config-file flash:/ file-url

Specify the configuration file to load during the next boot cycle.

For file-url, specify the path (directory) and the configuration filename.

Filenames and directory names are case sensitive.

Stride 3

end

Render to privileged EXEC way.

Step four

show boot

Verify your entries.

The boot config-file global configuration command changes the setting of the CONFIG_FILE environment variable.

Stride five

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To return to the default setting, use the no kick config-file global configuration command.

Booting Manually

By default, the switch automatically boots; however, yous can configure it to manually boot.

Beginning in privileged EXEC mode, follow these steps to configure the switch to manually boot during the next kick bicycle:

Control

Purpose

Stride one

configure final

Enter global configuration mode.

Pace 2

boot manual

Enable the switch to manually boot during the next boot cycle.

Stride 3

end

Return to privileged EXEC mode.

Stride iv

prove boot

Verify your entries.

The boot manual global command changes the setting of the MANUAL_BOOT surround variable.

The next time y'all reboot the arrangement, the switch is in boot loader mode, shown past the switch: prompt. To kicking the system, apply the kicking filesystem :/ file-url kicking loader command.

For filesystem :, utilize wink: for the system board wink device.

For file-url, specify the path (directory) and the proper noun of the bootable image.

Filenames and directory names are case sensitive.

Step 5

copy running-config startup-config

(Optional) Relieve your entries in the configuration file.

To disable manual booting, use the no boot manual global configuration command.

Booting a Specific Software Prototype

By default, the switch attempts to automatically boot the arrangement using data in the BOOT surroundings variable. If this variable is non set, the switch attempts to load and execute the beginning executable epitome it can by performing a recursive, depth-beginning search throughout the flash file organisation. In a depth-first search of a directory, each encountered subdirectory is completely searched before standing the search in the original directory. Even so, you lot tin can specify a specific paradigm to boot.

Get-go in privileged EXEC way, follow these steps to configure the switch to boot a specific image during the next kick cycle:

Control

Purpose

Step 1

configure terminal

Enter global configuration way.

Step ii

kick arrangement filesystem :/ file-url

Configure the switch to boot a specific paradigm in flash memory during the adjacent boot cycle.

For filesystem :, employ flash: for the system lath wink device.

For file-url, specify the path (directory) and the name of the bootable image.

Filenames and directory names are case sensitive.

Footstep iii

end

Render to privileged EXEC mode.

Footstep four

show boot

Verify your entries.

The boot organization global command changes the setting of the Boot surround variable.

During the next boot cycle, the switch attempts to automatically kicking the system using information in the Boot environment variable.

Step v

copy running-config startup-config

(Optional) Salvage your entries in the configuration file.

To render to the default setting, use the no boot organisation global configuration command.

Decision-making Environment Variables

With a normally operating switch, you enter the boot loader fashion simply through a switch console connection configured for 9600 bps. Unplug and then reconnect the switch power string. Afterward the switch performs POST, the switch begins the autoboot process. The kicking loader prompts the user for a suspension primal character during the boot-upwards sequence, as shown in this example:

***** The system volition autoboot in five seconds *****          
Send a pause central to prevent autobooting.          

The intermission key character is different for each operating system.

On a Lord's day piece of work station running UNIX, Ctrl-C is the pause central.

On a PC running Windows 2000, Ctrl-Break is the suspension key.


Note Cisco TAC has tabulated interruption keys for most common operating systems and provided an alternative suspension primal sequence for terminal emulators that practice non back up the pause keys. To see that list get to:
http://www.cisco.com/en/U.s./products/hw/routers/ps133/products_tech_note09186a0080174a34.shtml


When you lot enter the intermission key, the kick loader switch: prompt appears.

The switch boot loader software provides support for nonvolatile environment variables, which can exist used to command how the boot loader, or any other software running on the organisation, behaves. Kicking loader environment variables are like to environment variables that tin can be fix on UNIX or DOS systems.

Environment variables that take values are stored in flash memory exterior of the flash file arrangement.

Each line in these files contains an surround variable proper name and an equal sign followed by the value of the variable. A variable has no value if information technology is non listed in this file; it has a value if it is listed in the file fifty-fifty if the value is a naught string. A variable that is set to a null string (for example, " ") is a variable with a value. Many environment variables are predefined and have default values.

Environment variables store two kinds of data:

Information that controls lawmaking, which does not read the Cisco IOS configuration file. For instance, the name of a boot loader helper file, which extends or patches the functionality of the boot loader can be stored equally an environment variable.

Data that controls code, which is responsible for reading the Cisco IOS configuration file. For instance, the name of the Cisco IOS configuration file can be stored as an environment variable.

Yous can change the settings of the environment variables by accessing the boot loader or by using Cisco IOS commands. Under normal circumstances, information technology is non necessary to alter the setting of the environment variables.


Note For complete syntax and usage information for the kicking loader commands and environment variables, come across the command reference for this release.


Table 3-four describes the part of the virtually common surroundings variables.

Table 3-iv Surround Variables

Variable

Boot Loader Command

Cisco IOS Global Configuration Control

BOOT

set BOOT filesystem :/ file-url ...

A semicolon-separated list of executable files to try to load and execute when automatically booting. If the BOOT surroundings variable is non prepare, the system attempts to load and execute the first executable image information technology can find past using a recursive, depth-first search through the flash file system. If the BOOT variable is set but the specified images cannot be loaded, the system attempts to boot the beginning bootable file that information technology can find in the flash file organisation.

boot system filesystem:/file-url ...

Specifies the Cisco IOS image to load during the next boot bike. This command changes the setting of the BOOT environment variable.

MANUAL_BOOT

ready MANUAL_BOOT yes

Decides whether the switch automatically or manually boots.

Valid values are 1, yes, 0, and no. If it is fix to no or 0, the boot loader attempts to automatically boot the organisation. If information technology is set to anything else, y'all must manually boot the switch from the kick loader mode.

boot manual

Enables manually booting the switch during the next boot bike and changes the setting of the MANUAL_BOOT surroundings variable.

The adjacent time you reboot the organisation, the switch is in boot loader style. To boot the system, use the boot flash: filesystem :/ file-url boot loader command, and specify the name of the bootable image.

CONFIG_FILE

fix CONFIG_FILE flash:/ file-url

Changes the filename that Cisco IOS uses to read and write a nonvolatile copy of the arrangement configuration.

boot config-file flash: / file-url

Specifies the filename that Cisco IOS uses to read and write a nonvolatile copy of the system configuration. This command changes the CONFIG_FILE environment variable.


Scheduling a Reload of the Software Image

You tin can schedule a reload of the software epitome to occur on the switch at a subsequently time (for example, late at night or during the weekend when the switch is used less), or you lot tin can synchronize a reload network-wide (for example, to perform a software upgrade on all switches in the network).


Annotation A scheduled reload must take place within approximately 24 days.


Configuring a Scheduled Reload

To configure your switch to reload the software image at a later time, employ 1 of these commands in privileged EXEC manner:

reload in [hh :]mm [text]

This command schedules a reload of the software to have affect in the specified minutes or hours and minutes. The reload must take identify within approximately 24 days. You tin can specify the reason for the reload in a string up to 255 characters in length.

reload at hh : mm [month day | 24-hour interval month] [text]

This control schedules a reload of the software to take place at the specified time (using a 24-hour clock). If you specify the month and day, the reload is scheduled to take identify at the specified fourth dimension and date. If you do non specify the month and day, the reload takes place at the specified time on the current solar day (if the specified time is after than the electric current time) or on the side by side day (if the specified time is earlier than the current time). Specifying 00:00 schedules the reload for midnight.


Note Use the at keyword only if the switch system clock has been ready (through Network Fourth dimension Protocol (NTP), the hardware agenda, or manually). The time is relative to the configured time zone on the switch. To schedule reloads across several switches to occur simultaneously, the time on each switch must be synchronized with NTP.


The reload command halts the organization. If the arrangement is not ready to manually boot, information technology reboots itself. Use the reload control later you save the switch configuration information to the startup configuration (copy running-config startup-config).

If your switch is configured for manual booting, practice not reload it from a virtual concluding. This restriction prevents the switch from entering the boot loader mode and thereby taking information technology from the remote user'southward control.

If you modify your configuration file, the switch prompts you to save the configuration before reloading. During the save performance, the system requests whether you lot desire to continue with the salve if the CONFIG_FILE environment variable points to a startup configuration file that no longer exists. If you lot go along in this state of affairs, the system enters setup manner upon reload.

This example shows how to reload the software on the switch on the electric current mean solar day at seven:30 p.one thousand:

Reload scheduled for nineteen:thirty:00 UTC Wed Jun 5 1996 (in 2 hours and 25 minutes)          
Proceed with reload? [ostend]          

This example shows how to reload the software on the switch at a future time:

Switch#            reload at 02:00 jun 20                      
Reload scheduled for 02:00:00 UTC Thu Jun 20 1996 (in 344 hours and 53 minutes)          
Go along with reload? [ostend]          

To cancel a previously scheduled reload, utilize the reload cancel privileged EXEC control.

Displaying Scheduled Reload Information

To brandish information about a previously scheduled reload or to find out if a reload has been scheduled on the switch, use the show reload privileged EXEC command.

It displays reload information including the fourth dimension the reload is scheduled to occur and the reason for the reload (if information technology was specified when the reload was scheduled).

Source: https://www.cisco.com/en/US/docs/switches/metro/me3600x_3800x/trash/swipaddr.html

Posted by: martinhignisfat.blogspot.com

0 Response to "How To Change Automatic Dhcp Default Gateway"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel