4.9 Communication and networking Flashcards
What is the Internet?
The worldwide collection of networks that use the Internet Protocol Suite (TCP/IP)
What is a router?
A device that receives packets on a network and forwards them to correct destinations based on an IP address
What is a gateway?
- A device that receives packets on a network and forwards them to correct destinations based on an IP address
- A gateway is able to deal with packets travelling between networks using different protocols, by stripping off all of the header data and adding a new header in the format needed for the destination network
What is a domain name server?
A server that contains databases of IP addresses and their corresponding FQDNs.
What is an IP address?
An IP address uniquely identifies a device on a network, and defines where it is located geographically.
What is the link between a Domain Name and an IP address?
A domain name is a string that corresponds to an IP address.
What is a packet and what are the main components of a packet?
- A packet is what data being transported across a network is split into.
- A packet is made up of the header and the payload.
What is an NIC?
- A hardware component that connects to the motherboard and is hardwired with a unique MAC address
- It allows a computer to connect to a network
What are the steps in packet switching?
- Data is split into packets.
- Header is added to packet
- Packets are sent along the network, not necessarily along the same route
- Once packets arrived, they are re-ordered using their sequence number
- Acknowledgements sent from recipient to sender for each packet
- Transmission of a packet happens again if no acknowledgement is received
What does TCP/IP stand for?
Transmission Control Protocol / Internet Protocol
What are the four layers of the TCP/IP protocol stack?
- Application Layer
- Transport Layer
- Network Layer
- Link layer
What does the application layer do?
- It uses an appropriate protocol relating to whatever application is being used to transmit data
- It also interacts with the user via appropriate application software or the users system
What is the transport layer responsible for?
- establishing the “end-to-end” connection
- splitting the data into packets once the connection is made
- sends and receives acknowledgments
What does transport layer add to each packet?
- The sequence number
- The total number of packets
- The port number the packet should use
What protocol does network layer use?
IP (Internet Protocol)
What protocol does transport layer use?
TCP (Transmission Control Protocol)
What does network layer add to each packet?
- Source IP address
- Destination IP address
What is a MAC address?
A unique 12-digit hexadecimal address hardcoded on each NIC for use as an address in network communications to uniquely identify any device.
What does the link layer do?
- Adds the MAC addresses of the source and destination device
- The MAC addresses are changed at each hop on the route
What is a socket?
A socket is the IP address (provided by the IP protocol) combined with the port (provided by the TCP protocol)
What is a port?
The port determines what application on the device needs the packet
How does SSH work?
SSH uses for port 22. It uses public key encryption to authenticate the user and prevent unauthorised access.
- 👋 The client initiates the TCP connection by contacting the server
- 🔑 The server sends a public key to the client
- 🤝 The server and client agree communication rules and open a secure channel
- 🏝 The user can now login to the remote server host operating system and can issue application layer commands such as GET for HTTP, and SMTP and POP3 commands for sending and retrieving emails
How does SMTP work?
SMTP sends the email from the client device to the linked mail server or forwards the email to the recipient’s mail server.
How does POP3 work?
- Retrieves email from a mail server
- Removes it from the server
- Transfers it to your device
How does HTTPS work?
HTTPS uses encryption to secure the data being transferred, and authenticates the web server through certificates.
How does HTTP work?
The web client sends a request message to a web server and the web server sends back a response message containing the data needed to display the webpage (or other web resource).
How does FTP work?
- FTP commands can be issued from a command line interface, but more commonly a user interacts with an FTP client, which sits on top of the actual FTP protocol.
- Once logged in, the user can access directories on the FTP server and can download and upload files.
- FTP sites which are publicly available are known as anonymous FTP.
What does SSH stand for and what is its purpose?
- Secure Shell
- Used to provide an encrypted connection for remote access to another computer
What does SMTP stand for and what is its purpose?
- Simple Mail Transfer Protocol
- Used to send emails from client device to the linked mail server or to forward the email to the recipient’s mail server
What does POP3 stand for and what is its purpose?
- Post Office Protocol (v3)
- Used to retrieve emails from an email server.
What does HTTPS stand for and what is its purpose?
- Hypertext Transfer Protocol Secure
- HTTPS is used for accessing a webpage from a web server securely. HTTPS encrypts data between the client and server.
What does HTTP stand for and what is its purpose?
- Hypertext Transfer Protocol
- HTTP is used for accessing a webpage from a web server
What does FTP stand for and what is its purpose?
- File Transfer Protocol
- Used to move files between two devices. (commonly used to transfer data and programs as opposed viewable content)
What is a URL?
- A Uniform Resource Locator (URL) is the address of a webpage or other internet resource
- It indicates the location of a resource as well as the protocol used to access it.
‘www.w3schools.com’ is an example of a…
Fully qualified domain name
‘www’ is an example of a…
Host name or subdomain
‘w3schools.com’ is an example of a…
Domain name
‘/cs/cs_operators.asp’ is an example of a…
Path
What is the purpose of a domain name?
- A domain name identifies an organisation or individual on the internet.
- They use alphanumeric characters which make them easier for humans to remember than IP addresses
What is the purpose of a domain name server?
To translate a fully qualified domain name into its corresponding IP address
What is the domain name system?
- The domain name system is a distributed database of mappings from FQDNs to their corresponding IP addresses
- DNS servers are organised into a hierarchy
What happens is a domain name server cannot resolve a lookup?
The query will be passed to another DNS server
Who manages top level domains?
- An (internet) registry
- Each TLD may have restrictions as to who can use it
What is the main responsibility of an internet registry?
To maintain a definitive register of who owns a specific domain.
Give two examples of top level domains
.uk .org
What is meant by baud rate?
The maximum number of signal changes in a medium per second
What is meant by bit rate?
The number of bits transmitted over a medium per second
Bit rate equation
bit rate of channel = (baud rate) x (number of bits per signal change)
What is Serial Data Transmission?
Bits are sent one after the other over a single wire from source to destination
What is Parallel Data transmission?
- Multiple bits are sent simultaneously over multiple wires from source to destination
- Each bit is sent down a different wire
2 problems with Parallel Data transmission
- Unreliable because of skew
- Parallel wires also suffer from crosstalk
What is skew?
As each wire has slightly different properties, there is a possibility bits could travel different speeds over each of the wires and arrive at different times, meaning the signals might overlap
What is cross-talk?
Interference between different lines, which causes data corruption
3 advantages of serial over parallel transmission
- Serial transmission doesn’t suffer from skew or cross-talk
- Serial is reliable over much longer distances
- Serial transmissions tends to be cheaper, as there is much less complexity and the physical size of cables is smaller
What is bandwidth? What unit is it measured in?
- A measure of the maximum capacity of a communication channel
- It is directly proportional to bit rate
- Measured in bits per second
What is latency?
A time delay before some component in a computer system responds to an instruction
What is synchronous transmission?
- Data is transferred at regular intervals, synchronised by a clock signal
- Receiver and transmitter clocks are synchronised
What is asynchronous transmission?
- Receiver and transmitter clocks only need to be synchronised for the duration of data transmission
- Blocks of data are sent as soon as they are ready
How are start and stop bits used in asynchronous transmission?
- Start bit is sent to synchronise the clock in the receiver to the transmitter clock
- Stop bit allows the receiver time to process the current block of data before another is sent
- Stop bit is opposite to start bit to allows the next start bit to be recognised
What does a firewall do?
Blocks or allows network traffic, based on predefined or dynamic rules and policies
What is packet filtering?
When a firewall monitors outgoing and incoming packets and allowing them to pass or halt based on
- source and destination IP addresses
- protocols / ports
- Each packet is analysed separately
What is stateful inspection?
- When the firewall monitors the incoming and outgoing traffic from all ongoing TCP connections by:
– Analysing packet types
– Inspecting the payload
– Checking for suspicious activity (eg lots of outgoing data) - Connected packets are analysed together
What is a proxy server?
- A server that sits between the network hosts and the firewall
- Packets are sent outside the network by the proxy server (on behalf of the network hosts)
- Provides anonymity, caching, and logging of user activities
What is a worm?
A piece of malicious software that can self-replicate between computers, either within a network (such as the Internet) or by a user downloading and running and malicious files.
Unlike viruses, worms are complete programs - they do not require a host program to cause damage.
What is a virus?
- A virus is a small program of self-replicating software that is attached to other program or files
- Viruses require a host file in which to reside
What is a trojan?
- A type of malware that is disguised as a legitimate benign file that users can be tricked into opening
- They can delete and modify data and allow more malware in once they are opened
3 ways to prevent malware
- Improving code quality
- Monitoring
- Protection (e.g. up to date antivirus programs)
What is a network topolgy?
The way a network and its connected devices (computers, printers, servers etc.) are connected
3 disadvantages of bus networks
- If main cable fails no network data can be transmitted
- Performance degrades heavily with increased traffic
- Security is poor as all computers on the network can see all transmissions
2 disadvantages of star networks
- If central node goes down the whole network can’t transmit / receive data
- Can be costly to set up and install as lots of cabling is needed
How long is an IPv4 address and what is it split into?
- 32 bits (e.g. 192.168. 10.150)
- Network ID and Host ID
What is a subnet mask used for?
Identifying the Network ID part of an IP address (bitwise AND
operation applied to subnet mask and IP address)
How long is an IPv6 address and why was it introduced?
- 128 bits (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:73)
- Introduced to ensure there would be enough addresses for all devices to have a unique one - as IPv4 addresses are running out
What is the difference between routable and non-routable IP addresses?
- Routable IP Addresses must be public addresses. They are unique on a global scale, and are allocated by a regional issuing authority.
- Non-routable IP addresses are assigned internally to devices on a private network. Many devices may have the same private address.
What is NAT?
- A process in which a router translates one or more non-routable IP addresses into one or more routable IP addresses and vice versa in order to provide Internet access to the local hosts
- A single routable IP address can be used for an entire private network
What is port forwarding?
- An application of network address translation (NAT) that redirects a communication request for the public IP address using a specific port to a pre-selected private host
- The port number is unchanged (forwarded)
What is the purpose of port forwarding?
- Allows computers outside the LAN to connect to a specific computer (and port) within the LAN
- Needed if you want to have a (web) server inside the LAN
How to determine if two computers are on the same subnet
Bitwise AND
operation of subnet mask with both computer’s IP addresses. The result of the AND
operations are the network IDs. These are then compared.
How does routing work?
- Routers are organised into a hierarchy
- The path to take is selected by each router, determined by the Network ID of the destination IP address
- Each router decrements the “time to live” of the packets
- Source and destination MAC addresses changed at each hop
- Network Address Translation will occur at routers at either end
What is the purpose of DHCP?
To automate the allocation of IP addresses (configuration) to hosts on a network
Why is DHCP used?
- Reduces the need for expert knowledge when configuring a host
- Reduces the time required to configure hosts
How is an IP address configured using DHCP?
- Host sends request to discover a DHCP server
- DHCP server offers configuration to host
- Host accepts configuration by echoing the accepted configuration back to the server
- DHCP server confirms that configuration has been allocated to host
Explain how a router can be been configured so that a Web Server on a LAN can be accessed by computers outside the LAN
- Port forwarding
- Router must forward all traffic arriving on the HTTP(S) port to the IP address of the Web Server
What is a client port?
A port automatically allocated to a client that is temporarily assigned and only exists for the duration of a connection.
Why must a web server use well known port numbers?
Communication is initiated by clients, so clients must know which port number to connect to before communication with the server starts.
Also, particular port numbers are used to provide a particular service.
What is a protocol?
A set of agreed rules relating to communication between computer devices
3 differences between symmetric and asymmetric encryption
S: Uses same key for both encryption and decryption
A: Doesn’t
S: Have to distribute the key without interception
A: Don’t
S: Faster
A: Slower, but provides both confidentiality and authentication
Asymmetric encryption: A
sends to B
-
A
encrypts the message withB
’s public key -
B
decrypts with their own private key (the only key that can do this)
Asymmetric encryption: A
sends to B
, and B
can verify that A
is the sender
-
A
encrypts the message withB
’s public key andA
’s private key -
B
will decrypt withB
’s private andA
’s public key
What is the purpose of digital signatures?
To confirm the identity of the sender, and to detect if a message or document has been tampered with
Describe how A
can use a digital signature when sending a document to B
-
A
hashes the document, creating a message digest -
A
encrypts this message digest with their private key. This encrypted hash is known as the digital signature - The digital signature is appended to the message
- (This may now be encrypted with
B
’s public key, sent toB
, and decrypted byB
using their own private key as normal) -
B
decrypts the digital signature withA
’s public key, to reveal the message digest.B
also hashes recalculates the hash for the document. If the result of these procedures is the same, then the message has not been tampered with and the identity of the sender is authenticated.
Anyone could create a digital signature and claim they are a trusted individual. How do we solve this?
Digital certificates are used to verify the sender’s identity
What is a digital certificate? (2*)
- An electronic document that authenticates a message sender or a website
- It contains the sender’s public key as well as some information about them
How can a digital certificate be created for A? What do they contain?
A trusted individual (certificate authority) signs a copy of A’s public key as well as some information about A.
Digital certificates will contain:
- 🔢 Serial number
- 🏷️ Name (e.g. domain name for website digital certificates)
- 📅 Expiration date
- 🔑 Copy of the certificate holder’s public key
How are digital certificates used by modern web browsers?
- Modern web browsers check the digital certificate of each secure website as a standard security measure.
- If the certificate is suspicious or out of date, the site is blocked.
Why are key-exchange algorithms needed?
In order to distribute the key securely in symmetric encryption systems.
- Asymmetric encryption algorithms are nearly always much more computationally expensive than symmetric ones
- So in many cases it is common to exchange a shared key using a key-exchange algorithm, and then to transmit the data using that key and a symmetric key algorithm.
(e.g. SSH and SSL/TLS)
Difference between Physical vs Logical topology
Physical: The physical layout of the connections between computers on the network
Logical: How the packets flow around a network
How is data transferred between client and server in the client-server model?
- The client sends a request to a server
- The server responds with the data that was requested
(Most computers are nominated as clients and one or more as servers)
What does the websocket protocol do?
The Websocket protocol defines an API establishing a full-duplex ‘socket’ connection between a web browser and a server over TCP
What does full-duplex mean?
Data can be transmitted in both directions at the same time
What is the purpose and advantage of using the websocket protocol?
- To provide a persistent bidirectional connection between client and server, allowing both parties to send data at any time
- The connection is also fast and real-time, and overheads are small leading to reduced packets sizes
4 examples of where websocket protocol is used
- 👾 online gaming
- 💬 instant messaging
- 📹 video streaming
- ☁️remote cloud based document collaboration
What is CRUD?
CRUD stands for…
The four fundamental operations for any database or content management system:
- Create
- Retrieve
- Update
- Delete
What does REST stand for?
Representational State Transfer
What is the relationship between REST, CRUD and SQL?
REST enables CRUD to be mapped to SQL database functions
Create keywords: CRUD → HTTP request → SQL
Create → POST → INSERT
Retrieve keywords: CRUD → HTTP request → SQL
Retrieve → GET → SELECT
Update keywords: CRUD → HTTP request → SQL
Update → PUT → UPDATE
Delete keywords: CRUD → HTTP request → SQL
Delete → DELETE → DELETE
Explain how a REST API allows a client browser to access a database
The REST API allows JavaScript to talk to a database through HTTP.
- The client browser creates a HTTP request, calling the REST API
- The REST API is created and run on the server
- The server responds to the client’s requests using either JSON or XML
- The client’s browser processes the JSON or XML and displays the response to the user
What is the advantage of using REST?
- The client computer needs no knowledge at all of how the database server works
- So clients and servers can be developed independently
What are JSON and XML both examples of?
Standards for transferring data between a server and an application
What does JSON stand for?
Java script object notation
4 advantages of JSON over XML
- Easier for a human to read
- More compact (so quicker to transmit)
- Easier to create (as syntax is simpler)
- Easier for computers to parse and therefore quicker to parse
What is thin-client computing?
- When the processing / storage is carried out on the server
- The server needs lots of RAM, many secondary storage devices, and more processors
- The client needs a high bandwidth internet connection
What is thick-client computing?
- When the processing / storage is carried out on the client
- The client needs greater RAM, secondary storage and processing capacity than more thin clients
- Less reliance on an internet connection to do stuff
3 examples where thick-client computing is preferred
- 👾 gaming
- 📹 (professional) video editing
- 🔬 simulation/research
3 advantages of thick-client computing
- Internet connection not needed to do useful stuff
- More flexible in what can be done (not limited by what cloud-based services exist)
- Users can more easily keep data private
3 disadvantages of thick-client computing
- More expensive to buy and maintain
- Client is responsible for back-up of files
- Client is responsible for update of software
3 advantages of thin-client computing
- Cheaper to purchase, due to the lower hardware specification
- Simpler updating of software, as this is done by the server
- Server is also responsible for backups
3 disadvantages of thin-client computing
- Higher bandwidth internet connection is needed to be useful
- Limited to what cloud-based services exist and how they work
- Potential privacy concerns as entrusting a third-party to look after your files
4 reasons why setting up and maintaining client-server networks is more expensive (than P2P)
- 🔋 The servers need to be more powerful machines
- 💾 The servers need more secondary storage space
- ⏱️ They need to be always on
- 📈 As more hosts connect to a P2P network, the resource supply increases. Whereas when more hosts connect to a single server, the more powerful and expensive the machines need to be
6 differences between client-server and peer-to-peer networks
CS : The server has authority over the service
P2P : All computers have equal status - clients share resources and computing power
CS : Clients access resources from the server
P2P : Resources are stored on the computers, and any computer can access resources directly from any other - there is no dependence on a central server
CS : Server failure disrupts all computers on the network
P2P No single point of failure
CS : Configuration is more complex, and setting up and maintaining the network is more expensive
P2P : Cheaper to set up and maintain
CS : Supports centralised backups
P2P : Backups need to be made locally
CS : Improved security management, as security management can be centralised
P2P : Management of security must be managed individually on each computer
3 examples of where a client-server network might be used
- Personal web server for hosting a simple website with a limited number of users
- Cloud-based gaming platforms
- College
3 examples of where peer-to-peer networks are/could be used
- Home network with a small number of trusted devices
- Decentralised cryptocurrencies (e.g. Bitcoin)
- BitTorrent protocol
What is the purpose of wireless networks / WiFi?
To allow devices to communicate within a network without being physically connected to it
What is WiFi?
A type of wireless local area network (WLAN) that is based on international standards
2 components needed for wireless networking
- Wireless network interface card
- Wireless Access Point
3 ways to secure a wireless network
- Encryption of data using WPA or WPA2
- Disabling the SSID broadcast
- MAC address allow lists
What does WPA stand for?
Wifi Protected access
What is the main difference between WPA and WPA2?
WPA2 is more secure
What is an SSID?
- A Service Set Identifier (SSID) is a locally unique identifier for a wireless network
- They use alphanumeric characters that are specified during the setup of the wireless network
- This SSID is used by all devices which want to connect to that network
How can disabling the SSID broadcast improve security on a wireless network?
The SSID broadcast can be disabled in order to make it hidden, only allowing those who know the SSID to try to connect
How can a MAC address allow list be used to improve security on a wireless network?
- MAC address allow lists can be created to only allow specific devices to connect to a network
- Each MAC address is unique to each NIC
- The WAP checks the MAC addresses of devices trying to connect against a list of allowed devices
- Only devices with an allowed MAC address are able to connect
What does CSMA/CA stand for?
Carrier Sense Multiple Access with Collision Avoidance
What do RTS / CTS stand for?
Request to Send / Clear to send
How does CSMA/CA work (without RTS/CTS)?
- 👂 When a device is ready to transmit, it listens to its communication channel to check if it is idle
- ⏳️🎲 If there is a data signal present, it means another transmission is in progress, so the device waits for a random period of time
- 📮 When no data signal is present, the device sends its data
- ✅ Once the destination device (e.g. WAP) receives the data, it will respond back with an acknowledgment
- ⏳️🎲 If this acknowledgement is not received, the sending device waits for a random time period and the process begins again
What extra steps are required in CSMA/CA in order for RTS/CTS to be used?
- Before a device sends a message, a Request to Send is sent
- The WAP responds with a Clear to Send signal to only one device at a time, and only that device transmits its data
- If a CTS is not received the device must wait a random amount of time and try again
Which of packet filtering and stateful inspection are more advanced?
Stateful inspection
3 things that are better about IPv6
- There aren’t enough unique addresses in IPv4 - there are many more IPv6 addresses as they are much longer
- IPv6 eliminates the need for NAT
- Automatic host configuration is possible without DHCP
Which host ID is reserved as a network identifier?
Host ID = all zeros
State the name of the problem that RTS/CTS overcomes
The Hidden Node problem
Describe the Hidden Node problem in the context of computers A and B both trying to transmit data to a WAP
If A is transmitting data to the WAP, and B is outside the transmission range of A, then B might start transmitting its own data, causing a collision
Which is better, JSON or XML?
JSON
What is the key exchange problem?
How do we pass the key from sender to receiver without it being intercepted?