Introduction - Univerzitet u Zenici

Introduction - Univerzitet u Zenici

TCP/IP Mree Primjer Uvod u mree. Ova prezentacija e pomou jednog primjera ilustrirati interakciju protokola koji je zasnovan na temelju TCP/IP protokola. Namjena ovog primjera je da motivie studiranje TCP/IP protokola. 1 Jednostavan TCP/IP primjer Pretpostavimo da klijent (rije klijent u ovom primjeru moete itati i kao korisnik) na svom raunaru sa adresom argon.tcpip-lab.edu ("Argon") eli da pristupi web URL adresi http://neon.tcpip-lab.edu/index.html. argon.tcpip-lab.edu ("Argon") neon.tcpip-lab.edu ("Neon") Web request Web page Web client

Web server Postavljamo pitanje ta se u pozadini, u stvari, deava na mrei? 2 HTTP zahtjev i HTTP odgovor Web pretraiva (Chrome, FireFox,...) pokree HTTP klijent program (program koji radi u pozadini OS) Web server ima ve pokrenut HTTP server program HTTP klijent alje HTTP zahtjev prema HTTP serveru HTTP server odgovara sa HTTP odgovorom Argon HTTP client Neon HTTP request HTTP response HTTP server

3 Izgled HTTP zahtjeva GET /index.html HTTP/1.1 Accept: image/gif, */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 Host: neon.tcpip-lab.edu Connection: Keep-Alive 4 Izgled HTTP odgovor HTTP/1.1 200 OK Date: Sat, 25 May 2002 21:10:32 GMT Server: Apache/1.3.19 (Unix) Last-Modified: Sat, 25 May 2002 20:51:33 GMT ETag: "56497-51-3ceff955" Accept-Ranges: bytes Content-Length: 81 Keep-Alive: timeout=15, max=100

Connection: Keep-Alive Content-Type: text/html

Internet Lab

Click here for the Internet Lab webpage. Postavljamo pitanje na koji nain HTTP zahtjev dolazi sa klienta Argon do servera Neon? 5 Sa HTTP prema TCP Da bi poslao zahtjev, (jedini) HTTP klient program uspostavlja TCP vezu sa HTTP serverom na Neon-u. (Jedini) HTTP server na Neon-u ima pokrenut TCP server. Argon

Neon HTTP client HTTP request / HTTP response HTTP server TCP client TCP connection TCP server 6 Preraunavanje hostimena i port brojeva S obzirom da TCP ne radi sa hostimenima i sobzirom da ne zna nai HTTP server program na Neon-u, dvije se stvari moraju desiti: 1. Ime neon.tcpip-lab.edu mora biti prevedeno u 32bitnu IP addresu. 2. (Jedini) HTTP server na Neon-u mora biti identifikovan sa 16-bitnim port brojem.

7 Prevoenje hostimena u IP adresu Prevoenje hostimena neon.tcpip-lab.edu u IP adresu se odradi pogledom u bazu podataka neon.tcpip-lab.edu HTTP client argon.tcpip-lab.edu 128.143.71.21 DNS Server 128.143.136.15 Distribuirana baza podataka koja se koristi se zove Domain Name System (DNS) Sve maine na internetu imaju IP adresu: argon.tcpip-lab.edu neon.tcpip-lab.edu

128.143.137.144 128.143.71.21 8 Pronalaenje port broja (ovaj broj je jedinstv) Napomena: Mnogim servisima na internetu se moe pristupiti preko dobro-poznatih portova. Npr. svim HTTP servisima na Internetu se moe pristupiti pomou porta broj 80. Tako da: Argon jednostavno zna port broj (koji je jedinstven) od HTTP servera na udaljenoj maini. Na veini Unix sistemima, dobro-poznati portovi su izlistani u fajlu sa imenom /etc/services. Dobro-poznati brojevi portova nekih od najpopularnijih servisa su: ftp 21 finger 79 telnet 23 http 80 smtp 25 nntp 119

9 Zahtjev za TCP vezom (Jedini) HTTP klient na argon.tcpip-lab.edu zahtijeva od (jedinog) TCP klienta da uspostavi vezu sa portom broj 80 sa mainom koja je na adresi 128.141.71.21 argon.tcpip-lab.edu HTTP client Establish a TCP connection to port 80 of 128.143.71.21 TCP client 10 Buenje (pozivanje) IP protokola (jedini) TCP klient na Argonu alje zahtjev za uspostavljanje veze sa portom 80 na Neon-u Ovo se odradi tako to lokalni IP modul alje IP datagram prema argon.tcpip-lab.edu

TCP client Send an IP datagram to 128.143.71.21 IP 128.143.71.21 (Dio podataka od IP datagram-a sadri zahtjev za otvaranje veze) 11 Slanje IP datagram-a do IP router-a Argon (128.143.137.144) moe dostaviti IP datagram direktno Neon-u (128.143.71.21), jedino ako su na istoj IP mrei (nekad se ovo zove subnet). Ali Argon i Neon nisu na istoj IP mrei (Q: Kako Argon zna ovo?) Prema tome, Argon alje (jedini) IP datagram svom default gateway-u (jedini) Default gateway je na IP router-u (jedini) Default gateway za Argon je Router137.tcpip-lab.edu (128.143.137.1).

12 Put od Argon-a do Neon-a argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network

Primjetimo da gateway ima drugaije ime za svaki od svojih interfejsa (okruenja). 13 Slanje paketa sa128.143.71.21 Argon-1nije prema Neon-u na mojoj lokalnoj mrei. Prema tom, ja trebam poslati paket svom 128.143.71.21 je na mojoj lokalnoj mrei. default gateway-u ija je adresa 128.143.137.1 DNS: DNS: ThejeIP adresa

of odPrema tome, ja mogu poslati paket direktno. ARP:Koja Koja jeIPaddress MAC adresa odneon.tcpip-lab.edu 128.143.137.1? neon.tcpip-lab.edu is? od ARP: (jedina) MAC adresa 128.143.71.21 je 00:e0:f9:23:a8:20 128.143.137.1 argon.tcpip-lab.edu "Argon" 128.143.137.144 ARP: Koja je MAC adresa ARP: (jedina) MAC adresa od od 128.143.71.21? 128.143.137.1 je neon.tcpip-lab.edu

00:20:af:03:98:28 "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router frame Ethernet Network frame Ethernet Network 14

Traenje MAC adrese od gateway-a Da bi poslali IP datagram prema Router137, Argon stavlja (jedini) IP datagram u Ethernet okvir (frejm), i onda alje taj frejm. Bez obzira, Ethernet koristi razliite adrese, takozvane Media Access Control (MAC) adrese (takoer poznate pod imenima: fizike adrese, hardverske adrese) Prema tome, Argon prvo mora prevesti (jedinu) IP adresu 128.143.137.1 u MAC adresu. Prevod ove adrese se odradi preko Address Resolution Protocol (ARP) protokola 15 Adresa dobijena od ARP-a ARP message: What is the MAC address of 128.143.137.1? ARP message: IP address 128.143.137.1 belongs to MAC address 00:e0:f9:23:a8:20 argon.tcpip-lab.edu 128.143.137.144

00:a0:24:71:e4:44 router137.tcpip-lab.edu 128.143.137.1 00:e0:f9:23:a8:20 16 Buenje device (ureaj) drivera (jedini) IP modul na Argon-u, govori svom Ethernet device driver-u da poalje Ethernet frejm (ovir) na adresu 00:e0:f9:23:a8:20 argon.tcpip-lab.edu IP module Send an Ethernet frame to 00:e0:f9:23:a8:20 Ethernet 17 Slanje Ethernet frejma (jedini) Ethernet device driver na Argon-u alje (jedini) Ethernet frame prema Ethernet mrenoj kartici NIC (Network Interface

Card (NIC)) NIC alje frejm dalje na mreu IP Datagram for Neon argon.tcpip-lab.edu 128.143.137.144 00:a0:24:71:e4:44 router137.tcpip-lab.edu 128.143.137.1 00:e0:f9:23:a8:20 18 Slanje paketa sa128.143.71.21 Argon-1nije prema Neon-u na mojoj lokalnoj mrei. Prema tom, ja trebam poslati paket svom 128.143.71.21 je na

mojoj lokalnoj mrei. default gateway-u ija je adresa 128.143.137.1 DNS: DNS: ThejeIP adresa of odPrema tome, ja mogu poslati paket direktno. ARP:Koja Koja jeIPaddress MAC adresa odneon.tcpip-lab.edu 128.143.137.1? neon.tcpip-lab.edu is? od ARP: (jedina) MAC adresa 128.143.71.21 je 00:e0:f9:23:a8:20

128.143.137.1 argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router frame Ethernet Network Ethernet Network

19 Daljnje slanje IP datagram (jedini) IP ruter prima Ethernet frejm na okruenju 128.143.137.1, obnavlja IP datagram i odreuje da IP datagram treba poslati naprijed prema okruenju sa imenom 128.143.71.1 IP ruter donosi zakljuak da on moe isporuiti IP datagram direktno argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu

"Router71" 128.143.71.1 Router Ethernet Network Ethernet Network 20 Ponovni pogled na MAC adresu Sada ruter treba da pronae MAC adresu od Neon-a. Ponovo, ARP je pokrenut, da prevede IP adresu od Neona (128.143.71.21) u (jedinu) MAC adresu od Neon-a (00:20:af:03:98:28). ARP message: What is the MAC address of 128.143.71.21? ARP message: IP address 128.143.71.21 belongs to MAC address 00:20:af:03:98:28 router71.tcpip-lab.edu 128.143.71.1

neon.tcpip-lab.edu 128.143.71.21 00:20:af:03:98:28 21 Pozivanje device drivera na ruter-u (jedini) IP protokol na Router71, govori svom Ethernet device driveru da poalje Ethernet frame na adresu 00:20:af:03:98:28 router71.tcpip-lab.edu IP module Send a frame to 00:20:af:03:98:28 Ethernet 22 Slanje drugog Ethernet frejm-a (jedini) Ethernet device driver na Router71 alje Ethernet frame prema Ethernet adapteru, koji tranzmituje frejm na icu. IP Datagram for Neon router71.tcpip-lab.edu

128.143.71.1 neon.tcpip-lab.edu 128.143.71.21 00:20:af:03:98:28 23 Podaci su napokon stigli do Neon-a Neon dobija Ethernet frame Korisna nosivost koji Ethernet frame alje je IP datagram koji se alje dalje na IP protokol. Korisna nosivost od IP datagram-a je TCP segment, koji se dalje alje prema TCP serveru. Napomena: S obzirom da je TCP segment uvijet za vezu (za povezanost) (SYN), TCP protokol ne alje podatke prema HTTP programu za ovaj paket. Umjesto toga, TCP protokol na Neon-u e odgovoriti sa SYN segmentom prema Argon-u. Neon.cerf.edu HTTP server

TCP server IP module Ethernet 24 Slanje paketa sa128.143.71.21 Argon-1nije prema Neon-u na mojoj lokalnoj mrei. Prema tom, ja trebam poslati paket svom 128.143.71.21 je na mojoj lokalnoj mrei. default gateway-u ija je adresa 128.143.137.1 DNS: DNS: ThejeIP

adresa of odPrema tome, ja mogu poslati paket direktno. ARP:Koja Koja jeIPaddress MAC adresa odneon.tcpip-lab.edu 128.143.137.1? neon.tcpip-lab.edu is? od ARP: (jedina) MAC adresa 128.143.71.21 je 00:e0:f9:23:a8:20 128.143.137.1 argon.tcpip-lab.edu "Argon" 128.143.137.144 ARP: Koja je MAC adresa ARP: (jedina) MAC adresa od od 128.143.71.21?

128.143.137.1 je neon.tcpip-lab.edu 00:20:af:03:98:28 "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router frame Ethernet Network frame Ethernet Network 25

Pakiranje datog primjera Do sad reenom, Neon je samo primio jedan paket Puno vie rada se zahtijeva za uspostavljanje stvarne TCP veze i sljanja podataka sa HTTP zahtjevom Dati primjer je pojednostavljen na nekoliko naina: Nije se desila greka prilikom tranzmitovanja Ruta izmeu Argon-a and Neon-a je kratka (samo jedan IP router-er) Argon zna kako da kontaktira DNS server (bez dodatnog rutera ili traenja adrese) . 26 Koliko paketa se u stvarnosti poalje? tcpdump: listening on fxp0 16:54:51.340712 128.143.137.144.1555 > 128.143.137.11.53: 16:54:51.341749 128.143.137.11.53 > 128.143.137.144.1555: 16:54:51.342539 128.143.137.144.1556 > 128.143.137.11.53: 16:54:51.343436 128.143.137.11.53 > 128.143.137.144.1556: 16:54:51.344147 128.143.137.144.1557 > 128.143.137.11.53: 16:54:51.345220 128.143.137.11.53 > 128.143.137.144.1557:

1+ A? neon.cs. (25) 1 NXDomain* 0/1/0 (98) (DF) 2+ (41) 2 NXDomain* 0/1/0 (109) (DF) 3+ (38) 3* 1/1/2 (122) (DF) 16:54:51.350996 arp who-has 128.143.137.1 tell 128.143.137.144 16:54:51.351614 arp reply 128.143.137.1 is-at 0:e0:f9:23:a8:20 16:54:51.351712 128.143.137.144.1558 > 128.143.71.21.21: S 607568:607568(0) win 8192 (DF) 16:54:51.352895 128.143.71.21.80 > 128.143.137.144.1558: S 3964010655:3964010655(0) ack 607569 win 17520 (DF) 16:54:51.353007 128.143.137.144.1558 > 128.143.71.21.80: . ack 1 win 8760 (DF) 16:54:51.365603 128.143.71.21.80 > 128.143.137.144.1558: P 1:60(59) ack 1 win 17520 (DF) [tos 0x10] 16:54:51.507399 128.143.137.144.1558 > 128.143.71.21.80: . ack 60 win 8701 (DF) 27 Literatura "Mastering Networks: An Internet Lab Manual"; Jorg Liebeherr, Magda El Zarki; Chapter 0.

"TCP/IP Tutorial and Technical Overview"; Lydia Parziale, David T. Britt, Chuck Davis, Jason Forrester, Wei Liu, Carolyn Matthews, Nicolas Rosselot; Eighth Edition (December 2006), Chapter 1. http://www.cs.virginia.edu/~itlab/book/slides/ 28

Recently Viewed Presentations

  • Ministerul Educaiei, Culturii i Cercetrii Plan managerial al

    Ministerul Educaiei, Culturii i Cercetrii Plan managerial al

    Ministerul Educației, Culturii și Cercetării Plan managerial al candidatului la funcția de director al I.P. Institutul de Fizică Aplicată
  • Role of Flux Networks in Biogeosciences Dennis Baldocchi

    Role of Flux Networks in Biogeosciences Dennis Baldocchi

    Boundary Layer Budgets using Fluxes and High Precision CO2 measurements Spectral reflectance measurements and Digital Photos across the network for phenology and dynamics of structure and function Spatial-Temporal Network-Scale Analysis Real-time Data Assimilation Matching Footprints of Tower and Pixels Model...
  • Study 9 The Work Of Jesus www.biblebasicsonline.com www.carelinks.net

    Study 9 The Work Of Jesus www.biblebasicsonline.com www.carelinks.net

    For this is the covenant that I will make with the house of Israel after those days, says the Lord. I will put my laws into their mind and in their heart also will I write them… In that He...
  • Slope fields the easy way on 89 & StudyCards

    Slope fields the easy way on 89 & StudyCards

    Matching slope fields handout with accompanying TI-89 script will make graphing and teaching about differential equations for the AP Calculus exam so much easier. StudyCards™ for AP Physics and Calculus will also be shared. 194 Slope fields the Easy Way...
  • Administration - College of Computing & Informatics

    Administration - College of Computing & Informatics

    Main Scenario. The success scenario is the main story-line of the use-case. It is written under the assumption that everything is okay, no errors or problems occur, and it leads directly to the desired outcome of the use-case
  •  - rays from a superdeformed band in 152

    - rays from a superdeformed band in 152

    The nuclear surface HCl Nucleons are not on fixed positions. rigid rotor More like a liquid, but what kind of? viscous Ideal (superfluid He droplets) "irrotational flow" moment of inertia rigid irrotational Breakdown of adiabatic approximation Coincidence measurements select rotational...
  • Financial Conflicts of Interest in Research Sponsored Projects

    Financial Conflicts of Interest in Research Sponsored Projects

    Problem is not just the FCOI but the potential for BIAS. Recipe for a FCOI. Researcher must have: A role in the design, conduct, or reporting of research results ... Applicable to all research being conducted under Penn's auspices, regardless...
  • The Voice of Nursing Community of Practice Forums

    The Voice of Nursing Community of Practice Forums

    The Voice of Nursing Community of Practice Forums (CoP) Forums Northwest Kaiser Sunnyside Medical Center September 25, 2014 Lauren Bridge, CNO Janet Reeder, RN, Executive Consultant Nursing Operations