1 / 40

Sissejuhatus informaatikasse

Sissejuhatus informaatikasse. Data communication.

alize
Télécharger la présentation

Sissejuhatus informaatikasse

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sissejuhatus informaatikasse

  2. Data communication • Data Communications is the transfer of data or information between a source and a receiver. The source transmits the data and the receiver receives it. The actual generation of the information is not part of data communications nor is the resulting action of the information at the receiver. Data Communication is interested in the transfer of data, the method of transfer and the preservation of the data during the transfer process.

  3. NB! Masinates X ja Y on elektroonikatükk (võrgukaart) mis on traadi küljes ja suudab mõõta pinget traadis ja sinna ise pinget peale anda. Programmid 1 ja 2 juhivad/kuulavad võrgukaarti kaardi draiveriprogrammi abil. Kiirülevaade võrgunduse funktsioneerimisest • Üldpilt: g nad on enamasti kasutatavad ainult selle konkreetse programmeerimiskeele Traat või raadioside või valguskaabel vms Masin X Programm 1 käib kogu aeg ja ootab, et keegi talle infot (mingi teksti) saadaks. Kui saadetakse, siis ta rehkendab vastuse ja saadab vastuse. Programm 2 saadab programmile 1 masinas X teksti, ootab vastust. Seejärel vaatab, mis vastuses on, ja vastavalt tegutseb. Masin Y

  4. Hulk arvuteid võrgus traatipidi koos: ethernet X Igal arvutil on oma unikaalne NIMI ehk aadress Ethernetis: MAC aadress: 48 bitine arv Y Kui arvuti Y saadab arvutile X teksti, siis ta saadab selle traatipidi KÕIGILE arvutitele võrgus, aga teksti juures on öeldud, et AINULT X (MAC aadress!) peab seda kuulama. Teised ignoreerivad. HUB on lihtsalt traatide “harupesa”, ühendab kõik kokku NB! Korraga on traadil ainult üks teade!

  5. Osa arvuteid võrgus on “lihtsalt” harilikud arvutid, osa spetsiaalsed “võrgu-ruuterid” Hulk arvuteid võrgus traatipidi koos: internet X Teksti küljes on alati IP aadress. Iga võrgus olev masin suunab saadud teksti õiges suunas. Kuidas? Nn “routing table” ütleb, vaadates IP aadressi. Igas arvutis on nn “router”-programm, mis kuulab traati ja saadab saadud tekstid õiges suunas edasi. Igal arvutil on oma unikaalne NIMI ehk aadress Internetis: IP aadress: 32 bitine arv 32 bitti on 4 baiti. IP aadress kirjutatakse enamasti “inimloetavalt” nii (näide): 193.40.254.179 Y

  6. Kuidas info siis liigub? 1 X Y tahab saata teksti “Ahoi, tere” masinale IP-aadressiga X. Ruuterprogramm otsustab, kumbat juhet (tegelikult, vahemasina aadressi) valida. Otsutagu näiteks masina M kasuks. A E M Y L B K S

  7. Kuidas info siis liigub? 2 X M peab saatma teksti “Ahoi, tere” edasi masinale IP-aadressiga X. Ruuterprogramm otsustab, kumbat juhet (tegelikult, vahemasina aadressi) valida. Otsutagu näiteks masina E kasuks. A E M Y L B K S

  8. Kuidas info siis liigub? 3 X E peab saatma teksti “Ahoi, tere” edasi masinale IP-aadressiga X. Ruuterprogramm otsustab, kumbat juhet (tegelikult, vahemasina aadressi) valida. Otsutagu (ilmselt!) masina X kasuks. A E M Y L B K S

  9. Paketid võivad kaduma minna X Y peab saatma teksti “Ahoi, tere” edasi masinale IP-aadressiga X. Teade läheb masinani E, aga siis E crashib (läheb katki, programm läheb segamini, vool läheb ära vms). Võrgu alusprotokoll: IP ise ei kontrolli, kas teade jõudis pärale! A E crash!! M Y L B K S

  10. Paketid võivad minna eri teid pidi, eri kiirusega X Y peab saatma teksti “Ahoi, tere” edasi masinale IP-aadressiga X. A lõhub pika teksti kaheks paketiks! Osa “Ahoi, “ läheb otse E->X, aga siis läheb E-X otseühendus rikki. E leiab, et saab saata teate teise osa “tere” X-ile ka masina L kaudu. A E Ühendus puruneb! M Y L B K S

  11. Paketid võivad minna eri teid pidi, eri kiirusega X E suunabki teate masinale L, kes suunab selle masinasse X. Kaks teksti osa liikusid eri teid pidi! A E Ühendus purunenud, aga pole hullu ... M Y L B K S

  12. Paketid võivad minna eri teid pidi, eri kiirusega X Hiljem saadab Y uue teate “Tere taas” masinale X. E suunab esimese osa “Tere “ läbi masina L. A E Ühendus rikkis M Y L B K S

  13. Paketid võivad minna eri teid pidi, eri kiirusega X .... Siis läheb otseühendus korda, ja E suunab osa “taas” otse masinale X. Teine osa võib seega jõuda kohale enne esimest! A E Ühendus läheb korda! M Y L B K S

  14. ISO - OSI mudel

  15. OSI mudeli kihid • Liides (interface) Sama süsteemi eri kihtide suhtlusviis omavahel • Protokoll (protocol) Eri süsteemide samade kihtide suhtlusviis Omavahel Example: Human protocols Protocols define format, order and messages sent and received among networks, and actions taken on message transmission, receive.

  16. Kapseldamine

  17. Protokollipered (internet ja mõned muud) Sinine osa on interneti protokollid

  18. Päis Sisutekst (data) Interneti alusprotokoll: IP (internet protocol) • IP protokoll on kokkulepe, et kuidas infot saata ja sellest aru saada tuleb. • IP protokoll lubab saata ainult väikeseid tekstijuppe. • Iga tekstijupi ette pannakse lisainfo (päis ehk header), mis ütleb, et: • kuhu see tekst siis saata tuleb (IP aadress) • kust tekst tuli (saatja IP aadress) • Hulga lisainfot ka veel g nad on enamasti kasutatavad ainult selle konkreetse programmeerimiskeele

  19. IP (Internet Protocol) • IP stands for Internet Protocol. Its main job is tofind the best route--through the Internet--to the destination. IP uses IP addresses to identify the host machine and the network. A typical IP address is a 32 bit number, and looks like 142.110.237.1. In this case, 142.110.237.0 identifies the network address, and 0.0.0.1 identifies the host machine. IP addresses are always represented by decimal numbers. IP protocol data units (PDUs) are called datagrams, and provide a connectionless service (send and pray). • TCP/IP pere tööhobune • Garanteerib marsruutimise, st minemise õiges suunas • Mitteusaldusväärne - ei taga kohalejõudmist • Kui sisendpuhver on täis, siis ignoreerib • Ei loo kanalit • iga datagrammi käsitletakse sõltumatult

  20. IP Is it the computer IP? If no, then use the routing table to find the next server Transmitter Server A Server B Receiver

  21. IP Päis Sisutekst (data) TCP Päis Vajalik sisutekst Interneti järgmised protokollid: UDP ja TCP • Kaks põhi-protokolli, mis kasutavad IP-d. • UDP (user datagram protocol). Ei kontrollita, kas info jõudis pärale. • TCP (transfer control protocol). Toimub kontroll. • Kumbalgi puhul (TCP näitel): P Sisaldab omakorda päisega infot

  22. UDP (User Datagram Protocol) • A datagram is "a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without reliance on earlier exchanges between this source and destination computer and the transporting network." The term has been generally replaced by the term packet. Datagrams or packets are the message units that the Internet Protocol deals with and that the Internet transports. A datagram or packet needs to be self-contained without reliance on earlier exchanges because there is no connection of fixed duration between the two communicating points as there is, for example, in most voice telephone conversations. (This kind of protocol is referred to as connectionless.)

  23. UDP (User Datagram Protocol) • Iga rakenduse väljund tekitab uue datagrammi • Ei taga usaldatavust • Datagrammi ehitus: • lähte- ja sihtport (kumbki kaks baiti) • datagrammi pikkus (kaks baiti) • kontrollsumma (kaks baiti, pole kohustuslik) • andmeosa (varieeruva pikkusega hulk baite) • UDP paketi maksimaalpikkus on seega 64 kilobaiti. • Kontrollsumma vea puhul unustatakse datagramm • Rakendused: DNS, NFS, TFTP • This results in a low overhead and fast transfer service (relies on the upper layer protocols to provide error checking and delivery of data). • Using: DNS, streaming media, teleconferencing, Internet telephony

  24. TCP(Transmission Control Protocol) • Ühendusorienteeritud • Usaldatav • Voo tüüpi • Jagab voo segmentideks • Korrastab segmentide järjestuse • Saates käivitab taimeri ja ootab kinnitust • Requesting retransmission of lost data • Kinnitab saadud segmendid • Kontrollsumma päisest ja andmetest • Unustab dublikaadid • Kontrollib voo mahtu

  25. TCP: from computer A to computer B lost timeout timeout timeout Dublicates, which are removed t t t A B A B A B A sends a packet and B reports that it is received A sends a packet, it is lost, so A has to resends that and B reports that it is reseived A sends a packet and B reports, but timeout is over so the packet is resent

  26. Masin oma IP aadressiga X Programmid temas: • www server • ftp server • telnet • ... jne ... 1 1 2 2 ... ... Pordid • Masinas elab korraga palju programme ja igaüks tahab saada/saata oma pakette. Millisele programmile konkreetne pakett saata? • Programmidele antakse kasutamiseks nummerdatud TCP või UDP port (need ei ole füüsilised pistikud!) • Ühenduse määravad: IP aadressid, pordid, protokoll Masin oma IP aadressiga Y Programmid temas: • www brauser • ftp klient • telnet • ... jne ... .... ....

  27. Pordid • Portide liigitus: • 1 - 1023 üldtuntud pordid, sh • 21 FTP – TCP • 23 telnet – TCP • 517 UDP • 1024 – 5000 klientprogrammide ajutised pordid • >5000 muud (mitte-üldtuntud) serverid

  28. HTTP SMTP FTP DNS NFS TCP UDP IP Ethernet / SLIP / .... Füüsiline kiht Vahekokkuvõte protokollindusest internetis g nad on enamasti kasutatavad ainult selle konkreetse programmeerimiskeele Interneti rakenduste oma protokollid, tüüpiliselt eraldi rakendus- programmides Kohtvõrk, moodem vms, tüüpiliselt opsüsteemi laetavate kaardi- draiveritega “Interneti” põhiosa, reeglina opsüsteemi sisse ehitatud

  29. Klient (brauser) küsib faile HTTP ühendused: failide küsimine ja nende andmine • HTTP on omaette protokoll, mida kasutatakse veebilehtede, piltide, tekstifailide, zip failide jne jne saatmiseks veebiserveri ja brauseri vahel. http protokolliga päring üle TCP/IP serveri porti (tüüpiliselt 80) Server annab võrgulehti (faile) http protokolliga vastus üle TCP/IP kliendi porti (mis port, selle ütleb klient TCP sees)

  30. Edasi HTTP suunas: DNS: Domain Name Server • Ülesanne: kui programmile on antud masina nimi, millega ühendust võtta (näiteks, www.cnn.com), siis tuleb kõigepealt leida sellenimelise masina IP aadress. • DNS serverid: serverid, mis sisaldavad “nimi<->IP aadress” tabeleid ja vastavad päringutele “anna selle nime IP aadress” • Kuna DNS päring tuleb teha iga hariliku www-päringu jaoks, siis neid päringuid tehakse maailmas tohutult palju (rohkem kui mistahes muid infopäringuid). Üks masin või kanal ei pea seda vastu. • Lahendus: hajutatud andmebaas. DNS servereid on maailmas väga palju. Igaüks saab üles panna oma DNS serveri. DNS serverid süngivad omavahel infot oma tabelites.

  31. domain net. com. os.net. money.net. zone kids.net. corp.money.net. dop.kids.net. nt.os.net marnick.kids.net. unix.os.net dilbert.corp.money.net. mac.os.net market.corp.money.net. a DNS tree .

  32. local name server dns.iitb.ernet.in DNS: Process example root name server • Host xyz.iitb.ernet.in wants IP address of www.ibm.com • Contacts its local DNS server, dns.iitb.ernet.in • dns.iitb.ernet.in contacts root name server, if necessary • root name server sends the the authoritative name server address to local name server if necessary • local name server asks the authoritative name server dns.ibm.com for the IP address of www.ibm.com and gets it • local name server sends the IP address to the host xyz.itb.ernet.in 2 4 3 5 authoritative name server dns.ibm.com 1 6 xyz.iitb.ernet.in www.ibm.com

  33. ARP ARPstands for Address Resolution Protocol Even though IP packets are addressed using IP addresses, hardware addresses must be used to actually transport data from one host to another. The Address Resolution Protocol (ARP) is used to map the IP address to it hardware address.

  34. IP/ARP IP layer: global ARP layer: local between neighbour computers Transmitter Server A Server B Receiver

  35. NetBIOS perekond

  36. NetBIOS • NetBIOS (Network Basic Input/Output System) • Võimaldab seansi ja datagrammi tüüpi ühendust • Pakub nimeteenust • Masina nimi kuni 15 tähte, hierarhiata • Meetodid nime teisendamiseks IP aadressiks: • küsib WINS serverilt (nimede ja IP aadrsside andmebaas) • Küsimine üldlevi aadressil • LMHOSTS ja HOSTS fail • DNS päring • The NetBIOS name service and datagram service rely on the capability of the underlying network to broadcast name query requests to all NetBIOS applications. • The NetBIOS datagram service allows an application to exchange datagrams with a specific application or to broadcast datagrams to a group and receive datagrams from the group. Datagrams allow applications to communicate without establishing a session. When a NetBIOS application wants to send information that does not require acknowledgment from the destination application, the application can transmit a NetBIOS datagram.

  37. NetBEUI • NetBIOS Extended User Interface: formalizes the frame format (or arrangement of information in a data transmission) that was not specified as part of NetBIOS • The transport layer for NetBIOS • Asendab kohtvõrgu liikluses TCP+IP • + Optimiseeritud väikeste kohtvõrkude jaoks: efficient protocol for use in department-sized local area networks (LANs) of 20 to 200 computers, which would not need to be routed to other subnets • + Kiire • + Hea veakindlus • - Pole marsruuditav • - Palju liiklust üldaadressile

  38. Full Picture 7. Application Layer: Provides network services to the end-users.Web Browser, EMail etc .. Based on FTP/HTTP 6. Presentation Layer: Presents data to and from the terminal using special control characters to control the screen display (LF-line feed, CR-carriage return, cursor movement),OS Security ....FTP/HTTP 5. Session Layer: manages the communications between the workstation and the network: open/close connection [ports, passwords etc]FTP/HTTP 4. Transport Layer: breaks up the file into segments for transport to the network, and combines incoming segments into a contiguous file.TCP/UDP 3. Network Layer: is concerned with the path through the network. It is responsible for routing, switching, and controlling the flow of information between hosts.IP 2. Data Link Layer: Layer of the network interface card (physical connection): Format of data on the network, checksum, Media Access Control (MAC) addressARP/Ethernet 1. Physical Layer: The Physical layer concerns itself with the transmission of bits: Cables, Voltage etc.10 BASE-T/RS/ISDN...

More Related