TCP & IP Protocols

Cards (49)

  • The TCP/IP protocol is used to communicate on a network, especially the Internet
  • TCP/IP consists of 4 layers: Application, Transport, Network, and Link
  • The application layer selects the appropriate protocol to use for data transmission depending on the application being used
  • The transport layer establishes an end-to-end connection and then splits data into packets. It also adds the sequence number, total number of packets, and port number
  • The network layer adds the source and destination IP to each packet. Routers operate on this layer.
  • A socket consists of an IP address and a port. This is able to provide the device the packet is bound for, and which application it must use.
  • The link layer controls physical connections and hardware. It adds the source and destination MAC address to each packet.
  • Media Access Control (MAC) addresses are hard-coded into the NIC and are unique to each device
  • When a packet is received, it is stripped of additional data by going through the TCP/IP stack in reverse
  • A port specifies which application should handle a packet when it arrives
  • A protocol is a set of rules which govern communication between two devices
  • FTP, or file transfer protocol, is used for sending files between devices. It uses ports 20 and 21
  • Users can use an FTP client to connect to a server. They can access anonymously, or non-anonymously using a login.
  • SSH, or Secure Shell, is a protocol used for gaining remote access to a computer. It uses port 22
  • SSH clients can be used alongside other protocols. Thus it can 'tunnel' through a firewall with its own port and bypass ports that would typically be blocked
  • Email servers receive and send emails depending on the protocol
  • POP3, or the Post Office Protocol, is a protocol used to retrieve emails from an email server. It uses ports 110 and 995
  • POP3 downloads any emails on the server and then removes them from the server so that they are only stored locally
  • SMTP, or Simple Mail Transfer Protocol, is used for sending and forwarding emails. It uses ports 25, 587 and 465
  • A web server hosts websites in text form and can deliver these when requested by a client. Web browsers receive the web pages and web resources, and render them accordingly
  • HTTP, or Hypertext Transfer Protocol, allows web servers to send web pages to users. It uses port 80
  • HTTPS is the same as HTTP except the transmission is secure: data is encrypted which protects it and prevents it from being modified or read by unintended recipients
  • A routable IP address is public and must be unique: no two devices* have the same public IP address at the same time
  • Non-routable IP addresses are private, and there are reserved ranges for these. No two devices on the same network can have the same private address
  • A DHCP server - a device running the Dynamic Host Configuration Protocol - assigns IP addresses only when they are needed, and releases them back into the pool when no longer in use
  • NAT or Network Address Translation converts IP addresses from private to public and vice versa
  • In the client server model, a client sends a request to a server, which then sends a response back to the client
  • An API or Application Programming Interface is a set of protocols that defines how two applications communicate with each other
  • The websocket protocol is an API typically used with web servers to provide a constant stream of information between devices: it is full-duplex meaning data can be transmitted in both directions simultaneously. Uses include streaming and online gaming
  • REST or Representational State Transfer allows CRUD to be mapped from HTTP to SQL functions, such that clients and databases can be developed independently
  • JSON, or Java Script Object Notation, and XML are two standards for transferring data
  • JSON tends to be favoured over XML as it is simpler in syntax and thus quicker to create, is more compact, easier for humans to read and quicker for computers to parse
  • The thickness of a client refers to how much processing it does in comparison to the server. Thicker = more processing
  • Thick clients are more reliable, better for resource heavy applications, and don't need a constant connection to a server to run. However, they are more expensive, each client requires its own software, and the lack of centralisation creates integrity issues
  • Thin clients are very reliant on the server - if this goes down most functionality is lost. The server must be powerful, which is expensive, and the demand on bandwidth will be greater. However, this means software can be updated centrally and will appear on every device, it is easy to add new clients, and all files are stored securely on a central sesrver
  • IPv4 addresses are 4 bytes in size, allowing for about 4 billion possible IP addresses
  • An IP address consists of a network identifier and a host identifier
  • We can split IP addresses via classless addressing using subnet masks
  • Subnet masks use the basic AND operation. The length of the network identifier is all 1s, and the host is all 0s, meaning only the necessary part is returned
  • Networks can be divided up into smaller subnets