Take-home quizzes: Week 12, 13 Flashcards

1
Q

Which classes are used for connection-less socket programming?

A

DatagramSocket and DatagramPacket

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

What Java package contains classes and interfaces for networking?

A

java.net

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

How do socket pairs use the source port number?

A

The source port number acts as a return address for the requesting application

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

What is the purpose of this code:

ServerSocket server = new ServerSocket(8000);

A

Creates a server side socket on port 8000

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

What code does the client use to request a connection with the server?

A

s = new Socket(host, port);

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

At the client side, which stream should be declared assuming the client needs only to send data to the server

A

DataOutputStream

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

If the server uses writeDouble, what should the client use to read the value?

A

readDouble

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

T/F - DNS resolves Internet names to IP addresses

A

True

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

T/F - FTP transfers email messages and attachments

A

False

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

What is the purpose of the DNS application?

A

It translates a host name (URL) into an IP address

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

T/F -HTTP enables devices on a network to obtain IP addresses

A

False

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

T/F - Telnet provides remote access to servers and networking devices

A

True

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

T/F - SMTP transfers web pages from web servers to clients

A

False. HTTP does that

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

Here is a URL http://www.cisco.com/index.html

What part represents the top-level DNS domain?

A

.com

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

Port 80 and 443 are used by what protocol? What is the individual function of the 2 ports?

A

They’re used by HTTP. Port 80 is used for unsecured data transfers, port 443 is used by secured data transfers

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

Which 2 port numbers does FTP use? What are they used for?

A

Port 21 and port 20. Port 21 is used for control traffic (authentication, coordination), port 20 is used for user data traffic (like the actual file)

9
Q

In the DHCP sequence, what is the offer message doing?

A

The DHCP server offers an IP address to the requesting node.

10
Q

Name this part of the TCP/IP model: Defines the content and formatting of client requests and server responses

A

Application layer

11
Q

T/F - A DHCP discover message comes from a client seeking an IP address

A

True

12
Q

T/F - In a DHCP discover message the destination IP is 255.255.255.255

A

True

13
Q

T/F - In a DHCP discover message the source MAC address if 48 ones (FF-FF-FF-FF-FF-FF-FF)

A

False. The destination MAC address is 48 ones

14
Q

T/F - In a DHCP discover message only the DHCP server receives the message.

A

False

15
Q

T/F - In a DHCP discover message all hosts receive the message, only the DHCP server replies

A

True