cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
648
Views
5
Helpful
5
Replies

static Address in DHCP

Hiko
Level 1
Level 1

Hi

if I configure dhcp on router after I configure and switchport port-security on switch  fastethernet 0/1

interface fastethernet0/1

switchport access vlan 10

switchport mode access

switchport port-security

switchport port-security maximum 2

switchport port-security violation restrict

switchport port-security aging time 120

for exmaple my PC1 get 192.168.1.10 ip address on dhcp server  after i add other PC2 to this port (fastethernet0/1) i will get 192.168.1.11  ip address  again i back Pc1 to this port (fastethernet0/1) my pc1 will get new ip address or again will take 192.168.1.10 ?

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

What DHCP Server you are using, if you using MS DHCP Server, depends on Lease time you have setup.

 

If you  requirement  is to get all the time same IP address for PC1 and PC2, reserve the IP address so all the time PC1 and PC2 get same IP address

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

5 Replies 5

Hello,

 

the PC originally connected will retain its IP address, 192.168.1.10. That is with the Cisco IOS DHCP server. You will have to test if this works the same with other external 3rd party DHCP servers...

I am using dhcp on router so but i wan get same ip address everytime

If you using Cisco device as DHCP Server, then you need to do  Configuring DHCP Static Mapping.

 

Below document will help you for that.

 

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-server.html#GUID-BCEB43D4-8C44-4C86-BBAA-6B977196D35C

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

 

I tested your setup on an IOS device, as stated the original IP address is retained when you reconnect the PC...I did not configure any sort of mapping or reservation. 


@Hiko wrote:
I am using dhcp on router so but i wan get same ip address everytime

 

balaji.bandi
Hall of Fame
Hall of Fame

What DHCP Server you are using, if you using MS DHCP Server, depends on Lease time you have setup.

 

If you  requirement  is to get all the time same IP address for PC1 and PC2, reserve the IP address so all the time PC1 and PC2 get same IP address

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card