Why do computers on a LAN have to use same class IP? Is there any way (in Windows XP) to network two computers with different IP class? (Eg.10.0.0.1 and 192.168.0.1)?
I think this will work if you change your netmask to 0.0.0.0.
The 192.168.x.x group of IP addresses, among others, are reserved for LAN use - you won’t find any addresses of that form on the actual Internet. While you could assign any IP address you want to a computer on your LAN, if the address you assign happens to match an Internet server it could create problems.
10.0.x.x is among those addresses.
To expand on what the others said: computers communicating with the IP protocol distinguish between
[list=a]
[li]computers on the local subnet (their addess, bitwise AND the netmask, equals the computer’s own address, bitwise AND the netmask)[/li][li]computers on other networks[/li][/list]
If the computer determines the other computer is on the local subnet, it communicates directly with it. For all other addresses, it assumes that the path to the other computer is via a router.
So, computer 10.0.0.1 can communicate with computer 192.168.0.1 iff
[list=a]
[li]the netmask is set to 0.0.0.0 (i.e. the whole IP address space is in the local subnet). But: this prevents the local computers from communicating with Internet servers because the local computers assume the Internet servers are on the local network, which they are not in fact.[/li][li]or: the router connecting the local subnet to the Internet is set up to route between 10.0.0.1 and 192.168.0.1, both connected to its local network port.[/li][/list]
If you’re able to manually alter your routing tables as is possible in Unix-based operating systems, I believe you could set it up to talk to another subnet locally. I’m sure it violates an IEEE (or whoever makes them) standard or two, but it could be possible.