Lab 11: DHCP

DHCP Server

 DHCP Server
    -----
   | R1  |
    -----
  f0/0│  .254
      │
      │  192.168.1.0/24
      │
     __  _
    [__]|=|
    /++/|_|

   DHCP Client
R1(config)#service dhcp
R1(config)#ip dhcp pool LAN_A
R1(dhcp-config)#network 192.168.1.0 /24 
            or network 192.168.1.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.1.254
R1(dhcp-config)#dns-server 4.2.2.2 8.8.8.8
R1(dhcp-config)#lease 0 1 30 ! ( d  h m )
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
R1(config)#ip dhcp excluded-address 192.168.1.254

R1#show ip dhcp pool
R1#show ip dhcp binding
R1#clear ip dhcp binding *

DHCP with MAC

  DHCP Server
    -----
   | R1  |
    -----
  f0/0│  .254
      │
      │  192.168.1.0/24
      │
     __  _
    [__]|=|
    /++/|_|
    PC 1
   DHCP Client
MAC : 00:11:22:33:44:55

R1(config)#ip dhcp pool HOSTA
R1(dhcp-config)#host 192.168.1.100 /24
R1(dhcp-config)#client-identifier 0100.1122.3344.55 

! ( 01 : Ethernet , MAC : 00:11:22:33:44:55)

R1(dhcp-config)#default-router 192.168.1.254
R1(dhcp-config)#dns 4.2.2.2

DHCP Agent

	DHCP Agent     12.1.1.0/24

   ----------  .1       f0/1 ----------
  | Router 1 |───────────── | Router 2 |
   ----------   f0/1         ----------
   f0/0 │  .254         .2
        │                     DHCP Server
        │    192.168.1.0/24
     .1 │
       __  _
      [__]|=|
      /++/|_|
       PC A

  DHCP Client
! DHCP Server

R2(config)#service dhcp
R2(config)#ip dhcp pool LAN_A
R2(dhcp-config)#network 192.168.1.0 /24 
            or network 192.168.1.0 255.255.255.0
R2(dhcp-config)#default-router 192.168.1.254
R2(dhcp-config)#dns-server 4.2.2.2 8.8.8.8
R2(dhcp-config)#lease 0 1 30 ! ( d  h m )
R2(dhcp-config)#exit

R2(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
R2(config)#ip dhcp excluded-address 192.168.1.254


! DHCP Agent
	
R1(config)#service dhcp
R1(config)#inter f0/0
R1(config-if)#ip helper-address 12.1.1.2

! Static Route
R2(config)#ip route 192.168.1.0 255.255.255.0 12.1.1.1