Interview, the interviewer if you want to test the computer network learning how, how to say also need to ask the TCP three handshake process it?
So, I began to review the computer network April 24, intermittent review for 3 days.
ISP: Internet services Provider Internet service Provider
Eg: Chinese telecom, China Unicom and mobile
A router is a dedicated computer. The router implements a key component of packet switching (packet switching). Its task is to forward the received groupings.
Circuit switching-the bitstream of the entire message is continuously flowing from the source to the end point, as if it were being transported in a pipe
Message Exchange--the entire message is first transmitted to adjacent nodes, all stored down to find the forwarding post and forwarded to the next node.
Packet switching--a single grouping (which is only part of the entire message) is transmitted to adjacent nodes, stored down to find the forwarding post, forwarded to the next node.
Network classification
Wan-wan (Wide area Network)
Metropolitan Area Network-man (Metropolitan area Network): City
LAN-lan (local area network) EG: Campus network or Enterprise network
Personal area Network-pan (Personal region Network) Eg: Network connected by wireless technology for computers (WiFi)
OSI,TCP/IP, five-layer protocol architecture, and layer protocols
OSI layering (layer 7): Physical layer, Data link layer, network layer, transport layer, Session layer, presentation layer, application layer.
TCP/IP tiering (layer 4): network interface layer, internetwork layer, Transport layer, application layer.
Five layer protocol (layer 5): physical layer, Data link layer, network layer, Transport layer, application layer .
In combination with OSI and TCP/IP, a five-layer structure is created, namely: physical layer, Data link layer, network layer, Transport layer and application layer. The Internet is the TCP/IP protocol used
The function of each layer is as follows:
Physical layer: Transmission of bits via media, determination of mechanical and electrical specifications (bit bit)
Data Link layer: assemble bits into frames and point-to-place passes (frames frame)
Network layer: Responsible for packet transfer from source to host and Internetwork (package packet)
Transport Layer: Provides end-to-end reliable message delivery and error recovery (segment segment)
Session Layer: Establish, manage, and terminate sessions (Session Protocol data Unit SPDU)
Presentation layer: Translating, encrypting, and compressing data (representing protocol data unit PPDU)
Application layer: means to allow access to the OSI environment (Application Protocol Data unit APDU)
Frequency Division Multiplexing: All users occupy different frequency bandwidths at the same time.
Time Division Multiplexing: All users occupy the same band width at different times.
Protocol data Unit for the data link layer of the point-to-point channel--frame
Three basic issues with the data link layer:
Encapsulate frames: Add headers and tails to a piece of data before and after each, forming frames
Transparent transmission
Error detection: Cyclic redundancy test CRC error detection technology
Upper limit of data part length of frame-Maximum Transfer Unit MTU (Maximum Transfer unit)
CRC is a method of error detection, and FCS is a redundant code that is added behind the data.
PPP Protocol : The Data Link layer protocol used by the user's computer and the ISP to communicate.
Format of PPP frames: 75 pages
Adapter (network card): responsible for sending frames to the LAN and receiving frames from the LAN
Adapter receives and sends various frames without using the computer's CPU, the adapter is equipped with processor and memory (including RAM and ROM)
Broadcast Communication mode: When a computer sends data, all computers on the bus can detect this data.
CSMA/CD protocol: A station cannot send and receive at the same time (but must be on the side to send side listening channel )
The uncertainty of sending: Each station has the possibility of encountering collisions within a short period of time after sending the data itself. This short period of time is uncertain, it depends on the other station to send data to the distance from the station.
Contention period (collision window): End-to-end round-trip time for Ethernet 2i
after the contention period has not detected a collision, in order to be sure that the transmission will not clash . At this point, you can rest assured that this frame of data sent successfully completed.
The contention period for Ethernet is determined to be 51.2us
Ethernet specifies a minimum frame length of 64 bytes, or 512bit. If you send very little data, you must add some padding bytes so that the frame length is not less than 64 bytes.
Ethernet When sending data, if there is no collision during the contention period (64 bytes sent altogether), then the data sent will not conflict .
Any frame that is less than 64 bytes in length is an invalid frame that was aborted due to a conflict.
If a collision is detected during the contention period, then it is time to postpone the temporary retention of the frame and retransmit it again.
The adapter has the filtering function : hardware is used to check the destination address in the Mac frame for each Mac frame received from the network. If the frame is sent to the site to accept, otherwise this frame is discarded.
"Frames destined for this site" includes the following three types of frames :
Unicast (unicast) frame (single-to-one): The MAC address of the received frame is the same as the hardware address of the site
Broadcast (broadcast) frame (one-to-all): frames sent to all sites on this LAN (all 1 addresses)
Multicast (multicast) frames (one-to-many): frames sent to a portion of the site on the local area network
Hardware Address (or called Physical Address/mac address).
This 6-byte MAC address has been cured in the adapter's ROM while the adapter is being produced.
Format of MAC Frames: 92 pages
Hubs: Ethernet using hubs is logically still a bus network , where each station shares the logical bus, using the CSMA/CD protocol. A hub has many interfaces.
Data Link Layer expansion Ethernet to use a network bridge (bridge). The bridge works at the data link layer, forwarding and filtering the received frames according to the destination address of the Mac frame.
The bridge relies on forwarding to forward frames. Forwarding is also called the routing directory or forwarding database. Page 95
Transparent Bridge (Transparent bridge): currently used most. The bridge can work without manually configuring a forwarding post. is a Plug and Play device.
The bridge processes the received frames via the self-Learning algorithm (self-learning ), and forwards the frames according to the forwarding post. 98-Important
An Ethernet switch is actually a multi-interface bridge.
The biggest advantage of the switch: the bandwidth per interface to the host is 10mb/s. The total capacity for switches with n-to-interfaces is n*10mb/s.
Ethernet frame Format: 102 pages
virtual LAN VLAN is a logical group composed of some local area network segments that are independent of the physical location, and these segments have common requirements. The virtual LAN protocol allows a 4-byte identifier, called a VLAN tag (tag), to be inserted in the Ethernet frame format . Used to indicate which LAN the workstation that sent the frame belongs to.
Class A address network number: 126, namely 2^7-2=126;
Reason for minus 2: all 0 of the IP address represents "this network". The network number is 127 (0111 1111) reserved for communication between processes that are part of the local software loopback test (loopback test) of this host.
The Class A address host number occupies 3 bytes, so the maximum number of hosts in each Class A network is 2^24-2;
Minus 2 Reason: all 0 of the host Number field indicates that the IP address is "This host" connected to a single network address;
(The IP address of a host is 5.6.7.8, the host's network address is 5.0.0.0)
The full 1 represents "all", so the full 1 host Number field represents all hosts on that network.
The router always has two or more two IP addresses. That is, each interface of the router has an IP address with a different network number . Page 121
ARP is the address Resolution Protocol, and simple language explains how it works.
1. First, each host establishes an ARP list in its own ARP buffer to show the correspondence between the IP address and the MAC address .
2, when the source host to send data, first check the ARP list for the destination host IP address. If so, the corresponding hardware address is detected in the ARP cache, the hardware address is written to the Mac frame, and the Mac frame is sent to this hardware address through the LAN .
If not, send ARP packets to all hosts in this segment, including: Source host IP address, source host MAC address, destination host IP address.
3, when all hosts of this network receive the ARP packet, first check whether the IP address in the packet is its own IP address, if not, then ignore the packet, if it is, first remove the source host's IP and MAC address from the packet is written to the ARP list, if it already exists, overwrite, Then write your MAC address to the ARP response packet and tell the source host that it is the MAC address it wants to find.
4. After the source host receives the ARP response package . Writes the IP and MAC addresses of the destination host to the ARP list and uses this information to send the data. If the source host has not received an ARP response packet, it indicates that the ARP query failed.
The broadcast sends an ARP request, and a single advertisement sends an ARP response.
IP address and subnet mask phase & Get host number
Internetwork Control Message Protocol ICMP (Internet command message Protocol)
There are two types of ICMP packets, ICMP error message and ICMP inquiry message.
ICMP Inquiry message:
echo Request and Answer: A query sent by a host or router to a specific destination host. the host receiving this message must send an ICMP reply message to the source host or router.
Timestamp request and Answer: Ask a host or router to answer the current date and time.
PING: Used to test connectivity between two hosts .
Ping is an example of using the network layer ICMP directly by the application layer. It does not pass the transport layer of TCP or UDP
RIP and OSPF
Virtual Private Network
For these computers that are used only within the organization, their IP addresses can be assigned by the agency itself . This means that these computers use IP addresses (known as local addresses ) that are valid only in this institution, without requiring the Internet's governing body to apply for a globally unique IP address (called a global Address). This can greatly save valuable global IP address resources .
Private address: can only be used for internal communication of one institution, not for communication with hosts on the Internet . That is, a private address can only be used as a local address and not as a global address.
all routers in the Internet are not forwarded to a datagram where the destination address is a private address .
Private Address: