Networking Flashcards

(102 cards)

1
Q

What is the role of the application layer in the TCP/IP process?

A
  • Applications create the data that is sent or interpret the data that is recieved
  • The generated data is called a request and the returned data is a response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of the transport layer of the TCP/IP process?

A
  • The TCP and UDP protocols set up the end-to-end communication between two networked hosts
  • TCP splits application data into smaller segments and attaches a segment number and checksum to each
  • When recieved, TCP uses checksum to determine if segment has been received correctly and sends ACK to sender
  • Reassembles segments in order by segment number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the role of the network layer in the TCP/IP process?

A
  • The IP protocol operates to encapsulate segments into IP packets
  • Header of packets contains IP addresses of sender and destination so routers know where they should be passed
  • Allows communication between hosts on different networks
  • TTL (time-to-live) value added to provide self-destruct to drop packets if not properly routed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the role of the link layer in the TCP/IP process?

A
  • Physical transmission of packets takes place by encapsulating frames into link-layer frames
  • Frames contain MAC addreses in ethernet networks in the header
  • Network interface cards turn frames into electrical signals to send to other link-layer devices such as switches and WAP’s.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a port?

A
  • Each network application has a TCP or UDP port number by network manager
  • This allows the same device to run multiple network applications with a single IP address
  • OS’s network manager uses port number to decide which application recieves incoming data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the network socket?

A

The network socket is the combination of the IP address and port expressed as IP : port

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

What are the use for well-known server ports?

A
  • Reserved port numbers for specific purposes/protocols
  • Allows clients to initiate communication with remote servers
  • Otherwise, wouldm’t know which port for a particular service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are client ports?

A
  • Ports that are dynamically allocated by OS and it changes with each new TCP sessions
  • Used by OS to direct recieved packets to each application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is HTTP and how does it work?

A
  • The HyperText Transfer Protocol defines how web servers and browsers communicate
  • A HTTP request is sent to web server with an access method (i.e. GET or POST) and a file path on server
  • A HTTP response is sent back that contains a status code along with a body that contains data that has been requested
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are web servers?

A
  • A piece of software whose role is to listen to HTTP requests and send HTTP responses with web pages in HTML text form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are web browsers?

A
  • Software that retrieves and displays web pages on client computer
  • Generates HTTP requests
  • Renders webpage from HTML HTTP response
  • Iteratively generates further HTTP requests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is FTP and what is its purpose?

A
  • FTP is the file transfer protocol
  • It is used for sending files between devices
  • Client software can run on devices, allowing them to connect to FTP servers which send files requested by client
  • Can access servers anonymously or non-anonymously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is SSH and what is its purpose?

A
  • SSH is secure shell
  • It is a protocol that is used for the remote management of computers
  • Uses a username / password combination and encrypts information during transmission
  • SSH clients are software to establish TCP connection to a remote port
  • Once connected, commands for application-level protocols can be sent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is HTTP and what is its purpose?

A
  • HTTP is Hypertext transfer protocol
  • Web servers hold web pages in text from which is delivered to clients using HTTP
  • Application software renders the text files as web pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is HTTPS and what is its purpose?

A
  • Same function as HTTP (deliver web pages in text form from web servers)
  • Encrypts information during transmission
  • Prevents client information from being leaked and prevents information from being tampered with or modified during transmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is POP3 and what is its purpose?

A
  • POP3 is Post office protocol 3
  • Used for retrieving emails from an email server
  • Communicates with email servers to check for and download any new messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is SMTP and what is its purpose?

A
  • SMTP is the simple mail transfer protocol
  • Used for sending emails and used between a client and email server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How are IP addresses represented in binary?

A
  • split into two parts : network ID and host ID
  • in IPv4, each IP address is 4 bytes long with a certain number of bits assigned to the network ID and the rest to the host ID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the uses of the host and network ID?

A
  • network ID is used to identify all devices on the same network
  • host ID is used to identify a particular host device
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How many addressable hosts exist for a given network?

A

2n - 2
- where n represents the number of bits assigned to the host ID
- all 0’s is the subnet ID
- all 1’s is the broadcast ID
- these must not be assigned to a particular host on a network

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

What are subnets and what are they used for?

A
  • We can split a LAN into smaller subnets
  • We use part of the host ID bits to create a subnet ID which is combination of network ID and bits used to identify subnets
  • Can be used to identify smaller groups of devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is subnet mask why is it required?

A
  • Subnet mask identifies how many bits are used for the subnet ID part of the IP address
  • when being allocated IP address on a network, we are given a subnet mask so we can make requests over the internet and have the response returned to the correct subnet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is CIDR representation?

A
  • XXX.XXX.XXX.XXX/N
  • N represents the number of bits that are the subnet id
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the advantages of subnets?

A
  • Reduces broadcast domain which can improve performance of network by reducing traffic
  • Hosts on different subnets cannot communicate without going through routers and firewall so malware is stopped from spreading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What happens if your computer to makes an IP request to one on the same LAN?
- Finds MAC address associated with destination IP and send directly over LAN
26
How does a sending computer verify whether the destination computer is on its own network?
- logical bitwise AND with sending host’s subnet mask and other host’s IP address - this returns subnet ID, if not same, send packet to local router
27
What happens if your computer makes requests to computers not on the same LAN as it?
- Sending computer makes ARP request to find MAC address of destination computer’s local router - IP packet can be passed to router to send out onto network
28
How are emails stored in mail servers?
- emails are sent as structured text files - email client applications renders the files as a graphical page
29
What are the two ways that a host can be assigned an IP address?
1) Manually assigned - tell the OS what IP address you want to use 2) Dynamically assigned - using DHCP (Dynamic Host Configuration Protocol) an IP address is **leased** to hosts for a fixed durations
30
What sort of IP address would I give to the default gateway? Why? What other hosts use this type?
- Static IP address - Required to be **reliably reachable** on the network at a **known IP address** - Other examples are printers, file and authentication servers, DNS servers, router, default gateway
31
Why are dynamic IP addresses more useful?
- **Easier** as no need to enter IP address, subnet mask etc. - **Less error-prone** as it can cause **IP conflicts** - **More efficient** as IP addresses can be reallocated
32
What is the DHCP process?
1) Host that is requesting an IP address broadcasts a **DHCP DISCOVER** packet to all hosts on the entire subnet. 2) DHCP server recognises discover packet and responds with a **DHCP OFFER** packet. This is also broadcase since no IP yet for host. Packet contains an IP address to offer. 3) Host recieves offer and sends a **DHCP REQUEST** packet to confirm it want IP to be allocated. Request packet also includes request for other information to facilitate communication such as subnet mask, default gateway / router IP, and DNS server IP. 4) DHCP server receives request and sends a **DHCP ACK** to acknowledge and confirm allocation of IP address. This packet also includes all the other information requested. 5) Host C will configure itself to use all the given information.
33
What is the difference between a public and private IP address?
Private IP addresses are **non-routable** as they cannot be used to communicate with hosts across **different networks**. Public IP addresses are routable and hence must be **globally unique**.
34
What is Network Address Translation (NAT)?
The assignment of a single public IP address to the router of a local area network. This means that the devices on the network do not require a public, routable IP address.
35
How do devices on a LAN communicate with devices on the Internet when NAT is used?
1) Since each device is non-routable on the LAN, it will send its IP packets to the LAN. 2) Routers record which device on the network sent the packet by their private IP address. It will also record where the packet is sent by that IP. 3) Router will then replace the private IP as the sending address in the packet as its own public IP address. 4) Once the response is received, it will check the record (for sending IP address) and forward the response to the correct private IP address.
36
What is port forwarding?
Port forwarding is used when a client needs to communicate with a a server that is connected to a private network. The client sends packets to the public IP of the router. The packets sent by the client contain the **port number** of the application running on the server that the client wants to access. Router can then forward the packets to this server by using NAT.
37
What is The Internet?
The Internet is defined as a **network of interconnected computer networks** which uses an **end-to-end** communication protocol.
38
Is the internet wired or wireless?
Mostly a wired network (with wireless parts). Cables pass under oceans to connect different continents.
39
What are fully qualified domain names (FQDNs) and why do we use them?
- Provide human-friendly, easy-to-remember address for a host or service - Given exact location of a particular host within the DNS heirarchy
40
What are the key components of a FQDN?
- Comprised of host name, names of all domains that it belongs to (including top-level domain) - Separated by full stops
41
What is a Domain Name Server (DNS) used for?
- responsible for translating FQDN to IP address - doesn’t translate **whole URL** only the FQDN - required to make requests to the host
42
What are the steps involved in resolving a DNS query?
1) Check the **local cache** of the sending device for the IP address if it was **recently queried** 2) If not found, send a request for the IP address to the **DNS resolver** (usually run by the **ISP**) 3) If it isn’t there in the **cache of the DNS resolver**, it will send a request to the **root nameserver** for the **IP address of the TLD (top-level domain) nameserver, e.g. .com** 4) Once the response with the IP address of the TLD nameserver is returned, a query is made to the TLD nameserver for the **IP address of the authoritative nameserver** e.g. google 5) Once response with IP of authoritative nameserver is sent, a request is made to the authoritative nameserver for the **IP address for the FQDN** 6) This response is then forwarded to the original device which requested the IP address. 7) This IP address is then stored in the cache of the DNS resolver and local cache of the device to prevent unnecessary repetition of this process.
43
When is DNS not required?
- when local computer has matching record in local hosts file - when local computer has matching DNS record in local cache - when URL contains IP instead of FQDN - when URL is for local resource - when URL refers to localhost instead of external domain
44
What is a Uniform Resource Locator (URL)?
A reference to a unique **resource file** on a **specific host on the Internet**.
45
What are the constituent components of a URL?
- protocol, FQDN domain name, path - protocol e.g. https:// - FQDN domain name e.g. en.wikipedia.org - path e.g. /wiki/url
46
What are internet registries?
Internet registries are organisations that are responsible for administering and organising the allocation of IP addresses and domain names across the internet.
47
What is the main organisation responsible for allocating IP addresses and ASNs?
IANA, they provide public IP address and **autonomous system numbers** to other organisations
48
What are regional internet registries?
There are 5 regional internet registries (RIR’s) that IANA delegates the allocation of IP addresses for certain regional areas.
49
What are local internet registries?
Regional internet registries allocate blocks of addresses to local internet registries to assign to customers and organisations.
50
What is ICANN?
Organisation responsible for distributing responsibility for maintaining authoritative nameservers within each TLD to different organisations.
51
What are domain registrars?
Organisations that have permission to register domains on behalf of the organisation that operates a given TLD.
52
What is encryption?
The process of using an algorithm converting plaintext message data into a form that is not understandable (called ciphertext) without a key.
53
What is symmetric encryption?
Encryption where the **same key** is used for **both encryption and decryption**. This requires the use of a method of secret key exchange such as Diffie-Hellman.
54
What is asymmetric encryption?
Encryption where a pair of **different (but mathematically related)** keys are used for encryption and decryption processes.
55
How is asymmetric encryption used in **public key encryption**?
1) A device will have **a public key and a private key**. 2) A sending device can use the public key to encrypt the message. 3) Only the receiving device knows its own private key, so only it is unable to decrypt the message once it is received.
56
What is the key exchange problem?
- It is faster to use symmetric encryption such as AES - But any symmetric method uses a single key - Encryption key must bee passed from sender to receiver securely so that the message cannot then be intercepted and decrypted
57
What is the RSA public-key cryptography algorithm?
RSA is an algorithm used for public-key cryptography. The public key is used for encryption and the private key is used for decryption.
58
How to overcome the issues of the key exchange problem by combining symmetric and asymmetric encryption?
1) Sender A generates a symmetric key to share with recipient B 2) A encrypts shared key with B’s public key 3) A sends encrypted key to B 4) B decrypts the encrypted shared key using their own private key 5) Both parties have the shared symmetric key and can use it for ongoing communication
59
What are digital signatures?
Digital signatures are used to verify the identity of the sender of an encrypted message and detect whether the message has been tampered with or altered during transmission.
60
What are the steps used in generating a digital signature?
1) An application on computer A generates a message / data to be sent securely to computer B. 2) A hashing algorithm is used to generate a **hash** of the message, which is encrypted using A’s private key. 3) Encrypted message **hash** is the **digital signature** and is **appended** to the original message. 4) A’s original message and digital signature are then encrypted using B’s public key and encrypted message is sent to B.
61
What are the steps taken in receiving and verifying using a digital signature?
1) The encrypted message sent by A is received by B. 2) B uses its own private to decrypt the message. 3) The received message is rehashed by B to create a new hash. 4) The received digital signature is decrypted using A’s public key to reveal the original message hash. 5) Original message hash is compared to the recalculated hash to ensure that they match. 6) If there is a match, A’s identity is verified. If not, message is discarded as message could be corrupt.
62
What is a certificate authority? What is in a certificate?
A certificate authority generates and issues digital signatures from the keys that are submitted to it. Certificate contains the public key and additional information such as who owns the key and how long the certificate is valid for.
63
What is a firewall?
A firewall is a security measure designed to provide protection to a network by inspecting IP packet headers and restricting the exchange of data between the protected network and an external network, typically the Internet. - implemented as network **hardware or software** running on a router or computer - purpose is to protect a network from unauthorised access
64
Where are dedicated firewalls placed in networks and why are they used? What are they an alternative to?
- Dedicated firewalls are placed between the router and the switch - They are used for more advanced inspection of packets and more complex access rules - Non-dedicated firewalls are built into the router
65
What is a software firewall?
- Same concepts of packet filtering and inspection to protect local machine - Considered less secire as their ability to manipulate and manage rogue packets are less sophisticated - Data has to be processed by OS before it can be inspected by the firewall
66
In what ways do firewalls protect networks?
- Blocking traffic in **specific TCP/UDP ports** and traffic from specific IP addresses or domains - Blocking certain **types of packet** which hides the presence of a device on a network - Use **stateful inspection** to maintain information about current connections and only allowing packets which are relevant to those connections - Acting as a proxy server, forces traffic to pass through it, stops computers from being directly accessed - Identify unusual behaviour from an internal host
67
What is packet filtering and how does it work?
- As packet passes through firewall, header is inspected and information is compared to rules within firewall's **access control list** - Simple packet filtering doesn't inspect packet payload - Inspects information such as: - source and destination addresses of packet - size of payload - source of destination TCP and UDC ports
68
What are the limitations of static packet filtering?
- Limited in terms of how effectively it can identify acceptable and unacceptable data
69
What is stateful inspection?
1) Inspects **transport and application-layer protocols** used in the contents of packets to detemine if payload data should be permitted 2) Dynamically generate **filtering rules** to allow packets as a part of an ongoing exchange between two devices that was initiated by an **internal device**
70
What are proxy servers and how can they be used to protect networks?
A proxy sits between an internal and external device and handles communications on behalf of the internal device. Prevents direct connection between the internal and external device.
71
What are the security benefits of proxy servers?
- Anonymity to the internal host - Application / request level filtering - Maintain a log of all incoming and outbound requests - Detect malformed incoming packets anr repair or reject them
72
What is malware and what are the different types?
Malware is category of software designed to damage or destroy data / systems. - Viruses, worms and trojans are all examples - Designed to exploit a vulnerability within a system
73
What is a virus?
A virus is a form of malware that **attaches itself to, or conceals itself within another program or file**. Requires a host to replicate and execute its damage.
74
What is a worm?
Worms are **standalone** software that **do not require a host file in order to run**. Worms are almost always self-replicating and can **exploit network vulnerabilities** in order to spread to other devices.
75
What is a trojan?
Trojans are malicious software that appear legitimate and trustworthy.
76
What system vulnerabilities does malware exploit?
- Ineffective firewall rules - Remote management software being enabled - Default passwords being used - Out-of-date operating systems and implementations of network protocols - Also exploits applicatins where memory is not correctly managed - Users can also be exploited
77
What preventative measures can be taken to protect against malware?
- Correctly configured firewalls - Back up data - Install anti-virus software - Disable removable media
78
What ways are there of detecting malware to protect against malware?
- Network monitoring systems to check for high network traffic - Slow performance and high fan speeds and disk activity could be signs of malware
79
What ways are there to contain and recover from malware?
- Host machine should be powered off or disconnected from the local nerwork - Antivirus software can quarantine infected files - Backups can be used to restore original files
80
What is the role of the server in the client-server model?
The server provides resources that are required by the clients. A single can responds to requests from multiple clients at any given time.
81
What is the role of the clients in the client-server model?
Clients utilise resources requested from the server.
82
How do servers and clients work together in the client-server model?
Use of commonly agreed protocols e.g. HTTP
83
What is the difference between client-server model and star topology?
- CS model describes flow of **application-layer** data between hosts, where each host has a different role - Star topology shows flow of **link-layer** data between hosts, where a central hub or switch is used to connect hosts
84
What is the process involving the exchange of data within the client-server model?
1) Server **hosts the resources** that clients require 2) Data exchange is initiated by client that sends a **request** to the server 3) Once request is sent, client **waits for response** from server 4) The server responds by providing resource in a **response message** 5) The client **processes the response** that it recieved
85
What are the two main means of exchanging data betweeen client and server?
JSON and XML
86
Why is JSON better than XML?
- JSON is more compact, which facilitates **faster transmission**, smaller file sizes and uses less memory to store - Easier for **humans to read**, create and understand - Quicker for computers to parse - Understood directly in some programming languages (native support of arrays)
87
What are RESTful API's?
Provides a standardised interface for clients to request resources from servers over HTTP or HTTPS
88
What are the relationship between the API methods and the CRUD operations and the SQL commands?
89
How do APIs and CRUD allow access to online databases? (diagram)
90
What is the role of URLs in RESTful APIs?
Each item or collection of data is available at a specific URL, where **query parameters** specify values or filters. Data will be returned in JSON or XML
91
What do URLs represent in API calls?
- Represnt each resource at an **endpoint** - Cause server to carry out an appropriate action - Can be used to express more complex queries i.e. filtering
92
What is WebSocket and why is it needed?
HTTP and REST cannot **maintain a constant stream of communication** or handle **regular background requests**. Websocket is an **alternate protocol** to HTTP that browsers use to communicate with servers over a **persistent two-way connection over a TCP socket**, allowing both parties to send data to each other at any time.
93
Where is WebSocket used?
- Real-time appplications requiring constant data exchange - Situations where low latency and bi-directional communication are essential - Complex applications where performance and real-time updates are prioritised
94
What does thick-client or thin-client mean?
Thick-client are machines that natively **run much richer applications** since they are capable of significant processing and only use the server for **data storage** and **co-ordination activities**. Thin-client computing is where the client **relies upon the server** to perform most of the **processing** and **storage** requirements, so the client is only used to access the resources that the server provides.
95
What are the hardware requirements for thin-client and thick-client computing?
Thin: - Client machines have lower-powered processors, less RAM and storage - Servers require multiple processors, lots of RAM and storage Thick: - Client-machines have faster, more powerful processors, larger memory and storage - Servers can be lower-powered
96
What are the benefits of thin-client computing? (MS)
- Client machines are cheaper to purchase due to lower hardware requirements - Adding / replacing clients is easier as less setup - All data resides on server, more security - All clients use same, latest version of applications and OS - Client machines consume less power and are more energy-efficient 1 mark AO1 (knowledge) and 2 marks AO1 (understanding) What it is (1 mark): Processing is carried out // applications/programs are executed on an application server (A. server); NE. Resources are stored on the server Why selected (Max 2 marks): Clients are cheaper to purchase // clients can have lower hardware specification; NE. cheaper without further explanation Less configuration of clients is necessary // easier to configure/add a new client // easier to replace a client; Simpler installation/updating of software (as only done on server); R. if implication that software is on client Impossible to install unauthorised software on workstations // more secure as fewer settings can be changed; Workstations consume less electricity/power; Licensing can be cheaper (as licence per active user not per client); Longer MTBF for workstations // workstations do not fail/break as often // workstations need less maintenance;
97
What are the benefits to thick-client computing?
- Not dependent on reliable and highly-available internet connection to access applications and data - Doesn't require higher-bandwidth network or powerful servers - More powerful applications e.g. video editing or 3D modelling
98
What is IPv6 and why was it introduced?
It is the new version of IP addresses. It is needed because there were too few IPv4 addresses.
99
Why does IPv4 not provide enough addresses and how does IPv6 overcomes this?
IPv4 does not use enough **bits** to be able to represent a unique value for every device - IPv4 addresses use 32 bits / 4 bytes and IPv6 addresses use 128 bits / 16 bytes // IPv6 addresses uses 96 more / four times as many bits than IPv4 addresses // IPv4 (theoretically) allows 232 / 4 294 967 296 (unique) addresses and IPv6 (thoeretically) allows 2128 (unique) addresses
100
NAT explanation and uses MS
101
Differences between public and private IP MS
102
DHCP explanation and uses MS