Crunch Time Flashcards

1
Q

C build process: purpose of the Preprocesspr?

A

takes .c file, outputs .i preprocessed file

strips comments
makes substitutions for # (expand macros)
parse c code into pure c code with no preprocessor directives

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

C build process: what is the purpose of the compiler?

A

takes .i file, outputs .s or .asm file

tests for semantic errors
decompose/split operations into assembly operations

Front End:
- parse/tokenize keyworse, identifiers, operators and literals.
- checks for compiler syntax errors
- checks for semantic error (undeclared variable usage, incompatible types, variable out of scope)
- uses symbol table to confirm which symbols are legal to use, when used

Back End:
- Optimization
- generates assembly code from pure C code

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

C Build process: what is the purpose of the Assembler?

A

takes .asm file, outputs .o file (containing opcodes and data sections)
adds the following to object file:
- sections for static variables,
- symbol table, to store variable names and attributes
- debug info, maps source code and information needed by debugger
- export section; global symbols/functions/variables
- imports section, containing symbol names needed from other object files

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

C build process: what is the purpose of the Linker?

A

takes .o file, outputs relocatable file

Symbol Resolution
- resolves external references (that were marked by assembler), throws “unresolved reference to variable” if not found.

Relocation
- changes addresses assigned to labels because Section Merging and Section Placement

Section Merging:
- merges sections from input files into sections of output file

Section Placement
- assembled program assumes each section starts from address 0; if not, these need to be moved to reflect that

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

C Build Process: what is the purpose of the Locator?

A

takes relocateable file and linker script file, into executeable file

memory layout information - (flash/sram, placement of different program regions) -

is provided by linker script file, locator performs conversion to generate single, executeable binary image

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

Internet
Infranet

A

globally linked computer netowrk using TCP/IP protocol to communicate
privately owned/controlled network, usually on a client/server platform to share files/data locally

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

OSI Model

A

First standard model for network communication:
Application
Presentation
Session
Transport
Network
Data Link
Physical

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

IPV4,

Exhaustioned solutions

A

IPv4 was built for roughly 4.29 billion IPv4 addresses… and we are running out.

solutions:

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

Network Interface Card NIC

A

uses physical layer circuitry to communicate with data-link layer to provide a computer with a connection to the/a network

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

Ethernet

A

tech that connects devices in a LAN or WAN. enabled device comunication within a protocol

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

Hub

A

Broadcasts data to every computer/Ethernet based device connected to it.

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

Switch (Filtering, Forwarding)

A

smart switch; implements forwarding ro known destination MAC addresses, and filters packets

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

ARP

A

Address Resolution Protocol maps IP address to MAC addresses

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

Network types (LAN, WAN)

A

…really..?

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

IP addresses (Net ID, Host ID, subnet mask)

A

identifies device on network.
Net id identifies the host’s network,
host ID identifies the host’s TCP/IP network
subnet mask divides an IP address into two parts:

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

IP Address Classes

A

A: first 8 leading bits
B: first 16 leading bits
C: first 24 leading bits
D: for multitask aplications
E: undefined, for testing or illegal

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

CIDR

A

classless inter-domain routing

IP address Allocation Method, allows more flexibility than classful (A/B/C) adressing. (can create /23 leading bits and form subnets/vlans)

18
Q

vLAN

A

devices/nodes communicated as if they were in a single lan… or formed under an existing LAN

19
Q

NAT

A

Network Address Translation

20
Q

PAT

A

maps private addresses (internal IP) in a LAN to a public IP address,

21
Q

VPN

A

Port Address Translation, extension of NAT,

devices in LAN mapped to a single IP addresses using port numbers

22
Q

UDP/TCP

A
23
Q

Port

A

virtual point where connection starts and ends

24
Q

Socket

A

endpoint of a two-way communication between two programs on a network. (virtual file, written to, read from)

25
Q

DHCP

A

dynamic host configuration protocol

client-server protocol in which servers manage a pool of unique IP addresses, as well as information about client configuration parameters. The servers then assign addresses out of those address pools. DHCP-enabled clients send a request to the DHCP server whenever they connect to a network

26
Q

Describe the OSI Model. Give examples of Protocls in Layers

A
27
Q

Explain the IPv4 address exhaustion, and its solutions today

A
28
Q

What are the differences between a switch and a hub?

A
29
Q

What are the differences between LAN and WAN?

A
30
Q

Explain the need for IP addresses. Why are MAC addresses not sufficient?

A
31
Q

What are the differences between broadcast, multicast and unicast?

A
32
Q

What is ARP? ARP Cache? Gratioutous ARP?

A

Address Resolution protocol: map IP to Mac address
collection of ARP entries created when an ARP resolves a mac/ip connection
node broadcasts to netwrok to update its mapping

33
Q

What are the differences between UDP and TCP, and what are the advantages of each? when would we use each? which is safer? faster?

A
34
Q

What does a port number mean, and what is it used for?

A

ID’s the process where data should be sent to

35
Q

what is the command used to show all open ports and/or sockets on a machine?

A

sydo netstat -tulpn | grep LISTEN

-p dispplays pd
-n: don’t resolve names

36
Q

What is DHCP? which service provides DHCP in a home LAN?

A

provided by broadband/cable router, provides IP address to IP host

37
Q

What is a subnet mask and what is it used for?

A

assigns additional noodes/devices under a single IP address

38
Q

if you set a system’s subnet mask to 255.255.255.0, how many computers can you put in a network without using a router?

A

254

two reserved for network identifier and network broadcast. in this case broadcast is not in use

39
Q

given a network address 10.0.16.0/24, detect which of the following is a host IP: 10.0.17.50, 10.0.9.16, 10.0.16.31, or 10.0.0.16

A

10.0.16.31

40
Q

MAC Address:

A

Media Accesss Control Address. unique id assigned to NIC