About IP addresses
At the network level, packets are transmitted via IP address. A Ip address is needed for each device on the network to communicate, be aware, and transmit data. There are 2 versions of ip addresses:
1. IPv4 (That is, IP version 4)
2.İPv6 (That is, IP version 6)
Currently, the most commonly used IPv4 addresses consist of 4 parts separated by dots.
For example:18.104.22.168 (Global), 192.168.0.5(Private)
The smallest number that can be used at these addresses is 0, and the largest is 255.
Each section varies between 0–255. So there are 256 situations. IPv4 uses 32-bit IP addresses and is represented by 4 8-bit digits separated by dots.
Why 8 bits?
Each of the 256 different situations takes up 2⁸ bits of memory. Therefore, the sections of the ip address are called octets. The ip address consists of 4 octets.
For this reason, a total of 32 bits of space is allocated for IP addresses.
The ip are divided into 2 parts according to internal use (home, office) and external use (for internet access):
1. Private (Local) 2. Global (External)
# Personal ip-addresses office, home, etc. Applies to internal IPs. Each device (iphone, computer, printer, etc.) receives an internet protocol(İP) via DHCP (The Dynamic Host Configuration Protocol) protocol, which is on the router’s internal interfaces from the moment it is connected to WiFi. Local IPs can be provided also by the Network Administrator. Internal IPs are divided into classes according to their type. Each class has a different use.
* Class A is used in giant companies, in places used by millions of people. It is possible to address more than 16 million users. Examples include platforms such as HackTheBox.
* Class B is also used in companies with a large number of employees.
* Class C is mainly used in small office and home environments.
To learn our local ip (private ip) address:
- In the Windows operating system, you can view the cmd terminal by typing ipconfig and pressing enter
- In Linux, type ifconfig on the terminal and press Enter.
#Global IP addresses are provided by providers. When we go online, we go out with this IP address. InterNIC is the organization that controls the issuance of these IP addresses. There are two types of public ip:
* Static IP addresses are provided by a service and do not change. Social media, news sites, e-commerce, etc. use static ip. Static ip are always recommended for safety.
* Dynamic IP addresses are IP addresses that are temporarily assigned to a user by the ISP (Internet Service Provider) each time they connect to the Internet. This ip address may change once a day or every few days when you turn the modem on and off.
While to know the External (Public) ip address:
- Just type “ip address” in the browser. You can see if you visit one of the listed sites.
• In the Linux operating system, you can also type “curl icanhazip.com” in the terminal.