Skip to main content

How to Assign Static IP Address From Command Prompt

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 static IP address to a PC by our self. There are different ways to assign it to a PC but the easiest method is DOS method. There is a DOS prompt command to set 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 same procedure in MAC.


Steps to Assign Static IP To Any Interface From Command Prompt
  1. Start MS DOS as Administrator

    You must start command prompt as administrator to set static Internet Protocol number on your computer from 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

  2. Type the following command on DOS window.

    netsh interface ip set address name="[Interface Name]" static [IP Address] [Subnet Mask] [Default Gateway]

  3. Press Enter

This is the theoretical explanation of configuring logical address on a laptop without the help of 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
  1. Check current Addressing using ipconfig

    Here make note of the current default gateway and most importantly the Interface name.
    assign

  2. 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.

  3. Check the current addressing with the command ipconfig
    Show

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
  1. Click the Apple menu(upper right-hand corner of the screen)


  2. From the menu select System Preferences


  3. On System Preferences window click on Network


  4. On the Network select the following

    Location = Automatic
    Show     =  Built-in Ethernet


  5. Select manual option for Configure IPv4

Now you can enter the logical number you want to assign for this MAC. After entering the details click on Apply Now button to save the settings.


Related Topics
  1. How to Activate Disabled Adapter on your computer

  2. How to Track a Chat User and find location

  3. How to Use Netstat Command

New Topics

Comments

SPM said…
Just don't forget, if you mentioned GW in syntax, you should also fill in [metric] parameter!!

Recent Posts

Village Field Assistant in Kerala Revenue (123/2017) Examination

PSC has notified examination for the post Village Field Assistant in Kerala Revenue Department. Category number of the notification is 123/2017. According to this notification, anyone who has passed 10th Standard and having cycling skill can apply. There is no ineligibility for those having higher education standards to apply for Village Field Assistant. So, those who passed HSS, Degree etc can apply. Village Field Assistant is the new name given to the post Village Man in Kerala Revenue Department and is one of the few posts where PSC conducts direct recruitment to Revenue department. Public Service Commission conducts different examinations for each districts and there will be different question papers and cut off marks. Anyone who apply for Village Field Assistant can apply to only one district. Right now, only anticipatory vacancies are reported. So we do not know the exact number of vacancies in each districts. According to High Court verdict in 2006, women too can apply to Vill…

How to Configure Idea 4G & 3G on Android Phone -APN Settings

When you activate Idea GPRS, 4G or 3G Internet on your Android phone, your phone will receive the automatic settings. However, sometimes you may need to configure the Access Point and GPRS settings for Idea (both GSM second and third generation) connection manually on your Android phone. In case if you delete the previous configuration, it is better know how to setup the same settings again by yourself. A wrong Access Point Name can stop you from accessing their mobile broadband service. Otherwise after deleting the existing APN for Idea 3G or GPRS you may need to re-insert the SIM again to get automatic settings from them. If you know the manual configuration steps, you can avoid that hardware procedure. If you are looking for the steps to get maximum speed from Idea 4G, you may click the link below and follow the instructions. The below hack will increase the Idea 4G data transfer speed.


Boost Idea 4G Data Transfer Speed

Steps to Configure Idea 4G/ GPRS/ 3G on Android Click on Applic…

Kerala PSC Examination Syllabus

Syllabus oriented preparation is the key factor of success in every examinations. Chances of winning various examinations conducted by Kerala PSC depends on the efforts of a candidate to study topics mentioned in the exact syllabus of that examination. It is important to understand the detailed syllabus of an examination by Public Service Commission before starting to study for it. Complete analysis of examination syllabus will give the candidate the idea of most important and less important topics. By giving more efforts to cover important portions, he will be able to score more marks and better rank compared to others who have no idea on the syllabus. In this post, you can check detailed syllabuses of most of the exams conducted by Kerala PSC. In the chronological order, you can check syllabus for degree level examinations, 10'th level examinations and last grade exams. Time for both Degree level and Tenth level examinations is 75 minutes and there will be 100questions each …

Kerala Government Higher Secondary School Teacher Recruitment

Kerala PSC has invited applications from eligible candidates to recruit Higher Secondary School Teacher for Kerala Higher Secondary Education Department. Vacancies are available for teachers in various subjects and the detailed information is provided in the chart below. Monthly starting salary of Government Higher Secondary School Teacher (Junior) in Kerala Higher Secondary Eduction is 32300-68700/-Indian Rupees. Age limit to apply for Higher Secondary School Teacher post in Kerala for general category is 20 -40 years. Usual upper age relaxation is allowed for candidates belongs to OBC and SC/ST category. Kerala Government Higher Secondary School Teacher Examination detailed syllabus and previous year question papers are updated in the charts below.
Notification NumberName of the Post Last Date to Apply 246/2017Higher Secondary School Teacher (Junior) English20-09-2017 247/2017Higher Secondary School Teacher (Junior) Political Science20-09-2017 248/2017Higher Secondary School Tea…

Eligibility and Exam Pattern CBI Officer Recruitment 2017 - Sub Inspector By SSC CGL

To become an officer in Central Bureau of Investigation ( CBI ) is a dream of many youth in India. Though this elite investigation agency is popular among public, many do not know the procedure to join CBI as an officer. This article explains the various criteria, eligibility, exam pattern and procedure to become a CBI officer. Two different agencies conduct examinations to fill vacancies in CBI. They are UPSC and SSC. To become a group A officer in CBI, you must choose Civil Service Examination conducted by UPSC and become an IPS officer. To join as Sub Inspector in CBI, you must go through SSC CGL examination.

Name Of the Post Recruitment Agency Group A OfficerUPSC (Civil Service Examination)Sub InspectorSSC CGL
Where to Apply
If you are dreaming to become an Officer in CBI, you must pass the Combined Graduate Level Examination (CGL ) conducted by Staff Selection Commission (SSC) in every year. You must wait for the next SSC CGL notification and prepare for the same. It is a 4 tier …

PING: Transmit failed. General Failure - Reasons and Solution

Yesterday while checking network connectivity, I received one error message while trying to ping loopback address from my Windows computer. The error message I received is "PING: Transmit failed. General Failure" and all the packets send from command prompt were lost. I tried to ping a different loopback address but the result was same. I fixed the issue by following a set of steps and sharing those troubleshooting steps in this tutorial hoping it may help in case if you experience the same error message PING: Transmit failed. General Failure.


Broadband Hack To Improve Speed

This is the output I received when I ping loopback address.

C:\Users\sijugk>ping 172.0.0.21 Pinging 172.0.0.21 with 32 bytes of data: PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure. Ping statistics for 172.0.0.21: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)


Reasons an…