Test for IP address change?

G

Guest

My server is connected to the internet via a dlink adsl modem. The modem
connects to the internet and then assigns the static ip address to the
network card on my server using it's own DHCP. This all works fine until
there is a glitch on the adsl line. The modem then assigns a 192.168 address
to the network card and the internet becomes unavailable.
If I repair the network connection it regains the static ip address from the
modem.

I would like to have a scheduled task which checks the IP address, and if it
has changed to a 192.168 address, then force a repair of the network
connection. Is there a way of doing this?

Confinguring the network card directly with the static IP address doesn't
work.
 
P

Pegasus \(MVP\)

Hoof Hearted said:
My server is connected to the internet via a dlink adsl modem. The modem
connects to the internet and then assigns the static ip address to the
network card on my server using it's own DHCP. This all works fine until
there is a glitch on the adsl line. The modem then assigns a 192.168 address
to the network card and the internet becomes unavailable.
If I repair the network connection it regains the static ip address from the
modem.

I would like to have a scheduled task which checks the IP address, and if it
has changed to a 192.168 address, then force a repair of the network
connection. Is there a way of doing this?

Confinguring the network card directly with the static IP address doesn't
work.

It seems strange that you cannot assign a static IP address to your
server.

Anyway, here is a batch file that will check your server IP address:

@echo off
ipconfig | find /i "IP Address" | find "192.168" || goto :eof

c:\tools\RepairNetworkConnection.exe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top