Home > Flashcards > Print Preview
The flashcards below were created by user
on FreezingBlue Flashcards. What would you like to do?
Layers in Internet model
- 5. Application Layer
- 4. Transport Layer
- 3. Network layer
- 2. Link Layer
- 1. Physical Layer
techniques is typically more efficient for sending a single short message with just a few bytes of data?
techniques is typically more efficient for sending a long stream of messages?
If a host's transport layer receives a UDP datagram with a bad checksum, what does it do?
The transport layer discards it.
53 is the standard port number for DNS servers. If a UDP datagram has 53 as the source port, is that datagram most likely sent from or sent to a DNS server?
If a host's transport layer receives a UDP datagram from the network layer and the checksum looks okay, what information does it use to decide what to do with the datagram?
The UDP destination port.
Consider the following six byte message: da8f59412d46 What is the checksum that results from adding the three words together? Deal with any carries. Remember to complement the final result. Blackboard expects a hexadecimal result.
Suppose a TCP endpoint sends a segment with 73 bytes and sequence number 850. The endpoint then sends a 50 byte segment. What is the sequence number of the second segment?
Suppose a TCP endpoint sends a segment with 73 bytes and sequence number 850. The endpoint then sends a 50 byte segment. If the other peer acknowledges the first segment, what value should be in the acknowledgement field?
The sequence number field in the TCP header is 32 bits. How many bytescan be sent on a TCP connection before it becomes necessary to reusesequence numbers?
Suppose a TCP endpoint sends a segment with 73 bytes and sequence number 850. The endpoint then sends a 50 byte segment. If the other peer acknowledges the second segment, what will the value of the acknowledgement field be?
What TCP header field is most analogous to the IPv4 source address field, and why?
The source port because they both contained what the sender send.
How many bits are needed to distinguish between 256 different subnets?
When an IP layer receives an IPv4 datagram from the link layer, what information does it use to decide which transport layer protocol to pass the datagram contents to?
the protocol field
Class D, Byte range 224-239
ARP is to the link layer as the [a] is to the network layer.
Why is an ARP query sent within a broadcast frame rather than a unicast frame?
because the sender doesn't know the destination's MAC address.
A sending node determines whether an IP datagram is intended for another node on its LAN or intended for a node on a different, farther-away LAN,
by comparing the network portion of the destination address with the network portion of each of the sender's own IP addresses.
Suppose A and B are on different Ethernets connected by a sequence of one or more routers. If A sends an Ethernet broadcast, B (will/will not) [x] receive the broadcast frame. If A sends a frame with B's MAC address as the destination, B (will/will not) [y] receive the frame.
Why didn't I ask about the MAC addresses on the PPP link?
PPP does not use MAC addresses.
purpose of UDP
To share bare-bones IP connectivity among processes
Suppose a TCP sender experiences a timeout while awaiting an ACK. How is it most likely tomodify the congestion window?
Reduce it’s size by a factor of two (chop it in half).
Suppose a TCP sender receives an ACK. How is it most likely to modify the congestion window?
Increase its size incrementally, by one MSS.
Name two mechanisms TCP uses for reliability, one to reject segments with errors and theother to know that the other peer has received a segment
- 1. Checksums
- 2. Acknowledgements
We don't need MAC addresses in PPP since there are only two nodes, one at each end of the link. When using IP, do the nodes on a PPP link need IP addresses? Why or why not?
We do need IP addresses. The network layer at each end expects to see an IP header, which contains two IP addresses. A receiver would not know who the packet is intended for without a destination address, and, in the case of a router, could not forward it without a destination IP address. A receiver would not know who sent it without a source IP address.
As an IPv6 packet travels from source to destination, which header fields change from hop-to-hop?
Hop limit and sometimes the flow label.
Why would assigning the same network address to every interface of a router cause problems?
A router serves no purpose if it does not connect to more than one network. If multiple interfaces have the same address, they are by definition on the same network/subnet. Likewise, if all interfaces have the same address, they are all on the same network, and the router does nothing.
symmetric key encryption
secret key (since the same key is used for encryption and for decryption.
asymmetric key encryption: With public key encryption, everyone has public keys that are published and, ideally, easily obtained and verified
- Data encrypted with a public key can be decrypted only with the corresponding private key.
- Data encrypted with a private key can be
- decrypted only with the corresponding public key.
- h : message text → Integer.
- encypt message with authentication code
speed of light
3.0 x 10^8 m/s
- (synchronous)time-division multiplexing
- we divide time into quanta, and assign each customer one or more quanta.
- frequency-division multiplexing
- we allow each host to transmit at a different frequency
- we allow each host to transmit on demand.
- So, a host with something to send does not have to wait for its turn.
- A host with nothing to send uses no resources.
- But, if multiple hosts try to send at the same time, we need a scheme for resolving conflicts.
- Delay = Propagation + Transmit
- delay = d/s + L/r
calculate propagation delay
- Propagation = Distance / SpeedOfLight
- propagation = d/s
calculate transmit delay
- Transmit = Size / (Transmission Rate)
- transmission = L/R
a router will receive a packet and then forward it along its way.
the physical layer
The physical layer transmits unstructured bits across a link via, typically, electromagnetically.
The data link layer groups the bits into frames and delivers each frame to a particular node on a network. Layer 2 often does NIC-to-NIC error checking, e.g., NICs checking CRC. Media access control is here. NIC is network interface card
- The network layer provides forwarding across inter-connected networks.
- focuses on host-to-host communications.
the transport layer
- The transport layer provides (perhaps) reliable (per-haps) FIFO communications.
- The transport layer focuses on process-to-processcommunications.
- A connection-oriented transport protocol is the Transmission Control Protocol, TCP. TCP usually resides on top of IP, a connectionless network layer.
- A connectionless transport protocol is the User Datagram Protocol, UDP, which is also widely-used on the Internet.
- The application layer implements protocols designedto meet communication requirements of specific applications.
- The interface of a service is often specified atthis layer.
- Examples: ftp, telnet, SMTP, HTTP.
- domain name system
- domain name are hierarchical, distributed
- sub-subdomain name
- subdomain name
- domain name
- top-level domain (TLD) name
- Whenever a DNS server learns of a new binding, it places the binding in its cache.
- Reminder: a “binding” in this case is a domain name/IP address pair.
- Before querying another DNS server, a server check sits cache.
- Cache entries expire, typically after 1–3 days
Client-server applications rely on always-on servers thatclients can reliably find.
- P2P applications differ, since sometimes-on, sporadically-available hosts—peers—communicate directly with each other.
- two important application: file distribution, distributed hash tables
How can peer-to-peer be more efficient the client/server for distributing files?
- First of all, if the file originates on one machine, a server,the lower bound must be at least the time to get the file from that server. As before, this is F/us.
- As before, the minimum time must include the time to get the file to the slowest peer, F/dmin.
- The upload rate of the P2P system as a whole is the sum of the upload speeds of all the peers and the originating server. This gives an optimistic lower bound on how long it takes to distribute the file.
peer-to-peer differ from client/server
- What makes peer-to-peer different from client-server:
- not always-on server
- arbitrary end systems directly communicate
- peers request service from other peers, provide service in return to other peers
- self scalability: new peers bring new service capacity,as well as new service demands
- peers are intermittently connected and change IP ad-dresses
- complex management
- ISPs are optimized for asymmetric flow, from cloud to client. P2P evens this up.
- Security issues: everyone is running a server visible potentially to everyone.
- Economics: do I want to give up some of my disk space, processing power, and network bandwidth to others?
- The checksum is calculated by
- 1. taking the data 16b at a time,
- 2. adding them together,
- 3. adding any carry from the leftmost bit in at the right-most bit of the next 16b word, and then after all the sums are done,
- 4. complementing the result.
when checksum is okay or bad
- If the checksum is okay, UDP passes the datagram to the layer above.
- If the checksum is bad, UDP silently discards the datagram.
- is an endpoint in transport-layer communications.
- A socket consists of a port number, a protocol, and an IP address.
stop-and-wait (ARQ) protocol
- the transmitter sends a packet and then waits for an ACK before sending the next packet.
- If a timeout occurs, the sender re-transmits.
- is the fraction of time a resource is being used productively.
- U= xmit/ RTT+xmit
- U= (L/R)/ (RTT+(L/R))
- to Manage Multiple Packets in Transit
- keeping track of ACKs, and what packets have and have not been acknowledged. at the sender, at the receiver
three-way handshake is a three-step process to establish the connection and allow both parties to agree on some parameters:
TCP Sequence Numbers and Acknowledgement Numbers
- Sequence numbers are byte numbers, not packet numbers.
- The acknowledgement number in the TCP header is the number of the next byte expected.
- So, a mechanism was added (ca. 1989) that can trigger retransmission before a timeout actually occurs.
- When an in sequence segment arrives at the receiver:– If there is no previous unacknowledged data, wait 500ms.At the end of this wait, if no more data has arrived,send an ACK.– If there is previous unacknowledged data, send a cumulative ACK.
- If a segment arrives out of order, it cannot be acknowledged; send a duplicate ACK.
- If a segment arrives partly filling a gap, send a cumulative or a duplicate ACK depending on whether there is a gap before the new segment.
the receiver needs some way of telling the sender whether it can handle data at the current rate.
Whenever a TCP peer sends a segment, it includes a value in the rwnd (advertised window) field.
TCP Congestion Control
- The idea is that each source should figure out how much capacity is available in the network, and thus figure out how many packets it can safely have in transit.
- Once a host has that many packets in transit, it waits for ACKs, each ACK indicating that there is room in the network for another packet.
- which is used to limit the amount ofdata in transit at a given time.
- min(cwnd, rwnd) / RTT B/s
Additive Increase/Multiplicative Decrease
- 1. we cautiously increase our sending rate if we think there might be more capacity available, but
- 2. we aggressively decrease capacity use if there is reason to believe our flow is contributing to congestion.
- 1. Cautious increase: add a constant number of bytes to cwnd.
- 2. Aggressive decrease: chop cwnd in half.
- When a connection is first made, we need to start cwnd at some value and, perhaps, increase it at some rate.
- cwnd is initially one MSS in size.
- Chances are quite good the network can handle a newf low of this size.
- Then cwnd doubles in size with each ACK. Since the increase in cwnd is exponential, the term slow start may seem odd.
- Fairness goal: if K TCP sessions share same bottle-neck link of bandwidth R, each should have average rate of R/K.
- The goal is to share capacity evenly.
Parallel TCP Connections
- If every TCP connection gets about the same share of a link’s capacity, what is to stop a host from opening multiple connections to get multiple shares?
- (A) Three flows through a busy link, user X adds one and gets 25% (1/4) of the link capacity.
- (B) Three flows through a busy link, user X adds four and gets 57% (4/7) of the link capacity.
Multicast and broadcast:
- The IPv4 address block 184.108.40.206/4 is reserved for multicast.
- Multicast is also refered to as class D.
- 255.255.255.255 is broadcast.
datagram format: header
- TTL (time to live—called hop limit in IPv6)
- protocol (called next header in IPv6)
- source & destination addresses (32b—128b in IPv6)
Up to 64 kB• Usually much smaller to avoid fragmentation• Payload contents identified by the payload header field (usually TCP or UDP)
Virtual Circuit Networks
- Virtual circuit tables (no building or reading VC tables on final)• Connection setup time• Smaller headers than datagram services• Ideal for data streams, like file transfer
- Virtual circuit (VC) networks provide connection service at the network layer.
- Datagram networks provide connectionless service at the network layer.
- Forwarding tables• No connection, so no connection setup time• Larger headers than VC networks• Ideal for short-lived communications, one or a few short messages (like DNS)
- A sequence of n ones followed by 32 − n zeros.
- • Expressed in dotted decimal or CIDR (slash) format; example, 25 ones followed by 7 zeroscan be written either 255.255.255.128 or /25.Dotted decimal is going away with IPv6.
- • The mask is associated with a destination network or subnet in a router—the number of bitsused in the network or network plus subnet number.
- The destination address is ANDed with a mask to see if it matches a destination network inthe forwarding table.
- Starting with the longest mask:
- 1. AND a mask with the destination address
- 2. if the result matches a destination, forward it to the corresponding next hop
Dynamic Host Configuration Protocol (DHCP)
Hosts need:– IP address– Subnet mask– IP address of default router– IP address of one or more DNS servers• Prefer to distribute these things automatically, not manually.• The request is broadcast, and the response unicast.
Network Address Translation (NAT)
No IPv4 addresses left, so we share.• Private address blocks: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16; no good on greater Internet(specific address blocks unimportant for final).• NAT box (usually a router) shares it’s IP address with clients.• NAT box rewrites IP addresses and port numbers as datagrams enter and leave a network.
The Internet Control Message Protocol provides diagnostics and other information.
Cyclic Redundancy Checks (CRCs)
the sender and the receiver agree upon a function;• the function is applied to the frame, and• the receiver verifies that the result received matchesthe rest of the received frame.
- PPP was designed for situations where there is one senderand one receiver on a link, such as a dial-up link or ISDN.
- There’s no need for addressing at this layer, since eachend of the link is unique.
- Any given PPP universe has just two endpoints.
- There’s no media access control, i.e., a sender always hasexclusive access to the link, and so just sends (Ethernetdiffers).
Address Resolution Protocol (ARP).
ARP’s goal is to allow each host on a network to build a table of mappings.
- Multiple Access with Collision Avoidance for Wireless.
- The receiver and sender exchange control frames be-fore any data frames are actually transmitted.
- • The sender transmits a Request to Send (RTS) frameto the receiver, which includes a length field.
- • The receiver responds with a Clear to Send (CTS)frame, which echoes the length field.
- • Upon receiving the CTS, the sender can transmit.
- • Any node that hears the CTS frame knows it is nearthe receiver, and so cannot transmit until after themessage is sent.
- • Nodes that do not hear the CTS assume they are farfrom the receiver, and are free to transmit.
- Code Division Multiple Access
- each sender has its own code (a sequence of±1) and we define a chipping rate:
- The chipping rate is much higher than the bit rate.
- The sender multiplies each bit by a sequence from thecode.
802.11 Rate Adaptation
- Most 802.11 implementations attempt to match trans-mission rates with signal/noise (S/N) ratio. One suchscheme:
- • As long as ACKs are received consistently, the trans-mit rate is maintained or increased.
- • If ACKs are not received, the transmit rate is de-creased.
- • This somewhat resembles TCP congestion control.