static arp with wireless

I have 3 wireless desktops running Windows XP Pro SP2 connected to my router all with static IPs. Each computer runs a batch file at login to set static arp entries. Once or twice a day though, the desktops will lose their wireless connection for a few seconds but reconnect right away. The problem is that at each connection loss, the arp table gets flushed and the static entries are gone. Is there a way to:

A) disable the flushing of the arp table or

B) have Windows XP add the static entries back to the arp table on reconnect automatically or

C) some other trick I didn't think of? ;-)

Reply to
Batman
Loading thread data ...

Not a trick. It would be interesting to know what you're trying to accomplish by doing the job of the DHCP client. If you have a static IP address assigned on the client end, the arp table entry for your own client should be static. The problem is that the Windoze: arp -a command doesn't bother to list your own MAC address and IP address pair. It's there but well hidden. It's splattered all over: netstat -rn There's no need to set your own arp table entry with a static IP address.

If you're setting the arp table entry of the router or of other devices, if they are also statically assigned (such as the router), all you need to do is ping them to repopulate the table. This happens automatically as soon as traffic to that IP address starts. I think this is what you're asking. Just ping the IP address.

Also, If the arp table entry expires for a dynamically assigned IP address, it's up to the DHCP server to retain the lease entries. If you initiate a ping to that IP address, an ARP request packet will be issued, the DCHP server will respond, and the ARP table entry will again be repopulated.

So, why do you need to statically assign IP addresses to devices at the client? I haven't seen that for perhaps 10 years since the days of ancient print servers and bridges that didn't have an IP layer management function.

Reply to
Jeff Liebermann

There's a good reason to do that. If you were roaming between access points and wanted to retain the same IP address, then it would be necessary to flush the ARP cache every time you disconnect and reconnect. Otherwise, it will still be trying to make a connection via the old access point. I don't know if this feature can be defeated.

Dunno. It might be disconnecting simply because of lack of traffic. Have you tried some kind of keep-alive program on the clients to insure that there's enough traffic to justify a continuous connection?

Well, a simple batch file, VBS, or shell script would do trick. Something like this pseudo code.

While true: do ping internet if successful do nothing if not successful arp -s ip_address mac_address endif sleep 60 seconds done

The script tests for a working connection and replaces the arp entry if the connection is lost. The ping is kinda ugly. You can also grep the arp table listing (arp -a) to check if the correct entry is present followed by: arp -d ip_address (get rid of a bogus entry) arp -s ip_address mac_address (replace it with a correct entry)

Reply to
Jeff Liebermann

I'm doing 2 things for 2 different reasons:

1) I've setup static IPs on my PCs to enable port forwarding in my Linksys WRT54GS router to the correct PCs. 2) I've setup static arp entries on each pc to protect against arp poisoning. My problem is with #2. Static arp entries work fine on PCs that are connected directly to the router's LAN ports. It's the wireless connections that flush the arp entries everytime the connection drops. I already know how to add the entries manually using arp -s. What I need is a way to stop the arp entries from being flushed everytime my wireless PCs lose their connection for a few seconds.

Or someway for the arp entries to be re-added to the table not by pinging the router (which cannot be trusted in the case of arp poisoning) but from a text or batch or config file on my pc or maybe some registry setting. Basically any way to have Windows keep using the arp entries that I trust.

Reply to
Batman

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.