The following are notes from Computer Networks written by Tanenbaum 5th edition.
- First networks were designed with hardware as the main concern, and software as an afterthought, but this is no longer the case
- Networks are organized as a stack of layers/levels
- purpose of each layer is to
- offer services to higher layers
- shield details in implementation from higher layers
- Protocol
- agreement between communication parties on how to proceed
- violating protocol makes communications more difficult
- Peers
- Entities comprising corresponding layers on different machines
- can be software, hardware, or humans
- peers communicate using protocol
- no data is directly transferred from layer n on one machine to layer n on another
- data passes to layer below it until lowest layer is reached
- transfer through physical communication
- between adjacent layers is an interface
- layer must perform specific collection of well understood functions
- protocols within a layer can change without layers above and below noticing
- Network Architecture
- set of layers and protocols
- contain enough information to allow implementer to write or build hardware to obey correct protocols
- interfaces are the same on all machines in a network, not visible from outside
- Protocol stack
- list of protocols used by a system
- example
- Message M produced by application process layer 5
- given to layer 4 to transmission
- pust a header in front to identify the message
- header includes control information, such as addresses
- usually no limit on size of transmission
- pass to layer 3
- breaks up messages into units and packets
- prepends layer 3 header to each packet
- decides outgoing lines to use
- pass to layer 2
- adds a trailer to each piece
- pass to layer 1
- physical transmission
- received message goes up in layers
- peer processes
- from same layer to same layer communication, even though the message passes through lower layers
- Reliability is the design issue of making correctly operating network
- codes for error detection
- more powerful codes allow for error correction
- finding working path
- routing
- evolution of network
- protocol layering
- addressing/naming to identify senders and receivers
- differences in max size of messages
- scalability
- resource allocation
- Statistical multiplexing
- sharing based on statistics of demand
- flow control
- oversubscribed to a channel, network cannot deliver
- congestion
- real time delivery high throughput
- quality of service
- Security
- confidentiality to defend against eavesdropping on layers
- authentication to prevent impersonation
- integrity
- Connection-oriented
- modeled after telephone system
- service first establishes connection
- uses connection then release
- order of bits/date preserved
- negotiation about parameters to be used
- makes proposal, other side, accept, reject, counterproposal
- circuit - connection with associated resources, such as fixed bandwidth
- Connectionless
- modeled after postal system
- full destination address
- routed through intermediate nodes
- packet is a message at network layer
- store and forward switching
- receive message in full before sending to next node
- cut-through switching
- transmission starts before completely received
- Both characterized by reliability
- connection oriented service
- file transfer
- all bits arrived correctly and in same order
- message sequences
- has boundaries preserved, message length same
- i.e. pages in a book
- byte streams
- no message boundary
- i.e. download movie
- voice over IP
- video conference
- few pixels wrong is ok, some noise ok better than having a delay
- unreliable connectionless service
- datagram
- from telegram, does not return an acknowledgement or ack to sender
- dominant form in networks despite unreliability
- acknowledged datagram service
- send letter request return receipt
- request reply service
- datagram sends request, reply sends answer
- client-server implementation
Service Primitives
- primitives(operations)
- formally specified to access a service
- Socket interface
- LISTEN
- Block wait for incoming connection
- CONNECT
- establish connection
- ACCEPT
- accept connection
- RECEIVE
- wait for message
- SEND
- send message
- DISCONNECT
- terminate connection
- Server Client
- Server executes LISTEN to accept incoming connections
- Client executes CONNECT to establish connection with server
- Packet arrives at server, OS sees package is requesting connection
- checks for listener
- Server executes CONNECT
- sends response to client
- on arrival client released
- both sides are running and have connection
- Server executes RECEIVE
- accept first request
- after release from listen goes into this phase
- Client executes SEND
- immediately after SEND goes into RECEIVE
- to get reply
- arrival of request unblocks server to handle request
- Server executes SEND
- arrival of packet unblocks client
- Client done
- call DISCONNECT
- sends packet to server saying connection not needed
- Server DISCONNECT
- 6 packets required to complete protocol
- Services and Protocols distinct
- service is a set of primitives to layer above it
- defines operations to be performed
- relates to an interface between two layers
- protocol set of rules governing format and meaning of packets
- service definitions
- can change protocols at will as long as service visible not changed
- like abstract data type
No comments:
Post a Comment