Saturday, July 17, 2010

Networking

Subnetting
It’s objective is to reduce the total number of network numbers that are assigned.

The idea is to take one IP address and allocate in it several physical networks, now referred to as subnets. The subnets should be close to each other, because at a distant point in the Internet, they will all look like a single network, having only one network number between them.

They will all be part of the same big network, but inside they are a bunch of smaller networks. They all actually share the big network IP, but the mask allows us to identify them as subnets.

Now we need a subnet mask that will be used by a router to forward to the right subnet. The forwarding table will now contain .


CIDR: Classless InterDomain Routing
The problem with subnetting is that the address within which we have subnets has to be big, and it probably has inefficiencies. To solve these inefficiencies we would have to give each subnet its own lower class IP address. But then the backbone router would need to have one entry for each (with subnetting, all the subnets look like one net from the distance, and it’s the router at the entry the one in charge of sending a packet to the right subnet).

To avoid having inefficiencies (and running out of IP addresses) and having too many entries in the backbone router’s table, CIDR lets us use a single entry in a table for a lot of different networks.

If we have an AS with 16 class C networks, instead of handing out 16 class Cs at random, we give it 16 continuous class C addresses. They will now have the same top 20 bits. This can be the network number for all of them.

We need a new notation; the 20 bits prefix for all the networks 192.4.16 though 192.4.31 is represented as 192.4.16/20 (the 20 bits that define the network). To represent a single class C (24 bits long) we would sue 192.4.16/24.

Longest Match rule


BGP: Border Gateway Protocol
BGP assumes that the Internet is an arbitrarily connected set of ASs (Autonomous Systems). The goals of BGP are first to find some path, second to make sure the path is compliant with the policies of the various ASs.

BGP advertises complete paths as an enumerated list of ASs to reach a particular network.


Remote Procedure Call
A client sends a request message to a server, and the server responds with a reply message, with the client blocking while waiting.

Functions that must be performed by any RPC protocol (and that distinguish it from UDP?):

* Provide a name space for uniquely identifying the procedure to be called (could be implemented by defining a set of fields in the request message format)

* Match each reply message to the corresponding request message (implemented by uniquely identifying request-replies pairs using a message ID field)


TCP Congestion Control
The idea is for each source to determine how much capacity is available in the network. TCP makes use of three mechanisms for this:

1. Additive Increase/Multiplicative Decrease

It uses a new variable: Congestion Window (cwnd)

* Additive Increase: each time we get an ACK we increment the cwnd (by 1, for example)
* Multiplicative Decrease: each time a timeout occurs we cut cwnd in half

2. Slow Start (slow in comparison with initial TCP behavior, not additive increase)

Increases the cwnd rapidly from a cold start (exponentially, rather than linearly). Still uses multiplicative decrease on timeout.

3. Fast Retransmit and Fast Recovery

* Fast Retransmit: when the receiver gets a packet out of order – earlier data did not arrive – it resends the same ACK that it sent last time. After 3 duplicate ACKs, the sender retransmits the packet.

* Fast Recovery: removes the slow start phase that happens between when fast retransmit detects a lost packet and additive increase begins. Instead of starting from 1 when a timeout occurs, it starts by the last cwnd divided by 2.


TCP Tahoe
Includes all the mentioned congestion control mechanisms, except fast recovery.

TCP Reno
Includes all of them, plus an optimization known as header prediction (optimizing for the common case that segments arrive in order).

TCP Vegas
The end hosts try to predict congestion by looking at changes in the sending rate. It compares the measured throughput rate with the expected one.

No comments:

Post a Comment