3. TCP/IP Flashcards
(41 cards)
What does TCP/IP stand for?
Transmission Control Protocol/Internet Protocol
Who created TCP/IP?
Department of Defense (DoD)
TCP/IP backstory?
• 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)
Name the layers of the DoD Model?
- Process/Application layer
- Host-to-we Host or Transport layer
- Internet layer
- Network Access or Link layer
Which layer of the OSI model corresponds to the Process/Application layer in the DoD model?
Application
Presentation
Session
What are the functions of the
Process/Application layer
in the DoD model?
- Define protocols for node to node communication
- Controls user interface specifications
What are the functions of the
Transport (or Host to Host) layer
in the DoD model?
- Define protocols for setting up the level of transmission service for applications
- Create reliable end-to-end communication
- Ensure error free delivery of data
- Handle packet sequencing and maintain data integrity
What are the functions of the
Internet layer
in the DoD model?
- Define protocols for the logical transmission of packets across the network
- Addressing of hosts by giving them an IP address
- Handle routing of pockets among multiple networks
What are the functions of the
Link (or Network Access) layer
in the DoD model?
- Oversee hardware addressing
- Define protocols for physical transmission of data
Name (11) Process-Application layer protocols
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
What’s the difference between DHCP and BootP?
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
What are the four steps of DHCP?
Discover
Offer
Request
Acknowledge
Give details of the Discover step of DCHP?
• 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
What is a DHCP conflict?
How are they resolved?
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
What tools can be used to avoid a DHCP conflict?
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
When would APIPA be used?
• 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
Map the DoD model to the OSI model
Process/ Application
Application Presentation
Session
Transport Transport
(Host2Host)
Internet Network
Link Data Link
(Network Access) Physical
Map DoD model to TCP/IP protocol suite
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]
What is the default PIPA range and subnet mask used for APIPA?
169.254.0.1 to 169.256.255.254
255.255.0.0
Get details of the DHCP client 4 step process
- The DHCP client broadcasts a DHCP Discover message looking for a DHCP server (port 67).
- The DHCP server that received the DHCP Discover message sends a layer 2 unicast DHCP Offer message back to the host.
- The client then broadcasts to the server a DHCP Request message asking for the offered IP address and possibly other information.
- The server finalises the exchange with a unicast DHCP Acknowledgement message
TCP Segment Format fields
[ 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 ]
Study the TCP Segment field
photo
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
Study the UDP Segment ‘diagram’
[ 16-bit source port ][ 16-bit destination port]
[ 16-bit length ][ 16-bit checksum ]
[ Data ]
Common TCP Protocol Port Numbers
FTP
SSH
HTTP
HTTPS
Telnet
POP3
SNMP
DNS
IMAP4
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