You are on page 1of 25

Praktine tehnike rutiranja Predavanja

Prof. Mirjana Radivojevi

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DNS

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DNS

Application specified in the TCP/IP suite Means to translate human-readable names into IP addresses

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DNS configuration:Setting Up a Router to Use DNS Lookups

Your router can be configured to use DNS lookups if you wish to use the ping or traceroute commands with a host name rather than an IP address. Use these commands to do so: ip domain lookup Enables DNS-based host name-to-address translation. This command is enabled by default. ip name-server Specifies the address of one or more name servers. ip domain name Defines a default domain name that the Cisco IOS software uses to complete unqualified host names (names without a dotted-decimal domain name). Do not include the initial period that separates an unqualified name from the domain name.
Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 4

DNS configuration:Setting Up a Router to Use DNS Lookups


ip domain list Defines a list of domains, each to be tried in turn. Note: If there is no domain list, the domain name that you specified with the ip domain-name global configuration command is used. If there is a domain list, the default domain name is not used. ip ospf name-lookup Configures Open Shortest Path First (OSPF) to look up DNS names for use in all OSPF show EXEC command displays. This feature makes it easier to identify a router because the router is displayed by name rather than by its router ID or neighbor ID.

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 5

DNS example
# # # # # # # # # # # # # # # # # #

outer# show running-config Building configuration ... Current configuration : 470 bytes ! version 12.2 service timestamps debug datetime msec service timestamps log uptime no service password-encryption ! hostname Router ! ! ip subnet-zero ip name-server 192.168.1.100 !--- Configures the IP address of the name server. !--- Domain lookup is enabled by default. ! ! interface Ethernet0 ip address 192.168.1.1 255.255.255.0 !
Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 6

Implementing Advanced Cisco IOS Features: Configuring DHCP

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DHCP in an Enterprise Network

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DHCP

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

DHCP
A DHCP client may receive offers from multiple DHCP servers and can accept any one of the offers; however, the client usually accepts the first offer it receives. Additionally, the offer from the DHCP server is not a guarantee that the IP address will be allocated to the client; however, the server usually reserves the address until the client has had a chance to formally request the address. The client returns a formal request for the offered IP address to the DHCP server in a DHCPREQUEST broadcast message. The DHCP server confirms that the IP address has been allocated to the client by returning a DHCPACK unicast message to the client.

The formal request for the offered IP address (the DHCPREQUEST message) that is sent by the client is broadcast so that all other DHCP servers that received the DHCPDISCOVER broadcast message from the client can reclaim the IP addresses that they offered to the client.
Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 10

DHCP

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

The DHCP server will send to the client a DHCPNAK denial broadcast message, which means the offered configuration parameters have not been assigned, if an error has occurred during the negotiation of the parameters or the client has been slow in responding to the DHCPOFFER message (the DHCP server assigned the parameters to another client) of the DHCP server.

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

11

Dynamic Host Configuration Protocol

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

12

Dynamic Host Configuration Protocol

DHCP server offers configuration parametars: IP address MAC address Default gateway Lease IP telephony DHCP option-option 150 ( TFTP configuration of IP telephones)

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

13

Configuring DHCP Server Support


Configure a DHCP exclusion range that prevents XYZR1 from providing DHCP addresses within the reserved range of 192.l68.1.1-192.168.1.99, Creating a DHCP Exclusion Range on XYZR1 XYZR1# configure terminal XYZR1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.99 Configure the DHCP server on XYZR1, creating a DHCP address pool for the 192.168.1.0/24 subnet, ensuring the TFTP Server option (option 150) is set to the IP address of XYZR1 Creating a DHCP Pool on XYZR1 XYZR1(config)# ip dhcp pool QOSLAB XYZR1(dhcp-config)# network 192.168.1.0 255.255.255.0 XYZR1(dhcp-config)# option 150 ip 192.168.1.5 XYZR1(dhcp-config)# default-router 192.168.1.5 XYZR1(dhcp-config)# end Configure the TFTP Server option (option 150) with the IP address of XYZR1, because this is required for the phones to download their firmware image from XYZR1 when they boot up.

Configuring a DHCP Server


Router(config)#ip dhcp pool [pool name]

Enables a DHCP pool for use by hosts


Router(config-dhcp)#import all

Imports DNS and WINS information from IPCP


Router(config-dhcp)#network [network address][subnet mask]

Specifies the network and subnet mask of the pool


Router(config-dhcp)#default-router [host address]

Specifies the default router for the pool to use


Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 15

DHCP Server Configuration Example


ipdhcp database ftp://user:passwords@172.16.4.253/router-dhcp write-delay 120 ip dhcp excluded-address 172.16.1.100 172.16.1.103 ip dhcp excluded-address 172.16.2.100 172.16.2.103 ip dhcp pool 0 network 172.16.0.0/16 domain-name global.com dns-server 172.16.1.102 172.16.2.102 netbios-name-server 172.16.2.103 172.16.2.103 default-router 172.16.1.100

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

16

Importing and Autoconfiguration

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

17

DHCP Client
Router (config-if)#

ip address dhcp Enables a Cisco IOS device to obtain an IP address dynamically from a DHCP server

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

18

Helper Addressing Overview

Routers do not forward broadcasts, by default. Helper address provides selective connectivity. Relay agents receive DHCP messages and generate a new DHCP message to send out on another interface

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

19

Why Use a Helper Address?

Sometimes

clients do not know the server address. Helpers change broadcast to unicast to reach server. If configured relay agent add the relay agent information optin (option 82) in the packet and forwards it to the DHCP server

IP Helper Address Commands


Router(config-if)#

ip helper-address address

Enables forwarding and specifies destination address for main UDP broadcast packets Changes destination address from broadcast to unicast or directed broadcast address
Router(config)#

ip forward-protocol { udp [ port ] }

Specifies

which protocols will be forwarded

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

21

Multiple Servers: Remote Networks

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

22

Relay Agent Option Support

Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd

23

DHCP Verification Commands


router#

show ip dhcp database

Displays recent activity on the DHCP database


router#

show ip dhcp server statistics

Shows count information about statistics and messages sent and received
router#

show ip route dhcp

Displays routes added to the routing table by DHCP


router#

debug ip dhcp server {events | packets | linkage}

Enables debugging on the DHCP server


Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 24

Summary
DHCP

functions may be configured with Cisco IOS software. DHCP server can be configured. DHCP options can be configured. DHCP client can be configured. The IP helper address activates the DHCP relay agent in the Cisco IOS device. DHCP relay services are supported.
Praktine tehnike rutiranja, prof. Mirjana Radivojevi, RAF, Beograd 25

You might also like