• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TUT] Setting a static internal IP (Windows and Linux)
#1
This is how to set an internal static IP on your home network. This is of use when you're port forwarding on a DHCP network.

Windows XP

Start
Control Panel
Network and Internet Connections
Network Connections
Right click "Local Area Connection" and click properties
In the "This connection uses the following items:" box, double click "Internet Protocol (TCP/IP).
Then select, "Use the following IP address:"
IP address: 192.168.2.100
Subnet mask: 255.255.255.0
Default gateway: 192.168.2.1

To find your DNS servers, open cmd and type "ipconfig /all"
"Use the following DNS server addresses:"
Preferred DNS server:
Alternate DNS server:

Click OK, OK then you're good to go.


Linux

Running as root

Code:
sudo su

Your main network configuration file is /etc/network/interfaces

Code:
nano /etc/network/interfaces

Find and remove the dhcp entry

Code:
iface eth0 inet dhcp

Add the new network settings

Code:
iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.254

Save and close the file, then restart the network

Code:
sudo /etc/init.d/networking restart


Defining new DNS servers

Code:
sudo nano /etc/resolv.conf

You need to remove old DNS server assigned by DHCP server:

Code:
search Belkin
nameserver 192.168.2.1

Save and close the file.


I recommend keeping a backup of the files incase something goes horribly wrong.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Part 1] Creating a domain: Installing and setting up Windows Server 2003 Mark 4 19,366 20-04-2011, 10:57 PM
Last Post: Mark

Forum Jump: