Você está na página 1de 4

COMUTER NETWORKING

// do not study from this. it's unreliable


1. BASICS
> network: conneced computers
> Internet: A popular network; computers (end systems) connected by links and pa
cket switches
> packet: data segments
> protocols: formats of exchanging packets
> hosts: end systems which run applications; servers and clients; "network edge"
> end systems are connected to "edge routers"
> access networks allow access to Internet
> DSL (Digital Subscriber Line) and cable are popular in residential areas
> DSL uses existing phone lines
> telephone company provides modem (hence, ISP = telephone company)
> modem converts encodes signals from phone and comps at different frequenci
es
>> high speed download, high freq
>> medium speed upload, med freq
>> two way phone, low freq (unchanged)
> sends analog signals to DSL Accsess Multiplexer (DSLAM) at company's centr
al office (CO)
> customer uses splitter to differentiate bw incoming signals
> "frequency division multiplexing"
> cable system uses existing tv cables
> similar to DSL, except cables are shared
> hence, congestion reduces speed
> house to common node -> coaxial; node to Cable Modem Termination System (C
MTS) -> fibre
> hence, Hybrid Fibre Coax (HFC)
> fibre To The Home (FTTH)
> new; house connected directly by fibre; fast (Gbps)
> Satellite = slow
> Dial-up: similar structure to DSL, but very slow
> LAN: all computers in a region are connected to a single edge router
> popular LAN = ethernet (wired & wireless), uses twisted copper wire
> Moving data
> packet switching
> common method: store and forward; switch stores complete message before se
nding it to link
> storing = buffering; can lead to delays
> packets to be sent are stored in the output buffer/queue
> if buffer is full, leads to clashes, packet drops, queuing delays
> paths are determined using forwarding tables, etc. not fixed
> circuit switching
> paths are reserved for a certain session; constant speed; eg. telephones
> ps is more efficient
>
>
>
>

Network structure
tier 1 ISPs, regional ISPs, access ISPs
pop (point of presence) : other isps can connect to tier 1 isps
ixp (internet exchange point) : isps can connect to each other

> Delays

> processing delay, queuing delay


> transmission delay: time to send all the packets of a message into a link (dep
ends on internet speed)
> propagation delay: time it takes for bits to reach other switches; depends on
wire used
> throughput: rate at which data is received by a host
> layers: application, transport, network, link, physical
> each layer's frame: header + data (like the previous layer's frame)
> uses encapsulation

/* 2. APPLICATION LAYER */
> network application architecture: p2p or server-client
> processes in different end-systems communicate
> send messages through "sockets" (interface bw application processes and transp
ort layer protocols)
> transport protocols may provide services (reliable data transfer, constant thr
oughput, timing, security)
> internet provides tcp and udp; applications can choose either; ssl provides en
cryption to tcp (if inmplemented)
> application layer protocols: http, smtp, ftp, telnet, etc.
> HTTP, port 80, HTML transfer
> uses tcp; web servers, browsers;
> http servers do not store data; they just serve; hence http is "stateless"
> web servers are always on; constant ip
> persistent connection: many reuests/ replies are sent over the same tcp co
nnection
> non persistent: opposite
> http uses persistent by default
> in non persistent, connections may be parallel or serial (one after anothe
r)
> most browsers - 5 to 10 parallel connections; configurable
> non persistence may cause load on servers (multiple connections to be main
tained)
> persistent connections can use pipelining
> pipelining: multiple requests without waiting for replies
> http message: 1 request line (get, post, delete, etc.), multiple header lines,
data
> web servers can use cookies to identify users; included in headers
> cookies are managed by the browser and by the server
> Web cache/proxy servers
> satisfies requests in place of web server; keeps copies of recently reques
ted objects
> browsers can be setup to use proxies first; if object is not in cache, cac
he connects to server
> caches are usually installed by isps; browsers are configured to point to
the cache
> fast, reduce traffic
> usually uses conditional get statements (if modified since)
> Content Distribution Networks (CDNs) companies can install caches; popular
> FTP, port 20 for connection control, port 21 for data, file transfer
> uses two parallel tcp connections; control info is separate from data (file);

"out-of-band"
> one file per data connection; maintains state info about user; opens new data
connection if more files are requested
> commands: stor, retr, user, passwd, etc.
> SMTP, port 25, internet mail
> user agent (eg. MS Outlook), mail server, smtp; uses TCP
> each user has a mailbox in the mail server
> A -> A's mail server -> B's mail sever -> B; no intermediate mail servers
> entire message must be in 7-bit ascii
> smtp is a "pull" protocol; can only upload mail; other protocols are used to a
ccess mail (pop3 (simple), imap (complex))
> web based mail (gmail, yahoo, etc.):
> A -(HTTP or custom protocol)-> A's mail server -(SMTP)-> B's mail server -(HTT
P/custom)-> B
> Domain Name Systems (DNS), used by application protocols
> translates readable site name to ip address
> host name: eg. relay1.west-coast.gmail.com (canonical name), www.gmail.com (al
ias name)
> if a canonical host name has multiple servers, each time a different server ip
is provide by DNS; distributes load
> Heirarchy: Root servers > Top Level Domain servers (org, com, net, in, etc.) > Authoritative server (contains actual ip address)
> User -> local dns server (provided by isp) -> Root -> TLD (and other intermedi
ate servers) -> Authoritative
> local DNS server can cache ip addresses to be more efficient
> DNS servers store resource records (RRs)
> (name , value, type, time to live); if type is A, then authoritative record; e
lse, value contains ip of next dns server to go to
> DNS messages contain headers, RRs, queries, replies, additional data, etc.
> Peer to Peer (P2P)
> peers upload to and download from each other
> no need of complex architecture; can cause heavy load on isp's servers
> less distribution time (minimum time required for all peers to get the file/da
ta) than client-server, because everyone uploads
> bittorrent, ex of p2p
> uses trackers (special servers); registers users when they use torrents
> peers give priority to other peers who give them priority
> uses dht's; each active peer has parts of a hash table which contains info abo
ut which peer has which file's data
> processes send messages into sockets; each socket has an associated port numbe
r and are created by applications
> user datagram protocol (UDP): messages are sent without handshaking
> transmission control protocol (TCP): handshaking; client sends message to serv
er's welcoming socket; server acknowledges
> and creates a connection on a new port with the client's port (connection sock
et)

/* 3. TRANSPORT LAYER */

> provides a logical connection bw two processes (NOT HOSTS) on different hosts
> UDP only provides data delivery and error checking; TCP also provides congesti
on control and reliable data transfer (even though IP is unreliable)
> Extrending host-to-host delivery to process-to-process delivery is transport l
ayer de/multiplexing
> demultiplexing: deliver data in transport layer segment to correct socket
> multiplexing: obtain data from sockets, add relevant headers
> ports nos. : 0 to 65535; data in transport segment = (source port, destination
port, headers, data (applicaton segments, etc.))
> udp demultiplexes using only destination ip address and destnation port number
> tcp uses source and destination ip addresses and port numbers
> hence each process may have multiple tcp sockets (uses multi-threading = using
light-weight sub-processes)
> UDP
> connectionless; bare minimum; provides a checksum for error checking
> TCP
> header contains additional data, such as sequence numbers, ACK numbers, timers
, etc.
> is full duplex; hosts can send messages to each other at the same time

Você também pode gostar