{"id":797,"date":"2013-10-24T22:54:57","date_gmt":"2013-10-24T20:54:57","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=797"},"modified":"2021-10-12T22:32:29","modified_gmt":"2021-10-12T20:32:29","slug":"run-dhcp-relay-on-a-cisco-catalyst-2960","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html","title":{"rendered":"Run a DHCP Relay on a Cisco Catalyst 2960 Switch"},"content":{"rendered":"\n<p>Having a DHCP relay on a layer 2 switch is usually a nonsense. However, a DHCP server happened to crash and I had no access to configure a new DHCP service on a remote site.<br>My only option was to set a DHCP relay on the switch that will forward requests to another site to avoid a massive change for static IP.<br>Some say layer 2 devices cannot deal with DHCP but hey, this is on the <a href=\"\/en\/category\/networking\/cisco\">Cisco<\/a> catalyst 2960 <a href=\"http:\/\/www.cisco.com\/en\/US\/prod\/collateral\/switches\/ps5718\/ps6406\/prod_presentation_c97-494780.pdf\">feature<\/a> list&#8230; I even got this to work on a LAN base image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/images\/Cisco_catalyst_dhcp_relay.png\" alt=\"Cisco catalyst DHCP relay\"\/><\/figure>\n\n\n\n<p>First I create a new scope on a Windows DHCP server hosted on the main site whose IP is 192.168.15.240.<br>&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"\/images\/Windows_DHCP_Relay_Scope.png\" alt=\"Windows DHCP Ranges\"\/><\/figure><\/div>\n\n\n\n<p><br>Here&#8217;s how I configured my Cisco 2960: Small site, one vlan (VLAN 50), all ports in the same vlan<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">interface Vlan50\n ip address 192.168.50.11 255.255.255.0\n no ip route-cache\n!\nip default-gateway 192.168.50.254\n\nservice dhcp\n\nip dhcp pool My_Dhcp_Pool\n   relay source 192.168.50.0 255.255.255.0\n   relay destination 192.168.15.240\n!<\/code><\/pre>\n\n\n\n<p>&nbsp;<br>Make sure you have the connectivity to the DHCP server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">my_switch#ping 192.168.15.240\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 192.168.15.240, timeout is 2 seconds:\n!!!!!\nSuccess rate is 100 percent (5\/5), round-trip min\/avg\/max = 33\/42\/59 ms<\/code><\/pre>\n\n\n\n<p>&nbsp;<br>The Cisco 2960 vlan interface must be configured with an appropriate IP address and netmask of course. Then it must be activated using the no shutdown command.<br>Since the switch has only one interface, it can provide IPs on a single range. I don&#8217;t think a DHCP request received on a port assigned to a different vlan would get a response, I haven&#8217;t tested it though.<br>&nbsp;<br>Disable the DHCP relay if you need it no more<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">no service dhcp<\/code><\/pre>\n\n\n\n<p>This solution can be used as a backup with just a Cisco 2960 switch acting as a DHCP relay. In most scenarios, a layer 3 hardware such as a router, or a server on the network would handle DHCP leases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having a DHCP relay on a layer 2 switch is usually a nonsense. However, a DHCP server happened to crash and I had no access to configure a new DHCP service on a remote site.My only option was to set a DHCP relay on the switch that will forward requests to another site to avoid [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[21],"tags":[388,304,99,377,364],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch<\/title>\n<meta name=\"description\" content=\"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch\" \/>\n<meta property=\"og:description\" content=\"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-24T20:54:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-12T20:32:29+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html\",\"name\":\"Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch\",\"isPartOf\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2013-10-24T20:54:57+00:00\",\"dateModified\":\"2021-10-12T20:32:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run a DHCP Relay on a Cisco Catalyst 2960 Switch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch","description":"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch","og_description":"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server","og_url":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html","og_site_name":"Netexpertise","article_published_time":"2013-10-24T20:54:57+00:00","article_modified_time":"2021-10-12T20:32:29+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html","url":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html","name":"Netexpertise - Run a DHCP Relay on a Cisco Catalyst 2960 Switch","isPartOf":{"@id":"https:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2013-10-24T20:54:57+00:00","dateModified":"2021-10-12T20:32:29+00:00","author":{"@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Configure a layer 2 Cisco 2960 Catalyst switch as a DHCP relay, that forwards requests to a Windows DHCP server","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/networking\/cisco\/run-dhcp-relay-on-a-cisco-catalyst-2960.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Run a DHCP Relay on a Cisco Catalyst 2960 Switch"}]},{"@type":"WebSite","@id":"https:\/\/www.netexpertise.eu\/en\/#website","url":"https:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/797"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=797"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/797\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}