[Linux Network Programming] 02 mac address ip address port port netmask subnet mask

NIC: Network adapter
role: receive data for transmission, converts the analog signal into a digital signal

mac: Each card has a globally unique identification (ID): This global unique ID number is an identification of said mac address (physical address 48b 6 bytes)
ip address: a virtual host identifier or network card ip
ip address: 32b ipv4
ipv6 128b

ip address is divided into two parts: the main subnet id id

Subnet Mask: 1 consecutive zeros or continuously, in combination with the use of ip, is present alone meaningless

10.1.2.2/255.255.255.0

Host ip 10.1.2.2 Subnet Mask: 255.255.255.0 The mask 8 can be connected up to the power of -2 host 2

Subnet id: ip North subnet mask a continuous coverage
10.1.2
host id: ip are continuous coverage subnet mask 0
2

ip address classes:
A Class Address: 8bit subnet default id, the first bit is 0; 10.0.0.1 ~ 10.255.255.254
Class B addresses: 16bit subnet default id, the first two of 10; 172.16.0.1 ~ 172.31.255.254
class C addresses: 24bit subnet default id, the top three to 110; 192.168.0.1 ~ 192.168.255.254
class D address: 1110 first four bits, the multicast address;
E category address: 11110 for the top five, reserved for future use;
a, B, address C is the most common categories.

127.0.0.1 is called the loopback address
: Network Configuration major test of the machine, can ping 127.0.0.1 explanations of the machine's network adapter and IP protocol installed, no problems

Note: Any address 127.0.0.1 ~ 127.255.255.254 will loop back to the local host, the address does not belong to any category class, which represents the local virtual device interface.

Published 57 original articles · won praise 28 · views 4112

Guess you like

Origin blog.csdn.net/weixin_41747893/article/details/104760376