From the course: Network Programming in C: Develop Reliable Client/Server Applications

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Explore network addresses and ports

Explore network addresses and ports

- [Instructor] Of the 4 billion or so possible IPv4 addresses, certain ranges are reserved for local networks. I call them the 10s, the 172s and the 192.168s. The local router assigns each network device an address in one of these ranges. This address is known as the device's public address. No two advices are given the same address. The router may also assign an IPv6 address and some devices may have both an IPv4 and IPv6 address. If you've configured a router, you may be familiar with the subnet mask part of the address. This value is often expressed after an IP address, such as a slash in the value for IPv4 and a percent sign for IPv6. The subnet mask doesn't directly deal with network programming, but it does help the router determine which packets are local and which are forwarded to another network. A special address is the loopback, which is used for testing purposes, as it's the same on all network devices.…

Contents