Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5


[TUT] Setting a static internal IP (Windows and Linux)
08-07-2010, 07:17 PM (This post was last modified: 03-10-2010 02:59 PM by howtothings.)
Post: #1
[TUT] Setting a static internal IP (Windows and Linux)
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.


[Image: engrish25.png]
Reply



Forum Jump:


User(s) browsing this thread: 1 Guest(s)