Linux entry notes: 14. Network basics and linux Network Basics

Source: Internet
Author: User
Tags ip number

Linux entry notes: 14. Network basics and linux Network Basics
I. IP Address

An IP address is a globally unique identifier of each network node on the Internet. an IP address uniquely identifies a host (strictly speaking, it identifies a network interface card ).

IPv4 addresses are currently the most widely used and have been switched over to IPv6 addresses. The IPv4 address is 32-bit long, And the IPv6 address is 128-bit long. Here we mainly discuss Ipv4 addresses.

An IPv4 address is divided into two parts: the network part (network number) and the host part (host number ). The Network part is used to identify the network region and the host part is used to identify the host in the region.

Therefore, each computer on the Internet is identified by its unique IP address.

 

Ii. IPv4 address

An IPv4 address is a 32-bit binary string, such as 11001010011100010100010010101101. To improve readability, we usually convert every 8 bits in the 32-bit IPv4 address to the corresponding decimal number, and insert a vertex between each decimal number, that is, 202.113.68.173.Point-to-decimal notation.

 

3. Subnet Mask

The subnet mask (subnet mask) is also known as the network mask, address mask, and sub-network mask. It is used to indicate which bits of an IP address identify the subnet where the host is located, and the bit masks that identify the host. The subnet mask cannot exist independently. It must be used together with the IP address. The subnet mask has only one function, namely dividing an IP address into a network address and a host address. The subnet mask is a 32-bit address. It is used to block part of the IP address to distinguish the network ID and host ID. It also indicates whether the IP address is on the LAN or on a remote network. (Reference auto-interaction encyclopedia)

 

How can I determine whether different IP addresses are in the same LAN (Network Segment )?

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

The IP number and subnet mask can be used to obtain the network number.

Method 2:Ping the IP address of another computer directly.

If the packet is received, it is in the same LAN; if the receiving times out, it is not in the same LAN.

 

4. Communication between the same network

In the same network, the host parses the MAC address of the other Party based on the ARP protocol, and forwards information frames through the switch to implement communication.

 

1. MAC (Media Access Control)

MAC addresses are commonly referred to as network adapter addresses, hardware addresses, and adapter addresses.Physical addressIs globally unique, just like our ID card number.

The MAC address is represented by a hexadecimal number, which consists of 6 bytes and 48 bits. The first 3 bytes (24 bits in height) it is the Code allocated to different manufacturers by the IEEE registration management organization RA, also known as "uniquely compiled identifiers", the last 3 bytes (24 bit low) each manufacturer assigns its own adapter interface to the production, which is called an extension identifier (uniqueness ). An address block can generate 2 ^ 24 different addresses.

 

2. ARP (Address Resolution Protocol, Address Resolution Protocol)

In a TCP/IP network environment, each host is assigned an IP address, which is a logical address that identifies the host on the Internet. To transmit packets over the physical network, you must know the physical address (MAC address) of the target host ). In this way, there is a problem of converting an IP address into a MAC address. Taking the Ethernet environment as an example, in order to correctly send packets to the target host, the IP address of the target host must be converted into a MAC address. In this case, a group of services on the Interconnection layer need to convert the IP address to the corresponding MAC address, which is the ARP protocol. The APR protocol resolves physical addresses through IP addresses, ensuring smooth communication.

 

3. switch)

A vswitch is a network device used for electrical (optical) signal forwarding. It can provide exclusive electrical signal channels for any two network nodes connected to the vswitch to forward information frames, also known as exchange hubs.

 

5. Communication between different networks

In different networks, routes (gateways) must be forwarded to implement inter-host communication. The router (GATEWAY) or host with the routing function can be used for route forwarding.

 

Routing

The data transmission function between different networks is called the routing function. A device with the routing function is called a router. A Router generally has multiple interfaces, connects to different networks, and forwards data through the route table.

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

 

Vi. Domain Name

The IP address is hard to remember and it is easier to use a name. The name of the TCP/IP address is called a domain name.

A complete domain name is divided into three parts, separated:

  • Type: the type of the domain name (com, net, org, edu, gov, etc)
  • Domain Name: Domain Name
  • Host Name: name of a host in the domain

For example, "www.cnblogs.com", "www" host name, "cnblogs" domain name, and "com" type are connected to "www host under cnblogs.com ".

 

7. DNS (Domain Name System, Domain Name resolution server)

Each domain name represents an IP address, and the DNS server is used for Bidirectional resolution between the domain name and IP address.

 

8. Basic network configuration parameters 1. to configure a computer for LAN communication, you must:
  • IP address
  • Subnet Mask

 

2. to configure a computer for cross-network communication, you must:
  • IP address
  • Subnet Mask
  • Gateway

 

3. to configure a computer that can communicate with the internet, you must:
  • IP address
  • Subnet Mask
  • Gateway
  • DNS

 

Reference link:

Basic network knowledge sorting

Ipv4 address and next-generation IP Address

How can I determine whether two IP addresses are in the same lan?

What is the MAC address?

ARP Protocol

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.