# Cisco Networking/CCENT/Network Services

This lesson covers network services, including DHCP, DNS, NTP, and NAT.

## Objectives and Skills

Objectives and skills for the network services portion of Cisco CCENT certification include:
* Configure and verify DHCP (IOS router)
** Configuring router interfaces to use DHCP
** DHCP options (Basic overview and functionality)
** Excluded addresses
** Lease time
* Configure and verify NTP as a client
* Identify the basic operation of NAT
** Purpose
** Pool
** Static
** 1 to 1
** Overloading
** Source addressing
** One-way NAT
* Configure and verify NAT for given network requirements

## Readings

* Wikipedia: Dynamic Host Configuration Protocol
* Wikipedia: DHCPv6
* Wikipedia: Domain Name System
* Wikipedia: Network Time Protocol
* Wikipedia: Network address translation
* Cisco: Configuring the Cisco IOS DHCP Client
* Cisco: Configuring DNS on Cisco Routers
* Cisco: Configuring Network Address Translation
* Networking Signal: DHCP Dora Process

## Multimedia

* YouTube: DHCP Addressing Overview - CompTIA Network+ N10-005: 2.3
* YouTube: An Overview of DNS - CompTIA Network+ N10-005: 1.7
* YouTube: Configuring a DHCP Server on a Cisco Router
* YouTube: Configuring NAT (PAT) on Cisco Routers
* Cisco: Internet Connections with NAT and PAT
* YouTube: GNS3 Tutorial - Connecting GNS3 Routers to the Internet in Windows 7

## Examples
### DHCP Client Configuration
#### ip address dhcp

To assign a dynamic IP address to an interface, use the ip address dhcp command.

#### release dhcp

To release a dynamic IP address, use the release dhcp command.

#### renew dhcp

To renew a dynamic IP address, use the renew dhcp command.

#### Command Sequence

A command sequence to assign a dynamic ip address would be similar to the following.
A command sequence to release and renew a dynamic ip address would be similar to the following.

### DNS Configuration
#### ip domain lookup

To enable IP Domain Name System (DNS)-based hostname-to-address translation, use the ip domain lookup command in global configuration mode.

#### ip name-server

To specify one or more hosts (up to six) that can function as a name server to supply name information for the DNS, use the ip name-server command in global configuration mode.

#### ip dns server

To enable the Domain Name System (DNS) server on a router, use the ip dns server command in global configuration mode.

#### Command Sequence

A command sequence to configure the DNS service and verify DNS host name lookup would be similar to the following.

### DHCP Server Configuration
#### ip dhcp excluded-address

To specify the IP addresses that the DHCP Server should not assign to clients, use the ip dhcp excluded-address command in global configuration mode.

#### ip dhcp pool

To configure the DHCP address pool name and enter DHCP pool configuration mode, use the ip dhcp pool command in global configuration mode.

#### network

To configure a subnet and mask for the newly created DHCP address pool, use the network command in DHCP pool configuration mode.

#### default-router

To specify a default router for a DHCP client, use the default-router command in DHCP pool configuration mode.

#### domain-name

To configure a domain name string for the client, use the domain-name command in DHCP pool configuration mode.

#### dns-server

To configure the DNS IP servers that are available to a DHCP client, use the dns-server command in DHCP pool configuration mode.

#### lease

By default, each IP address assigned by a DHCP Server comes with a one-day lease. To change the lease value, use the lease command in DHCP pool configuration mode.

#### show ip dhcp

To display DHCP Server information, use the following commands in EXEC mode, as needed:

#### Command Sequence

A command sequence to configure a DHCP server would be similar to the following.

### NTP Configuration
#### show clock

To display the time and date from the system software clock, use the show clock EXEC command.

#### ntp server

To allow the software clock to be synchronized by a Network Time Protocol (NTP) time server, use the ntp server command in global configuration mode.

#### show ntp associations

To show the status of Network Time Protocol (NTP) associations, use the show ntp associations EXEC command.

#### Command Sequence

A command sequence to configure and verify an NTP server would be similar to the following.

### NAT Configuration
#### ip nat

To designate that traffic originating from or destined for the interface is subject to Network Address Translation ( NAT), use the ip nat command in interface configuration mode.

#### ip nat inside source

To enable Network Address Translation (NAT) of the inside source address, use the ip nat inside source command in global configuration mode.

#### ip nat pool

To define a pool of IP addresses for Network Address Translation (NAT) translations, use the ip nat pool command in global configuration mode.

#### access list

To define a standard IP access list, use the standard version of the access-list command in global configuration mode.

#### Command Sequence

A command sequence to configure dynamic NAT/PAT would be similar to the following.

## Activities

* Configure dynamic client addressing.
** Add a cloud and a router to a new GNS3 project and start the devices.
** Configure the cloud and add a Generic Ethernet NIO interface matching your host computer's Ethernet interface.
** Add a link to connect the following.
*** R1 FastEthernet0/1 <-> Cloud1 Ethernet connection
** Open the console for the router and practice using the following commands.
*** enable
*** configure terminal
*** interface
*** ip address dhcp
*** no shutdown
*** exit
** Verify the configuration using the following commands.
*** show ip interface brief
*** show ip default-gateway
* Configure host name resolution.
** Use the router from above and practice using the following commands.
*** enable
*** configure terminal
*** ip domain lookup
*** ip name-server
*** ip dns server
*** exit
** Verify the configuration using the following command.
*** ping en.wikiversity.org.
* Configure an NTP server.
** Use the router from above and practice using the following commands.
*** enable
*** show clock
*** configure terminal
*** ntp server
*** exit
** Verify the configuration using the following commands.
*** show ntp associations.
*** show clock.
* Configure a router as a DHCP server.
** Use the router from above and practice using the following commands.
*** enable
*** configure terminal
*** ip dhcp excluded-address
*** ip dhcp pool local
*** network
*** default-router
*** domain-name
*** dns-server
*** lease
*** exit
** Verify the configuration using the following commands.
*** show ip dhcp pool local
*** show ip dhcp binding
*** show ip dhcp server statistics
** Test the configuration by adding a VCPS PC to the project.
** Add a link to connect the following.
*** R1 FastEthernet0/0 <-> PC1 Ethernet0
** Open the console for PC1. Set the IP address for PC1 using the following commands.
*** ip dhcp
*** ping
* Configure a router to provide NAT/PAT.
** Use the router and PC from above and practice using the following commands.
*** enable
*** configure terminal
*** interface
*** ip nat
*** access-list
*** ip nat inside source
*** exit
** Verify the configuration using the following commands.
*** show running-config
** Open the console for PC1 and test the configuration using the following command.
*** ping 8.8.8.8

## Lesson Summary

* Dynamic Host Configuration Protocol is used by hosts to request Internet Protocol parameters from a network server.
* DHCPv4 operations fall into four basic phases: IP discovery, IP lease offer, IP request, and IP lease acknowledgement. These points are often abbreviated as DORA (Discovery, Offer, Request, Acknowledgement).
* DHCPv4 options provided to clients include subnet mask, router (default gateway), domain name server, domain name, lease time, renewal time (T1), rebinding time (T2), and others.
* Network links without a DHCP server can use DHCP relay agents to receive messages from DHCP clients and forward them to DHCP servers. DHCP servers send responses back to the relay agent, and the relay agent then sends these responses to the DHCP client on the local network link.
* DHCPv6 operations are similar to DHCPv4, but are described as Solicit, Advertise, Request, and Reply. Renewals are processed with Renew and Reply.
* Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network.
* DNS distributes the responsibility of assigning domain names and mapping those names to IP addresses. Authoritative name servers are assigned to be responsible for their particular domains, and in turn can assign other authoritative name servers for their sub-domains.
* Caching DNS servers cache DNS queries and perform recursive queries to improve efficiency, reduce DNS traffic across the Internet, and increase performance in end-user applications.
* Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.
* NTP is intended to synchronize all participating computers to within a few milliseconds of Coordinated Universal Time (UTC).
* Network address translation (NAT) is a methodology of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) datagram packet headers while they are in transit across a traffic routing device.
* To assign a dynamic IP address to an interface, use the ip address dhcp command.
* To release a dynamic IP address, use the release dhcp command.
* To renew a dynamic IP address, use the renew dhcp command.
* To enable IP Domain Name System (DNS)-based hostname-to-address translation, use the ip domain lookup command in global configuration mode.
* To specify one or more hosts (up to six) that can function as a name server to supply name information for the DNS, use the ip name-server command in global configuration mode.
* To enable the Domain Name System (DNS) server on a router, use the ip dns server command in global configuration mode.
* To specify the IP addresses that the DHCP Server should not assign to clients, use the ip dhcp excluded-address command in global configuration mode.
* To configure the DHCP address pool name and enter DHCP pool configuration mode, use the ip dhcp pool command in global configuration mode.
* To configure a subnet and mask for the newly created DHCP address pool, use the network command in DHCP pool configuration mode.
* To specify a default router for a DHCP client, use the default-router command in DHCP pool configuration mode.
* To configure a domain name string for the client, use the domain-name command in DHCP pool configuration mode.
* To configure the DNS IP servers that are available to a DHCP client, use the dns-server command in DHCP pool configuration mode.
* To change the default DHCP lease value, use the lease command in DHCP pool configuration mode.
* To display DHCP Server information, use the commands show ip dhcp pool <name>, show ip dhcp binding, and show ip dhcp server statistics in EXEC mode, as needed.
* To display the time and date from the system software clock, use the show clock EXEC command.
* To allow the software clock to be synchronized by a Network Time Protocol (NTP) time server, use the ntp server command in global configuration mode.
* To show the status of Network Time Protocol (NTP) associations, use the show ntp associations EXEC command.
* To designate that traffic originating from or destined for the interface is subject to Network Address Translation ( NAT), use the ip nat command in interface configuration mode.
* To enable Network Address Translation (NAT) of the inside source address, use the ip nat inside source command in global configuration mode.
* To define a pool of IP addresses for Network Address Translation (NAT) translations, use the ip nat pool command in global configuration mode.
* To define a standard IP access list, use the standard version of the access-list command in global configuration mode.

## Key Terms
### inside global

    A legitimate IP address assigned by the NIC or service provider that represents one or more inside local IP addresses to the outside world.

### inside local

    The IP address assigned to a host on the inside network.

### NAT overload

    Allows NAT to translate multiple inside devices to a single address in the pool.

### outside global

    The IP address assigned to a host on the outside network by the host owner.

### outside local

    The IP address of an outside host as it appears to the inside network.

### PAT

    Address translation using only one or a few external addresses to support multiple internal addresses. Also see NAT overload.

### stateful DHCPv6

    Enables DHCP servers to pass configuration parameters, such as IPv6 network addresses, to IPv6 nodes.

### stateless DHCPv6

    Uses stateless autoconfiguration (SLAAC) to assign one or more IPv6 addresses to an interface, while it utilizes DHCPv6 to receive additional parameters which may not be available through SLAAC.

### Stateless Address Autoconfiguration (SLAAC)

    A method by which a node automatically creates a link-local address with the prefix fe80::/64 on each IPv6-enabled interface, even if globally routable addresses are manually configured or obtained through configuration protocols.

## Review Questions

* Dynamic Host Configuration Protocol is used by hosts to _____. Dynamic Host Configuration Protocol is used by hosts to request Internet Protocol parameters from a network server.
* DHCPv4 operations fall into four basic phases: _____. These points are often abbreviated as _____. DHCPv4 operations fall into four basic phases: IP discovery, IP lease offer, IP request, and IP lease acknowledgement. These points are often abbreviated as DORA (Discovery, Offer, Request, Acknowledgement).
* DHCPv4 options provided to clients include _____. DHCPv4 options provided to clients include subnet mask, router (default gateway), domain name server, domain name, lease time, renewal time (T1), rebinding time (T2), and others.
* Network links without a DHCP server can use _____ to receive messages from DHCP clients and forward them to DHCP servers. Network links without a DHCP server can use DHCP relay agents to receive messages from DHCP clients and forward them to DHCP servers. DHCP servers send responses back to the relay agent, and the relay agent then sends these responses to the DHCP client on the local network link.
* DHCPv6 operations are similar to DHCPv4, but are described as _____. DHCPv6 operations are similar to DHCPv4, but are described as Solicit, Advertise, Request, and Reply.[26] Renewals are processed with Renew and Reply.
* Domain Name System (DNS) is _____. Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network.
* DNS distributes _____. Authoritative name servers are _____. DNS distributes the responsibility of assigning domain names and mapping those names to IP addresses. Authoritative name servers are assigned to be responsible for their particular domains, and in turn can assign other authoritative name servers for their sub-domains.
* Caching DNS servers _____. Caching DNS servers cache DNS queries and perform recursive queries to improve efficiency, reduce DNS traffic across the Internet, and increase performance in end-user applications.
* Network Time Protocol (NTP) is _____. Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.
* NTP is intended to synchronize all participating computers to _____. NTP is intended to synchronize all participating computers to within a few milliseconds of Coordinated Universal Time (UTC).
* Network address translation (NAT) is _____. Network address translation (NAT) is a methodology of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) datagram packet headers while they are in transit across a traffic routing device.
* To assign a dynamic IP address to an interface, use _____. To assign a dynamic IP address to an interface, use the ip address dhcp command.
* To release a dynamic IP address, use _____. To release a dynamic IP address, use the release dhcp command.
* To renew a dynamic IP address, use _____. To renew a dynamic IP address, use the renew dhcp command.
* To enable IP Domain Name System (DNS)-based hostname-to-address translation, use _____. To enable IP Domain Name System (DNS)-based hostname-to-address translation, use the ip domain lookup command in global configuration mode.
* To specify one or more hosts (up to six) that can function as a name server to supply name information for the DNS, use _____. To specify one or more hosts (up to six) that can function as a name server to supply name information for the DNS, use the ip name-server command in global configuration mode.
* To enable the Domain Name System (DNS) server on a router, use _____. To enable the Domain Name System (DNS) server on a router, use the ip dns server command in global configuration mode.
* To specify the IP addresses that the DHCP Server should not assign to clients, use _____. To specify the IP addresses that the DHCP Server should not assign to clients, use the ip dhcp excluded-address command in global configuration mode.
* To configure the DHCP address pool name and enter DHCP pool configuration mode, use _____. To configure the DHCP address pool name and enter DHCP pool configuration mode, use the ip dhcp pool command in global configuration mode.
* To configure a subnet and mask for the newly created DHCP address pool, use _____. To configure a subnet and mask for the newly created DHCP address pool, use the network command in DHCP pool configuration mode.
* To specify a default router for a DHCP client, use _____. To specify a default router for a DHCP client, use the default-router command in DHCP pool configuration mode.
* To configure a domain name string for the client, use _____. To configure a domain name string for the client, use the domain-name command in DHCP pool configuration mode.
* To configure the DNS IP servers that are available to a DHCP client, use _____. To configure the DNS IP servers that are available to a DHCP client, use the dns-server command in DHCP pool configuration mode.
* To change the default DHCP lease value, use _____. To change the default DHCP lease value, use the lease command in DHCP pool configuration mode.
* To display DHCP Server information, use the commands _____, _____, and _____ in EXEC mode, as needed. To display DHCP Server information, use the commands show ip dhcp pool <name>, show ip dhcp binding, and show ip dhcp server statistics in EXEC mode, as needed.
* To display the time and date from the system software clock, use _____. To display the time and date from the system software clock, use the show clock EXEC command.
* To allow the software clock to be synchronized by a Network Time Protocol (NTP) time server, use _____. To allow the software clock to be synchronized by a Network Time Protocol (NTP) time server, use the ntp server command in global configuration mode.
* To show the status of Network Time Protocol (NTP) associations, use _____. To show the status of Network Time Protocol (NTP) associations, use the show ntp associations EXEC command.
* To designate that traffic originating from or destined for the interface is subject to Network Address Translation ( NAT), use _____. To designate that traffic originating from or destined for the interface is subject to Network Address Translation ( NAT), use the ip nat command in interface configuration mode.
* To enable Network Address Translation (NAT) of the inside source address, use _____. To enable Network Address Translation (NAT) of the inside source address, use the ip nat inside source command in global configuration mode.
* To define a pool of IP addresses for Network Address Translation (NAT) translations, use _____. To define a pool of IP addresses for Network Address Translation (NAT) translations, use the ip nat pool command in global configuration mode.
* To define a standard IP access list, use _____. To define a standard IP access list, use the standard version of the access-list command in global configuration mode.

## Assessments

* Flashcards: Quizlet: CCENT - Network Services
* Quiz: Quizlet: CCENT - Network Services

## See Also

* Computer Networks/Installation and Configuration/DHCP Concepts
* Internet Protocol Analysis/Address Assignment