{"id":113,"date":"2010-04-09T13:22:04","date_gmt":"2010-04-09T06:22:04","guid":{"rendered":"http:\/\/www.jaringankita.com\/blog\/?p=113"},"modified":"2012-02-24T13:14:16","modified_gmt":"2012-02-24T06:14:16","slug":"it-network-configuring-ip-address-and-dns-via-windows-command-line","status":"publish","type":"post","link":"https:\/\/www.jaringankita.com\/blog\/it-network-configuring-ip-address-and-dns-via-windows-command-line","title":{"rendered":"[IT Network] Configuring IP Address and DNS via Windows Command Line"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"https:\/\/www.jaringankita.com\/blog\/wp-content\/uploads\/2010\/04\/command-prompt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-114\" title=\"command-prompt\" src=\"https:\/\/www.jaringankita.com\/blog\/wp-content\/uploads\/2010\/04\/command-prompt.png\" alt=\"\" width=\"164\" height=\"143\" \/><\/a>Usually when we want to change <em>the IP address<\/em> and <em>DNS<\/em> on P <em>C \/ Notebook<\/em> which is using Windows-based <em>operating system,<\/em> we always go to <em>control panel<\/em> then go to the <em>network.<\/em> For those who are familiar about changing <em>the IP Address<\/em> and <em>DNS<\/em> from the command line on the LINUX \/ UNIX <em>based,<\/em> surely he will get this feeling. Well,\u00a0 the same thing on LINUX \/ UNIX OS, we can also make changes to <em>IP addresses<\/em> and DNS via <em>command line.<\/em> To do something like that, we need a command that is <!--more--><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #0000ff;\"><strong><em>netsh interface ip set address name = &#8220;ethernet interface name us&#8221;<\/em><\/strong> <span style=\"color: #000000;\">and <strong><em>&#8220;<span style=\"color: #0000ff;\">static<\/span><\/em><\/strong><\/span><span style=\"color: #0000ff;\"> <strong><em>ip_address subnet_mask gateway metric&#8221;<\/em><\/strong><\/span><\/span> <span style=\"color: #0000ff;\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: justify;\">For example, we want to change the IP address as data shown below:<\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">IP Address\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0 : 192.168.0.2<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Subnet Mask\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 255.255.255.0<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Gateway\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 192.168.0.1<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">DNS Primary\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : 192.168.0.3<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">DNS Secondary\u00a0 : 192.168.0.4<br \/>\n<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Metric Gateway: 1 (usually is\u00a0 1)<\/span><\/span><\/em><\/p>\n<p style=\"text-align: justify;\">So, those datas abouv<\/p>\n<p style=\"text-align: justify;\"><span>Thus, the data mentioned above if you want to put through the <em>command line<\/em> is as follows:<\/span><\/p>\n<p style=\"text-align: justify;\"><em>netsh interface ip set address name=&#8221;Local Area Connection&#8221; static 192.168.0.2 255.255.255.0 192.168.0.1 1<\/em><\/p>\n<p style=\"text-align: justify;\"><em><br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\"><span> Then to set its DNS is as follows:<\/span><\/p>\n<p style=\"text-align: justify;\"><span> <em>netsh interface ip set dns name = &#8220;Local Area Connection&#8221; static 192.168.0.3<\/em><\/span><\/p>\n<p style=\"text-align: justify;\"><span> <em>netsh interface ip set dns name = &#8220;Local Area Connection&#8221; 192.168.0.4 index = 2<\/em><\/span><\/p>\n<p style=\"text-align: justify;\"><span>After running all these commands, make sure the IP address and DNS was already configured well by verifiying it using the command ipconfig \/ all<\/span><\/p>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\"><em><br \/>\n<\/em><\/p>\n<div id=\"_mcePaste\" style=\"overflow: hidden; position: absolute; left: -10000px; top: 39px; width: 1px; height: 1px;\">netsh interface ip set address name=&#8221;Local Area Connection&#8221;<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Usually when we want to change the IP address and DNS on P C \/ Notebook which is using Windows-based operating system, we always go to control panel then go to the network. For those who are familiar about changing the IP Address and DNS from the command line on the LINUX \/ UNIX based, [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[169,14,171,170,223,44],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-other","tag-dns","tag-ip-address","tag-local-area-connection","tag-metric-gateway","tag-subnet-mask","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":9,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":1314,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions\/1314"}],"wp:attachment":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}