02.2 (Conspect) Sockets
We continued the last lecture about the global network.
Global network
The task of data transfer is solved, but:
- locally (in the space of single media)
- without any data integrity / transmission control / data interpretation
So we shall continue. Next subtask is to unite all local networks (sets of nodes bound by joint media) into global network
- Router
- a node of two or more local networks, that can retransmit packets from one network to another
- Route
- a chain of routers leads from sender to recipient
- Routing
a process of determining this chain
- Host
- a node of global network
Identifying and routing
- All hosts should have unique identifiers
When sending a packet from one host to another, in case they're not connected to the same media, there should be algorithm to determine what router to chose to send packet instead of recipient (which therefor is not accessible directly by media)
Dynamic connectivity
No host can bear a full routing map of global network:
- It changes every second
Everybody can change a route without informing all others
But some information on what is connected to what is critical. Question is: what is «what»?
E. g.: the Internet
- Addressing:
every host has an (almost) unique IP_address
There's some address groups, that can be non-unique, for use in intranet, the set of local networks under single administration
- Routing:
- every IP address is assigned to a network interface connected to the media
Classic (topological): every IP address is divided to network address and node address.
- If network addresses of two nodes are identical, they treated as connected to single media, so no routing is needed.
If network addresses of two nodes are different, there must be special routing table entry pointing to the router that can deliver packet to the recipient. The shorter network address is, the longer is node address and more nodes can belong to this network. IPv4 network address of 0 bits (0.0.0.0) means all the internet
- Typical network setup:
- One local network
- One default router for all recipient not belonging to local network
- Non-classic (source based / policy based) routing
- Exterior dynamic routing:
A set of single-administered local networks forms autonuomus system
All AS'es should announce their availability and other properties to each other (for example, via Border_Gateway_Protocol), and update routing tables.
Sockets
- Socket
- universal, asynchronous data transfer process. Looks like a portal - we shove data into one receiving hole and it falls out of the other end of the hole. And this data can be in the system. Or these holes are abstract - we create some kind of descriptor. Socket - socket - name of the program interface to provide data exchange between processes. Processes during this exchange can be executed on one computer or on different computers connected by a network. Socket - abstract object representing an endpoint of connection. A socket is much more universal abstraction. Visualization can be nailed to different family of protocols (network). Socket documentation describes a huge number of protocol families. It means that when we create a socket we create some interface between the 4 transport layer and the 3 delivery layer.
- TSP
- streaming connection, here we are guaranteed overfill protection. If on one side (A) the computer tries to transmit data very quickly, and on the other side (B) the computer receives it very slowly or there is a narrow channel in the middle which routes it very slowly.