Ports & Protocols Flashcards
What is TCP?
Transport Control Protocol.
Which protocol guarantees info delivery?
Transfer Control Protocol (TCP). UDP is “best effort”.
What is UDP?
User Datagram Protocol (UDP)
What is a benefit of UDP?
Faster than TCP (Transfer Control Protocol)
What is Transfer Control Protocol really good for?
File transfer, email, and web page requests.
What is UDP really good for?
Audio and streaming. Since there is no guarantee the connection was made you can loose data, but you gain speed. That’s acceptable with audio and stream (normally)
What is meant by TCP being connection-orientated?
Transfer Control Protocol ensures that a connection is established between the sender and the receiver. It is reliable in that you know the message will be received.
Why is UDP considered Connection-less orientated Protocol?
User Datagram Protocol will only promise to send the request to the target. It doesn’t ensure the target is ready to receive, or that it has been received. Fire and pray.
How does every TCP (transfer control protocol) session start?
3-way handshake
What is a 3-way handshake composed of, and what protocol uses it?
TCP uses it. It is 3 packets that go back and forth from the sender to the destination to establish connection. The packets have no payload.
Describe the 3-way handshake process.
TCP sets up the connection by sending a SYN packet to the destination machine, the destination then sends back a SYN/ACK packet, and TCP then sends its ACK packet back.
What else is being set up in the 3-way handshake besides connection?
Flow control. They are telling each other how fast they can send and receive data, and agreeing on an optimal choice.
In TCP, what must occur before sending any data?
A connection via the 3-way handshake (also identify the flow control)
Every time a data packet is sent in TCP what should occur?
The destination should send an acknowledgement. If not it will need to send again.
Explain an “error” message in terms of TCP
During the 3-way handshake the destination did not acknowledge. The initiator send numerous attempts until its default limit was reached. Then provided the user with an error message.
TCP sends packets, what does UDP send?
User Datagram Protocol sends datagrams.
TCP and UDP both use ports. What is another name for ports?
service identifiers
What are ports, or service identifiers?
Ways of breaking up channels so you can multiple different applications over them
Ports, or service identifiers are specifically set up for what?
Each port, or group of ports is for a specific exchange. The computer is listening for messages that apply to the specific port, through that port. For example, Port 80 is reserved for HTTP traffic.
Who decides what ports are reserved for specific traffic?
(IANA) Internet Assigned Numbers Authority
How many ports are there in a computer?
0 - 65535 (so 65536)
What ports are reserved for “well known” ports (ie. DNS or HTTPS)
0 - 1023
What set of ports are registered, but at the moment unassigned by IANA
1024 - 49151
What set of ports are unassigned and open for anyone to use? Also known as Dynamic.
49152 - 65535
If a server is not listening to a certain port when a request is made what will happen
It will not respond
If I am a developer that has made a new protocol, where would I go to get a port assigned to my protocol?
IANA (Internet Assigned Authority)
What is the dynamic assigned SOURCE port that a client uses to send out a request to establish a connection called?
Ephemeral Port
What is a source port?
This is the port that the client machine uses to send out the message hoping to establish a connection with a server.
How are source ports (Ephemeral Ports) chosen?
They are randomly assigned from a cache of ports that the system uses. Ex: Windows uses a cache of 1025 - 5000. One of these would be assigned arbitrarily to the client machine.
What is FTP?
File Transfer Protocol
What ports do FTP run on?
TCP port 20 and 21.
Why does FTP (File Transfer Protocol) use 2 TCP ports?
One port is used to send the command communications (log me in, authenticate me, upload this file, etc), and the other port is used for data transfers.
What is a problem with FTP (file transfer protocol)?
It is insecure. It is an unencrypted protocol. A sniffer in the middle between A and B can see all the information being exchanged (this includes passwords, usernames, data, everything)
What is TFTP?
Trivial File Transfer Protocol
Is TFTP run on TCP ports or UDP ports?
UDP ports.
Is FTP run on TCP or UDP ports?
TCP ports
What port does Trivial File Transfer Protocol (TFTP) run on?
User Datagram Protocol (UDP) ports
How does TFTP differ from FTP?
It is run on UDP ports. It transfers data to a remote machine with basically no commands and no authentication
Using TFTP what is all you need to make your transfer?
Remote end and file name. This IP address, get this .doc
What is ARP?
Address Request Protocol
What layer is Address Request Protocol (ARP) located?
Data Link, Layer 2.
How does Address Request Protocol work?
Requests MAC addresses for a given IP address. “I have a packet for 192.168.1.5, which computer is that, tell me, I am 192.168.1.1. (this is done on the same network, the package is already within the network, now its trying to get to is destination). The owner of the IP would then give the MAC address so the package can be delivered.
What is a problem with ARP (Address Request Protocol)
No authentication. A spoof can be placed that just says its everything so now all traffic goes to it. (Man in the middle)
What is DHCP?
Dynamic Host Control Protocol
What does DCP (Dynamic Host Control Protocol)
Assign an IP to a machine at boot time.
Why would a machine need to use a DHCP (Dynamic Host Control Protocol) server?
If you have not statically assigned, manually assigned, an IP address to your machine it can request one from a DHCP server every time it boots up.
What is a DHCP machine, in terms of the network?
It is one server on the network that assigns dynamic IP addresses to machines that request one. (because they were not manually assigned an IP address)
How does the DHCP server work? (Dynamic Host Control Protocol)
A machine asks for a DHCP server, it responds, the machine requests an IP address, the DHCP either gives it one from its pool or it can select one it has already identified as reserved for that machine’s MAC address.