Recall that the MAC address was (usually) set by the manufacturer and should be globally unique for a device. But where does the IP address of a device come from?
The IP address of a device is set by the user or network administrator. There are a number of key elements
- IP address : 4 8 bit bytes for example 192.168.8.77
- Subnet mask : 4 8 bit bytes that together with the IP address defines the network address of the device. Each bit of the IP address are combined with the corresponding bit of the subnet mask in an AND operation. eg the network address of 192.168.8.77 with subnet mask 255.255.255.0 gives 192.168.8.0
there are online tools for this eg https://mxtoolbox.com/SubnetCalculator.aspx
When an endpoint tries to contact another device on the ip network it needs to first work out if the destination is in the same subnet. If not the frame must be sent to the default gateway
- Default gateway: This is the device where frames are sent if the destination ip address is not in the same subnet. This is usually the internet router or firewall
- DNS server: This is the ip address of the device that translates names eg google.com or spectralis.local to the IP address. In a home network this will usually be the ISPs DNS server or Google’s server (18.104.22.168). In a business network, it will usually be the domain controller (Windows server)
- DHCP server: This is the IP address of the device that automatically allocates IP addresses. In a home network this is usually also the internet router. In a business network, it is normally the domain controller.
On a windows machine, you can retrieve the current information from a workstation or server by typing ipconfig /all at a command prompt