Linux entry record: 14, network Foundation

Source: Internet
Author: User
Tags ip number

First, IP address

The IP address is the unique identifier of each network node on the Internet, and an IP address uniquely identifies a host (which is strictly a network interface card that identifies a NIC interface).

Now the most widely used is the IPV4 address, which has gradually switched to the IPV6 address. The IPV4 address is 32 bits long and the IPV6 address is 128 bits long. The main discussion here is Ipv4 address.

A IPV4 address is divided into two parts: the network part (network number) and the host part (host number). The network section is used to identify which host is part of the network area that the host is used to identify.

Therefore, each computer on the Internet relies on its own unique IP address to identify it.

Second, IPV4 address

The IPV4 address is a 32-bit binary string, such as 11001010011100010100010010101101. To improve readability, we often convert every 8 bits in a 32-bit IPV4 address to the corresponding decimal, and insert a point between each decimal number, that is, 202.113.68.173, which is the usual dotted-decimal notation .

Third, subnet mask

A subnet mask (subnet mask), also known as a netmask, address mask, subnet mask, is a bitmask that indicates which bits of an IP address are identified by the host's subnet, and which bits identify the host. The subnet mask cannot exist alone, it must be used in conjunction with an IP address. The subnet mask has only one function, which is to divide an IP address into two parts: network address and host address. A subnet mask is a 32-bit address that is used to mask part of an IP address to differentiate between a network identity and a host identity, and whether the IP address is on a local area network or on a remote Web site. (Quote from Interactive encyclopedia)

How to judge the different IP in the same local area network (network segment)?

Method 1: compare whether their network numbers are the same.

With the IP number and subnet mask, you can get the network number.

Method 2: Ping the IP of the other computer directly with a single computer.

If a packet is received, it is on the same LAN, and if the receive times out, it is not on the same LAN.

Iv. communication between the same network

Under the same network, the host computer resolves the MAC address of each other based on the ARP protocol, and the information frame is forwarded through the switch to realize the communication.

1. MAC (media access Control)

MAC address Mac, people used to call it a network card address, hardware address, adapter address, is a physical address , like our ID number, with global uniqueness.

The MAC address is represented by a hexadecimal number, a total of 6 bytes of 48 bits, and the first 3 bytes (24 bits high) is the code that is assigned by the IEEE registry RA to the different manufacturers, also known as the "unique identifier", and the next 3 bytes (low 24 bits) are assigned by the manufacturers themselves to the production adapter Called an extended identifier (uniqueness). An address block can generate 2 ^ 24 different addresses.

2. ARP (address Resolution Protocol, addresses resolution Protocol)

In a TCP/IP network environment, each host is assigned an IP address, which is a logical address that identifies the host in the internetwork. In order for the message to be transmitted on the physical network, the physical address (MAC address) of the destination host must be known. There is an address translation problem that transforms the IP address into a MAC address. Taking the Ethernet environment as an example, in order to correctly transmit the message to the destination host, the IP address of the destination host must be converted to a MAC address. This requires a set of services at the Interconnect layer to translate the IP address into the appropriate MAC address, which is the ARP protocol. APR protocol is implemented to resolve the physical address through IP address, ensuring the smooth communication.

3. Switches (switch)

A switch is a network device used for transmitting electrical (optical) signals. It can provide a unique electrical signal path for any of the two network nodes that access the switch, enabling the forwarding of information frames, also known as switched hubs.

V. Communication between different networks

Under different networks, routing (gateway) forwarding is required to implement communication between hosts. Routing forwarding can be implemented either as a router (gateway) or as a host with routing capabilities.

Routing

The ability to transfer data between different networks is called routing, and a router with routing capabilities is called a router, and routers typically have multiple interfaces connected to different networks, and data is forwarded through a routing table.

The routing table contains a series of routing rules that can be used to determine the destination of network traffic.

Vi.. Domain Name

IP addresses are hard to remember, and it's easier to use a name. The name used to represent the TCP/IP address is called the domain name.

A complete domain name is divided into three sections, split with ".":

    • Type: Identifies the type of the domain name (COM, net, org, edu, gov, etc.)
    • Domain Name: domain name
    • Hostname: The name of a host in the domain

For example "www.cnblogs.com", "www" hostname, "cnblogs" domain name, "com" type, connected together is "cnblogs.com this domain name of the WWW host."

Vii. DNS (domain name System, name resolution Server)

Each domain name represents an IP, and the DNS server is used for bidirectional parsing between the domain name and the IP.

VIII. basic Network configuration parameter 1. To configure a computer for a LAN communication, you need to:
    • IP Address
    • Subnet mask

2. Configure a computer to communicate across a network segment, which requires:
    • IP Address
    • Subnet mask
    • Gateway

3. To configure a computer that can communicate with the Internet, you need to:
    • IP Address
    • Subnet mask
    • Gateway
    • Dns

Reference Links:

Network basic Knowledge Collation

Ipv4 address and next-generation IP address

How to judge two IP on the same LAN?

What is the MAC address?

ARP protocol

Linux entry record: 14, network Foundation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.