Chapter 6: TCP/IP Basics Flashcards

1
Q

Where does the TCP/IP protocol suite operate?

A

At Layers 3-7 of the OSI seven-layer model.

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

What layer does Internet Protocol (IP) work at and what does it do?

A

IP works at the Network layer. It takes data chunks from the Transport layer, adds addressing, and creates the final IP packet. It then hands the IP packet to the Data Link layer for encapsulation into a frame.

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

What layer does Internet Control Message Protocol (ICMP) work and what is its role?

A

ICMP works at the Network layer. It plays a role in IP error reporting and diagnostics (ping, etc.).

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

What is the Version field in an IPv4 packet header?

A

The version (Ver) field defines the IP address type: 4, for IPv4.

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

What is the Total Length field in an IPv4 packet header and what is its size?

A

The total size of the IP packet in octets (bytes). This includes the IP header and its payload. This field is 16 bits long, which limits the packet size to 65 KB.

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

What is the Time to Live (TTL) field in an IPv4 packet header and what is its purpose?

A

It is a counter that decrements by one every time a packet goes through a router. This counter cannot start higher than 255. The purpose of the TTL field is to prevent endless loops on the Internet.

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

What is the Protocol field in an IPv4 packet header?

A

In most cases, the protocol field is either TCP or UDP and identifies what’s encapsulated inside the packet.

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

What is the Transmission Control Protocol (TCP) and at what layer does it work?

A

TCP is a connection-oriented protocol that gets an application’s data from one machine to another reliably and completely. It works at the Transport layer (Layer 4).

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

What is the TCP three-way handshake

A

SYN
SYN-ACK
ACK

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

What are port numbers and at what layer are they used?

A

Port numbers are used by systems to determine what application needs the received data. Each application is assigned a specific port number on which to listen/send (1 to 65,535). They are used at the Transport layer.

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

What are the Sequence number and Acknowledgment number fields in the TCP segment header?

A

These numbers enable the sending and receiving computers to keep track of the various pieces of data flowing back and forth.

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

What is the Flags field in the TCP segment header?

A

TCP flags give both sides detailed information about the state of the connection.

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

What is the Checksum field in the TCP segment header?

A

The recipient can use the checksum to check the TCP header for errors as bits flipped or lost during transmission.

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

Transmission Control Protocol (TCP) vs. User Datagram Protocol (UDP)

A

Both function at the Transport layer. Data gets broken up into segments when using TCP. UDP datagrams don’t get chopped up, they just get a header.

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

What is a Wide Area Network (WAN)?

A

In a basic sense it is a collection of interconnected Local Area Networks (LANs).

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

What does Address Resolution Protocol (ARP) do?

A

It resolves an IP address to an Ethernet MAC address.

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

What command do you type in Window’s Command Prompt to view the system’s current ARP cache?

A

arp -a

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

What command do you type in Window’s Command Prompt to delete one of the entries in the ARP table?

A

arp -d [ip address from the cache table]

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

What is the decimal value of the binary number: 1111 1111

A

255

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

What command do you type in the Window’s Command Prompt to display the IP and MAC addresses?

A

ipconfig /all

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

What command do you type in the macOS terminal to display the IP and MAC addresses?

A

ifconfig

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

What command to you type in the Linux terminal to display the IP and MAC addresses?

A

ip address

(ifconfig is the older command)

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

What do reserved network IDs (IP addresses) end in?

A

0

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

What two things are combined to make a system’s IP address?

A

The network ID and the host ID.

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

What does a subnet mask do?

A

A subnet mask is used by each computer on a network to determine if a packet is for the LAN or for a computer on the WAN, so it knows how to handle the packet.

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

What does a router need for every LAN that it interconnects?

A

An IP address that is in the LAN’s network ID for that LAN’s router interface (LAN-side NIC).

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

What is the default gateway?

A

The router’s interface on a LAN and the router itself that routes traffic out to other networks.

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

What is the conventional address given to the LAN-side NIC on the default gateway?

A

The lowest or highest host address in the network.

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

What is a subnet mask?

A

A string of ones followed by a string zeroes, always totaling 32 bits, set on every TCP/IP host.

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

How does the subnet mask determine the network ID and host ID portions of an IP address?

A

When you line up an IP address with its corresponding subnet mask in binary, the portion of the IP address that aligns with the ones of the subnet mask is the network ID portion of the IP address. The portion that aligns with the zeroes is the host ID.

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

What is Classless Inter-Domain Routing (CIDR) notation?

A

An IP address followed by the / and a number that tells you the IP address and the subnet mask in one statement.

32
Q

What do all computers on the same network posses?

A

The same subnet mask and network ID.

33
Q

Class A IP block:

First Decimal Value
First Binary Octet
Addresses
Subnet Mask

A

First Decimal Value: 1-126
First Binary Octet: 0xxxxxxx
Addresses: 1.0.0.0-126.255.255.255
Subnet Mask: 255.0.0.0

34
Q

Class B IP block:

First Decimal Value
First Binary Octet
Addresses
Subnet Mask

A

First Decimal Value: 128-191
First Binary Octet: 10xxxxxx
Addresses: 128.0.0.0-191.255.255.255
Subnet Mask: 255.255.0.0

35
Q

Class C IP block:

First Decimal Value
First Binary Octet
Addresses
Subnet Mask

A

First Decimal Value: 192-223
First Binary Octet: 110xxxxx
Addresses: 192.0.0.0-223.255.255.255
Subnet Mask: 255.255.255.0

36
Q

Class D IP block (Multicast):

First Decimal Value
First Binary Octet
Addresses

A

First Decimal Value: 224-239
First Binary Octet: 1110xxxx
Addresses: 224.0.0.0-239.255.255.255

37
Q

Class E IP block (Experimental):

First Decimal Value
First Binary Octet
Addresses

A

First Decimal Value: 240-255
First Binary Octet: 1111xxxx
Addresses: 240.0.0.0-255.255.255.255

38
Q

What is the formula to determine how many hosts a network can have?

A

2^x - 2, where x represents the number of zeroes in the subnet mask.

You subtract two for the network ID (host ID all zeroes) and broadcast address (host ID all 255s).

39
Q

Define: Broadcast packet

A

Where every computer on the LAN hears the message.

40
Q

Define: Unicast packet

A

Where one computer sends a message directly to another.

41
Q

Define: Anycast packet

A

Where multiple computers share a single address and routers direct messages to the closest computer.

42
Q

Define: Multicast packet

A

Where a single computer sends a message to a group of interested computers. Routers use multicast to talk to each other.

43
Q

What are the classful subnets?

A

/8, /16, /24 (Class A, Class B, Class C)

44
Q

What is subnetting?

A

Taking a single class of IP addresses and chopping it up into multiple smaller groups called subnets. You take an existing /8, /16, or /24 subnet and extend the subnet mask by replacing zeroes with ones.

45
Q

List the steps to create a Classless Inter-Domain Routing (CIDR) subnet.

A
  1. Write the existing subnet mask out in binary and place a vertical line at the end of the ones.
  2. Extend the network ID by replacing one or more zeroes with a one until you have the number of subnets that you need. Place a second vertical line at the end of your new one(s).
  3. Convert your new /(# of 1s) subnet mask into dotted decimal.
46
Q

What is the formula for determining how many subnets you create in subnetting?

A

2^y, where y is the number of bits (ones) you add to the subnet mask.

2^1 = 2
2^2 = 4
2^3 = 8

47
Q

What are the steps to create the new networks IDs for the subnets created in subnetting?

A
  1. Convert the original network ID into binary.
  2. Add the network ID extensions to the end for each of the subnets you created.
  3. Convert the new network IDs for your subnets into dotted decimal.
48
Q

What is static IP addressing?

A

Manually typing the IP address, subnet mask, and default gateway into each of your hosts.

49
Q

What does Dynamic Host Configuration Protocol (DHCP) do?

A

It automatically assigns an IP address whenever a computer connects to the network (booting up, etc.). This is called dynamic addressing.

The network requires a DHCP server and DHCP clients for dynamic addressing.

50
Q

What does the DHCP server provide to the DHCP client?

A

An IP address, subnet mask, and default gateway.

51
Q

What is the DHCP four-way Handshake?

A

Discover
Offer
Request
Acknowledgment

(DORA)

52
Q

What port number do DHCP servers use?

A

port 67

53
Q

What port number do DHCP clients use?

A

port 68

54
Q

Define: DHCP Scope

A

The pool of IP addresses the DHCP server can pass out to clients.

55
Q

Define: DHCP Scope Options

A

The default gateway, DNS server, Network Time server, and other information that a DHCP server passes out to clients.

56
Q

What is a DHCP relay?

A

DHCP relays enable DHCP traffic to cross routers.

A DHCP relay enables a router to accept DHCP broadcasts from clients and then use UDP forwarding to send them on via unicast addresses directly to the DHCP server when it is not located on the same LAN as the DHCP client.

57
Q

What is MAC reservations?

A

Enabling DHCP to lease the same IP address to the same host each time.

58
Q

Which devices should never use dynamic IP addresses?

A

Routers
Switches
File Servers
Printers
Cameras
Other Servers

59
Q

Define: IP Exclusion Range

A

Knocking out some of the IP addresses for static addressing inside the pool (DHCP scope).

60
Q

What is Automatic Private IP Addressing (APIPA)?

A

All DHCP clients (Windows) are designed to generate an APIPA address automatically if they do not receive a response to a DHCP Discover message.

61
Q

What is the network ID for APIPA?

A

169.254.0.0/16

The DHCP client only generates the last two octets of an APIPA address.

62
Q

What are some signs the DHCP server is down?

A

The client can’t reach the internet because APIPA cannot issue a default gateway.

The operating system will post some form of error.

The client can’t communicate with computers that retain the DHCP-given address.

*Systems that use static IP addressing can never have DHCP problems.

63
Q

What command do you type in the Window’s command prompt to reestablish the DHCP lease manually?

A

ipconfig /renew

64
Q

What command do you type in the Window’s command prompt to force a client to release its DHCP lease?

A

ipconfig /release

65
Q

What command do you type into macOS to force a client to release a DHCP lease?

A

sudo ifconfig eth0 down

*Also old command for Linux

66
Q

What command do you type in macOS to renew a DHCP lease manually?

A

sudo ifconfig eth0 up

*Also old command for Linux

67
Q

What command do you type in Linux to force a client to release a DHCP lease?

A

sudo dhclient -r

68
Q

What command do you type in Linux to renew a DHCP lease manually?

A

sudo dhclient

69
Q

Define: DHCP Failover

A

Where two, and only two, DHCP servers work together to provide DHCP for the network.

The pair consists of a primary DHCP server and a secondary DHCP server. They both share a single scope.

70
Q

What is a security danger with using DHCP?

A

A rogue DHCP server can be unknowingly added to the network and may be malicious in nature.

This is possible due to DHCP clients accepting IP information from the first DHCP server that responds to it.

71
Q

How do you detect a rogue DHCP server on the network?

A

Anytime some users can access resources and some cannot, check clients’ IP addresses to see if they are outside the network ID.

Also check the default gateway to see if it is correct and has not been changed by a rogue DHCP server to capture network traffic.

72
Q

What subnet is reserved for loopback addresses?

A

127.0.0.0/8

127.0.0.1 is the traditional loopback address used.

73
Q

What is a loopback address used for?

A

To tell a device to send packets to itself.

You can use the ping command with a loopback address to test a computer’s network stack.

74
Q

What are the private IP address ranges?

A

10.0.0.0 - 10.255.255.255 (1 Class A network block)

172.16.0.0 - 172.31.255.255 (16 Class B network blocks)

192.168.0.0 - 192.168.255.255 (256 Class C network blocks)

75
Q

Do routers block private IP addresses?

A

Yes

This makes them useless for systems that need to access the Internet, unless you use NAT. Anyone can use private IP addresses to hide systems from the Internet.