Difference between revisions of "Cisco DHCP configuration"

From Ever changing code
Jump to navigation Jump to search
Line 2: Line 2:


=== Basic DHCP config ===
=== Basic DHCP config ===
;Configure Cisco router as DHCP SERVER
  configure terminal
  configure terminal
   service dhcp
   service dhcp
Line 12: Line 13:
  ip dhcp excluded-address 192.168.100.1 192.168.100.10
  ip dhcp excluded-address 192.168.100.1 192.168.100.10
  ip dhcp excluded-address 192.168.100.240 192.168.100.255
  ip dhcp excluded-address 192.168.100.240 192.168.100.255
;Cisco router interface configured to obtain an IP Address from DHCP server
configure terminal
r1-basic(config)#int gi 0/0
r1-basic(config-if)#ip address dhcp
r1-basic(config-if)#no shutdown
r1-basic(config-if)#end
once ip is assigned you will see
*Sep  1 22:08:33.531: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up
*Sep  1 22:08:34.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up




[[Category:cisco]]
[[Category:cisco]]

Revision as of 23:13, 1 September 2013

This configuration will be applied to Cisco 1941 with EHWIC-3G-HSPA+7 card and Light Weigh Access Point.

Basic DHCP config

Configure Cisco router as DHCP SERVER
configure terminal
 service dhcp
 ip dhcp pool LMA-POOL
  network 192.168.100.0 255.255.255.0
  default-router 192.168.100.254
  dns-server 192.168.100.254 8.8.8.8
  domain-name lma.gateway
  lease 0 8 '<--- 8 hrs lease -- number represents: Days Hours Minutes ---'
ip dhcp excluded-address 192.168.100.1 192.168.100.10
ip dhcp excluded-address 192.168.100.240 192.168.100.255
Cisco router interface configured to obtain an IP Address from DHCP server
configure terminal
r1-basic(config)#int gi 0/0
r1-basic(config-if)#ip address dhcp
r1-basic(config-if)#no shutdown
r1-basic(config-if)#end

once ip is assigned you will see

*Sep  1 22:08:33.531: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up
*Sep  1 22:08:34.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up