Académique Documents
Professionnel Documents
Culture Documents
3 2 Layer 1 protocol
Physical medium
Layering Contd.
The danger in layering is the considerable latency added to message delivery. However, protocol families are used to define a standard, not to force how the standard is implemented. The most popular network architectures are OSI architecture and TCP/IP (transmission control protocol/internet protocol) architecture. Application Presentation Session Transport Network Data Link Physical OSI Layers Application Transport Network DataLink Physical TCP/IP Layers
Transport layer. This layer's responsibility is to control the flow of data between two communicating hosts. The Transport layer is responsible for breaking down data into packets and sending and receiving them from the Network layer. Network layer. This layer's responsibility is to route packets across the network. It is also responsible for some message control and group management. Link layer. This layer's responsibility is to handle the hardware-related details of the system. In other words, the Link layer is responsible for interfacing the operating system to the network interface card within the computer.
Internetwork communication
Homework
LAN Components
3 general characteristics:
A diameter of not more than a few kilometers. A total data rate of at least several Mbps. Completely ownership by a single organization.
The medium in LAN is usually a twisted pairs of copper wires, or coaxial cable, or fiber optics. It may also be wireless transmission. Hardware in LAN includes network interface cards (NICs), servers, communication devices. NIC connects a machine to LAN. Server provides service to other machines. Communication devices include repeaters, bridges, routers, and gateways etc..
LAN components
Repeaters copy individual bits between cable segments. Bridges connect LANs together. Routers or gateways connect LANs to WANs or WANs to WANs and resolve incompatible addressing.
Other LAN
Bridge To WAN router LAN server Repeater
Host Router
WAN
Wide area networks (WANs) carry message at a lower speed between computers that are separated by large distance. Many WANs and LANs can be combined to produce a single internetwork a communication system that interconnects large collections of geographically dispersed computers. The computers interconnected by a WAN are called host computers. The communication medium is a set of communication circuits linking a set of dedicated computers called packet switches or packet switching exchanges (PSEs). The OSI layer architecture, TCP/IP layer architecture, or other layer architectures can be used in building WANs.
WAN
In WANs (packet networks), a message is divided into packets before transmission and the packets are reassembled at the receiving computer (transport layer). A packet consists of a header and a data field. The header contains a transport address composed of the network address of a host and a port number. The PSEs operate the network by forwarding packets from one PSE to another along a route from sender to the recipient. PSEs are responsible for defining the route (network layer).
WAN
Every packet of data is stored temporarily by each PSE along its route before it is forwarded to another PSE (store-and-forward communication). The routing operations introduce a delay at each point in the route, and the total transmission time for a message depends on the route it follows. Two types of data transport service can be provided: connection-oriented -- a `virtual connection is set up between a sending and a receiving process and is used for the transmission of a stream of data; connectionless individual messages (datagrams) are transmitted to specified destinations.
Intranet
10 12 15 19 87
T2
DATA
10
87
A
LAN SW1
SW2 LAN
Internet
A S1 S3 D
WAN
F1 F2 LAN S3 D
Introduction to DLL
Receives service from physical layer and provides service to the network layer. Receives service from network layer and provides service to physical layer. Responsible for carrying data from one hop to the next hop.
10 12 15 19 87
T2
DATA
10
87
Duties
bridge
15 87
12
19
Duties of DLL
Addressing MAC or VC
Flow control
DLL is for point to point, or node to node on a common link LAN and WAN operate in DLL
IEEE standards
802 project
- LLC (logical Link Control) - MAC (Media Access Control)
802.3:CSMA/CD 802.4: TOKEN BUS 802.5: TOKEN RING 802.6: DQDB 802.11: WIRELESS LAN
MAC LLC
DLL
PHYSICAL LAYER
PHYSICAL LAYER
IEEE
INTERNET
Design issues
How to perform the duties stated in the last slide? DL can be designed to offer various services. 3 main responsibilities:
Unacknowledged Connectionless service. Acknowledged connectionless service. Connection oriented service.
Framing
Packetizing. Hand over the frame to physical layer. Or create frames from raw data received from physical layer. Breaks up bit streams into discrete frames and compute checksums for each frame.
Frame gap; in addition to this
Character count; rarely used now Starting and ending character with character stuffing Start, end flags with bit stuffing Physical layer coding violation
Character delimiter
ASCII character sequence used as frame delimiter When delimiter appears in the data consecutive delimiter character is used as a escape sequence.
Error control
Need feedback for sending frames. Waiting time for feedback: timer. Retransmit if frame or the acknow is lost. Potential danger to retransmitting. Use sequence number to each outgoing frame. Whole issue is of managing timers and sequence numbers so as to ensure that each frame is ultimately passes to the NL at the destination exactly once.
Flow control
How does a recv handle the situation when a sender sends frames faster than it can receive. Sender need feedback from recv to control its frame rate.
Access control
Link management
Physical, data link and Network layers are independent. Uses message to communi. Connection oriented, reliable channel. Infinite supply of data. No processing delay. Simplex mode. DL waits for a packet form NL. When and if DL recv a pack from NL, it encapsulates it into a frame adding some control bits (header), and then handed over to physical layer. Transmitting HW appends checksum bits and then transmits frame on the cable. DL in rcvr waits for a frame from physical layer. DL may wait in an infinite loop or for an interrupt from physical layer. Recv HW recv a frame and computes the checksum. If checksum is ok frame is recvd undamaged and passed to DL. DL checks if the destination matches with its own id. If everything is ok, DL drops the frame header and passed the packet to NL.
Definitions
const LastBit = .; {determines the pkt size} doomsday = false; {repeat forever} MaxSeq = .; {Highest Seq = 2n -1} type bit = 0..1; SequenceNr = 0 .. MaxSeq; packet = packed array [0 .. LastBit] of bit; FrameKind = (data, ack, nak); Frame = packed record kind: FrameKind; seq: SequenceNr; ack: SequenceNr; info: packet; end;
Definitions contd.
procedure wait (var event: EvType); begin {wait for an event to happen; return its type in event} end. procedure FromNL(var p: packet); begin {Fetch info from NL for transmission} end; procedure ToNL(p: packet); begin {delivers info from inbound frame to NL} end; procedure FromPhysL(var r: frame); begin {get an frame from PhysL and copy it to r} end; procedure ToPhysL(s: frame); begin {pass the frame s to PhysL for transmission} end; procedure StartTimer(k: SequencNr); begin {start the clock and enable TimeOut event} end;
Definitions contd.
procedure StopTimer(k:SequenceNr); begin {Stop the clock and disable TimeOut event} end; procedure StartAckTimer; begin {Start aux timer for sending separate acks} end; procedure StopAcktimer; begin {Stop aux timer and disable NLIdle event} end; procedure EnableNL; begin {allows NL to cause a NLReady event} end; procedure DisableNL; begin {Forbids NL from causing a NLReady event} end; procedure inc(var k: SequenceNr); begin {increment k circularly} end;
type Evtype = (FrameArrival); procedure sender2; var s:frame; buffer: packet; event: EvType; begin repeat FromNL(buffer); s.info = buffer; ToPhysL(s); wait(event); until doomsday end;
procedure receiver2; var s,r: frame; event: EvType; begin repeat wait(event); FromPhysL(r); ToNL(r.info); ToPhysL(s); until doomsday; end;
Operation: Normal
S=0
Data 0
R=0 S=1
Data 1
R=1
time
Lost frame
A receiver remains silent and keeps it value of R. After the time out interval at the sender ends, sender sends another copy of the frame.
Lost Acknowledgement
If the sender receives a damaged Ack, it discards it. When the timeout for Ack is over sender retransmits the frame. However, receiver discards the duplicate frame and sends the Ack again.
Delayed Ack
Ack is received by the sender after the timeout for ack 0. The sender already retransmitted a copy of the frame 0. Since receiver expects the frame 1, it simply discards the duplicate frame 0 and sends ack 1.
Piggybacking
Bidirectional transmission. Piggybacking combines data frame with acknowledgment
Frames are numbered sequentially from 0 to 2N-1. If N is 3, frames are: 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7, 0,1,2,3,.. Sliding window concept is used to hold the outstanding frame.
Control variables
S seq.no of recently sent frame. SF seq. no of the first frame in the window. SL Last frame in the window. R seq no of the frame it expects to receive.
Acknowledgement
If a frame is damaged or is received out of order, the recv is silent and will discard all subsequent frames. The silence of the recv. cause the timer of the unacknowledged frame in the sender to expire. Then sender go back to send all frames, beginning with the unacknowledged one.
Selective repeat
In noisy channel Go back N protocol is inefficient. Retransmission is high. Selective repeat protocol does no sent N frames; only the damaged frame is retransmitted. Sender and receiver window size must be less than or equal to 2m/2. Use Nack to report damaged frame.
3| 0| 1| 2| 3| 0 | 1 3| 0| 1| 2| 3| 0 | 1
Frame acknowledged S S S F L
Sender window
Receiver window
Explain that the size of sender and receiver window must be at most one-half of 2m.
Flag
Bit oriented. Use bit stuffing. Address: 1 or several bytes long. Ethernet uses more bytes for both sender and receiver addresses. Control
1 or 2 bytes long. Sequence no., ackn., etc. flow control. Information. Its length can vary from network to network but always fixed within each network. Error control
Data Checksum
On idle, flags sequences are transmitted continuously Minimum frame length three fields (32 bits)+flag bits.
HDLC contd.
Seq frame sequence no. 3 bit sliding window. Next piggybacked ackn. P/F poll/final, P is used when computer is inviting the terminal to send data. All the frames sent by the terminal set the bit to P, except the final one, which is set to F.
Information
Supervisiony
In some of the protocols the P/F bit is used to force the other machine to send a supervisory frame immediately rather than waiting for the reverse traffic onto which to piggyback the window information. Type for different kinds of supervisory frames. Type 0 is RECEIVE READY, 1 is REJECT. Next field indicates frames to be retransmitted, Type 2 receive not ready, Type 3 - selective reject. Unnumbered Frames used for connectionless services. Differs greatly on implementation.
PPP
Point to Point Protocol Purposes:
router to router traffic home user to ISP