From DSL wiki.
ifconfig eth0 xxx.xxx.x.xx
ifup eth0
is the commands you'd use.
The xxx.xxx.xxx.xxx is almost any of two numbers from private IP ranges.
http://support.microsoft.com/kb/142863
Is the common three subnets for IPv4. The subnets in these examples don't even have to be followed.
In reality if they don't have a gateway IP address or not connected to the internet, then you can use any two IP addresses you want. A gateway address would not be needed for your lan subnet just to talk between two computers.
There ways to go way beyond this too.