Set 3 Flashcards

Checked by Matt. Covers content between SA2 and SA3 on the BPCompSci topic list. Need card on client port

1
Q

What is the Internet?

A

The worldwide collection of networks that use standard (TCP/IP) protocols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a router and how does it work?

A
  • A networking device with two or more links, each in a different network. It examines the destination IP address of incoming packets to decide which outgoing link to use to forward the packet.
  • It sends the packet down the most efficient path to the destination
  • It updates its own routine table to reflect congestion or network failure or changes
  • It modifies the MAC addresses for the next hop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a gateway?

A

A device within a network that connects it to another network (like a router). If the networks use different protocols, it will handle the conversion from one protocol to the other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a domain name server?

A

A server that contains databases which map FQDNs to their corresponding IP addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an IP address?

A

A binary number assigned to a node in an internet network that is made up of a network ID and a host ID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a packet and what are the main components of a packet?

A
  • A packet is what data being transported across a network is split into.
  • A packet is made up of the header and the payload.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an NIC?

A

Network Interface Controller
* 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the steps in packet switching?

A
  1. Data is split into packets.
  2. Header is added to each packet
  3. Packets are sent along the network, not necessarily along the same route, hopping between routers
  4. Once packets arrived, they are re-ordered using their sequence number
  5. Acknowledgements sent from recipient to sender for each packet
  6. Transmission of a packet happens again if no acknowledgement is received
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does TCP/IP stand for?

A

Transmission Control Protocol / Internet Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the four layers of the TCP/IP protocol stack?

A
  1. Application Layer
  2. Transport Layer
  3. Network Layer
  4. Link layer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the transport layer do?

A
  • The transport layer establishes an end to end communication channel
  • The destination and source applications are identified using port numbers
  • The transport layer uses these port numbers to route reassembled requests (or responses) to the correct application layer process
  • The transport layer splits and reassembles requests (or responses) into packets
  • Packets are numbered by transport layer
  • The transport layer (using TCP) deals with error control i.e. acknowledgements and retransmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the application layer do?

A
  • 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 on the users system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does transport layer header add to each packet?

A
  1. The sequence number
  2. The total number of packets
  3. The source port number
  4. The destination port number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What protocol does network layer use?

A

IP (Internet Protocol)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What protocol does transport layer use?

A

TCP (Transmission Control Protocol) or UDP (User Datagram Protocol)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a MAC address?

A

Media Access Control address. A 12-digit hexadecimal address hardcoded on a network interface controller. Used to uniquely identify networked devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does the link layer do?

A
  • Adds the MAC addresses of the source and destination device to the packet header, to create a frame
  • The MAC addresses are changed at each hop on the route
  • It moves packets between 2 internet hosts directly connected by a physical medium (e.g. wire or electromagnetic)
  • It deals with physical connections (and cabling)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a socket?

A

A socket is the IP address (provided by the IP protocol) combined with the port number (provided by a Transport layer protocol)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a port?

A

A number that identifies a specific network process running on a device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How does SSH work?

A

SSH uses for port 22. It uses public key encryption to authenticate the user and prevent unauthorised access.

  1. The client initiates the TCP connection by contacting the server
  2. The server sends a public key to the client
  3. The server and client agree communication rules and open a secure channel
  4. 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How does SMTP work?

A

SMTP sends the email from the client device to the linked mail server or forwards the email to the recipient’s mail server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How does POP3 work?

A
  1. Retrieves email from a mail server
  2. Removes/Deletes mail from the server as it retrieves
  3. Transfers it to your device’s inbox
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How does HTTPS work?

A

Similar to HTTP, but HTTPS uses encryption to secure the data being transferred, and authenticates the web server through digital certificates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How does HTTP work?

A

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). Hypertext is a format of web pages that can include links between other pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How does FTP work?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What does SMTP stand for and what is its purpose?

A
  • Simple Mail Transfer Protocol
  • Used to send emails from client device to the linked mail server or to send email between mail servers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What does SSH stand for and what is its purpose?

A
  • Secure Shell
  • Used to provide an encrypted connection for remote access to another computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What does POP3 stand for and what is its purpose?

A
  • Post Office Protocol (v3)
  • Used to retrieve emails from an email server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What does HTTPS stand for and what is its purpose?

A
  • Hypertext Transfer Protocol Secure
  • HTTPS is used for accessing a webpage from a web server securely. HTTPS encrypts data between the client and server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What does HTTP stand for and what is its purpose?

A
  • Hypertext Transfer Protocol
  • HTTP is used for accessing a file (e.g. webpage) from a web server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What does FTP stand for and what is its purpose?

A
  • File Transfer Protocol
  • Used to move files between two devices. (commonly used to transfer data and programs as opposed viewable content)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is a URL?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

‘www.w3schools.com’ is an example of a…

A

Fully qualified domain name

34
Q

‘www’ is an example of a…

A

Host name or subdomain

35
Q

‘w3schools.com’ is an example of a…

A

Domain name

36
Q

‘/cs/cs_operators.asp’ is an example of a…

A

Path

37
Q

What is the purpose of a domain name?

A
  • 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
38
Q

What is the purpose of a domain name server?

A

To translate a fully qualified domain name into its corresponding IP address

39
Q

What is the domain name system?

A
  • The domain name system is a distributed database of mappings from FQDNs to their corresponding IP addresses
  • DNS servers are organised into a hierarchy
40
Q

What is the operating system?

A

A collection of system software that controls the operation of computer hardware and provide an interface between the user and the computer

41
Q

What are the main roles of the OS?

A
  1. To hide the complexities of the hardware from the user
  2. To manage the resources which processes compete for (NB to get marks here you need to state WHICH resources).

Give a concrete example, e.g. “To allocate I/O devices to processes”

42
Q

What is a virtual machine?

A

A virtual machine is the apparent machine or interface that the OS presents to the user/programmer

43
Q

What is an API (in the context of the operating system)?

A
  • An application programming interface
  • APIs are layers of software that allow the application programmers call upon the functions the OS provides
44
Q

What is a process?

A

A process is an instance of a program being executed

45
Q

What resources do processes compete for?

A
  • (Secondary) Storage
  • I/O Devices
  • Memory
  • Processor time

Think about the columns in the Task Manager

46
Q

How does the OS manage storage?

A
  • Allocating space on storage devices to files
  • Organising files into directories
  • Determining where on the device to save a file
  • Manages which process/user can access (read/write/modify) different files and directories
47
Q

How does the OS manage I/O devices?

A
  • By allocating I/O devices to different processes
  • And managing communication between the processes and devices
  • To handle interrupts // to call appropriate interrupt handler/ISR when an interrupt occurs
48
Q

How does OS manage main memory?

A
  • To allocate memory/RAM to processes
  • to determine what areas of memory are used for what purpose
  • moving data into and out of RAM / to a paging file
  • for virtual memory
  • ensuring processes can only write to memory that they have been allocated
49
Q

How does the OS manage processors?

A
  • To allocate processors/cores to processes // schedule processes // decide which process to carry out when
  • manage the execution of multiple processes
50
Q

Simplify A . (A+B)

A

A
(can be a useful shortcut)

51
Q

How does routing work?

A
  • Routers are organised into a hierarchy
  • The path to take is selected by each router, determined by the destination IP address
  • Routers use a routing table to keep track of the network
  • Each router decrements the “time to live” of the packets
  • Source and destination MAC addresses are changed at each hop
52
Q

What is a well known port number and why are they used?

A

Well known port numbers are reserved for common TCP/IP applications. They range from 0 to 1023.
When there is a client/server communication, they allow client applications to easily locate the corresponding server application processes on other hosts.

53
Q

When are port numbers selected from the “client” or “ephemeral” range?

A

When there is a client/server communication, the client port numbers come from the upper range.

54
Q

What are the disadvantages of Caesar cipher?

A
  • Easy to crack because there are only 25 keys
    • → so very quick to crack with brute force
  • Frequency analysis reveals the likely shift
  • Word structure is preserved
  • Key length is such shorter than the message
  • So NOT computationally secure
55
Q

What is encryption?

A

The process of converting plaintext to ciphertext, so that it cannot be understood if intercepted

56
Q

What is special about a Vernam cipher key?

A
  • The key is randomly generated, or taken from a ‘one-time pad’.
  • and key length = plaintext length
57
Q

What operation does the Vernam cipher use for encryption and decryption?

A

XOR

58
Q

What are the five conditions for the Vernam Cipher to offer perfect security?

A
  • Key is chosen truly randomly
  • Key is only used once
  • Key is known only to the sender and receiver
  • Key must be destroyed after use
  • Key length at least message length
59
Q

What is symmetric encryption?

A

When the same key is used for both encryption and decryption

60
Q

What is an entity?

A

An entity is the object / thing of interest about which data is to be recorded (a table in SQL).

61
Q

What is an attribute?

A

An attribute is property of an entity (a field in SQL).

62
Q

What is a relationship?

A

A relationship is the link or association between entities (primary keys ←→ foreign keys)

63
Q

What is a key (in a database)?

A
  • A key is the name given to a special field in a database where the values in the field can be used to identify particular records, e.g. CustomerID.
  • Sometimes a field that is already in the database can be used as the key field.
64
Q

What is a primary key?

A

A key which has a unique value for each record, and acts as a unique identifier for each record

65
Q

Give three problems with a flat file database:

A
  1. One small change can involve tediously changing many records
  2. Deleting the only instance of a record containing a particular category will also delete that category
  3. You can’t add a new category until you create a record that contains that particular category
66
Q

How do you solve the problems with flat file databases?

A
  • Relational databases that are made up of two or more linked tables.
  • Linked tables can be used to find records which are linked together by using the value of the shared key column. They are a feature of relational databases.
  • This shared key column acts as the primary key in the table in which its defined, and as a foreign key in the table it is used.
67
Q

What is a flat file database?

A

A simple store of information
- Columns are called fields
- Rows are called records
- A table is a group of records

68
Q

What does DDL stand for (in SQL)?

A

Data Definition Language

69
Q

Give the SQL instruction to: Create a table called students
(StudentNumber as primary key, forename, surname, and date of birth)

A

CREATE TABLE students
(
StudentNumber INT PRIMARY KEY,
forename TEXT,
surname TEXT,
DateOfBirth DATE
)

70
Q

SQL: What is the keyword for deleting a database/table?

A

DROP …

71
Q

What are the SQL data types

A

CHAR(size) // → fixed length string
VARCHAR(size) // → string (with a maximum length)
‘TEXT’ // → string
ENUM // → string object that has to be chosen from a list of possible values
BOOL / BOOLEAN
INT(size) // → size is the number of digits
FLOAT(size,d) // → size is the number of digits , with d digits after the decimal point
DATE
TIME
DATETIME

72
Q

What does DML stand for (in SQL)?

A

Data manipulation language

73
Q

Give the SQL WHERE command for: all strings beginning with ‘bor’

A

LIKE ‘bor%’

74
Q

Give the SQL WHERE command for: any strings at least five characters long

A

LIKE ‘_____%’

75
Q

Give the SQL WHERE command for: a studentID between 10 an d100 numbers

A

… WHERE StudentID BETWEEN 10 AND 100

76
Q

Give the SQL command for: ordering results by surname

A

ORDER BY surname

ORDER BY surname ASC

ORDER BY surname DESC

77
Q

Give the SQL command for: Inserting data into the student table
Assume it’s of the form: Students(StudentID, Forename, Surname, House)

A

INSERT INTO students VALUES(‘’,’’,’’,’’), (‘’,’’,’’,’‘)…

INSERT INTO students (surname , forename) VALUES (__…
//if you can’t remember what order you’re supposed to do it in)

78
Q

Give the SQL command for: update a forename to ‘Harry’ where…:

A

UPDATE students SET forename = ‘Harry’ WHERE…

79
Q

Give the SQL command for: Delete a record from the students table

A

DELETE FROM students WHERE …

80
Q

What is a foreign key?

A

An attribute in one table that is the primary key field of another table.
It exists to make a link between the tables.
The name is misleading as it doesn’t have to be a key in the foreign table!

81
Q

How does the OS hide the complexities of the hardware from the user?

A

By providing a platform or virtual machine which application developers can use to create user interfaces and applications. (Note: user interfaces are not a core part of the operating system)
e.g.
- Graphical User Interfaces (GUIs)
- Command Line Interfaces (CLIs)
- Application Programing Interfaces (APIs)