Showing posts with label IPv4. Show all posts
Showing posts with label IPv4. Show all posts

Friday, May 10, 2013

Configuring IPv4 and IPv6 Settings Manually from the Command Prompt


                    'Netsh' utility will help to assign an IP configuration to a connection from the command prompt.To assign a static IPv4 address and subnet mask to a connection from the command prompt,type the following, where Connection_Name is the name of the connection (such as Local Area Connection), Address is the IPv4 address, and Subnet_Mask is the subnet mask.

netsh interface ip set address "Connection_Name" static Address Subnet_Mask

For example, to set the IPv4 address of the Local Area Connection to 192.168.33.5 with a subnet mask of 255.255.255.0, you would type the following:

netsh interface ip set address "local area connection" static 192.168.33.5 255.255.255.0 

If you also want to define a default gateway along with the IPv4 configuration, you can add that information to the end of the command. For example, to configure the same IPv4 address for the local area connection with a default gateway of 192.168.33.1, type the following:


netsh interface ip set address "local area connection" static 192.168.33.5 255.255.255.0 192.168.33.1


To assign a static IPv6 address to a connection from the command prompt, type the following, where Connection_Name is the name of the connection and Address is the IPv6 address.


netsh interface ipv6 set address "Connection_Name" Address

For example, to assign an address of 2001:db8:290c:1291::1 to the Local Area Connection (leaving the default subnet prefix of 64), type the following:

netsh interface ipv6 set address "Local Area Connection" 2001:db8:290c:1291::1