Online Shopping : Computers : Operating Systems : Microsoft : bilal

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

374 of 448 people (83%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Windows XP: IP address: Set: How to set your IP address + gateway + DNS from the MSDOS command line?

Apr 2nd, 2009 06:46
engatoo engatoo, Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden - 10 August 2003 - 02:51 am -----------------------
Internet: TCP/IP: IP Adress: Set: Operating system: Microsoft Windows 
2000 / XP / 2003: How to set your network, gateway, and DNS IP address 
from the MSDOS command line?
---
In order to automate setting the IP address, e.g. by using this
commands in a batch file, or by having to switch quickly between
different IP settings (e.g. for your laptop when having to connect to
the network on different locations, and so needing different IP
settings) you can use the the netshell command:
 netsh
---
-to set the IP address, type the following:
  netsh interface ip set address name=<the name of your network card> 
source=<static> addr=<your IP address> mask=<your mask>
---
If you want to see the name of this network card to fill in (as there
might be several cards present on your computer, and the netsh has to
be informed which one of this network cards to change), type first:
  ipconfig
 then check what this shows, and type the name of the network card
 exactly as it is shown there
 (that is, copy the text shown after:
   'Ethernet adapter' and until the next colon ':'
---
---
For example:
First type:
 ipconfig /all
---
You should see then something like:
+---------------------------------------------------------+
|Windows IP Configuration                                 |
|                                                         |
|                                                         |
|Ethernet adapter VMware Network Adapter VMnet8:          |
|                                                         |
|        Connection-specific DNS Suffix  . :              |
|        IP Address. . . . . . . . . . . . : 192.168.118.1|
|        Subnet Mask . . . . . . . . . . . : 255.255.255.0|
|        Default Gateway . . . . . . . . . :              |
|                                                         |
|Ethernet adapter VMware Network Adapter VMnet1:          |
|                                                         |
|        Connection-specific DNS Suffix  . :              |
|        IP Address. . . . . . . . . . . . : 192.168.186.1|
|        Subnet Mask . . . . . . . . . . . : 255.255.255.0|
|        Default Gateway . . . . . . . . . :              |
|                                                         |
|Ethernet adapter Ethernet Broadcom 440x 10 100 built in: |
|                                                         |
|        Connection-specific DNS Suffix  . :              |
|        IP Address. . . . . . . . . . . . : 192.168.0.3  |
|        Subnet Mask . . . . . . . . . . . : 255.255.255.0|
|        Default Gateway . . . . . . . . . :              |
|                                                         |
|Ethernet adapter Network Bridge (Network Bridge) 13:     |
|                                                         |
|        Connection-specific DNS Suffix  . :              |
|        Autoconfiguration IP Address. . . : 189.244.93.4 |
|        Subnet Mask . . . . . . . . . . . : 255.255.0.0  |
|        Default Gateway . . . . . . . . . :              |
+---------------------------------------------------------+
So to change the IP address of your Broadcom network card to 
192.168.0.4, you should type:
 netsh interface ip set address name="Ethernet Broadcom 440x 10 100 
built in" source=static addr=192.168.0.4 mask=255.255.255.0
---
---
You should then see as a reply, after a little while:
Ok.
---
If you see:
 'Invalid interface test specified'
you have very probably not supplied the correct network card name (so 
double check
the name in the ipconfig output).
---
To check if the IP address has indeed changed, just type
 ipconfig /all
again, and check if it has been changed (it should now show
192.168.0.4, for example)
---
---
To change the IP address in your VMWare client operating system, you 
can use:
 netsh interface ip set address name="Local Area Connection" 
source=static addr=<your new IP address> mask=<your mask>
---
for example: to set your IP address in a client Microsoft Windows XP 
operating system in VMWare, you can use:
 netsh interface ip set address name="Local Area Connection" 
source=static addr=10.0.0.254 mask=255.255.255.0
---
---
-to set your gateway IP address, type the following:
   netsh interface ip set address name=<the name of your network card> 
gateway=<your gateway IP address> gwmetric=1
---
 for example:
   netsh interface ip set address name="Ethernet Broadcom 440x 10 100 
built in" gateway=192.168.1.1 gwmetric=1
---
 for example: to set your gateway IP address in a client Microsoft 
Windows XP operating system in VMWare, you can use:
   netsh interface ip set address name="Local Area Connection" 
gateway=10.0.0.1 gwmetric=1
---
---
-to set your DNS IP address(one or more, as there might be several 
nameservers where to look)
 The general format is:
   netsh interface ip set dns [name=]<string> [source=]dhcp|static 
[addr=]<IP address> | none [[register=]none|primary|both]
-to set for example a static first DNS address (another option is to 
use DHCP, but this should be installed on your network, which is in 
general not the case):
  netsh interface ip set dns name=<the name of your network card> 
source=static addr=<your DNS IP address> register=primary
---
 for example:
  netsh interface ip set dns name="Ethernet Broadcom 440x 10 100 built 
in" source=static addr=243.234.0.15 register=primary
 if it works OK, you should see then 'Ok.'
---
-to add a one or more other DNS addresses, type for each extra DNS IP 
address the following:
  netsh interface ip addns [name=]<string> [addr=]<IP address> 
[[index=]<integer>]
  so thus:
   netsh interface ip add dns name=<the name of your network card> 
source=static addr=<your DNS IP address> index=<an integer like 1, 2, 
3, 4, ...>
---
 for example to add a second DNS IP address to the list:
  netsh interface ip add dns name="Ethernet Broadcom 440x 10 100 built 
in" addr=243.234.0.16 index=2
 if it works OK, you should see then 'Ok.'
---
 for example, to add a third DNS IP address, use:
  netsh interface ip add dns name="Ethernet Broadcom 440x 10 100 built 
in" addr=243.234.0.17 index=3
 if it works OK, you should see then 'Ok.'
---
---
Note: if you want to ping
successfully on your local
network, you can try the
following:
1. the IP addresses should be in range
    e.g. both computers have
    IP address range
     10.0.0.xxx
    or
     192.168.0.xxx
Further you might apply the following:
2. they use the same mask
   (e.g. both have 255.255.255.0)
3. they use the same gateway
   (e.g. both use 10.0.0.1)
So possibly adapt this
or make this equal.
---
---
Internet: see also:
---
Linux: IP address: Set: How to set your IP address + gateway + DNS 
(from the console command line)?
http://www.faqts.com/knowledge_base/view.phtml/aid/23675/fid/107
---
Network:Microsoft:Windows:How to create batch file to set IP 
address,mask,gateway,DNS,proxy?Overview
http://www.faqts.com/knowledge_base/view.phtml/aid/39154/fid/868
---
Operating system: Microsoft: Windows: XP: Link: Overview: Can you give 
an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/34878/fid/868
----------------------------------------------------------------------
http://www.roo7e.com
http://www.roo7e.com
http://www.al33ab.com
http://ksacam.com
http://chat.ksacam.com
http://ksacam.info
http://oo2o.com
http://s4cam.com
http://saudi4cam.com				
http://voice.ksacam.com
http://سعودي-كام.oo2o.com
http://سعوديكام.com
http://xn--mgbply5cnrr.com
http://www.3rabstarz.com/vb
http://www.3rabstarz.com/vb
http://www.3rabstarz.com/
http://www.3rabstarz.com/vb
http://www.3rabstarz.com/
http://www.dir.3rabstarz.com/
http://www.up.3rabstarz.com
http://www.3rabstarz.com/vb/forumdisplay.php?f=5
http://www.3rabstarz.com/vb/forumdisplay.php?f=116
http://www.3rabstarz.com/vb/forumdisplay.php?f=66
http://www.3rabstarz.com/vb/forumdisplay.php?f=78
http://www.3rabstarz.com/vb/forumdisplay.php?f=147
http://www.3rabstarz.com/vb/forumdisplay.php?f=2
http://www.3rabstarz.com/vb/forumdisplay.php?f=31
http://www.3rabstarz.com/vb/forumdisplay.php?f=136
http://www.3rabstarz.com/vb/forumdisplay.php?f=34
http://www.3rabstarz.com/vb/forumdisplay.php?f=89
http://www.3rabstarz.com/vb/forumdisplay.php?f=26
http://www.3rabstarz.com/vb/forumdisplay.php?f=72
http://www.3rabstarz.com/vb/forumdisplay.php?f=73
http://www.3rabstarz.com/vb/forumdisplay.php?f=149
http://www.3rabstarz.com/vb/forumdisplay.php?f=150
http://www.3rabstarz.com/vb/forumdisplay.php?f=151
http://www.3rabstarz.com/vb/forumdisplay.php?f=152
http://www.3rabstarz.com/vb/forumdisplay.php?f=67
http://www.3rabstarz.com/vb/forumdisplay.php?f=3
http://www.3rabstarz.com/vb/forumdisplay.php?f=37
http://www.3rabstarz.com/vb/forumdisplay.php?f=115
http://www.3rabstarz.com/vb/forumdisplay.php?f=76
http://www.3rabstarz.com/vb/forumdisplay.php?f=77
http://www.3rabstarz.com/vb/forumdisplay.php?f=36
http://www.3rabstarz.com/vb/forumdisplay.php?f=153
http://www.3rabstarz.com/vb/forumdisplay.php?f=122
http://www.3rabstarz.com/vb/forumdisplay.php?f=118
http://www.3rabstarz.com/vb/forumdisplay.php?f=119
http://www.3rabstarz.com/vb/forumdisplay.php?f=120
http://www.3rabstarz.com/vb/forumdisplay.php?f=121
http://www.3rabstarz.com/vb/forumdisplay.php?f=35
http://www.3rabstarz.com/vb/forumdisplay.php?f=65
http://www.3rabstarz.com/vb/forumdisplay.php?f=7
http://www.3rabstarz.com/vb/forumdisplay.php?f=9
http://www.3rabstarz.com/vb/forumdisplay.php?f=11
http://www.3rabstarz.com/vb/forumdisplay.php?f=142
http://www.3rabstarz.com/vb/forumdisplay.php?f=143
http://www.3rabstarz.com/vb/forumdisplay.php?f=146
http://www.3rabstarz.com/vb/forumdisplay.php?f=140
http://www.3rabstarz.com/vb/forumdisplay.php?f=137
http://www.3rabstarz.com/vb/forumdisplay.php?f=114
http://www.3rabstarz.com/vb/forumdisplay.php?f=117
http://www.3rabstarz.com/vb/forumdisplay.php?f=113
http://www.3rabstarz.com/vb/forumdisplay.php?f=51
http://www.3rabstarz.com/vb/forumdisplay.php?f=84
http://www.3rabstarz.com/vb/forumdisplay.php?f=138
http://www.3rabstarz.com/vb/forumdisplay.php?f=139
http://www.3rabstarz.com/vb/forumdisplay.php?f=15
http://www.3rabstarz.com/vb/forumdisplay.php?f=130
http://www.3rabstarz.com/vb/forumdisplay.php?f=97
http://www.3rabstarz.com/vb/forumdisplay.php?f=102
http://www.3rabstarz.com/vb/forumdisplay.php?f=101
http://www.3rabstarz.com/vb/forumdisplay.php?f=104
http://www.3rabstarz.com/vb/forumdisplay.php?f=131
http://www.3rabstarz.com/vb/forumdisplay.php?f=103
http://www.3rabstarz.com/vb/forumdisplay.php?f=99
http://www.3rabstarz.com/vb/forumdisplay.php?f=59
http://www.3rabstarz.com/vb/forumdisplay.php?f=60
http://www.3rabstarz.com/vb/forumdisplay.php?f=39
http://www.3rabstarz.com/vb/forumdisplay.php?f=40
http://www.3rabstarz.com/vb/forumdisplay.php?f=42
http://www.3rabstarz.com/vb/forumdisplay.php?f=4
http://www.3rabstarz.com/vb/forumdisplay.php?f=1
http://www.3rabstarz.com/vb/forumdisplay.php?f=88
http://www.3rabstarz.com/vb/forumdisplay.php?f=148
http://www.3rabstarz.com/vb/forumdisplay.php?f=62
http://www.3rabstarz.com/vb/forumdisplay.php?f=63
http://www.3rabstarz.com/vb/forumdisplay.php?f=64
http://www.3rabstarz.com/vb/forumdisplay.php?f=6
http://www.3rabstarz.com/vb/forumdisplay.php?f=12
http://www.3rabstarz.com/vb/forumdisplay.php?f=96
http://www.3rabstarz.com/vb/forumdisplay.php?f=58
http://www.3rabstarz.com/vb/forumdisplay.php?f=38