Chapter 22 Q and A

19
Chapter 22 Q and A Victor Norman CS 332 Spring 2014

description

Chapter 22 Q and A. Victor Norman CS 332 Spring 2014. TCP/IP vs UDP/IP. Q: Why does this chapter treat TCP/IP as a single unit? What about UDP/etc.? - PowerPoint PPT Presentation

Transcript of Chapter 22 Q and A

Page 1: Chapter 22 Q and A

Chapter 22 Q and A

Victor NormanCS 332

Spring 2014

Page 2: Chapter 22 Q and A

TCP/IP vs UDP/IP

Q: Why does this chapter treat TCP/IP as a single unit? What about UDP/etc.?

A: Good point. IP is layer 3 and TCP is over it. They are separate and independent, theoretically. UDP is also over it (layer 4), but adds almost no functionality to IP.IP is responsible for naming endpoints (IP addresses) and forwarding packets.

Page 3: Chapter 22 Q and A

Connection-oriented vs. -less

Q: Comer says that the Internet uses a combination of connection oriented services that use connection less services. How is this the case? Is he just describing the fact that a connection is achieved, but not directly??A: IP is connection-less: no setup or teardown is required. Endpoints do not agree to communicate before they communicate.TCP, however, uses IP, to set up end-to-end connection-oriented communication.

Page 4: Chapter 22 Q and A

Virtual Packet?

Q: How is a packet a virtual packet? I know it's not tied to the hardware, but isn't it still tied to the underlying computer/network Layer 2 implementation?A: All Comer means by “virtual” is hardware independent.Layer 2 protocols move the packets across various networks, but IP on top of it is independent of those protocols.

Page 5: Chapter 22 Q and A

IP Header fields

Q: Why is TTL needed? Is that to stop packets from going in an infinite loop?A: Yes! If there are routing loops, packets would go round-and-round forever, if not for TTL field.Q: It states that the Type of Service field in the IP header is seldom used in practice. Why might this be?A: I think routers didn’t implement it initially, and then groups couldn’t agree on how to use it, and the socket interface didn’t provide for using it.

Page 6: Chapter 22 Q and A

TTL implications

Q: Comer mentions that when a packet reaches the end of its time to live, it is discarded and an error is sent to the source. Who sends the error message? A: The router where the TTL goes to 0.Q: Is there any guarantee that the error message won't time out? A: Nope.Q: Is it possible that it is impossible to send packets from one network to another network that is too many hops away, or is there a limit on the maximum number of network jumps possible?A: Yes: the Internet may only be 256 hops across.

Page 7: Chapter 22 Q and A

IP Options

Q: Does header length only vary by IP Options, or do other fields change?

A: The basic header length is fixed (20 bytes). It only varies when options are added (which most routers don’t honor anyway).

Page 8: Chapter 22 Q and A

Purpose of Source Address?

Q: Is the source address important for reasons other than letting the receiving host know who sent it?A: Question: is it used in packet forwarding?A: No: the source address is only used (theoretically) for letting the receiver know who to respond to.

Page 9: Chapter 22 Q and A

Unique IDs

Q: How are packets given unique IDs?

A: I think the spec says that a device picks a pseudo-random number to start and then increments it for each subsequent packet generated.(What is the ID used for?)

Page 10: Chapter 22 Q and A

IP Forwarding Question

Q: What IP header fields are changed as a packet is forwarded across a network?

A: TTL, fragment fields (if necessary), header checksum.Note: for each hop, the layer 2 is replaced, but the layer 3 is essentially unchanged. Thus, the dest MAC usually does not match the dest IP.

Page 11: Chapter 22 Q and A

Different frame formats

Q: In 22.12 it states that because different networks have different hardware frame formats and headers can be different sizes. If the header contains the same information at each hop how exactly can they be different sizes? A: If multiple networks in the path used the same layer-2 frame format, the header sizes would be identical. But, the contents would totally change for each hop.

Page 12: Chapter 22 Q and A

Longest Prefix Match

Q: What is the purpose of the longest prefix match method? I thought that IP addresses with CIDR have the subnet mask appended (via /number) so the possibility of there being ambiguity as described on pg. 369 on the router shouldn't arise, right?A: We write address/m, but notice that the mask is not in the IP packet. But, there can be ambiguity… see my example that I’m going to draw on the board…

Page 13: Chapter 22 Q and A

LPM implementation, etc.

Q: How is longest prefix match typically implemented? Is there a better approach? Do most routers have relatively small routing tables?A: It is typically implemented now in something very cool called Content-Addressable Memory. You provide a value and it looks in all memory locations for the best match.Most routers have small routing tables. Some have huge routing tables.

Page 14: Chapter 22 Q and A

Packet Fragmentation

Q: How much does this slow down a network?

A: Enough that IPv6 does not do it…(Very famous paper called Fragmentation Considered Harmful.)

Page 15: Chapter 22 Q and A

Reassembly

Q: In reassembly how can you guarantee that the information will be reassemble in the correct way since it is being split apart? It does state that the fragment offset deals with this but can this actually guarantee it? A: Each packet contains the length of the header + data, and each packet contains the offset from the beginning of the packet (in bytes). So, the final destination can reassemble correctly – if it receives all fragments.

Page 16: Chapter 22 Q and A

More on fragmentation

Q: In Section 22.14 comer says that if a datagram is fragmented, the last fragment has an additional bit set in the header of the frame to designate it as the "last fragment." How does this work since IP is a "best-effort" and doesn't guarantee that fragments will be delivered in order? What if that fragment is delivered first?A: A queue is allocated for each fragmented packet and the fragments are stored until all fragments arrive, or some timer times out (at which point the fragments are discarded).

Page 17: Chapter 22 Q and A

Even more on fragmentation

Q: If fragmentation indexes using 13 bits but packet size is 16 bits, aren't there MTUs for which a large enough packet can't be fragmented? A: Answer is in the details: the 13-bit fragment offset is the location of the data in the original in 8-byte chunks. (And 23

is 8.)

Page 18: Chapter 22 Q and A

Multiple “Parallel” Routes

Q: How are routers enabled to send portions of their traffic to a particular network prefix through a particular route and the rest through another route to better distribute traffic like our example in class? Is this just a specific type of router and how does the rest of the network adjust to deal with this (if it even has to)?A: No: to the best of my knowledge, this isn’t done. It can be done well for certain layer-2 protocols (ATM).

Page 19: Chapter 22 Q and A

Host-specific route

Q: What are the occasions that you would want to use a host-specific route?

A: Suppose most of your 153.106.7 network is out one interface, but one special single host is out another interface. You would use a host-specific route to handle this.