{"id":248,"date":"2015-09-11T04:27:44","date_gmt":"2015-09-11T04:27:44","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=248"},"modified":"2017-01-20T02:36:20","modified_gmt":"2017-01-20T02:36:20","slug":"ccent-6-s01-e23-routing-sdm-and-dhcp-server-configuration-pt-2","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=248","title":{"rendered":"CCENT 6 S01 E24 \u2013 Routing: SDM and DHCP Server Configuration Pt.2"},"content":{"rendered":"<h3>What is DHCP<\/h3>\n<ul>\n<li>Dynamic Host Configuration Protocol.<\/li>\n<li>Automatically assigns IP addresses to connected hosts<\/li>\n<li>Usually assigned for a limited time or as long as actively using it.<\/li>\n<li>Can be &#8220;Manually Allocated&#8221; by MAC Address, so same MAC will always get the same IP.<\/li>\n<li>DHCP Servers can be server-based or router based.<\/li>\n<ul>\n<li>Router based more reliable, less prone to crashing<\/li>\n<li>Server based generally easier and use a GUI, thus server based tend to be common.<\/li>\n<\/ul>\n<\/ul>\n<h3>DHCP Process<\/h3>\n<ol>\n<li>PC sends out a &#8220;DHCP Discover&#8221; broadcast packet.<\/li>\n<li>DHCP Server will reply with &#8220;DHCP Offer&#8221; which will contain an IP address.\u00a0 (Unicast)<\/li>\n<li>The PC will reply with a reply saying it accepts the IP (Unicast).<\/li>\n<li>The server replies with an acknowlegement and allocates the IP (Unicast).<\/li>\n<\/ol>\n<h3>Using the SDM to configure DHCP<\/h3>\n<p>Configure -&gt; Additional Tasks<\/p>\n<h3>Setting up Command Line (cli)<\/h3>\n<pre>r1(config)#ip dhcp pool POOL-NAME\r\nr1(dhcp-config)#network 172.30.2.0 255.255.255.0\r\nr1(dhcp-config)#domain-name lab.local\r\nr1(dhcp-config)#dns-server 8.8.8.8\r\nr1(dhcp-config)#default-router 172.30.2.1\r\nr1(dhcp-config)#import all\r\nr1(dhcp-config)#lease 3\r\nr1(dhcp-config)#exit\r\nr1(config)#ip dhcp exclude-addresses 172.30.2.1 172.30.2.19\r\nr1(config)#ip dhcp exclude-addresses 172.30.2.101 172.30.2.254<\/pre>\n<div class='infotube'>domain-name: sets the default domain name.  If you ping &#8216;r1&#8217; it will automatically add .lab.local to the end of the host name.<br \/>\ndns-server: define the IP of the dns server<br \/>\ndefault-router: Same as default gateway.<br \/>\nimport all: Grabs the information from the dhcp server and applies it to the server &#8211; such as the default gateway and dns servers.<br \/>\nlease: hours minutes seconds<br \/>\nip dhcp exclude-addresses: by default dhcp will hand out all IPs in the subnet.  The &#8216;exclude&#8217; command reserves<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3>To refresh the DHCP Address on a Windows PC<\/h3>\n<pre>C:\/&gt; <span style=\"color: #00ffff;\">ipconfig \/refresh<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h3>Show the addresses handed out<\/h3>\n<pre>#show ip dhcp binding<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What is DHCP Dynamic Host Configuration Protocol. Automatically assigns IP addresses to connected hosts Usually assigned for a limited time or as long as actively using it. Can be &#8220;Manually Allocated&#8221; by MAC Address, so same MAC will always get the same IP. DHCP Servers can be server-based or router based. Router based more reliable, ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=248\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2,12],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-ccent","category-networking","category-routers"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=248"}],"version-history":[{"count":10,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}