Embedded punch Star Program day 75 (Java Network Programming Multithreading collaboration, networking basics Tcp / ip, ip address.)

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_42655650/article/details/102576772

# Guangdong I come embedded inlay Star Program # ## Guangdong
Guangdong embedded Star program challenges
today, clocking the first 75 days
of network programming
computer network, it refers to a polypeptide computers and peripheral equipment will not be tolerated and has a unique geographical features, connected by a communication line up in the network operating system, network management software, network management software, network management and coordination and communication protocols, and computer system resource sharing and information transfer.
From a logical point of view function, the computer system is a computer network to transfer information based on purpose, the communication line connecting the set of the plurality of computers, a network of computers and communication apparatus comprising a transmission medium.
Although Huawei type of network LAN, MAN, WAN and the Internet are four
local area network in general only be a small area,
metropolitan area network interconnection of different regions.
Network hierarchy:
To reduce the complexity of your network design, most networks use a hierarchical design method. The so-called hierarchical design flow process is in accordance with the overall function of network information to be decomposed into a functional layers using the same protocol between the functional layer on the same machine stop,
through an interface between adjacent layers on the same machine functions Information transfer.
Here Insert Picture Description
Open systems interconnection information provides a functional framework structure. It is from low to high: the physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer. Here Insert Picture Description
TCP / IP is the protocol reference model is divided into four levels, they are: the network access layer, internetworking layer, a transport layer (host to host), and application layers.

  1. Application Layer
    The application layer corresponds to the level of the OSI reference model, to provide users with various services required, such as: FTP, Telnet, DNS, SMTP and so on.
  1. 传输层
    传输层对应于OSI参考模型的传输层,为应用层实体提供端到端的通信功能,保证了数据包的顺序传送及数据的完整性。该层定义了两个主要的协议:传输控制协议(TCP)和用户数据报协议(UDP).
    TCP协议提供的是一种可靠的、通过“三次握手”来连接的数据传输服务;而UDP协议提供的则是不保证可靠的(并不是不可靠)、无连接的数据传输服务.
  2. 网际互联层
    网际互联层对应于OSI参考模型的网络层,主要解决主机到主机的通信问题。它所包含的协议设计数据包在整个网络上的逻辑传输。注重重新赋予主机一个IP地址来完成对主机的寻址,它还负责数据包在多种网络中的路由。该层有三个主要协议:网际协议(IP)、互联网组管理协议(IGMP)和互联网控制报文协议(ICMP)。
    IP协议是网际互联层最重要的协议,它提供的是一个可靠、无连接的数据报传递服务。
  3. 网络接入层(即主机-网络层)
    网络接入层与OSI参考模型中的物理层和数据链路层相对应。它负责监视数据在主机和网络之间的交换。事实上,TCP/IP本身并未定义该层的协议,而由参与互连的各网络使用自己的物理层和数据链路层协议,然后与TCP/IP的网络接入层进行连接。地址解析协议(ARP)工作在此层,即OSI参考模型的数据链路层。

什么是网络编程:

什么是套接字:
源IP地址和目的IP地址以及源端口号和目的端口号的组合称为套接字。其用于标识客户端请求的服务器和服务.
通过使用套接字类达到进程间通信目的的编程就是网络编程

Here Insert Picture Description

网络编程的三要素:

(1) ip address
(2) Port
(3) protocol, rules, data transfer, interaction rules

network infrastructure:
Protocol (ip) is interconnected between the network of the Internet protocol Western abbreviations, abbreviated as Chinese Tennis Federation, in java use intAddress class represents;
IP version:
the IPv4: 192.168.10.30
the IPv6: 1080: 0: 0: 0:. 8: 800: 200C of: 417A
IP addressing scheme addresses: IP address of an IP addressing scheme is divided into the address space a, B, C, D, E five categories, wherein A, B, C is the base class, D, E and class reserved for use as a multicast.
10.0.0.0-10.255.255.255 Class A
Class B 172.16.0.0-172.31.255.255
Class 192.168.0.0-192.168.255.255 C

The difference between b / s and c / s is

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_42655650/article/details/102576772