Results 1 to 3 of 3
Hi, all:
Currenly, I am using freebsd. I want to detect the IP change from a specific interface. Can anyone give me an example about it? Thank you very much.
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-28-2009 #1Just Joined!
- Join Date
- Jan 2006
- Posts
- 13
IP change detection
Hi, all:
Currenly, I am using freebsd. I want to detect the IP change from a specific interface. Can anyone give me an example about it? Thank you very much.
Best Regards,
Max
- 04-28-2009 #2Just Joined!
- Join Date
- Apr 2009
- Posts
- 90
You want to detect when an ip address has changed on your machine?
usually IP addresses stay the same while they are connected, and only change on disconnect (for PPP or DHCP connections). So why not just check ifconfig then?
- 04-30-2009 #3Just Joined!
- Join Date
- Jan 2006
- Posts
- 13
Thank you Touchtecservers. I use the following command and the problem is solved.
ifconfig | grep -A3 \"%s\" | tail -n1 | awk '{print $2}'


Reply With Quote
