suresh.bonala
July 3rd, 2006, 09:56 AM
Hi All,
I wrote a server program using tcp sockets.my server listens on a particular IP address and port number when it comes up.
I made this program as a windows service ,which starts automatically when ever windows bootsup.
During start up my program gets all the IP addresses on that machine and opens socket(particular port say 7000) on all the IPs.
suppose the machine has 2 IPs,then there will be 2 socket opened.
ex:
tcp 10.78.118.90:7000 LISTEN
tcp 10.78.118.91:7000 LISTEN
one day i observed a strange problem,my server is listening on a junk IP which is not on that machine.
i analysed the problem and guessed it may be due to the follwoing reason.
may be my service started before DHCP client gets IP address from DHCP server.i came to know that each ethernet interface holds a junk IP address before it gets actual IP address from DHCP server.thats how i concluded that my service started listening on junk IP address.
this is my analysis,i dont know i am right or wrong.
I want to know wheather all user services(services registered by users like my program) comes up after windows services comes up or there is no dependency betwen services.
if i make my service dependent on DHCP client service,can it resolve this problem?
i dont know how to resolve this problem pls help me .
Any help is appriciated...
Thanks in Advance.
Suresh B
I wrote a server program using tcp sockets.my server listens on a particular IP address and port number when it comes up.
I made this program as a windows service ,which starts automatically when ever windows bootsup.
During start up my program gets all the IP addresses on that machine and opens socket(particular port say 7000) on all the IPs.
suppose the machine has 2 IPs,then there will be 2 socket opened.
ex:
tcp 10.78.118.90:7000 LISTEN
tcp 10.78.118.91:7000 LISTEN
one day i observed a strange problem,my server is listening on a junk IP which is not on that machine.
i analysed the problem and guessed it may be due to the follwoing reason.
may be my service started before DHCP client gets IP address from DHCP server.i came to know that each ethernet interface holds a junk IP address before it gets actual IP address from DHCP server.thats how i concluded that my service started listening on junk IP address.
this is my analysis,i dont know i am right or wrong.
I want to know wheather all user services(services registered by users like my program) comes up after windows services comes up or there is no dependency betwen services.
if i make my service dependent on DHCP client service,can it resolve this problem?
i dont know how to resolve this problem pls help me .
Any help is appriciated...
Thanks in Advance.
Suresh B