3. TCP/IP Flashcards

1
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
2
Q

Who created TCP/IP?

A

Department of Defense (DoD)

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

TCP/IP backstory?

A

• 1973 first created
• 1978 was divided into TCPand IP protocols
• 1983 Advanced Research Projects Agency (ARPA) renamed DARPA and divided into ARPAnet and MIL-NET.
• TCP/IP replaced network control protocol (NCP) used in ARPAnet
• 1990 ARPAnet and MIL-NET dissolved
• TCP/IP shipped with BSD Unix (Berkeley Software Distribution)

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

Name the layers of the DoD Model?

A
  1. Process/Application layer
  2. Host-to-we Host or Transport layer
  3. Internet layer
  4. Network Access or Link layer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which layer of the OSI model corresponds to the Process/Application layer in the DoD model?

A

Application
Presentation
Session

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

What are the functions of the
Process/Application layer
in the DoD model?

A
  1. Define protocols for node to node communication
  2. Controls user interface specifications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the functions of the
Transport (or Host to Host) layer
in the DoD model?

A
  1. Define protocols for setting up the level of transmission service for applications
  2. Create reliable end-to-end communication
  3. Ensure error free delivery of data
  4. Handle packet sequencing and maintain data integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the functions of the
Internet layer
in the DoD model?

A
  1. Define protocols for the logical transmission of packets across the network
  2. Addressing of hosts by giving them an IP address
  3. Handle routing of pockets among multiple networks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the functions of the
Link (or Network Access) layer
in the DoD model?

A
  1. Oversee hardware addressing
  2. Define protocols for physical transmission of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name (11) Process-Application layer protocols

A

Telnet
SSH Secure Shell
FTP File Transfer Protocol
TFTP Trivial File Transfer Protocol
SNMP Simple Network Management Protocol
HTTP Hyper Text Transfer Protocol
HTTPS Hyper Text Transfer Protocol Secure
NTP Network Time Protocol
DNS Domain Name Service
DHCP/BootP Dynamic Host Configuration Protocol
APIPA Automatic Private IP Addressing

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

What’s the difference between DHCP and BootP?

A

BootP can assign an IP address to a host, but the host hardware address must be entered manually

BootP can send an operating system that a host can boot from

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

What are the four steps of DHCP?

A

Discover
Offer
Request
Acknowledge

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

Give details of the Discover step of DCHP?

A

• A client sends out a broadcast at both layer 2 and layer 3.
• The layer 2 broadcast is all F’s in hex
• The layer 3 broadcast is 255.255.255.255 (which means all networks and all hosts)
• DHCP is connectionless which means it uses UDP at the transport layer

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

What is a DHCP conflict?
How are they resolved?

A

A DHCP address conflict occurs when two hosts use the same IP address.

A DHCP conflict can only be resolved by an administrator by hand

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

What tools can be used to avoid a DHCP conflict?

A

The DHCP server can use the Ping program to test the availability of an IP address from its pool before assigning

A host can send a gratuitous ARP on the local LAN or VLAN using its newly assigned address, if nobody replies, this confirms the IP address is free

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

When would APIPA be used?

A

• APIPA is provided by later windows OS to avoid static IP addressing (adding by hand) when you don’t have a DHCP server.
• The IP address range for a PIPA is
169.254.0.1 to 169.256.255.254.
• A default class B subnet mask of 255.255.0.0 is used

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

Map the DoD model to the OSI model

A

Process/ Application
Application Presentation
Session

Transport Transport
(Host2Host)

Internet Network

Link Data Link
(Network Access) Physical

18
Q

Map DoD model to TCP/IP protocol suite

A

Process/ [Telnet][FTP][LPD][SNMP]
Application [TFTP][SMTP][NFS][X Win]
————————————————————-
Transport [TCP][UDP]
(Host2Host)
————————————————————-
Internet [ICMP][ARP][RARP]
[ IP ]
————————————————————-
Link [Ethernet][FastEthernet]
[Token Ring][FDDI]

19
Q

What is the default PIPA range and subnet mask used for APIPA?

A

169.254.0.1 to 169.256.255.254

255.255.0.0

20
Q

Get details of the DHCP client 4 step process

A
  1. The DHCP client broadcasts a DHCP Discover message looking for a DHCP server (port 67).
  2. The DHCP server that received the DHCP Discover message sends a layer 2 unicast DHCP Offer message back to the host.
  3. The client then broadcasts to the server a DHCP Request message asking for the offered IP address and possibly other information.
  4. The server finalises the exchange with a unicast DHCP Acknowledgement message
21
Q

TCP Segment Format fields

A

[ 16-bit source port ][ 16-bit destination port]
[ 32-bit sequence number ]
[ 32-bit acknowledgment number ]
[4b head len][Rsrvd][Flags][16-bit window sz]
[16-bit TCP Checksum][16-bit urgent pointer]
[ Options ]
[ Data ]

22
Q

Study the TCP Segment field
photo

A

Source Port (16-bits)
This is the port number of the application on the host sending the data

Destination Port (16-bits)
This is the port number of the application requested on the destination host

Sequence number (32-bits)
A number used by TCP that puts the data back in the correct order or re-transmit missing or damaged data during a process called sequencing

Acknowledgement Number (32-bits)
The value is the TCP octet that is expected next

Header length (?)
The number of 32 bit words in the TCP header, which indicates where the data begins. The TCP header (even one including options) is an integral number of 32 bits in length.

Reserved (?)
Always set to 0.

Flags/code bits (?)
Controls functions used to set up and terminate a session

Window (16-bit)
The window size the sender is willing to accept in octets

Checksum (16-bits)
The cyclic redundancy check (CRC) Used because TCP doesn’t trust the lower layers and checks everything. The CRC checks the header and data fields

Urgent (16-bits)
A valid field only if the urgent pointer in the code bit is set. If so, this value indicates the offset from the current sequence number (in octets) where the segment of non-urgent data begins

Options
Maybe zero, meaning that no options have to be present or a multiple of 32 bits

Data
Handed down to the TCP protocol at the transport layer, which includes the upper layer headers

23
Q

Study the UDP Segment ‘diagram’

A

[ 16-bit source port ][ 16-bit destination port]
[ 16-bit length ][ 16-bit checksum ]
[ Data ]

24
Q

Common TCP Protocol Port Numbers

FTP
SSH
HTTP
HTTPS
Telnet
POP3
SNMP
DNS
IMAP4

A

FTP 20, 21
SSH 22
HTTP 80
HTTPS 443
Telnet 23
POP3 110
SNMP ? (Both TCP and UDP)
DNS 53 (Both TCP and UDP)?
IMAP4 143

25
Q

Common UDP Protocol ports

SNMP
SMTP
TFTP
DNS
NTP
BootP

A

SNMP 161
SMTP 25 (587)
TFTP 69
DNS 53
NTP 123
BootP 67

26
Q

Study the IP Header
diagram photo

A

Version (4-bit)
IP version number

Header Length (4-bit)
Add a length in 32 bit words

Priority and Type of Service (8-bits)
Type of Service tells how the datagram should be handled. The first 3 bits are the priority bits or differentiated services bits

Total Length (16-bits)
Length of the packet, including header and data

Identification (16-bits)
Unique IP-packet value used to differentiate fragmented packets from different datagrams

Flags (3-bits)
Specifies whether fragmentation should occur

Fragment Offset (13-bits)
Provide fragmentation and reassembly if the packet is too large to put in a frame. It also allows different maximum transmission units (MTUs) on the Internet.

Time to Live (8-bits)
The time to live (TTL) is set into a packet when it’s originally generated. If it doesn’t get to where it’s supposed to go before the TTL expires the packet is dropped. This stops IP packets from continuously circling the network looking for a home.

Protocol (8-bits)
The port of the upper layer protocols for example TCP is port 6 and UDP is port 17. Also support network layer protocols (not ports) like ARP and ICMP and can be referred to as the Type field in some analyses.

Header Checksum (16-bits)
Cyclic redundancy check (CRC) on header only

Source IP Address (32-bits)
32-bit IP address of sending station

Destination IP Address (32-bits)
32-bit IP address of the station this packet is destined for

Options (0 or 32-bits)
Used for network testing, the bugging, security and more

Data (varies if any)
After the IP option field will be the upper layer data if any

27
Q

What are the values (ports) in an IP packet for the protocols?

? - ICMP
? - IP in IP (tunnelling)
? - TCP
? - UDP
? - IPv6
? - GRE
? - EIGRP
? - OSPF
? - L2TP

A

1 - ICMP
4 - IP in IP (tunnelling)
6 - TCP
17 - UDP
41 - IPv6
47 - GRE
88 - EIGRP
89 - OSPF
115 - L2TP

28
Q

What is ICMP and what is it used for?

A

Internet Control Message Protocol

  • ICMP works at the network layer and is used by IP for many different services.
  • It is basically a management protocol and messaging service.
  • Its messages are carried as IP datagrams.
  • RFC1256 is an annex to ICMP
29
Q

What messages are sent via ICMP?

A
  • Destination unreachable
  • Buffer Full / Source Quench
  • Hops / Time Exceeded
  • Ping
  • Traceroute
30
Q

What is ARP?
What is it used for?

A

Address resolution protocol

  • ARP finds the hardware address of a host from a known IP address.
  • If IP doesn’t find the destination host hardware address in the ARP cache, it uses ARP to find this information
  • ARP interrogates the local network by sending out a broadcast asking the machine with the specified IP address to reply with its hardware address
31
Q

What is an IP address?

A

An IP address is a software address (not a hardware address) that is hardcoded on a network interface card (NIC) and used for finding hosts on a local network.

32
Q

What is a network address?

A

The network address (also called network number) uniquely identify each network. Every machine on the same network shares that network address as part of its IP address for example 192.168.0.0

33
Q

What is a node address?

A

A node address (or host address) is assigned to each machine on a network
This part of the address must be unique because it identifies the machine.
For example, 192.168.1.12

34
Q

Summarise the different classes of networks

A

Class 8-bit 8-bit 8-bit 8-bit
A [Network][ Host ][ Host ][ Host ]
B [Network][Network][ Host ][ Host ]
C [Network][Network][Network][ Host ]
D Multicast
E Research

Class A
0xxxxxxx = 0 -> 127

Class B
10xxxxxx = 128 -> 191

Class C
110xxxxx = 192 -> 223

Class D = 224 -> 239
Class E = 240 -> 255

35
Q

Study the following reserved IP addresses

A

Network address of all 0s
Interpreted to mean “this network or segment “

Network address of all 1s
Interpreted to mean “all networks”

Network 127.0.0.1
Reserved for loopback tests.
Designate the local node and allows that node to send a test packet to itself without generating network traffic.

Node address of all 0s
Interpreted to main “network address“ or any host on a specified network.

Node address of all 1s
Interpreted to mean “all nodes“ on the specified network,
for example 128.2.255.255 means “all nodes“ on network 128.2 (Class B address)

Entire IP address set to all 0s
Used by Cisco routers to designate the default route.
Could also mean “any network“

Entire IP address set to all 1s ie (255.255.255.255)
Broadcast to all nodes on the current network, sometimes called an “all 1s broadcast“ or local broadcast

36
Q

What are the Private IP Address (RFC 1918) ranges for each Class of IP Address?

A

Class A
10.0.0.0 through 10.255.255.255

Class B
172.16.0.0 through 172.31.255.255

Class C
192.168.0.0 through 192.168.255.255

37
Q

What is the address range of Loopback interfaces?

A

127.0.0.0 through 127.255.255.254

38
Q

Who is a Layer 2 Broadcast sent to?
What format does it take?

A
  • All nodes on a LAN
  • Also called hardware broadcast
  • Sent to MAC address ff:ff:ff:ff:ff:ff (all 1s)
39
Q

Who is a Layer 3 Broadcast sent to?
What format does it take?

A
  • All hosts on a broadcast domain can be achieved by setting all host bits on ie 192.168.255.255
  • All hosts and networks can be achieved using 255.255.255.255 (all network and host bits on)
  • Note that default router behaviour is not to pass this broadcast on
40
Q

What is a Unicast Address?

A

This is defined as a single IP address for a single NIC

41
Q

What is a Multicast Address?
How is it used?

A
  • Multicast addresses allow the sending of data or messages to multiple hosts from a single host (one to many)
  • Implemented by hosts subscribing to an IP multicast group address
  • EIGRP uses multicast on 224.0.0.10
  • Address range is 224.0.0.0 through 239.255.255.255 (Class D)