14 - communincation Flashcards
protocol
- set of rules governing communication across a network - agreed by
both sender and recipient
need for protocols
- both parties need to agree on the protocol to ensure communication is successful
- without agreeing cant use parity checking
TCIP/IP
DARPA Layers
Application
Transport
Internet
Link network
↓sending ↑receiving
TCIP/IP +
+ layers breaks down the process into manageable self contained modules (DECOMPOSITION)
+ its easier to develop and make hardware/ software compatible
application layer
- what the user sees
- contains programs that exchange data eg web browsers of server software
- sends files to transport
- includes: HTTP, SMTP, POP, IMAP, DNS, FTP, RIP, SNMP
HTTP
hypertext transfer protocol
- for transferring files that make up web pages on the WWW
- uses hyperlinks
- client server
HTTP process - how its used to request resources
- User types URL
- HTTP transmits request from application to transport (TCP)
- TCP creates packet and sends to destination ports
- DNS server uses domain name to look up IP address
- Server TCP sends back acknowledgement
- Now communication has been established the web server sends the web page back in HTML to the browser
- Browser displays page
SMTP
simple mail transfer protocol
- sending emails
- text based
- push protocol
- no binary files eg media/ images/ video/ music - need to use MIME (multi purpose internet mail extension)
push protocol
eg SMTP
a client opens connection with server and keeps the connection active, then the client uploads a new email
pull protocol
eg POP and IMAP
client connects to server, checks for and downloads new emails, connection is then closed - this is the repeated
POP
Post office protocol
- recieving emails
- pull protocol
IMAP
Internet message access protocol
- recieving emails
- pull protocol
POP vs IMAP
- POP doesn’t keep server and client synchronised - when emails are downloaded they are deleted from the server
- IMAP - is synchronisation - a copy remains on the server
FTP
file transfer protocol
- Used to transfer files from one device to another via internet/ networks
FTP features
- Anonymous ftp - allows the user to access without identifying themself
- Ftp commands - a user can carry out actions that change files on an ftp server eg delete, close, rename
- Ftp server - where files are stored
packet
a message/data is split up into smaller groups of bits for transmission over a network.
MIME
multi-purpose internet mail extension. A protocol that allows email attachments containing media files as well as text to be sent
binary file
a file that does not contain text only. The file is machine-readable but not human- readable.
transport
- Regulates network connections
- data is broken into packets
- Adds segment number and port number
- Ensures packets arrive in sequence without errors - swap acknowledgments and retransmit corrupted/lost packets
Includes: TCP, UDP, SCTP
TCP
- responsible for safe delivery of messages by creating sufficient packets
- positive acknowledgement - PAR - automatically resends packets if it doesn’t receive acknowledgment
- Connection oriented - establishes end-to-end connection between hosts
- Host to host - connects hosts using handshakes
steps in connection TCP
- Host1 sends host2 a segment (including synchronisation sequence bits to ensure correct order)
- Host2 responds by sending back a segment (containing acknowledgement and its own synchronisation sequence bits)
- Host1 sends out its acknowledgement that the segment was received
- Transmission between 1 and 2 now takes place
internet
- Identifies the intended network and host
- Uses IP
IP functions
- Ensures correct routing of packets
- Takes packet from transport - adds its own header (inc IP address of sender/ recipient)
- IP packets (datagram) is sent to data-link layer where it assembles datagrams into frames
network / link layer
- Identifies and moves traffic across local segments
- encapsulates IP packets into frames for transmission
- Maps IP to MAC and ensures correct protocols
- Physical network layer - specifies requirements of hardware to be used
- Data link layer - identifies protocols in the packet header (TCP/IP in this case) and delivers packets to network
physical network layer
specifies requirements of hardware to be used
data link layer
identifies protocols in the packet header (TCP/IP in this case) and delivers packets to network
ethernet protocols
- System that connects a number of computers or devices to form a LAN (not Internet)
- Uses protocols to control the movement of frames between devices and prevent simultaneous transmission
- Local protocol - does not allow you to communicate with external devices (need IP for this)
components of ethernet data
- Destination - MAC address of the destination computer
- Source - MAC address of the source computer
- Ethernet type or length -
○ if the frame length ≤ 1539B then this is the length of the Ethernet frame
○ if the frame length > 1539B then this is the Ethernet type (IPv4 or IPv6 in our example) - Frame check - includes a checksum to allow checking of data integrity
bittorrent
- Peer to peer - but scaled up
- fast file sharing over the Internet - allows many peers to share files
bit torrent file sharing
- Torrent is created
- File is broken into = segments called pieces
- peers wanting to download a file have to obtain the torrent and connect to the appropriate tracker
- Each peer gets a piece of file and they become a source for that piece so other peers know where to find it
- Once a peer has downloaded a files completely they make the file available to other peers in the swarm and become a seed.
- The more seeds the faster the file downloading process
- Logging off is frowned upon as comps need to be on to download from
torrent
small file containing metadata about the file that’s about to be shared
swarm
group of peers connected
seed
peer that has downloaded a file and then made it available to the other peers
tracker
- central server that stores details about other peers, eg IP allows users to locate each other
leech
a peer that has a negative impact on the swarm by downloading more than uploading
* Ratio - amount uploaded/ downloaded
* If >1 then positive impact
* If <1 then negative impact
lurker
a peer that downloads files but doesn’t make any new content available
circuit switching
- Method of transmission where a dedicated channel/circuit lasts the duration of communication
- E.g. PSTN
circuit switching stages
○ Channel between sender and receiver established
○ Data transfer takes place - normally bidirectional
○ After data transfer is complete connection is terminated
circuit switching pros
- circuit dedicated to single transmission
- whole bandwidth available
- faster data transfer rate
- packets arrive in same order
- no lost packets as packets follow in sequence
packet switching
- a message is broken into packets which can be sent along paths independently from each other
- Packets need to be reassembled in order at destination - by TCP/IP
- Each packet follows own path
- Routing selection depends on number of packets waiting to be processed at each node (traffic)
- Shortest available path is selected
- Packets can reach destination in different order to how sent
- E.g. VoIP
circuit switching cons
- not very flexible - has to use single dedicated line
- nobody else can use the circuit
- always there even when not used
- if there is a failure on the line there is no alternate route
- requires greater bandwidth
- time to establish link can be long
packet switching pros
- no need to tie up a communication line
- can overcome failure of a line by rerouting
- easy to expand traffic usage
- charges only for duration of connectivity (cheaper)
- high data transmission is possible
- uses digital networks meaning digital data is transmitted dircetly
packet switching cons
- protocols used can be more complex
- if a packet is lost the sender must resend
- does not work as well in real time data streams
- channel has to share bandwidth with outer packets
- delay at destination during reassembly
- needs lots of RAM to handle large amounts of data
hopping
- when a packet goes from router to router
- hop number is added to the header - each packets is only allowed a finite number of hops decided by the network protocol
- each time the packet passes through the router the hop number is -1 - if the packets hop number = 0 and its not at its destination then its deleted at the next router
- prevents lost packets hopping forever
header
- part of a data packet containing key data such as destination IP address, sequence number, and so on.
- Packets also contain error checking eg checksum or parity - if values are different then a request is made to resend
- Priority values indicate which queue should be used (shorter if higher priority)
routing table
- a data table that contains the information necessary to forward a package along the shortest or best route to allow it to reach its destination
- When the packet reaches a router the packet header is compared with the routing table which supplies instructions to send the packet to the next router (a hop)
routing table includes
○ Number of hops
○ MAC address of the next router
○ Metrics (cost assigned to each route so the most efficient is found)
○ Network ID or pathway
○ Gateway (points to the gateway through which target network can be reached)
○ Netmask (used to generate network ID)
○ Interface (indicates which locally available interface is responsible for reaching the gateway)