If I do not have access to the router / DHCP server to create a static reservation (i.e. asking the router / DHCP server to set aside a specific IP address when a certain MAC address requests it), how can I set my Windows 7 workstation to have a static IPv4 address?
Windows – How to set a static IP address in Windows
ipv4networkingwindows 7
Related Solutions
using the linux program dhclient.
If you don't have linux installed, you can use a bootable Linux live CD.
[edit] If you do this trick to create an address reservation for an actual Windows machine, first switch the NIC in Windows to a static IP, because after a reboot in DHCP mode Windows may send a DHCP request with its last used IP, which would annihilate your efforts with dhclient below...
The trick is to send a DHCP request with your desired IP address from the same NIC (or better: same MAC address).
Edit the /etc/dhcp/dhclient.conf and add the following line (you might have to first copy the file to a writeable location if booting from a CD):
send dhcp-requested-address 192.168.1.240;
Then stop and start dhclient as user root
, where your NIC is eth0
(check by issuing ip addr show
beforehand)
dhclient -r -v
dhclient -4 -d -v -cf /etc/dhcp/dhclient.conf eth0
If successfull, your DHCP server will fulfill your prepared request. Sometimes you will have to delete the device entry in the DHCP table before issuing dhclient -4 -d ...
.
Then make that device IP address in the DHCP table of the router a fix address reservation. This will associate the IP to the MAC of the device and return the same IP everytime a DHCP request with that MAC address is encountered in the future.
How do I set a static IP address for a particular MAC address?
"Setup" > "Lan Setup" > "Network Address Server Settings (DHCP)" > "Pre-assigned DHCP IP Addresses"
Here you can assign static (fixed) IP adresses to specified MAC addresses.
You also need to enable the DHCP server to use static (fixed) fixed IP addresses.
Setup > Lan Setup
The Setup Lan Setup page allows you to configure the settings for the Local Area Network (LAN) in your home. These settings include the range of IP addresses that define the LAN itself as well as how the addresses are assigned (automatically by DHCP or manually) as new devices are added to the network.
...
Network Address Server Settings (DHCP)
DHCP Server
Allows you to enable or disable the DHCP server in the residential gateway. The DHCP server is used to automatically allocate IP addresses to devices Pre-assigned DHCP IP Addresses page
...
Click Pre-assigned DHCP IP Addresses in the Lan Setup page. The Pre-assigned DHCP IP Addresses page opens. This page allows you to assign a specific IP address to a PC or other device when they request an IP address using DHCP. Only addresses within the range of the gateway's DHCP address pool can be reserved with this feature.
Source Cisco Model DPC 3825 and EPC 3825 8x4 DOCSIS 3.0 Wireless Residential Gateway User Guide, p32
Best Answer
You will now have the IP Address always set to this address. Because it is getting set to whatever was found below, once your computers find the new address, it will remember it. Your router (more specifically, the DNS Service) will match the name with the IP Address, and HomeGroups are built to just know (using IPv6, usually).
How do you find out what you can put here?
cmd
and press Enter to bring up the Command Prompt.ipconfig /all
and press EnterCheck for the following items:
Your screen will output different numbers. Keep the information handy, and put them into the dialog above.
Type
exit
and press Enter to exit.