You need to set a static IP.
Run the following, and note down the netmask and gateway:
/etc/network/interfaces, and, assuming your NIC is
eth0, add the IP, netmask and gateway addresses noted earlier:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address xxx.xxx.xxx.xxx # enter your IP address
ipconfig command in Command Prompt to get the default gateway and netmask.
Open Network Connections
Right-click the network connection you want to configure, and then click Properties.
On the General tab (for a local area connection) or the Networking tab (all other connections), click the Internet Protocol (TCP/IP) component, and then click Properties.
Click Use the following IP address for a local area connection, in IP address, Subnet mask, and Default gateway, type the IP address, subnet mask, and default gateway addresses.
Click Use the following DNS server addresses.
In Preferred DNS server and Alternate DNS server, type the primary and secondary DNS server addresses. This is usually the same as your default gateway
If you need to do something more advanced here's the official howto for Windows and a howto for Linux.