Difference between revisions of "DHCP Cisco IOS"

From Teknologisk videncenter
Jump to: navigation, search
(DHCP Server example with fixed options)
Line 19: Line 19:
 
   dns-server 192.168.22.223  
 
   dns-server 192.168.22.223  
 
!  
 
!  
 +
</pre>
 +
 +
=== DHCP Server often used SHOW commands ===
 +
==== Show leased addresses ====
 +
<pre>
 +
Mercantec#show ip dhcp binding
 +
IP address      Client-ID/Hardware address Lease expiration            Type
 +
192.168.22.100  0063.5973.636f.9da6.                  Jan 25 2009 12:30 AM        Automatic
 +
192.168.22.101  0063.6c72.636f.6e38.                  Jan 25 2009 12:53 AM        Automatic
 +
192.168.22.108  0063.7e7a.636f.247f.                  Jan 25 2009 14:32 AM        Automatic
 
</pre>
 
</pre>
  

Revision as of 00:17, 3 February 2009

Computer Networking articles. Contains articles not suitable for specific categories like Category:Cisco, Category:CCNA, Category:CCNP or Category:IOS

Comment The information in this article is targeted to Cisco CCNA and CCNP curriculum, and not meant as in-depth information on all IOS

DHCP Server

IOS DHCP Servers service is installed Cisco Router IOS and not on Cisco Switch IOS.


DHCP Server example with fixed options

! 
ip dhcp excluded-address 192.168.22.1 192.168.22.99
ip dhcp excluded-address 192.168.22.200 192.168.22.255
!
ip dhcp pool STUDENTS
  network 192.168.22.0 255.255.255.0
  domain-name tekkom.dk
  default-router 192.168.22.1
  dns-server 192.168.22.223 
! 

DHCP Server often used SHOW commands

Show leased addresses

Mercantec#show ip dhcp binding
IP address       Client-ID/Hardware address	 	Lease expiration            Type
192.168.22.100   0063.5973.636f.9da6.                   Jan 25 2009 12:30 AM        Automatic
192.168.22.101   0063.6c72.636f.6e38.                   Jan 25 2009 12:53 AM        Automatic
192.168.22.108   0063.7e7a.636f.247f.                   Jan 25 2009 14:32 AM        Automatic

DHCP Client

DHCP Client simple example

interface FastEthernet0/1
  ip address dhcp

DHCP Client and Server with NAT/PAT example

ip dhcp excluded-address 192.168.22.1 192.168.22.99
ip dhcp excluded-address 192.168.22.200 192.168.22.255
!
ip dhcp pool HETH
   network 192.168.22.0 255.255.255.0
   domain-name tekkom.dk
   default-router 192.168.22.1
   dns-server 192.168.22.223
!
interface FastEthernet0/0
 description Inside. Internal LAN
 ip address 192.168.22.1 255.255.255.0
 ip nat inside
!
interface FastEthernet0/1
  description Outside: Internet connection to ISP
 ip address dhcp
 ip nat outside
!
ip nat inside source list 1 interface FastEthernet0/1 overload
!
access-list 1 permit 10.0.0.0 0.255.255.255
access-list 1 permit 172.16.0.0 0.15.255.255
access-list 1 permit 192.168.0.0 0.0.255.255