Find the answer to your Linux question:
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.
  1. #1
    Just 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

  2. #2
    Just 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?

  3. #3
    Just 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}'

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •