Author Topic: [SOLVED] Release IP and Refresh IP from DHCP  (Read 11061 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
[SOLVED] Release IP and Refresh IP from DHCP
« on: July 17, 2023, 05:28:39 pm »
Hello

Can someone please refresh me the techniques to release IP address and refresh/reset the IP (on ArcaOS) to get a new IP from the DHCP?

I have some issues with my VirtualBox VM guest (Host is on Windows 10). I hibernate the ArcaOS VM from the office network,  go home and re enable it, but it does not longer has internet access until I reboot.  Is this an issue of VirtualBox?

Regards
« Last Edit: July 20, 2023, 03:53:03 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Tom

  • Full Member
  • ***
  • Posts: 212
  • Karma: +6/-0
    • View Profile
Re: Release IP and Refresh IP from DHCP
« Reply #1 on: July 17, 2023, 05:55:10 pm »
Hello

Can someone please refresh me the techniques to release IP address and refresh/reset the IP (on ArcaOS) to get a new IP from the DHCP?

I have some issues with my VirtualBox VM guest (Host is on Windows 10). I hibernate the ArcaOS VM from the office network,  go home and re enable it, but it does not longer has internet access until I reboot.  Is this an issue of VirtualBox?

Regards

Use the DHCP Monitor for that (dhcpmon.exe - to be found in \mptn\bin). After its window comes up, use the Actions menu to Request a lease or Release a lease.

Regarding your issue: I would suggest that at your office you already use "Release a lease" from within your VM, before hibernating. And at home use "Request a lease". Not sure if it would matter that the DHCP servers at your office and at your home possibly have a different IP address. It could be that  the DHCP Monitor at home tries to use the IP address for the DHCP server that is used in your office.

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 398
  • Karma: +6/-0
    • View Profile
Re: Release IP and Refresh IP from DHCP
« Reply #2 on: July 17, 2023, 11:34:35 pm »
In my experience, release/request by itself isn't generally enough if you're moving from one network to another.

My procedure to clear out the current network configuration on, say, lan0 is (I have a 'fluship' script to do this) is:

Code: [Select]
dhcpmon -t
route -f
ifconfig lan0 down
ifconfig lan0 delete
arp -f

Then (assuming I'm connected to the new network), I run mptn\bin\setup.cmd, which will start the DHCP client on lan0 with a fresh configuration.

This works well 99% of the time.  Very rarely, something of the old configuration seems to get stuck to the point that only a reboot will clear it.

Remy

  • Hero Member
  • *****
  • Posts: 766
  • Karma: +12/-1
    • View Profile
Re: Release IP and Refresh IP from DHCP
« Reply #3 on: July 18, 2023, 10:48:39 pm »
What I do under ClamAV GUI to refresh dhcp
If lan0 used

a/ ifconfig lan0 -arp
b/ ifconfig lan0 down
c/ dhcpmon -T
d/ ifconfig lan0 up
e/ ifconfig lan0 arp
f/ dhcpmon -R


Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Release IP and Refresh IP from DHCP
« Reply #4 on: July 20, 2023, 03:34:50 am »
Hi
Code: [Select]
dhcpmon -t
route -f
ifconfig lan0 down
ifconfig lan0 delete
arp -f

Then (assuming I'm connected to the new network), I run mptn\bin\setup.cmd, which will start the DHCP client on lan0 with a fresh configuration.

Alex, I was able to test it today and it worked.

On the next trip to the office I will try Remy's technique.

Thanks to all for your tips.

Regards
« Last Edit: July 20, 2023, 03:52:50 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Release IP and Refresh IP from DHCP
« Reply #5 on: July 20, 2023, 10:55:35 pm »
Hi Remy

What I do under ClamAV GUI to refresh dhcp
If lan0 used

a/ ifconfig lan0 -arp
b/ ifconfig lan0 down
c/ dhcpmon -T
d/ ifconfig lan0 up
e/ ifconfig lan0 arp
f/ dhcpmon -R

As it is, it didn't work, but if I add a "c:\mptn\bin\setup.cmd" run at the end it works for me.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Remy

  • Hero Member
  • *****
  • Posts: 766
  • Karma: +12/-1
    • View Profile
Re: Release IP and Refresh IP from DHCP
« Reply #6 on: July 22, 2023, 11:01:05 pm »
Hi Remy

What I do under ClamAV GUI to refresh dhcp
If lan0 used

a/ ifconfig lan0 -arp
b/ ifconfig lan0 down
c/ dhcpmon -T
d/ ifconfig lan0 up
e/ ifconfig lan0 arp
f/ dhcpmon -R

As it is, it didn't work, but if I add a "c:\mptn\bin\setup.cmd" run at the end it works for me.

Regards

Strange and good to know. Thanks

Roderick Klein

  • Hero Member
  • *****
  • Posts: 698
  • Karma: +14/-0
    • View Profile
Re: Release IP and Refresh IP from DHCP
« Reply #7 on: July 22, 2023, 11:10:50 pm »
Hi Remy

What I do under ClamAV GUI to refresh dhcp
If lan0 used

a/ ifconfig lan0 -arp
b/ ifconfig lan0 down
c/ dhcpmon -T
d/ ifconfig lan0 up
e/ ifconfig lan0 arp
f/ dhcpmon -R

As it is, it didn't work, but if I add a "c:\mptn\bin\setup.cmd" run at the end it works for me.

Regards

I am not certain what defines "working" . Is it considered "working" when the network card has an IP address ?
After you ran setup.cmd start dhcpmon at once and check how long it takes before your NIC card gets an IP address assigned from the DHCP server.
In some cases the DHCP client in eCS And ArcaOS can be very slow compared to other DHCP clients and it take a while before an IP addresses is assigned.

Roderick

Andi B.

  • Hero Member
  • *****
  • Posts: 873
  • Karma: +14/-2
    • View Profile
Re: [SOLVED] Release IP and Refresh IP from DHCP
« Reply #8 on: July 22, 2023, 11:47:14 pm »
Quote
DHCP client in eCS And ArcaOS can be very slow compared
I've said it on other places and do it again - the OS/2 included DHCP client is buggy especially when you're on a network with more than one DHCP server. Although it was unusual (you may say even forbidden) in the past in today's environment it's not that unusual anymore. AFAIR OS/2 DHCP client sends DHCP accept messages to the the wrong DHCP server which didn't send to offer message.

Bottom line - don't use OS/2 DHCP client. That's all about why I implemented dhclient (ISC version) to xwlan back then. Something like 'dhclient lan0' sounds like a good replacement to IBMs old DHCP client.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: [SOLVED] Release IP and Refresh IP from DHCP
« Reply #9 on: July 24, 2023, 07:56:22 pm »
Hi Andi B.

I have interest to also test your DHCP Client. Since OS/2 wifi does not work at all on my laptop I didn't notice you implemented that.
Can you give me a pointer (link) to your latest version?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: [SOLVED] Release IP and Refresh IP from DHCP
« Reply #10 on: July 25, 2023, 12:42:49 pm »
I can say this about Virtualbox and WIFI: bridged networking can be a persistent problem. I worked around this by creating a NAT network that happens to have the same network address range as my routers local network. That did the trick. And I seem to remember that a NAT network also implements a DHCP server.

Andi B.

  • Hero Member
  • *****
  • Posts: 873
  • Karma: +14/-2
    • View Profile
Re: [SOLVED] Release IP and Refresh IP from DHCP
« Reply #11 on: July 25, 2023, 03:42:04 pm »
Hi Andi B.

I have interest to also test your DHCP Client. Since OS/2 wifi does not work at all on my laptop I didn't notice you implemented that.
Can you give me a pointer (link) to your latest version?

Regards
It should be in 'yum install dhclient'. Not sure if the very latest changes are implemented as Yuri made the packages. But I don't think there has been any changes in the last years. And dhclient worked much better than OS/2 DHCP client ever did. If we ever get new wifi drivers I may look at it again.