Sie sind auf Seite 1von 23

Interconnecting Cisco Networking

Devices Part 1
ICND1 100-105

Instructor
Paul A. Parker

1
Chapter 20

DHCP and IP Networking on Hosts

2
Chapter 20
Foundation Topics
v Configuring Routers to Support DHCP
▼ Dynamic Host Configuration Protocol (DHCP) is one of the most
commonly used protocols in a TCP/IP network.
▼ DHCP provides several advantages over manually or statically
configuring IPv4 settings.
▼ The IP configuration can be controlled centrally which can
significantly reduce the errors by manually configuring static
addresses.
▼ DHCP enables mobility by allowing users to move locations
without having to manually reconfigure their network connection.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 3


Chapter 20
Configuring Routers to Support DHCP
v DHCP Protocol Messages and Addresses
▼ The DHCP process to lease an IP address uses the following four
messages between the client and server:
➘  Discover: Sent by the DHCP client to find a willing DHCP server
➘  Offer: Sent by a DHCP server to offer to lease to that client a
specific IP address (and inform the client of its other parameters)
➘  Request: Sent by the DHCP client to ask the server to lease the
IPv4 address listed in the Offer message
➘  Acknowledgment: Sent by the DHCP Server to assign the address,
and to list the mask, default router, and DNS server IP addresses
▼ The first letters spell DORA which can be an easy way to
remember the different messages.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 4


Chapter 20
Configuring Routers to Support DHCP
v DHCP clients have a unique problem in that they do not
have an IP address but they need to send IP packets to
lease an IP address. Two special addresses are allowed
on the local subnet:
▼ 0.0.0.0: An address reserved for use as a source IPv4 address
for hosts that do not yet have an IP address.
▼ 255.255.255.255: The address reserved as a local subnet
broadcast address. Packets sent to this destination address are
broadcast on the local data link, but routers do not forward them
to other subnets.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 5


Chapter 20
Configuring Routers to Support DHCP
v DHCP Discover and Offer

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 6


Chapter 20
Configuring Routers to Support DHCP
v Supporting DHCP for Remote Subnets with DHCP Relay
▼ The ip helper-address server-ip subcommand tells the router
to do the following for messages coming from a DHCP client:
➘  1. Watch for incoming DHCP messages, with destination IP address
255.255.255.255.
➘  2. Change that packet’s source IP address to the router’s incoming
interface IP address.
➘  3. Change that packet’s destination IP address to the address of the
DHCP server (as configured in the ip helper-address command).
➘  4. Route the packet to the DHCP server.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 7


Chapter 20
Configuring Routers to Support DHCP
v IP Helper Address Effect

v IP Helper Address for the Offer Message Returned

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 8


Chapter 20
Configuring Routers to Support DHCP
v Information Stored at the DHCP Server
▼ The following list shows the type of settings the DHCP server
needs to know to support DHCP clients:
➘  Subnet ID and mask: The DHCP server can use this information to know
all addresses in the subnet. Usually, unless reserved or excluded, the server
believes that it can lease any and all valid addresses in the subnet. (The
DHCP server knows to not lease the subnet ID or subnet broadcast address.)
➘  Reserved (excluded) addresses: The server needs to know which
addresses in the subnet to not lease. This list allows some addresses to be
reserved for assignment as statically assigned IP addresses. For example,
most router and switch IP addresses, server addresses, and addresses of
most anything other than user devices use a statically assigned IP address.
Most of the time, engineers use the same convention for all subnets, either
reserving the lowest IP addresses in all subnets, or reserving the highest IP
addresses in all subnets.
➘  Default router(s): This is the IP address of the router on that subnet.
➘  DNS IP address(es): This is a list of DNS server IP addresses

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 9


Chapter 20
Configuring Routers to Support DHCP
v DHCP Server Configuration and Verification on Routers
▼ IOS DHCP Server Configuration
➘  The Cisco IOS DHCP server configuration steps are as follows:
➘  Step 1. Exclude addresses from being assigned by DHCP: ip dhcp
excluded-address first last
➘  Step 2. Create a DHCP pool and go to pool configuration mode: ip
dhcp pool name
➼  A. Define subnet that the DHCP server should support: network subnet-ID
mask or network subnet-ID prefix-length
➼  B. Define default router IP address(es) in that subnet: default-router
address1 address2…
➼  C. Define list of DNS server IP addresses: dns-server address1 address2…
➼  D. Define length of lease, in days, hours, and minutes: lease days hours
minutes
➼  E. Define the DNS domain name: domain-name name

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 10


Chapter 20
Configuring Routers to Support DHCP
v DHCP Server Configuration and Verification on Routers
▼ IOS DHCP Server Verification
➘  The Cisco IOS DHCP server has several different show commands
to verify the configuration:
➘  show ip dhcp binding: Lists state information about each IP address
currently leased to a client
➘  show ip dhcp pool [poolname]: Lists the configured range of IP
addresses, plus statistics for the number of currently leased addresses
and the high-water mark for leases from each pool
➘  show ip dhcp server statistics: Lists DHCP server statistics

v Detecting Conflicts with Offered Verses Used Addresses


▼ Both the Cisco IOS DHCP server and typical DHCP clients attempt
to detect conflicts. The DHCP server uses ping to see if an IP
address is statically configured where the DHCP client uses ARP.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 11


Chapter 20
Verifying Host IPv4 Settings
v IP Address and Mask Configuration
▼ To verify the IP address, mask, default router, and other settings
operating systems support the ipconfig (Windows), or ifconfig
(Linux and Mac OS). Both have several options that can be seen
by adding -? to the end of the command.
v Name Resolution with DNS
▼ The Domain Name System (DNS) defines a protocol as well as a
worldwide system of servers that use DNS.
▼ When looking into problems with hosts you should check the DNS
settings to find out what DNS server address the host tries to
use.
▼ You can also use the nslookup command which send a DNS
request to the DNS server showing the results.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 12


Chapter 20
Verifying Host IPv4 Settings
v Default Routers
▼ For packets destined for a remote network the local host sends
the packet to the default gateway. For the LAN-based host’s
default router setting to work the following must be true:
➘  The host link to the LAN and the default router link to the LAN must
be in the same VLAN.
➘  The host and default router IP addresses must be in the same
subnet.
➘  The host default router setting must refer to the same IP address
configured on the router. (In other words, if the host claims the
default router is 10.1.1.1, make sure the router interface IP address
is not 10.1.1.2.)
➘  The LAN switches must not discard the frame because of the port
security configuration.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 13


Chapter 20
Testing Connectivity with ping, traceroute, and telnet
v While verifying the host’s IPv4 settings is important the
true test is whether the host can communication with
other hosts.
v The ping Command
▼  The ping command uses the Internet Control Message Protocol
(ICMP), specifically the ICMP Echo Request and ICMP Echo Reply
messages.
▼  The Cisco Router ping ip-address command will send 5 echo
messages with a timeout of 2 seconds.
▼  The Cisco Router extended ping allows the user to choose several
additional parameters compared the standard ping.
▼  The extended ping can be used to select the source address for the
ping allowing the router to emulate a ping being sent by a local
interface.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 14


Chapter 20
Testing Connectivity with ping, traceroute, and telnet
v The traceroute Command
▼ The traceroute command lists the next-hop address of each
router found in the path from source to destination address.
▼ The traceroute uses the TTL Exceeded message to identify the
last address reached for each hop in the path.
▼ It does this by setting the TTL value in the Echo Request
message to 1 for the first Echo Request and the subsequently
increasing the TTL value by 1 until it reaches 30 hops or the
destination address has been reached.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 15


Chapter 20
Testing Connectivity with ping, traceroute, and telnet
v Telnet and Suspend
▼ Engineers can use telnet from their workstation to connect to the
routers and switches but the Cisco routers and switches also
have their own Telnet and SSH.
▼ The advantage of using the Cisco telnet and ssh commands is the
suspend feature. The suspend feature allows a connection to
remain active while creating another connection.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 16


Chapter 20
Exam Preparation Tasks

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 17


Chapter 20
Command Reference
v Configuration Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 18


Chapter 20
Command Reference
v Configuration Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 19


Chapter 20
Command Reference
v EXEC Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 20


Chapter 20
Command Reference
v EXEC Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 21


Chapter 20
Command Reference
v Host Networking Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 22


Questions?

23

Das könnte Ihnen auch gefallen