Test for IP address change?

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top