No device can communicate over a network without a valid IP address. Usually, DHCP server is providing Internet Protocol address to computers connected to the network. However, in certain cases, we must assign a static IP address to a PC by our self. There are different ways to assign it to a PC but the easiest method is the DOS method. There is a DOS prompt command to set a static IP address on a Windows computer. This tutorial explains how to configure static IP address from Command Prompt and explain the procedure with a practical example. At the end of this tutorial, you can see how to perform the same procedure in MAC.
This is the theoretical explanation of configuring a logical address on a laptop without the help of a DHCP server. Now let us check a practical example to learn it.
Here I am going to assign Permanent logical number 192.168.42.1 to my computer with default gateway 192.168.42.129 and subnet mask 255.255.255.0
You cannot release and renew static IP by using ipconfig/release. There is another DOS Prompt command to release static IP address set on a computer. To learn more about it, visit the link below.
Configure Automatic Logical Addressing From Command Prompt
New Topics
Steps to Assign Static IP To Any Interface From Command Prompt
- Start MS-DOS as Administrator
You must start the command prompt as administrator to set static Internet Protocol number on your computer from the command prompt. On Start menu, right click on cmd and click run as administrator. To learn more about it, visit the link below.
Run DOS As Administrator - Type the following command on DOS window.
netsh interface ip set address name="[Interface Name]" static [IP Address] [Subnet Mask] [Default Gateway] - Press Enter
This is the theoretical explanation of configuring a logical address on a laptop without the help of a DHCP server. Now let us check a practical example to learn it.
Practical Explanation
Here I am going to assign Permanent logical number 192.168.42.1 to my computer with default gateway 192.168.42.129 and subnet mask 255.255.255.0
- Check current Addressing using ipconfig
Here make note of the current default gateway and most importantly the Interface name. - Type the command
netsh interface ip set address name="Local Area Connection 2" static 192.168.42.1 255.255.255.0 192.168.42.129 and press enter. - Check the current addressing with the command ipconfig
How to Release Static IP From Command Prompt
You cannot release and renew static IP by using ipconfig/release. There is another DOS Prompt command to release static IP address set on a computer. To learn more about it, visit the link below.
Configure Automatic Logical Addressing From Command Prompt
How to Assign Static IP on MAC OS
- Click the Apple menu(upper right-hand corner of the screen)
- From the menu select System Preferences
- On System Preferences window click on Network
- On the Network select the following
Location = Automatic
Show = Built-in Ethernet - Select manual option for Configure IPv4
Related Topics
- How to Activate Disabled Adapter on your computer
- How to Track a Chat User and find the location
- How to Use Netstat Command
New Topics