ipconfig <ip> <mask> [gateway]
Set a static address on the primary NIC in one line, with an optional default gateway. The mask may be dotted (255.255.255.0), a bare prefix (24) or /24, or written onto the address as 10.0.0.5/24.
Example
PC1> ipconfig 192.168.1.10 255.255.255.0 192.168.1.1
PC1> ipconfig Eth0 10.0.0.5/24 10.0.0.1The adapter name is optional — with none given the address lands on the primary NIC (Eth0, the same one /renew uses); name it first ('ipconfig Eth0 …') to target another. An address typed on its own ('192.168.1.0/24') is not a command and is rejected: give it to ipconfig, and give the host a host address (192.168.1.10): the block's network and broadcast addresses are refused with 'The combination of IP address and subnet mask is invalid.' A malformed gateway is an error rather than being dropped while the IP still applies.
Don't just read it — type ipconfig <ip> <mask> [gateway] in a real network simulator in your browser and watch it take effect. No install, no account needed to start.
Frequently asked
What does the "ipconfig <ip> <mask> [gateway]" command do?
Set a static address on the primary NIC in one line, with an optional default gateway. The mask may be dotted (255.255.255.0), a bare prefix (24) or /24, or written onto the address as 10.0.0.5/24.
What's the common gotcha with "ipconfig <ip> <mask> [gateway]"?
The adapter name is optional — with none given the address lands on the primary NIC (Eth0, the same one /renew uses); name it first ('ipconfig Eth0 …') to target another. An address typed on its own ('192.168.1.0/24') is not a command and is rejected: give it to ipconfig, and give the host a host address (192.168.1.10): the block's network and broadcast addresses are refused with 'The combination of IP address and subnet mask is invalid.' A malformed gateway is an error rather than being dropped while the IP still applies.
Example of "ipconfig <ip> <mask> [gateway]"
PC1> ipconfig 192.168.1.10 255.255.255.0 192.168.1.1 PC1> ipconfig Eth0 10.0.0.5/24 10.0.0.1