cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1460
Views
0
Helpful
3
Replies

Static/Reserved IP based off of MAC and/or Port # on Switch or Router?

rmorenobb
Level 1
Level 1

Hi,

I have a Cisco 2911 router and a Cisco 2960 switch at a remote location.

I have a user who will work out of this office a few days out of the week and will need to obtain the same IP address everytime the user visits this office.

This office has no file server, no dhcp server.

I have the user's MAC address and for now, the user is getting an IP address that is leased for 30 days.

I'm trying to find the best way to configure either the router or switch or both so that each time this user connects to this office, that user device will always pull the same IP address and of course no other device will use that IP.

I've did some research in creating a small vlan possibly, and assigning it specifically to the port# that the user's desk is at, but not sure if that's the best way or exactly sure how it'll work.

I'm currently studying for my CCNA so this is all new to me and I'm trying to do research and test without obviously causing production issues especially given this is a remote site and I access these devices via putty.  I can however drive to the site if needed for testing, but I'd like to have a good grasp on what method I'll be using that will work before I actually make the trip.

Any advice would be appreciated.

Thanks,

R

1 Accepted Solution

Accepted Solutions

cadet alain
VIP Alumni
VIP Alumni

Hi,

for example the IP is 192.168.1.20/24  and mac is 0000.0001.0001

1° get the client-identifier used by the host from the dynamic binding entry:

    show ip dhcp binding | i 192.168.1.20

2° you must remove the dynamic binding on the dhcp server:

-clear ip dhcp binding 192.168.1.20

3° configure the host pool:

   ip dhcp pool host1

   host 192.178.1.20 /24

   client-identifier 01xx.xxxx.xxxx.xx   or hardware-address xxxx.xxxx.xxxx  depending upon result from 1°

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

3 Replies 3

Jonn cos
Level 4
Level 4

You have to configure dhcp on the router and use dhcp bindings so that everytime user with a particular mac address will always get the same IP. Its kinda like dynamic but static IP :-).

cadet alain
VIP Alumni
VIP Alumni

Hi,

for example the IP is 192.168.1.20/24  and mac is 0000.0001.0001

1° get the client-identifier used by the host from the dynamic binding entry:

    show ip dhcp binding | i 192.168.1.20

2° you must remove the dynamic binding on the dhcp server:

-clear ip dhcp binding 192.168.1.20

3° configure the host pool:

   ip dhcp pool host1

   host 192.178.1.20 /24

   client-identifier 01xx.xxxx.xxxx.xx   or hardware-address xxxx.xxxx.xxxx  depending upon result from 1°

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Sorry for the late follow-up, but here's what's happening.

I have this in the config:

!

ip dhcp pool bloomberghost1-tmirg

   host 192.168.12.26 255.255.255.0

   hardware-address 01f0.def1.9b01.df

!

ip dhcp pool data

   network 192.168.12.0 255.255.255.0

   default-router 192.168.12.1

   dns-server 192.168.2.50 192.168.1.50

   lease 30

This is what I see on the router:

SF-RTR-01#show ip dhcp binding

Bindings from all pools not associated with VRF:

IP address         Client-ID/             Lease expiration       Type

                   Hardware address/

                   User name

192.168.12.7       01f0.def1.03a7.17       May 08 2013 06:35 PM  Automatic

192.168.12.8       01f0.def1.356d.43       May 08 2013 03:53 PM   Automatic

192.168.12.9       01f0.def1.9b01.df       May 08 2013 09:17 PM   Automatic

192.168.12.26       01f0.def1.9b01.df       Infinite               Manual

SF-RTR-01#

You’ll see the last two entries are the same hardware address, which is the user’s mac. 

For some reason, it won't assign that address the .26.  Rather it gave it an address from dhcp.  I'm researching as to why, but thought I'd post my results. 

Review Cisco Networking products for a $25 gift card