physical layerPhysical Layercomputer networkOSI modelThe lowest floor in the.Physical layer regulation: provide mechanical, electronic, functional and normative features for the creation, maintenance and removal of physical links required for data transmission.In short, the physical layer ensures that the originaldataIt can be transmitted on various physical media.LANAndWANBoth belong to the first and second floors.
The physical layer isOSIAlthough it is at the bottom layer, it is the foundation of the entire open system.The physical layer is between devicesdata communicationProvide transmission media and interconnection equipment fordata transmissionProvide a reliable environment.If you want to remember the first level with as few words as possible, that is“signalandmedium”。
OSI adopts various ready-made protocols, including RS-232RS-449、X.21、V.35、ISDN、And FDDIIEEE802.3、IEEE802.4、And IEEE802.5.[1]
(1) The physical layer should shield the physical devices and transmission media as far as possible. The data link layer should not feel these differences due to the difference in communication means, and only consider completing the protocols and services of this layer.
(2) The ability to give its service users (data link layer) the ability to transmit and receive bit streams (generally serial and sequentially transmitted bit streams) on a physical transmission medium. To this end, the physical layer should solve the problems of establishing, maintaining and releasing physical connections.(3) The data circuit is uniquely identified between two adjacent systems.[2]
Main functions of physical layer: provide data transmission path and data transmission for data terminal equipment.
1. Provide data transmission channel for data terminal equipment,Data pathCan be aPhysical media, or it can be connected by multiple physical media.Once completedata transmission, including activating the physical connection, transmitting data, and terminating the physical connection.The so-called activation means that no matter how many physical media participate in the communicationData terminal equipmentTo form a pathway.
2. To transmit data, the physical layer should form aentity, is a data transfer service.One is to ensure that the data can be passed correctly, and the other is to provide enoughbandwidth(Bandwidth refers to theBit(BIT) to reduce channel congestion.Transmitting datamodeIt can meet the requirements of point-to-point, point to multipoint, serial or parallel, half duplex or full duplex, synchronous orAsynchronous transmissionNeeds.
3. Complete some management work of the physical layer.[3]
component
Announce
edit
physical layer
The media of the physical layer includes overhead open wire, balance cableOptical fiber, wireless channel, etc.Interconnection equipment for communication refers to the interconnection equipment between DTE and DCE.DTE is data terminal equipment, also known asPhysical devices, such as computers and terminals.DCE isdata communicationEquipment or circuit connection equipment, such as modem, etc.data transmissionIt usually goes through the path of DTE - DCE, and then DCE - DTE.Interconnection equipment refers to the devices connecting DTE and DCE, such as various plugs and sockets.All kinds of thick and thin in LANCoaxial cableT-connector, plug, receiver, transmitter,RepeaterMedia andConnector。[4]
Important content
Characteristics of physical layer interface
(1) Mechanical characteristics
Indicate the shape and size of the connector used for the interface, the number and arrangement of leads, fixing and locking devices, etc.
(2) Electrical characteristics
Indicates the range of voltages present on each line of the interface cable.
(3) Functional characteristics
Indicate what the voltage of a certain level on a line means.
(4) The procedure characteristics indicate the occurrence sequence of various possible events for different functions.
Main characteristics of the physical layer:
(1) Before OSI, many physical procedures or protocols have been formulated, and in the field of data communication, these physical procedures have been adopted by many commercial devices. In addition, the physical layer protocols cover a wide range of areas. So far, a new set of physical layer protocols has not been formulated according to the abstract model of OSI, but the existing physical procedures have been used,The physical layer is defined as the mechanical, electrical, functional and procedural characteristics that describe the interface with the transmission media.
(2) Because there are many physical connection methods and many types of transmission media, the specific physical protocol is quite complex.[2]
Signal transmission can not be separated from the transmission medium, and there must be interfaces at both ends of the transmission medium for sending and receiving signals.Therefore, since the physical layer is mainly concerned with how to transmit signals, the main task of the physical layer is to specify some characteristics related to various transmission media and interfaces and transmission signals.
1. Mechanical characteristics
Also called physical characteristics, it indicates the mechanical characteristics of the hardware connection interface between communication entities, such as the shape and size of the connector used for the interface, the number and arrangement of leads, fixing and locking devices, etc.This is very similar to the usual power plug of various specifications, and its size has strict regulations.
ISO standardizedDCEThe geometric dimension of the interface and the number and arrangement of the jack cores.
The connector of DTE (Data Terminal Equipment, equipment used to send and receive data, such as user's computer) is commonly used in pin form, and its geometric dimension is the same as that of. DCE (Data Circuit Terminating Equipment, equipment used to connect DTE and data communication network, such as ModemModem)The connector shall be matched, and the number and arrangement of pin cores shall be mirror symmetrical with the DCE connector.
2. Electrical characteristics
It specifies the electrical connection of wires and the characteristics of relevant circuits in physical connection, generally including: description of receiver and transmitter circuit characteristics, signal identification, description of maximum transmission rate, rules related to interconnection cables, output impedance of transmitter, input impedance of receiver and other electrical parameters.
3. Functional characteristics
Indicate the purpose (usage) of each signal line of the physical interface, including: the method for specifying the function of the interface line, the functional classification of the interface signal line -- data signal line, control signal line, timing signal line and grounding line.
4. Procedure characteristics
Indicate the whole process of using the interface to transmit the bit stream and the legal sequence of events used for transmission, including the execution sequence of events and data transmission mode, that is, the action sequence of DTE/DCE on their respective circuits when the physical connection is established, maintained and information is exchanged.
The above four characteristics realize the regulations of the physical layer on signals, interfaces and transmission media when transmitting data.
Important standards
physical layer
Some standards and protocols of the physical layer have been formulated and applied long before the establishment of the OSI/TC97/C16 Subcommittee,
OSI has also developed some standards and adopted some existing achievements.Some important standards are listed below for readers' reference.
ISO2110: It is called "Data communication -- 25 core DTE/DCE interface connector and pin assignment".It is basically compatible with EIA's "RS-232-C".
ISO2593: It is called "Data Communication -- 34 core DTE/DCE -- Interface Connector and Pin Allocation".
ISO4902: It is called "Data Communication -- 37 core DTE/DEC -- Interface Connector and Pin Allocation".Compatible with EIARS-449.
CCITT V. 24: It is called "the data terminal equipment (DTE)InterfaceCircuit definition table
It is compatible with EIARS-232-C and RS-449 on the 100 serial line.
characteristic
Reflected in physicsInterfaceThe four characteristics of the physical interface in the protocol are mechanical characteristics, electrical characteristics, functional characteristics and procedural characteristics
physical layer
(1) Mechanical characteristics, specifyingInterfaceThe shape andsize, number and arrangement of leads, fixing and locking devices, etc.This is very similar to the usual power plugs of various specificationssizeThere are strictregulations。
(2) Electrical characteristics, indicatingInterfaceThe range of voltages present on each line of the cable.
Electrical characteristics of physical layerregulationsWhen transferring binary bit stream on physical connectionlineUpper signal voltage and impedance matchsituation, TransmissionrateThe earlier electrical characteristics standards defined the electrical characteristics at the physical connection boundary points, while the newer electrical characteristics standards defined the electrical characteristics of the transmitter and receiver. At the same time, the relevant provisions of the interconnection cable were also given. By comparison, the newer standards are more conducive to the integration of the transmission and reception lines. Physical layerInterfaceIts electrical characteristics are mainly divided into three categories: unbalanced type, new unbalanced type and new balanced type.
Unbalanced transmitter and receiver are both unbalancedmodeWorking, each signal is transmitted by a wire, and all signals share a ground wire. The signal level is+5V~+15V, representing binary "0", and - 5V~- 15V, representing binary "1"Signal transmission rateLimited to 20Kbps, wirelengthIt is limited to 15M. BecauseThe signal lineIt is a single line, so the interference between lines is large, and the transmissionprocessThere is also a lot of external interference.
physical layer
In the new unbalanced standard, the transmitter is unbalancedmodeWork. The receiver works in a balanced way (i.e. differential receiver). Each signal is transmitted by a wire. All signals share two ground wires, i.e. one ground wire in each direction. The signal level uses+4v~+6v to represent binary "0", and - 4V~- 6V to represent binary "1". When the transmission distance reaches 1000M, the signal is transmittedrateBelow 3kbps, with the increase of transmission rate, the transmission distance will be shortened. Short distance within 10MsituationThe transmission rate can reach 300 kbps.Because the receiver adopts differential reception, and each direction uses signal ground independently, the interference between lines and outside is reduced
New balanced standardregulations, transmitter and receiver are both differentialmodeWorking, each signal is transmitted by two wiresInterfaceIt can work normally without sharing signals. The signal level is represented by the difference between the signals on two wires. Relative to a wire, the difference between+4V and+6V represents binary "0", and the difference between - 4V and - 6V represents binary "1". When the transmission distance reaches 1000M, the signal transmission rate is below 100kbps;In case of short distance transmission within 10m,rateUp to 10Mbps.Because each signal is transmitted by two lines, the interference between lines and external interference is greatly weakened, and it has a high ability to resist common mode interference.
(3) Functional characteristics, which specify the source and function of interface signals and the relationship between other signals.That is, physicsInterfaceTop itemsThe signal lineFunction allocation and exact definition of.PhysicsInterfaceThe signal lineIt is generally divided into data line, control line, timing line and ground line.
Common connection mechanical characteristics
The functional characteristics of DTE/DCE standard interface are mainly to define the exact function of each interface signal line and determine the operating relationship between each other.Two methods are usually used to define each interface signal line: one is the one line one meaning method, that is, each signal line is defined as a function, which is used by CCITT V24, EIA RS-232-C, EIA RS-449, etc;The other method is the one line ambiguity method, which means that each signal line is defined as multiple functions. This method is conducive to reducing the number of interface signal lines. It is called CCITT X.21.
Interface signal line can be generally divided intoground wire、data line、Control line, timing line, etc.The naming of each signal line usually adopts three forms of numbers, letter combinations or English abbreviations. For example, EIA RS-232-C adopts letter combinations, EIA RS-449 adopts English abbreviations, and CCITT V.24 is named after a number.At CCITT V.24 In the proposal, the DTE/DCE interface signal line is named after 1, so it is usually called 100 series interface line, while the DTE/ACE interface signal line is named after 2, so it is called 200 series interface signal line.
(4) Discipline characteristics, definedThe signal lineA group of operations for binary bit stream transmission on theprocess, including the working sequence and timing of each signal line, so that the bit transmission can be completed.
The procedure characteristics of DTE/DCE standard interface specify the interrelation, action sequence, maintenance and test operation of each signal line of DTE/DCE interface.The procedure characteristics reflect various possible events that may occur between the two parties in the process of data communication.Because the sequence of these possible events is different, and there are many combinations, the discipline characteristics are often complex.A better way to describe the characteristics of a procedure is to use the state transition diagram.Because the state transition diagram reflects the transition process of the system state, and the system state transition is determined by the current state and the events (referring to the control signals that occurred at that time).
Different physicsInterfaceThe standards differ in the above four important characteristics.Physical is widely used in the actual networkInterfaceThe standards include EIA-232-E, EIA RS-449 and X of CCITT.21 Recommendations.EIA RS-232C is still the most commonly used computer asynchronous communication interface.
Interface protocol
Announce
edit
one
Telephone network modems-V.ninety-two
two
IRDA physical layer
three
USB physical layer
four
EIARS-232,EIA-422,EIA-423,RS-449,RS-485
five
Ethernet physical layerIncluding10BASE-T, 10BASE2, 10BASE5100BASE-TX, 100BASE-FX. 100BASE-T, 1000BASE-T, 1000BASE-SX and other types
six
Varieties of 802.11 Wi Fi physical layer
seven
DSL
eight
ISDN
nine
T1 and otherT-carrierlinks, and E1 and otherE-carrierlinks
ten
SONET/SDH
eleven
Optical Transport Network(OTN)
twelve
GSMUm air interface physical layer
thirteen
Bluetooth physical layer
fourteen
ITURecommendations: seeITU-T
fifteen
IEEE 1394 interface
sixteen
TransferJet physical layer
seventeen
Etherloop
eighteen
ARINC 818 Avionics Digital Video Bus
nineteen
G. Hn/G.9960 physical layer
twenty
CAN bus (controller area network) physical layer
Communication hardware
Announce
edit
Common equipment in the physical layer include: network card optical fiber, CAT-5 cable (RJ-45 connector), hub with integral wave function, Repeater enhanced signal, serial port, parallel port, etc.
Communication hardware includesCommunication adapter(Also calledcommunication interface)And modem (MODEM) andCommunication line。fromprincipleThe physical layer only solves the bit stream transmission between DTE and DCEnetwork nodeThe communication control device, which is the main component of the equipment, has its own connotation in the physical layerdata link layer, or even higher level, the boundary is not very clear in terms of content, but it containsMODEMInterface、BitThe functions such as sampling and sending, bit buffering, etc. of thecategoryOf.In order to realize the communication between PC and modem or other serial devices, you must first useElectronicslineConvert the parallel data in the PC into a bit stream compatible with these devices.In addition to the transmission of the bit stream, it is also necessary to solve how many bits a character consists of and how to extract from the bit streamcharacterAnd other technical problems, which requires the use of communication adaptation.Communication adapterIt can be regarded as a circuit used to complete serial and parallel conversion of binary data and other related functions.Communication adapterIt can be divided into TTY (Tele Type Writer,Teletypewriter)、BSC(Binary Synchronous Communication, binarySynchronous communication)AndHDLC(High-level Data link Control,Advanced Data Link Control)Three.
IBM PC AsynchronousCommunication adapter: Use TTYrulesAsynchronous communication adaptation ofRS - 232C interface standard。suchCommunication adapterIn addition to being used for PC online communication, it can also be connected to a variety of RS-232CInterfaceOfperipheral。For example, you can connect themouseDevice, digitizer, etcinput device;Can be connected toprinter, plotter and CRTmonitorEtcoutput device。Visible, asynchronousCommunication adapterIt is widely used.The asynchronous communication procedure regards each character as an independent information, and the characters can appear in the bit stream in ordertimeIt is arbitrary (that is, asynchronous timing is used between characters), but each bit in the character is fixedclock frequencyTransmission.Asynchronous timing between characters and synchronous timing between bits in characters areAsynchronous transmissionCharacteristics of the procedure.
1 bitOdd/even check bit: Used for error detection.
five
1~2 stop bits: represented by logic "1", used as the space between characters.This transmissionmodeIn, each character is separated by a start bit and a stop bit, so it is also called "start stop" transmission.Serial portEach parallel character in the data to be sent is first converted into a serial bit string, and the start bit is added before the string, and the check bit and stop bit are added after the string, and then sent out.The receiver guarantees the integrity of the bit string in the received character by detecting the start bit, check bit and stop bit, and finally converts them into parallel characters.Serial asynchronous communicationThe adapter itself is like aMicrocomputer, the above functions are all controlled bytransparentTo be completed withoutuserintervention.Early asynchronyCommunication adapterBe made into separateplug-in unitThe board can be directly inserted into the system expansion slot of the PC for use. Later, most of the asynchronous communication adapters and other adapters (such as printersdisc driveThe adapter is built on a plug-in board called a multi-function board.There are also some high-grade microcomputers, which have been asynchronousCommunication adapterWorking in the systema main boardUp, asmicro-computer systemA regular part of.
Programming method
Announce
edit
PCAsynchronous serial communicationThe contents of programming methods include DOS, WINDOWS and BIOS level PC communication, PC communication of systems based on asynchronous communication and communication programming methods.
DOS communication
PCGenerally, there are two asynchronous serialport, called COM1 and COM2 respectively, which conform to the RS-232C standard.staydos operating system COM1 and COM2 are managed as I/O devices, and COM1 and COM2 are theirLogical deviceFirst name.Therefore, DOS can realize asynchronous serial communication by operating COM1 and COM2.The MODE command of DOS can be used to set asynchronySerial portOfparameterThe DOS COPY command allows you to use the asynchronous serial port as a special“file", proceeddata transmission。Here is an example of how to use the MODE and COPY commands of DOS to run dual computerskeyboardInput character transmittedexample。 Of the MODE commandformatAs follows:
MODE port name:rate,Verification method, data bits, stop bits
Where the port name is COM1 or COM2;transmissionrate110, 150, 300, 600, 1200, 2400, 4800 or 9600bps;checkmodeIs E(Even check)、(Odd check)Or N (no calibration);The number of data bits is 7 or 8;The number of stop bits is 1 or 2.The parameters set by both communication parties should be consistent. If both parties enter the following command: MODE COM1:1200, E, 7, 1 meansboth sidesCOM1 is used as the asynchronous communication port to communicate with the setting parameters of 1200bps, even calibration, 7-bit data bit and 1-bit stop bit.There is a standard console COM in DOS. In fact, COM is the keyboard when input, and COM is the keyboard when outputmonitor。[1]
The PC to be sent executes the following command: COPY CON: COOM1: indicates that the information received from the keyboard will pass through COM1Serial portsend out.
The PC to be received will execute the following command: COPY COM1: CON:serial And display it on the display.
After the two PCs execute the above commands respectively, the characters entered on the sender's keyboard will be displayed on the receiver's display.The above description is the simplest PC communication realized with the MODE and COPPPY commands of DOS.stayMS-DOSThe higher version of (for example, MS-DOS V6.0) also provides a command called INTERLNK, which is actually a communication program.Using INTERLNKcommandAnd one to connect two PCsSerial portA PC can access data and run programs from the disk drive of another PC without usingfloppy diskgoCopyFile.The PC used to type commands is called Client, and the PC connected to the client is called ClientThe server(Server)。The client uses the server's drive andprinterThe server displays the connection status of two PCs.
After two PCs are connected by INTERLNK, the drive on the server will be mapped to the client in the form of extended drivedriveAfter the connection, the client has three additional extended drives, E, F, G (server drive image), in addition to its own three drives. The client can use these extensions as if it were using its own drivesDriver。When using INTERLNK, each PC must have at least one freeSerial portAnd a cable for Line 3 or Line 7Null modem(Null Modem) SerialCable line, at least 16K free memory on the client and at least 130K free memory on the serverMemory。
In the client's CONFIG system configuration file.Add the following command to SYS: deve=c: dos interlnk.exe/drives:5
Restart the client to load INTERLNK.Here we assume interlank.Exe inClientIn the DOS subdirectory of drive C, the/drives: 5 parameter is used to image five server drives. By defaultsituationThere are 3 drives below.CONFIG is not required to start INTERLNK on the server.SYS can make any changes only in DOScommand promptType intersvr.At this point,screenA line appears at the bottomstatus information , display the connection status of INTERLNK.
PC communication
Microsoft Windowsapplication programTerminal allows the user's PC to connect with other computers and exchange data. It can also be simulated as required by the remote computer with which the data will be exchangedTerminal type。The following shows a terminal slave of a PC using WINDOWS with a connection serviceremote systemRead file communicationprocess。
Open the terminal - use the Settings menu to set parameters - view files - use the Transfers menu to receive a file - go offline with the remote computer - use the phone menu to suspend the modem - use the File menu to store files - exit the terminal