Cisco 2501 - Router - EN Manual do Utilizador Página 41

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 76
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 40
Router Interfaces
219
Configuring DHCP on your router
You can configure your router to become a Dynamic Host Configuration Protocol
(DHCP) server, and I’ll show you some examples at the end of this chapter and on a
real network in Chapter 6 “IP Routing.” Here are some basics of making your router
a DHCP server.
"
First, create a name for the pool. The name is completely irrelevant, but using a name
allows you to create an unlimited amount of DHCP pools. A pool is defined as a subnet
or group of IP addresses you want the DHCP server to hand out to DHCP clients.
"
Second, use the network command to define the subnet of address the DHCP pool will
hand out to the DHCP clients
"
Third, set the optional options such as default gateway, DNS server, WINS server,
domain name, and lease length. A DHCP lease specifies the amount of time a DHCP
server grants a DHCP client permission to use a particular IP address.
Here is an example:
Todd#config t
Todd(config)#ip dhcp pool Finance
Todd(dhcp-config)#network 10.10.1.0 255.255.255.0
Todd(dhcp-config)#default-router 10.10.1.1
Todd(dhcp-config)#dns-server 10.30.1.1
Todd(dhcp-config)#netbios-name-server 10.30.1.1
Todd(dhcp-config)#lease 0 0 1
Todd(dhcp-config)#exit
Todd(config)#ip dhcp excluded-address 10.10.1.1 10.10.1.199
Todd(config)#
The above commands create a DHCP pool that will be used for DHCP clients connecting
to a router interface with an IP address of 10.10.1.1 (the configured default gateway). The
DNS and WINS server is 10.30.1.1 and the IP addresses that will be handed out to DHCP
clients will be 10.10.1.200 through 10.10.1.254 because the excluded range is 10.10.1.1
through 10.10.1.199. The lease command is configured in days, hours, minutes. The lease
0 0 1 command is a one-minute DHCP lease.
You need to verify and configure the router interface the DHCP clients are connected to
with the correct IP address:
Todd(config)#iinteface f0/0
Todd(config-if)#ip address 10.10.1.1 255.255.255.0
Todd(config-if)#no shutdown
You can also configure a router interface to receive a DHCP address. You would
do this, for example, if your router was connected to a DSL or cable connection to the
47020.book Page 219 Wednesday, January 2, 2008 4:31 PM
Vista de página 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 75 76

Comentários a estes Manuais

Sem comentários