Page MenuHomeVyOS Platform

DHCP lease wont changed it's IP after creating static mac-ip mapping
Needs testing, NormalPublicBUG

Description

I've sat up the DHCP server:

# show service dhcp-server | commands
set shared-network-name LAN subnet 172.25.100.0/24 default-router '172.25.100.1'
set shared-network-name LAN subnet 172.25.100.0/24 dns-server '172.25.100.1'
set shared-network-name LAN subnet 172.25.100.0/24 domain-name 'ak-vcloud.ru'
set shared-network-name LAN subnet 172.25.100.0/24 lease '86400'
set shared-network-name LAN subnet 172.25.100.0/24 range 0 start '172.25.100.50'
set shared-network-name LAN subnet 172.25.100.0/24 range 0 stop '172.25.100.199'

After connecting first client (hostname yiv-iPhone, assigned ip is 172.25.100.50) I've created a static mapping:

set shared-network-name LAN subnet 172.25.100.0/24 static-mapping yiv-iPhone ip-address '172.25.100.30'
set shared-network-name LAN subnet 172.25.100.0/24 static-mapping yiv-iPhone mac-address '80:ed:2c:ad:16:71'

And the client got the 172.25.100.30 address.

But when I've trying to show the leases list, I've seen outdated information about the lease:

# run show dhcp server leases 
IP address     Hardware address    Lease expiration     Pool    Client Name
-------------  ------------------  -------------------  ------  -------------
172.25.100.50  80:ed:2c:ad:16:71   2018/12/18 19:23:47  LAN     yiv-iPhone

The yiv-iPhone should be 172.25.100.30, not 172.25.100.50.

BTW tell me please how to drop some leases from the list.

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rc10
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Harliff updated the task description. (Show Details)
Harliff updated the task description. (Show Details)
Harliff updated the task description. (Show Details)

As the DHCP client sometimes stores its lst IP address and sends a request for it you probably should delete the lease from the DHCP server:

run reset dhcp server lease ip <x.x.x.x.>

syncer changed the task status from Open to Needs testing.Dec 21 2018, 10:38 AM
syncer assigned this task to dmbaturin.
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.

Command was deprecated.

reset dhcp server lease ip <x.x.x.x.>
vyos@r1-roll:~$ reset 
Possible completions:
  conntrack     Reset all currently tracked connections
  conntrack-sync
                Reset connection syncing parameters
  dns           Reset a DNS service state
  firewall      reset a firewall group 
  ip
  ipoe-server   Clear ipoe-server sessions or process
  ipv6          Reset Internet Protocol version 6 (IPv6) parameters
  nhrp          Clear/Purge NHRP entries
  openvpn
  pppoe-server  Reset PPPoE server sessions
  terminal      Reset terminal
  vpn           Reset Virtual Private Network (VPN) information
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 7:01 PM