3-13
Catalyst 3750 SwitchSoftware Configuration Guide
OL-8550-09
Chapter3 Assigning the Switch IP Address and Default Gateway
Assigning Switch Information
This example shows how to configure a switch as a DHCP server so that it will download a configuration
file:
Switch# configure terminal
Switch(config)# ip dhcp pool pool1
Switch(dhcp-config)# network 10.10.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)# option 150 10.10.10.1
Switch(dhcp-config)# exit
Switch(config)# tftp-server flash:config-boot.text
Switch(config)# interface gigabitethernet1/0/4
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.10.1 255.255.255.0
Switch(config-if)# end
Step4 network network-number mask
prefix-length
Specify the subnet network number and mask of the DHCP address
pool.
Note 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 (/).
Step5 default-router address Specify the IP address of the default router for a DHCP client.
Step6 option 150 address Specify the IP address of the TFTP server.
Step7 exit Return to global configuration mode.
Step8 tftp-server flash:filename.text Specify the configuration file on the TFTP server.
Step9 interface interface-id Specify the address of the client that will receive the configuration
file.
Step10 no switchport Put the interface into Layer 3 mode.
Step11 ip address address mask Specify the IP address and mask for the interface.
Step12 end Return to privileged EXEC mode.
Step13 copy running-config startup-config (Optional) Save your entries in the configuration file.
Command Purpose