My Countingdown

Friday, December 16, 2011

Lab 1. IP Services - DHCP Server


Let’s do DHCP test. We set f0/0 in R2 using  DHCP.

R1#
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
 ip ospf 1 area 0
 no shut

R2#
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address dhcp
 ip ospf 1 area 0
 no shut

Verify interface brief in R2

R2(config-if)#do sh ip int brie
Interface                      IP-Address      OK?  Method   Status                          Protocol
FastEthernet0/0            unassigned      YES   DHCP     up                                up
FastEthernet0/1            unassigned      YES   unset        administratively down   down
Loopback0                  2.2.2.2           YES   manual      up                                up

Interface Fa0/0 R2 should get ip from R1 as DHCP server

R1#
ip dhcp excluded-address 12.12.12.1
!
ip dhcp pool TEST
   network 12.12.12.0 255.255.255.0
   domain-name cisco.com
   dns-server 12.12.12.1
   default-router 12.12.12.1

Just wait!

R2(config-if)#
*Mar  1 00:12:41.363: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 12.12.12.2, mask 255.255.255.0, hostname R2
R2(config-if)#
*Mar  1 00:12:46.495: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

Good! Now Fa0/0 in R2 got ip address from R1.
Verify DHCP in R1!

R1#show ip dhcp pool
Pool TEST :
 Utilization mark (high/low)    : 100 / 0
 Subnet size (first/next)       : 0 / 0
 Total addresses                : 254
 Leased addresses               : 1
 Pending event                  : none
 1 subnet is currently in the pool :
 Current index        IP address range                    Leased addresses
 12.12.12.3           12.12.12.1       - 12.12.12.254      1

R1#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
12.12.12.2   0063.6973.636f.2d63.    Mar 02 2002 12:12 AM    Automatic
                    3030.312e.3135.3634.
                    2e30.3030.302d.4661.
                    302f.30

Verify the IP, OSPF, and routing table in R2. Make sure can ping to loopback R1

R2(config-if)#do sh ip int brie
Interface                       IP-Address      OK? Method Status                Protocol
FastEthernet0/0            12.12.12.2      YES   DHCP   up                    up
FastEthernet0/1            unassigned       YES   unset  administratively down down
Loopback0                  2.2.2.2            YES   manual up                      up

R2(config-if)#do sh ip ospf nei 
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DR         00:00:34    12.12.12.1      FastEthernet0/0
R2(config-if)#do sh ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 12.12.12.1 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/11] via 12.12.12.1, 00:02:09, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [254/0] via 12.12.12.1

R2(config-if)#do ping 1.1.1.1 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/32/44 ms

No comments:

Post a Comment