Networking Review and Socket Programming

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/45

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering OSI and TCP/IP models, layer functions, addressing, network protocols, and C socket API functions.

46 Terms

1
New cards

OSI Model

Open Systems Interconnection


Seven layers that computer systems use to communicate over a network.

2
New cards

OSI Seven Layers


<p></p>
3
New cards

Layer 2 Switch

A network device, operating at Layer 2(Data Link), responsible for forwarding data frames between devices within the same LAN


4
New cards

Switch facts

Layer 2 switches forward data only to the device it is intended for, using MAC addresses.


Multilayer switches can also route at Layer 3

5
New cards

Router

A networking device operating at Layer 3 (Network) connects multiple networks and receives, analyze, and forwards data packets between them using IP addresses.

6
New cards

Default Gateway

used when destination host is outside the network; it locates the destination's network and forwards the packet

7
New cards

TCP/IP Model

a layered networking framework about how data is transmitted between devices over a network using standardized protocols

8
New cards

TCP/IP Model Four Layers

Link → Internet → Transport → Application

(LITA)


(or five layers when Physical is separated from Link, PLITA)

9
New cards

Protocol Data Unit (PDU)

The specific unit of information handled by a particular networking layer or protocol.

10
New cards

Packet

The Protocol Data Unit (IP datagram) handled at Layer 33 (Network).

11
New cards

Frame

The Data Link layer (Layer 22) Protocol Data Unit containing a header, payload, and trailer, used in Ethernet to carry MAC addresses and error-detection data.

12
New cards

Media Independence

The characteristic of IP packets allowing them to be encapsulated in different link-layer frames (e.g., Ethernet or Wi-Fi) without modifying IP addressing or delivery.

13
New cards

Synchronous Communication

Data communication that relies on coordinated timing, such as through a shared or recovered clock.

14
New cards

Asynchronous Communication

Communication that operates without a continuously shared clock, often using start/stop bits for framing; in programming, operations that can finish at a later time.

15
New cards

MAC Address

A link-layer hardware identifier for network interfaces on a local network, typically 4848 bits in length and represented as six hexadecimal byte pairs.

16
New cards

FF:FF:FF:FF:FF:FF

The Ethernet broadcast destination address received by all network interfaces within the local broadcast domain.

17
New cards

Organizationally Unique Identifier (OUI)

The first three bytes (six hexadecimal digits) of a universally assigned 48-bit48\text{-bit} MAC address identifying the manufacturer or organization.

18
New cards

Hop-by-Hop MAC Rewriting

The process at routed hops where each router strips the incoming frame and generates a new frame addressed to the next hop MAC, altering destination MAC addresses across hops.

19
New cards

IPv4 Address

A 32-bit32\text{-bit} numerical network address represented in dotted-decimal format (e.g., 192.0.2.1).

20
New cards

IPv6 Address

A 128-bit128\text{-bit} hexadecimal network address (e.g., 2001:db8::1) that replaces broadcast communications with multicast.

21
New cards

Transmission Control Protocol (TCP)

A connection-oriented Layer 44 protocol that ensures reliable, ordered byte-stream delivery with retransmissions, flow control, and congestion control via segments.

22
New cards

User Datagram Protocol (UDP)

A connectionless Layer 44 protocol that sends independent datagrams without guarantees of delivery or ordering, operating with lower overhead.

23
New cards

Port Numbers

16-bit16\text{-bit} transport-layer numbers ranging from 00 to 6553565535 used to identify application endpoints or services on a host.

24
New cards

ACK and NACK

Control signals where ACK indicates successful data receipt and NACK (or NAK) explicitly reports missing or rejected data in protocols configured for it.

25
New cards

Unicast

A communication method involving one sender transmitting data to a single specific destination.

26
New cards

Multicast

A communication method where a single sender transmits packets to an entire subscribed group of hosts.

27
New cards

Broadcast

A communication method where a single sender transmits data to all devices located within the local broadcast domain.

28
New cards

Ethernet

A family of wired LAN technologies standardized as IEEE 802.3 defining MAC addressing, frame structures, and physical signaling.

29
New cards

Half Duplex

A transmission mode allowing bidirectional communication, but only in one direction at a time.

30
New cards

Full Duplex

A transmission mode that allows simultaneous bidirectional transmission and reception of data.

31
New cards

Internet Protocol (IP)

A connectionless, best-effort Layer 33 protocol responsible for packet addressing and routing across networks without ordering or delivery guarantees.

32
New cards

Socket

An operating system communication endpoint referenced in C by a file descriptor and associated with an IP address and a port number.

33
New cards

Network Address Translation (NAT)

A router technique that rewrites IP addresses (and ports in NAPT/PAT) to allow multiple private hosts to share a public IPv4 address.

34
New cards

Loopback Address

The IPv4 address 127.0.0.1 (within the reserved 127.0.0.0/8127.0.0.0/8 block) where network traffic is routed internally back to the local host machine.

35
New cards

Private IPv4 Address Ranges

Reserved, non-globally routed address ranges: Class A (10.0.0.0 to 10.255.255.25510.0.0.0\text{ to }10.255.255.255 or /8/8), Class B (172.16.0.0 to 172.31.255.255172.16.0.0\text{ to }172.31.255.255 or /12/12), and Class C (192.168.0.0 to 192.168.255.255192.168.0.0\text{ to }192.168.255.255 or /16/16).

36
New cards

Well-Known Ports

System port numbers ranging from 00 to 10231023, including SSH (2222), DNS (5353), HTTP (8080), and HTTPS (443443).

37
New cards

Network Byte Order

Big-endian format used in network protocols where the most significant byte of a multibyte value is transmitted or stored first.

38
New cards

htons() and htonl()

C conversion functions declared in translating 16-bit16\text{-bit} and 32-bit32\text{-bit} integers from host byte order to network byte order.

39
New cards

ntohs() and ntohl()

C conversion functions declared in translating 16-bit16\text{-bit} and 32-bit32\text{-bit} integers from network byte order to host byte order.

40
New cards

struct sockaddr_in

A C socket address structure in for IPv4, featuring fields: sin_family = AF_INET, sin_port (network byte order), and sin_addr.

41
New cards

socket()

A C system call taking domain, type, and protocol parameters that allocates a network communication endpoint and returns its file descriptor, or −1-1 on error.

42
New cards

bind()

A C system call that binds a socket file descriptor to a local IP address and port number, returning 00 on success or −1-1 on error.

43
New cards

connect()

A C system call that establishes an active TCP connection to a peer socket address, or assigns a default peer address for UDP without a handshake.

44
New cards

listen()

A C system call that transitions a connection-oriented socket into a passive state ready to queue incoming connection requests up to a specified backlog length.

45
New cards

accept()

A C system call that extracts the first connection request from a passive socket queue and creates a new connected socket descriptor, returning −1-1 on failure.

46
New cards

send() and recv()

C library functions used to transmit and receive stream or datagram bytes; recv() returning a count of 00 on TCP signals an orderly peer shutdown.