Manually Set IP Address Version 4

Utility

Today, Internet Protocol (IP) address version 4 is majorly used between computer communication over the network. However, most common people does not know that IP address is set on the network interface and not in the core system of the computer. For example, a laptop can have two IP address, one is on the cable and one is on the WiFi. This article guides users in setting IP address manually which can be for:

Short Description

Set Up IP Address Manually

Windows GUI

Go to control panel
Go to control panel.
Click Network and Internet
Click Network and Internet.
Click Network and Sharing Center
Click Network and Sharing Center.
Change Adapter Setting
Change Adapter Setting.
Choose a connection, right click, and properties
Choose a connection, right click, and properties.
Open Internet Protocol
Open Internet Protocol.
Use Following
Use Following.

Windows Command Line

Using command prompt (CMD):

    netsh interface show interface
    netsh interface ip set address "[chosen interface]" static [ip address] [subnet mask] [gateway] [metric]
    netsh interface ipv4 set dns name=”[YOUR INTERFACE NAM]” static [DNS SERVER], for example:
    netsh interface ip set address "Ethernet" static 192.168.100.25 255.255.255.0 192.168.100.1 1
    netsh interface ipv4 set dns name=”8.8.8.8” static Ethernet

Linux GUI (Debian)

Go to settings or straight to network manager
Go to settings or straight to network manager.
Go to WiFi or Network
Go to WiFi or Network.
Go to Identity and Choose a Network Interface
Go to Identity and Choose a Network Interface.
Go to IP, choose manual, and input addresses
Go to IP, choose manual, and input addresses.
Scroll down and set DNS also routes if necessary
Scroll down and set DNS also routes if necessary.
go to security
If necessary, go to security.

Linux Command Line (Debian)

Using ifconfig:

    sudo ifconfig [interface] [ip address] netmask [subnet mask] up
    route add default gw [IP-ADDRESS] [INTERFACE-NAME], for example
    sudo ifconfig eth0 192.168.100.22 netmask 255.255.255.0 up
    route add default gw 192.168.100.1 eth0

Using ip:

    sudo ip addr add [ip address]/[netmask id] dev [interface]
    sudo ip route add default via [gateway], for example
    sudo ip addr add 192.168.100.22/24 dev eth0
    sudo ip route add default via 192.168.100.1

For DNS, edit /etc/resolve.conf:

    nameserver 8.8.8.8

Mirrors