How to check IP address at startup?

Ask a Question related to Mac Networking, Design and Development.

  1. #1

    Default How to check IP address at startup?

    My OS X 10.1.5 sometimes gets an incorrect IP from the DHCP on my DI-604
    router. In binary, the address looks sort of, but not quite, like a
    correct address that has been bit-shifted--a few bits (not at the
    shift-in end of the address) don't match as well.

    Is there a way I could have an AppleScript script examine the IP address
    and make sure that the three leftmost bytes of the address are correct?

    Galen

    --
    Galen Tackett

    *** To e-mail me just remove the spam from my address
    Galen Tackett Guest

  2. Similar Questions and Discussions

    1. Spell Check and Grammer Check
      Hello, Does anybody know about some good spell checker/grammer checker for html/asp pages? Thank you, Regards, Raj.
    2. Turning off Check in / Check out feature
      How can I turn off the check in / check out feature? Can't seem to find it in the Contribute HELP. Thanks!
    3. Check to see if Check Boxes are Checked
      How do I check to see if a checked box is check on the following page? This is what I have. What am I doing wrong? <%If...
    4. startup ...
      Hello, I noticed there are folders like: /etc/rc0.d /etc/rc1.d /etc/rc2.d .. .. ..
    5. site check address
      http://www.klp.biz/roberts/index.html Referring URLs http://www.klp.biz/roberts/index.html
  3. #2

    Default Re: How to check IP address at startup?

    In article
    <gspamtackett-FFEF97.16513208102003@news.comcast.giganews.com>,
    Galen Tackett <gspamtackett@yahoo.com> wrote:
    > My OS X 10.1.5 sometimes gets an incorrect IP from the DHCP on my DI-604
    > router. In binary, the address looks sort of, but not quite, like a
    > correct address that has been bit-shifted--a few bits (not at the
    > shift-in end of the address) don't match as well.
    >
    > Is there a way I could have an AppleScript script examine the IP address
    > and make sure that the three leftmost bytes of the address are correct?
    >
    > Galen
    What does the address look like in dotted decimal notation? If it
    starts with '169' it probably indicates that the DHCP server isn't
    supplying an address and the OS is generating one for use in a strictly
    local LAN.

    --
    Tom Stiller

    PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
    7BDA 71ED 6496 99C0 C7CF
    Tom Stiller Guest

  4. #3

    Default Re: How to check IP address at startup?

    On 2003-10-08, Galen Tackett <gspamtackett@yahoo.com> wrote:
    > My OS X 10.1.5 sometimes gets an incorrect IP from the DHCP on my DI-604
    > router. In binary, the address looks sort of, but not quite, like a
    > correct address that has been bit-shifted--a few bits (not at the
    > shift-in end of the address) don't match as well.
    Sounds very suspicious.

    > Is there a way I could have an AppleScript script examine the IP address
    It's easy with a shell script. One way would be:

    ifconfig en0 | grep inet | awk '{print $2}'

    assuming the default ethernet interface. This will give you the
    address in standard dotted form: a.b.c.d.







    Hugh Wolf Guest

  5. #4

    Default Re: How to check IP address at startup?

    On 2003-10-09, Hugh Wolf <hwolf@deutsches.lieder.de> wrote:
    > ifconfig en0 | grep inet | awk '{print $2}'
    Even easier: ipconfig getifaddr en0

    Hugh Wolf Guest

  6. #5

    Default Re: How to check IP address at startup?

    In article
    <tomstiller-57A690.17434708102003@news.comcast.giganews.com>,
    Tom Stiller <tomstiller@comcast.net> wrote:
    > In article
    > <gspamtackett-FFEF97.16513208102003@news.comcast.giganews.com>,
    > Galen Tackett <gspamtackett@yahoo.com> wrote:
    >
    > > My OS X 10.1.5 sometimes gets an incorrect IP from the DHCP on my DI-604
    > > router. In binary, the address looks sort of, but not quite, like a
    > > correct address that has been bit-shifted--a few bits (not at the
    > > shift-in end of the address) don't match as well.
    > >
    > > Is there a way I could have an AppleScript script examine the IP address
    > > and make sure that the three leftmost bytes of the address are correct?
    > >
    > > Galen
    >
    > What does the address look like in dotted decimal notation? If it
    > starts with '169' it probably indicates that the DHCP server isn't
    > supplying an address and the OS is generating one for use in a strictly
    > local LAN.
    You hit the nail on the head, Tom. Thanks for the information!

    Thanks, also, Hugh, for your help.

    And the next question is (if you care to take it on):

    The DI604 log shows it assigning an address to my Mac. Why might the Mac
    not see it? (This is merely intermittent so it's hard to use something
    like tcpdump to watch what's happening.)

    My home network runs on Siemens SpeedStream HomePlug and apart from this
    has been extremely reliable and fast.

    Thanks again!

    --
    Galen Tackett

    *** To e-mail me just remove the spam from my address
    Galen Tackett Guest

  7. #6

    Default Re: How to check IP address at startup?

    In article
    <gspamtackett-E607E4.17002109102003@news.comcast.giganews.com>,
    Galen Tackett <gspamtackett@yahoo.com> wrote:
    > In article
    > <tomstiller-57A690.17434708102003@news.comcast.giganews.com>,
    > Tom Stiller <tomstiller@comcast.net> wrote:
    >
    > > In article
    > > <gspamtackett-FFEF97.16513208102003@news.comcast.giganews.com>,
    > > Galen Tackett <gspamtackett@yahoo.com> wrote:
    > >
    > > > My OS X 10.1.5 sometimes gets an incorrect IP from the DHCP on my DI-604
    > > > router. In binary, the address looks sort of, but not quite, like a
    > > > correct address that has been bit-shifted--a few bits (not at the
    > > > shift-in end of the address) don't match as well.
    > > >
    > > > Is there a way I could have an AppleScript script examine the IP address
    > > > and make sure that the three leftmost bytes of the address are correct?
    > > >
    > > > Galen
    > >
    > > What does the address look like in dotted decimal notation? If it
    > > starts with '169' it probably indicates that the DHCP server isn't
    > > supplying an address and the OS is generating one for use in a strictly
    > > local LAN.
    >
    > You hit the nail on the head, Tom. Thanks for the information!
    >
    > Thanks, also, Hugh, for your help.
    >
    > And the next question is (if you care to take it on):
    >
    > The log shows it assigning an address to my Mac. Why might the Mac
    > not see it? (This is merely intermittent so it's hard to use something
    > like tcpdump to watch what's happening.)
    >
    > My home network runs on Siemens SpeedStream HomePlug and apart from this
    > has been extremely reliable and fast.
    >
    I can't ay for sure, but my guess would be that the DI604 isn't
    responding before the Mac gives up. Depending on the model of Mac
    and/or router characteristics, there may be too much time lost
    negotiating the link speed.

    I moved up to Jaguar as soon as it was released and so, don't have
    anything running 10.1.x to experiment with :-(

    --
    Tom Stiller

    PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
    7BDA 71ED 6496 99C0 C7CF
    Tom Stiller Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139