cs 164: slide set 12 ipv6 and transport layer. where are we ? we have covered sections 4.1, 4.2 and...
TRANSCRIPT
![Page 1: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/1.jpg)
CS 164: Slide Set 12IPv6 and Transport Layer
![Page 2: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/2.jpg)
Where are we ?
• We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6).
• We now move to Chapter 5 and cover Sections 5.1 and 5.2.
• We will revisit Section 4.4 (Multicast), time permitting.
![Page 3: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/3.jpg)
Why IPv6 ?
• Address space is scarce -- 32 bits may not suffice.
• Initial proposal to double the IP address space but finally a proposal to have 128 bit IP addresses.
• Allows for 3 x 1038 addresses.
![Page 4: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/4.jpg)
In addition ...
• Support for real-time services
• Better Security support• Auto configuration• Mobility support
– Note that many of these exist in IPv4 but the goal is to do these things better.
![Page 5: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/5.jpg)
Address Space Allocation
• No classes; however, address space sub-divided based on leading bits.
• Prefixes may have specific assignments.• There are special prefixes for “link local use”
and “site local use”. Hosts can construct (by themselves) an address that will work on the network that they have without being concerned about global uniqueness.
• A large fraction of the addresses are assigned as before -- for unicast operations.
• However, a significant chunks of space are reserved for future use and to accommodate non-IP addresses.
• Read book for rest on this.
![Page 6: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/6.jpg)
Address Notation
• It is in Hex !• Example:47CD:1234:4412:AC02:0022:1234:A456:1204• If we have --47CD:0000:0000:0000:0000:0000:A456:1204
it is simply represented as : 47CD::A456:1204
-- for compact representation.
![Page 7: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/7.jpg)
Backward Compatibility
• IPv4 compatible IPv6 addresses: Zero extend the 32 bit IPv4 address to 128 bits. This is required for those nodes that understand IPv6.
• IPv4 Mapped IPv6 addresses: Add a 2 byte prefix of all 1’s to the 32 bit IPv4 address and then zero extend the result.– Example ::00FF:128.96.33.81
• Note that if there are nodes that can only understand Ipv4, one could use tunneling between these nodes -- creation of IPv6 tunnels.
![Page 8: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/8.jpg)
Routing with IPv6
• There exists global unicast addresses that can be aggregated. Similar to CIDR.
• Stub AS or Multihomed AS --> subscribers.• Transit AS --> Providers.
– Can be either direct providers (connected to backbone networks) or indirect providers.
• The address prefix is assigned to the provider who then assigns the lower prefix to subscribers -- a single provider prefix is advertised.
• The disadvantage is that changing providers can cause problems.
• IPv6 packet format -- read book.
![Page 9: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/9.jpg)
Auto-configuration
• Obtain an Interface ID that is unique on the link to which the host is attached -- link layer addresses used.
• Obtain correct prefix -- router periodically advertises.
• Put them together.
![Page 10: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/10.jpg)
NAT
• Stands for Network address translation.• Hosts are assigned a private address --not
necessarily unique.• There is a NAT box that provides the address
translation --in some sense acts as a proxy.• It is complex -- need for understanding of
higher layer protocols (port nos. etc. for obtaining correct mapping).
• Viewed architecturally impure by purists.
![Page 11: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/11.jpg)
Anycasts• With anycasting, packet may go to any of a set of interfaces (as an example the nearest interface).
• As an example, all of the routers of a backbone provider could be assigned a single anycast address.
• Web caching -- http request forwarded to any of a set of sites.
• IPv6 supports anycasting -- a specific address format.
• Rest of IPv6 -- Self Study.
![Page 12: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/12.jpg)
Chapter 5:Transport Layer
![Page 13: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/13.jpg)
Transport Layer:Intro
• A single logical connection between processes.
• Hides intricacies of underlying network structure.
• Takes an application message, divides it into smaller chunks (called PDUs for protocol data units), adds headers and sends.
![Page 14: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/14.jpg)
UDP• Stands for User Datagram protocol.• Acts as a simple demultiplexer between processes.– Once datagram arrives at a destination host, which process is it to be forwarded to ?
– The processes are distinguished using port numbers.
• Note: IP multiplexes data from various processes!
• Best Effort -- as with IP. • UDP applications --DNS, routing updates.
![Page 15: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/15.jpg)
Pictorial view of UDPApplication
processApplication
processApplication
process
UDP
Packets arrive
Ports
Queues
Packetsdemultiplexed
![Page 16: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/16.jpg)
Ports
• Processes identified using port numbers -- an abstraction.
• 16 bit representation of ports.• Destination port is usually well known
– In Unix usually in /etc/services– as an example -- DNS has port 53 on which messages are received.
– Can use well known port to agree on a different port to communicate.
• Port implementation is OS specific -- usually implemented as message queues– UDP appends message to queue.
![Page 17: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/17.jpg)
What does UDP give ?
• Just demultiplexing.• No “flow control”• No reliable/ordered delivery• No congestion control provision.
• But, message correctness ensured by checksum.
![Page 18: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/18.jpg)
UDP checksum
• Computed over the UDP header, the contents of the message body and something called the pseudoheader.– Pseudoheader -- from IP header, contains protocol number, source IP address, destination IP address and UDP length field.
• Arrange the contents into 16 bit words, add the words, take the 1’s complement and include as checksum.
![Page 19: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/19.jpg)
Why UDP ?
• No connection set up.• No need to maintain state.• Smaller packet overhead (8 bytes whereas TCP has 20 bytes)
• Unregulated send rate -- especially if packet loss is not an issue.
![Page 20: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/20.jpg)
Transmission Control Protocol (TCP)
• Reliable byte stream.• Connection oriented -->
– Guarantees reliable in-order delivery of a stream of bytes.
– Has flow control i.e., the receiver can limit the amount of data that the source sends.
– Does the demultiplexing that UDP does.– Includes a congestion control mechanism -- throttle the rate of sending to avoid overloading the network.
![Page 21: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/21.jpg)
TCP basics
• A sliding window protocol is at the heart of TCP.
• TCP establishes an explicit logical connection between a client and a server.
• There is an explicit connection establishment phase (similar to dialing a connection) -- the two sides agree to exchange data.– The two parties establish some shared state to enable the sliding window algorithm to begin.
• There is a explicit teardown phase -- the connection is torn down.
![Page 22: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/22.jpg)
Challenges• Remember, sliding window specifies how many segments should be in flight at a given time.
• The RTT of a logical connection is highly variable.
• Delay bandwidth product okay only if there is a single connection -- however, if there are many connections, and the number is varying on the different links through which a TCP connection passes,estimation of this product is difficult.
• TCP tries to learn about the resources for a connection.
![Page 23: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/23.jpg)
Packet re-ordering and Sequence Nos.
• Packets could be re-ordered when the traverse the Internet.
• Sequence numbers are used to ensure that they arrive in order.– How far out of order ? (to be determined)
• Remember -- IP has a TTL – TCP uses this information to define a maximum segment lifetime (defined as MSL).
– Current recommended setting for MSL is 120 seconds (it is a conservative estimate).
![Page 24: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/24.jpg)
Segments
• TCP is a byte oriented protocol -- This means that sender writes “bytes” into a TCP connection and receiver retrieves bytes.
• But TCP does not really “directly” transmit bytes.
• Buffers enough to fill a reasonably sized data unit called segment and sends it to receiver.
• Receiver retrieves bytes and stores in buffer.
![Page 25: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/25.jpg)
Pictorial View of the Process
Application process
Write
bytes
TCP
Send buffer
Segment Segment Segment
Transmit segments
Application process
Read
bytes
TCP
Receive buffer
■ ■ ■
![Page 26: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/26.jpg)
Maximum Segment Size
• TCP segment size is limited by what is called MSS (Maximum Segment Size).
• The largest segment that TCP can send without causing the local IP layer to fragment it.
![Page 27: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/27.jpg)
The Push Operation
• One can also invoke the push operation with TCP.
• Flushes the buffer of unsent bytes– supports the operation of terminal emulators (such as talk or chat).
• With Push, there is a timer that periodically fires taking what is in the buffer.
![Page 28: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/28.jpg)
TCP Segment Format• Src Port and Dst Port
represent the corresponding port nos.
• TCP’s demux key is {Src Port, Src IP addr, Dst Port, Dst IP addr}
• Each byte of data contains a sequence number.
• Sequence number of segment is the sequence number of first byte.
Options (variable)
Data
Checksum
SrcPort DstPort
HdrLen 0 Flags
UrgPtr
AdvertisedWindow
SequenceNum
Acknowledgment
0 4 10 16 31
![Page 29: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/29.jpg)
TCP Segment (cont)
• ACK and Advertised Window go from receiver to sender (we will see later).
• Hdr Len -- In terms of 32 bit words.
• Checksum is over TCP header, TCP data and pseudoheader (as in UDP).
Options (variable)
Data
Checksum
SrcPort DstPort
HdrLen 0 Flags
UrgPtr
AdvertisedWindow
SequenceNum
Acknowledgment
0 4 10 16 31
• Options -- Time stamps, extension of the adv. window
![Page 30: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/30.jpg)
Flags in TCP header
• There are 6 bits for flags.• SYN flag -- connection establishment• FIN flag -- connection termination• ACK flag -- Acknowledgement field is valid --
bytes are being acknowledged, so the receiving TCP entity should pay attention to that field.
• URG flag --segment contains urgent data (next slide).
• PUSH flag -- sender invoked PUSH -- send data to application right away.
• RESET flag : confusion -- abort connection.
![Page 31: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/31.jpg)
Urgent data
• Data to interrupt operation underway – called out of band communications.
• The Urgent flag says that there is urgent data in the front of the segment body upto what is specified by the UrgPtr field.
![Page 32: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/32.jpg)
Connection Establishment
• Client is the caller• Server is the callee• In the SYN+ACK
message, both the SYN and ACK flags are set.
• It is a three way handshake!
Active participant(client) (server)
SYN, SequenceNum =x
ACK, Acknowledgment =y+1
Acknowledgment =x+1
SYN+ACK,
SequenceNum=y,
![Page 33: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/33.jpg)
The Three Way Handshake
• If SYN+ACK is lost, then server is left hanging -- does not know that the client did not get it and therefore might have aborted.
• If ACK gets lost on the other hand, it is ok -- the sender sends the first segment and so on -- so the connection survives.
![Page 34: CS 164: Slide Set 12 IPv6 and Transport Layer. Where are we ? We have covered Sections 4.1, 4.2 and 4.3 (We finish 4.3 today with IPv6). We now move to](https://reader033.vdocuments.site/reader033/viewer/2022052603/56649d825503460f94a68724/html5/thumbnails/34.jpg)
Next Time
• Connection Termination• TCP State Transition Diagram• What is the Advertised Window ? -- Flow Control.