Cs 164: Slide Set 12 Ipv6 and Transport Layer
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 Chapter 5 and cover Sections 5.1 and 5.2. We will revisit Section 4.4 (Multicast), time permitting.
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.
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.
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.
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 1s 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.
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.
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.
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.
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.
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.
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.
Queues
Packets arriv e
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.
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 1s complement and include as checksum.
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.
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.
There is a explicit teardown phase -- the connection is torn down.
The two parties establish some shared state to enable the sliding window algorithm to begin.
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.
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.
Write bytes
Read bytes
Segment
Segment
Segment
Transmit segments
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.
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)
Next Time
Connection Termination TCP State Transition Diagram What is the Advertised Window ? - Flow Control.