View Single Post
Old 07-18-06, 09:15 PM   #24 (permalink)
compu_d00d
Aximsite Prospect
 
Join Date: Jul 2006
Posts: 1
Thanked 0 Times in 0 Posts
what's really going on...

hi, allow me to clear this one up....

...what microsoft has done, imho, is programmer-lazy. you see, microsoft (and other vendors) wrote their tcp/ip stack such that, whenever an adapter is configured to "obtain address from the server" (which is achieved via "dhcp -- 'd'ynamic 'h'ost 'c'onfiguration 'p'rotocol), it sends out a request for a new IP address, and waits....waits.....waits.... if it "times out" (ie, has waited for a predetermined amount of time without getting a response), it "self-assigns" an IP, usually in the 169.x.y.z range... this range is set aside by the IANA ('i'nternet 'a'ssigned 'n'umbers 'a'uthority) for just that purpose.

so, it turns out that *any* microsoft adapter set to obtain its ip address "from host" or "dynamically" will self-assign the ip: 169.254.2.1, if it times-out while waiting for an ip...

...so, what the clever programmers at microsoft did, knowing this fact, is design the activeSync software running on the host pc to give *itself* the ip address 169.254.2.2; then, when the pocketPC is connected (with its adapter in the 'default' mode of 'dynamically-assigned ip'), it will eventually time-out, self-assign the ip 169.254.2.1, and then, voila! it will 'see' the activeSync system, configured at 169.254.2.2...

...now the activeSync software is 'clever', in that it uses a "virtual adapter" to allow itself to have an ip address *INDEPENDENT* of the ip address of the internet connection in use by the host PC on which it runs... this way, even *if* the host pc is not actively connected to the internet, an "intranet" connection, between the activesync software and the pocketpc device being sync'd, can exist...

...of course, if you tell the activesync software that 'this computer connects to the internet', what it'll do is forward all traffic on its virtual 169.254.2.2 adapter to the 'real' internet adapter, thereby allowing the pocketpc-activesync connection to be 'proxied' to the actual internet connection... pretty clever, eh?

the LAZY part is that, the programmers take advantage of the fact that all microsoft adapter set to configure via DHCP will self-assign the same ip, after a suitable timeout (by the way, this is why this solution will work if you sync between computers, *assuming* each computer's activesync software is left to default params of 169.254.2.2, *and* that the pocketpc device in question is left to auto-configure via dhcp)

the Right Way would have been to make a 'mini dhcp server' inside of the activesync software itself; this would allow a *much* faster ip-acquisition (and thus network communication) time for the pocketpc-activesync connection, speeding up the sync itself (because the syncing occurs through the same pocketpc-activesync intranet connection)


whew... sorry, that was rather long-winded, but i wanted everyone to understand really what's going on...


...oh, one final thing: because of the default behavior of activesync, the pocketpc will still popup an alert about 'could not find server...', because it does that whenever it has to self-assign an ip; however, the internet (and sync) connection will still work, as others have noted here....

any other questions/thoughts (microsoft engineers, are you listening? hehe), please post 'em, i'll do my best to answer! :)

compu_d00d.
compu_d00d is offline   Reply With Quote