Your Internet service provider (ISP) automatically assigns public IP addresses to customers. Devices get their public IP addresses from the ISP when they connect to the ISP's network, such as when you plug an Internet cable into a router.