Groups | Blog | Home
all groups > dotnet compact framework > october 2007 >

dotnet compact framework : Static Ip;


tiziano fabbri
10/13/2007 12:57:00 AM
Hi guys,

I have some connection problem when I try to connect my personal FTP client,
Xp OS, to my FTP server, CE, and IP is static.

To connect I need to shutdown my application in CE, run the FTP service, it
was off, make a connection by XP, shutdown FTP service in CE, run my FTP
server and login: no exception.

Else if DHCP is enabled I haven't problem.

Some one has some idea ? I didn't add at this question the source because is
very long.

thanks, fabbrit
Paul G. Tobey [eMVP]
10/15/2007 8:08:05 AM
The servers and so on have *no* idea whether the IP addresses they are
connected to are assigned by DHCP or not. My guess is that you are not
properly assigning a subnet mask or gateway when you are assigning them
statically.

Paul T.

[quoted text, click to view]

tiziano fabbri
10/15/2007 9:15:03 AM
I Paul, thanks for your answer.

Regarding the subnet mask I'm OK, else about gateway I'don't make any
actions on CE server and Xp machine also.

I just apply a static ip for each machine and same subnet mask.

thank, fabbrit

[quoted text, click to view]
Paul G. Tobey [eMVP]
10/15/2007 9:35:45 AM
Yes, and if you set the wrong subnet mask, things won't work. The same with
gateway. You've verified that the same subnet is being assigned by you
statically as what was assigned by the DHCP server? That's not clear from
your message. Otherwise, it could be that you are not assigning DNS server
or WINS server addresses when you are statically assigning things, but the
DHCP server *is* assigning one or both of those addresses. This seems
less-likely, but I guess it's possible.

Paul T.

[quoted text, click to view]

tiziano fabbri
10/17/2007 4:31:01 AM
Hi Paul, and I'sorry for long replay time.

So, do you think that should be better to force wins and dns server anyway,
when I use static IP ?
If 'Yes' I'll found in win32 libraries some functions to do this
[iprtrmib.h, iphlpapi.h, winsock2.h] ?
Should be better before assing a static IP disable DHCP ? But assigning a
new IP DHCP is not automatically disabled or needs an imperative command to
do it ?

Regarding first part of your replay I'm sure that when I set static IP in
effect I make a change of IP and SUBNETMASK and before to esc from the method
I check that my changing is effective.

bye fabbrit

[quoted text, click to view]
Paul G. Tobey [eMVP]
10/17/2007 9:09:59 AM
[quoted text, click to view]

Sorry, I don't understand the question. When switching between DHCP and
static IP addressing, you should set the registry entries for static,
including changing the state of the EnableDHCP registry entry, the IP
address, the subnet mask, the gateway address, the DNS addresses, if any,
and the WINS addresses, if any, then REBIND the adapter. That's all it
should take.

[quoted text, click to view]

The most-likely explanation for this not working is that you've done
something wrong, so I want you to verify that the static addresses you are
setting are of the same form as the dynamically-assigned ones from DHCP.

Tell us what the settings are in both cases...

Paul T.

AddThis Social Bookmark Button