Linux Operations Notes (i) Network basics

Source: Internet
Author: User

Network basic knowledge First, Basic Concepts

1.ARPANET & TCP/IP: Integrate network hardware with " software" technology , so that different computers or data can achieve data communication through this software (TCP/IP technology is also known as the Internet).

2. Ethernet network (ETHERNET): standard interface for network hardware setup and development (IS88023).

Note: The transmission information of the network is 0 and 1, so the unit of data transmission is the number of bits per second , i.e. M bits /second, the meaning of Mbps. divide by 8.  

Two Computer network Components

1. Node: The name of the device with the network address (IP).

2. Server host (server): Provides a response (Respone) to the user's host.

3. Client: The host that sent the request.

4. Network Interface card,nic: A card that provides network access, most of which are currently using an Ethernet network card with RJ-45 connectors.

5. Network interface: The network interface designed by the software is mainly used to provide the network address . A NIC can match at least one network interface.

6. Network morphological Topology (topology): How each node is linked on the network.

7. Gateway (route) or communication Gate (Getway): Has more than two network interfaces, can link more than two different network segments of the device.

Three regional scope of the network

1. Local area network (Network,lan)

2. Wan (Wide area Network,wan)

3. WLAN (Wireless Local area Network,wlan)

Four Computer network protocol

1.OSI (Open System Interconnection) seven layer protocol:

2. Computer network protocol:TCP/IP

Open Web page for example:

Application stage: After the browser input URL is determined, the relevant information is packaged as a data, down into the application layer.

Application layer: The HTTP communication protocol provided by the application layer encapsulates the information from the browser and gives an application layer header, which is fed into the transport layer.

Transport Layer: The transmitted data is encapsulated again to TCP, given a TCP encapsulation header, dropped to the next layer.

Network layer: The TCP data is encapsulated in an IP packet, and an IP header is given.

Network interface layer: If using an Ethernet network, IP will encapsulate the MAC data frame according to the CSMA/CD standard, and give the Mac frame header, turn into bitstream, and finally send to the remote host using the transfer media.

Five link Layer related protocols

1. Devices used by the WAN

1) Traditional telephone dial-up: PPP protocol early Online = modulation Mediator + phone line + computer nine-pin serial port +PPP protocol. PPP supports protocols such as TCP/IP.

2) Integrated Services Digital Network (ISDN): Access to the Internet using telephone lines and ISDN modulation mediators.

3) Asymmetric digital circuit (ADSL): High frequency portion of the phone + using the Modulator +pppo protocol to simulate PPP to an Ethernet card

4) Cable modulator (Cable modem): Cable TV cable + modem linked to ISP

2. Ethernet Network Transfer Protocol: CSMA/CD

each Ethernet card is shipped with a unique card number, which is called ( MAC).

CSMA/CD Online mode:

in the figure Hub for hubs

A hub is a network-shared media device that can only be used by a single host in a single point in time.

Transfer process:

1. Monitor media usage (Carrier sense): a host before sending network packets, first listen to the network media, confirm that no one used, before sending data frames.

2. Multipoint transfer (multiple Access): The data sent by a host is copied by the hub and then sent to all hosts that can connect to the hub. (Unwanted primary opportunity to discard).

3. Conflict detection (Collision Detection): The data frame with detection capability, if the other host also just at the same time to send the data frame, then two data frames will conflict, the data frames will be destroyed, the host waits for a random time to resend.

3.MAC Package Format

Mac data Frame (frame):

The destination address and source address refer to the network card number. Note: In this Mac transfer, only in the local area network, if you cross the subnet, then the source and destination hardware address will change.

Vi. Network Layer-related data packets and data

Encapsulation of 1.IP Packets

Slightly

composition and classification of 2.IP addresses

IP consists of 32-bit binary values:

00000000.00000000.00000000.00000000 ==> 0.0.0.0

11111111.11111111.11111111.11111111 ==> 255.255.255.255

Classification of IP:

Classa:0xxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx ==> 0.xx.xx.xx~127.xx.xx.xx

|-netid-|----------------HostID--------------|

Classb:10xxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx ==> 128.xx.xx.xx~191.xx.xx.xx

|---------NetID------|--------HostID--------|

Classc:110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx ==> 192.xx.xx.xx~223.xx.xx.xx

|----------------NetID-------------|-hostid--|

CLASSD: Slightly

ClassE: Slightly

Within the same physical network segment, all host IPs have the same netid and have different hostid.

Attention:

1.HostID in a binary representation, not both 0 and 1. Because all 0 represents the address of the entire network segment (network IP), all 1 represents the broadcast address (broadcast IP).

For example: 192.168.0.0 and 192.168.0.255.

2. Hosts within the same physical segment can pass data directly to the NIC via a network card (i.e., directly via MAC data frames). Different network segments must be connected via a router.

Classification of 3.IP

1) Public IP: This IP can be connected to the Internet.

2) Private IP: Not directly connected to the Internet IP, mainly for the host planning connection within the LAN.

Private IP network segment:

classa:10.0.0.0~10.255.255.255

classb:172.16.0.0~172.31.255.255

classc:192.168.0.0~192.168.255.255

3) Special loopback IP network segment:

That is 127.0.0.1 localhost

4.Netmask, sub-network

1) Netmask (subnet mask):

classa:255.0.0.0

classb:255.255.0.0

classc:255.255.255.0

2) Sub-network division: binary in the HostID bit to NetID.

5. About Routing

In the same LAN, the purpose of data transmission can be achieved by means of IP broadcast. A router is used instead of a local area network.

Self-remembering how routes work.

Routed commands: See the Linux command table.

6.IP address and network card number

Slightly

vii. Transport Layer-related data packets and data

A) Reliable connection-oriented TCP protocol

1) Privileged port: A port less than 1024, the initiator's identity must be root

2) Socket Pair:

1. SOURCE ip+ Source Port

2. Purpose ip+ Destination port

3) TCP Three-time handshake:

A:B, are you there?

B: I'm here, are you there?

A: I'm here, too.

4) Non-connected UDP:

The User Datagram protocol is suitable for real-time data that does not require rigorous verification, such as video connectivity.

Linux Operations Notes (i) Network basics

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.