1 / 57

Multimedie- och kommunikationssystem, lektion 8

Multimedie- och kommunikationssystem, lektion 8 . Repetition av TCP/IP-modellens 5 nivåer Adressering på Internet: MAC-adresser, IP-adresser, subnet-masker, NAT, DNS-namn, portnummer, URL:er. Figure 2.2 Internet layers. TCP, UDP. IP. Ethernet.

Download Presentation

Multimedie- och kommunikationssystem, lektion 8

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. Multimedie- och kommunikationssystem, lektion 8 Repetition av TCP/IP-modellens 5 nivåer Adressering på Internet: MAC-adresser, IP-adresser, subnet-masker, NAT, DNS-namn, portnummer, URL:er.

  2. Figure 2.2Internet layers TCP, UDP IP Ethernet

  3. Figure 2.4An exchange using the Internet model

  4. Lager 1 • Det fysiska lagret ansvarar för transmission av enskilda databitar från en nod till nästa. • Detta kan innefatta: • Kontakter • Elektriska nivåer • Modulation • Multiplextekniker • Bitsynkronisering • Kretskoppling • Exempel: RS232.

  5. Lager 2 • Datalänklagret är protokoll för transmission av ramar (frames) från en nod till nästa. Detta kan innefatta: • Fleraccessprotokoll (multiple access control=MAC) för att undvika kollisioner • Adressering inom LAN:et/länken (nätverkskortens fysiska MAC-adresser eller nivå 2-adress). • Felhantering (t.ex. vid trådlös kommunikation eller telefonnätsmodem) • Exempel: Ethernet ligger på lager 1 och 2.

  6. Figure 2.8Example 1 I Figure 2.8 sänder en nod med fysisk adress 10 en ram (dvs ett paket på nivå 2) till en nod med fysisk adress 87. De två noderna är förbundna med en länk. Ramens huvud (header H2) innehåller bl.a. avsändarens och mottagarens fysiska adress. Ibland används en svans (trailer T2) som innehåller felrättande och/eller felupptäckande kod.

  7. Lager 3 Nätverkslagret ansvarar för vidareförmedling av paket “end-to-end”, dvs via kedjan av datalänkar från den ursprungliga källan till den slutliga destinationen. Detta innefattar WAN-adressering (t.ex. IP-adresser) och routingprotokoll. Exempel: IP-protokollet.

  8. Figure 2.11Example 2 I figur 2.11 vill vi sända data från en nod med logisk nätverksadress (IP-adress) A och fysisk adress 10 till en nod med IP-adress P och fysisk adress 95. De två enheterna befinner sig i olika LAN. Därför kan vi inte enbart använda deras fysiska adress. Den fysiska adressen kan enbart användas vid kommunikation inom ett LAN. De två routrarna förstår av IP-adressen vilken väg paketen ska vidareförmedlas, och ändrar paketets fysiska adressering.

  9. Lager 4 • Transportlagret ansvarar för leverans av meddelanden “end-to-end”, från en process på avsändardatorn till en process på mottagardatorn. Detta kan innefatta: • portnummer, • virtuell kretskoppling, dvs flödesstyrning, felkontroll, segmentnumrering, omsändning, ordning av segment. (TCP-protokollet. Ej UDP-protokollet.)

  10. Figure 2.14Example 3

  11. Example 3 Figur 2.14 exemplifierar transportlagret (UDP-protokollet). Data som kommer från högre lager förses med en TCP-header, som innehåller portnummer j och k. Avsändarprocessens portnummer är j och mottagarprocessens portnummer är k. Eftersom meddelandets storlek är större än nätverkslagret kan hantera, delas datat i två segment (två paket). Nätverkslagret lägger till nätverksadresserna (A och P) till varje paket.

  12. Lager 5: • Applikationslagret är kommunikationsprotokoll för att tillhandahålla en komplett kommunikationstjänst till slutanvändaren. Exempel: • HTTP för web • FTP för filöverföring. • SMTP och POP3 för Internet e-post

  13. Figure 2.16Summary of duties

  14. Figure 12.1 Addressing techniques

  15. Adresser till min dator • Fysisk MAC-adress, 48 bitar: 00-00-E2-4F-54-04 • IP-adress, 32 bitar: 193.10.250.187. • Intern NAT-IP-adress (Network Address Translation): 10.14.1.63. • IP-subnetmask: 255.255.0.0 • DNS-namn (Domain namn Service): mageripc.itm.miun.se, där itm.miun.se är DNS-suffix, och .se är toppdomän. • URL till webbsida på webbserver på min dator: http://mageripc.itm.miun.se:portnummer/filkatalog/filnamn.typ • URL till ftp-fil på min dator: ftp://användanamn:lösenord@mageripc.itm.miun.se/filkatalog/filnamn.typ • Filnamn till fil vid delad diskaccess till min dator: \\mageripc.itm.miun.se\filkatalog\filnamn.typ (Av säkerhetsskäl inte tillgänglig utanför nätet.) • E-postadress till användare på en e-postserver på min dator: användarnamn@mageripc.itm.miun.se

  16. System och protokoll för översättning mellan olika adresseringstekniker • ARP (Address resolution protocol) översätter IP-adress till fysisk adress. • DHCP (Dynamic Host Configuration Protocol) kan ge varje dator en ledig IP-adress, och talar om för en dator med en viss fysisk adress vilken dess IP-adress är vid varje omstart. • DNS (Domain Name Server) är ett system av databaser som översätter mellan IP-adress och DNS-adress. • NAT (Network Address Translation) är en server, ofta i anslutning till företagets brandvägg, som modifierar IP-paketen genom att byta ut intern avsändar-IP-adress och portnummer till extern IP-adress + portnummer vid utgående paket, och vice versa vid inkommande. På så sätt kan många dela på samma externa IP-adress.

  17. Network Interface Card (NIC) NIC for a desktop • Each device on Ethernet network has its own interface card (NIC) to connect to the network • The NIC is usually plugged into the device and has a 6 bytes (48 bits) physical address • The physical address is normally written in hexadecimal notation • 02-11-02-2C-4D-1B (example address) NIC for a laptop

  18. Ethernet Addressing • Each station recognizes three classes ofaddresses. • Unicast address (for one-to-one communication) • Broadcast address (for one-to-all communication) • Optionally, one or more multicast addresses (for one-to-many communication, i.e. to a group of users) • Major reason for broadcast is address discovery. Brodcast Ethernet address is all 1s, or in hexadecimal • FF : FF : FF : FF : FF :FF • Multicast addresses are used for specialized link layer functions. • Ethernet addresses are unique • First three bytes assigned to manufacturer by IEEE, the other three bytes assigned by the manufacturer

  19. IP-adresser • 32-bit adress i dagens IP version 4. 64-bit i IPversion 6. • Exempelvis har Utbildningsradions www-server IP-adressen 1010 0001 0000 1010 0101 1011 0001 1111 binärt. • På punkterad decimalform blir det 193.12.91.31. • Hexadecimalt blir det C10C5B1F.

  20. Figure 19.9Dotted-decimal notation

  21. Example 1 Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation: a. 129.11.11.239 b. 249.155.251.15

  22. Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 75.45.34.78 Solution We replace each decimal number with its binary equivalent (see Appendix B): a. 01101111 00111000 00101101 01001110 b. 01001011 00101101 00100010 01001110

  23. IP-adressklasser • Prefix = Net-ID. Anger nät, t.ex. för ett nät som kontrolleras av en Internet-operatör eller ett företag. Fungerar som riktnummer • Suffix = Host-ID. Anger dator • Basadress = Första IP-adressen i nätet, dvs med Net-ID=0 • Multicasting = En-till-många, dvs gruppkommunikation • Broadcasting = En till alla. • Förr användes klass A- B och C-adresser, där de första 8, 16 respektive 24 bitarna är Net-ID, och återstående bitar är Host-ID. De första 1-4 bitarna anger klass.

  24. Figure 9.5 IP address formats and classes

  25. Figure 19.13Netid and hostid

  26. Figure 19.10Finding the class in binary notation

  27. Example 3 Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11110011 10011011 11111011 00001111 Solution See the procedure in Figure 19.11. a. The first bit is 0; this is a class A address. b. The first 4 bits are 1s; this is a class E address.

  28. Figure 19.12Finding the class in decimal notation

  29. Figure 9.6 Subnet addressing: (a) address structure;(b) example.

  30. Klasslösa adresser • Idag används klasslösa adresser med hjälp av IP-masker. En 1:a i IP-masken betyder att motsvarande bit i adressen tillhör Net-ID. • Exempel: IP-masken 255.255.0.0 = FFFF0000 (sexton 1:or och sexton 0:or) betyder att de första 16 bitarna i IP-adressen är Net-ID, övriga är Host-ID.

  31. Note: A network base address is different from a netid. A network base address has both netid and hostid, with 0s for the hostid.

  32. Figure 19.21Addresses in a network with and without subnetting

  33. Figure 19.22Hierarchy concept in a telephone number

  34. Table 19.1 Default masks

  35. Note: The network address can be foundby applying the default mask to anyaddress in the block (including itself).It retains the netid of the block and sets the hostid to 0s.

  36. Example 8 A router outside the organization receives a packet with destination address 190.240.7.91. Show how it finds the network address to route the packet. Solution • The router follows three steps: • The router looks at the first byte of the address to find the class. It is class B. • The default mask for class B is 255.255.0.0. The router ANDs this mask with the address to get 190.240.0.0. • The router looks in its routing table to find out how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  37. Figure 19.23Subnet mask

  38. Example 9 A router inside the organization receives the same packet with destination address 190.240.33.91. Show how it finds the subnetwork address to route the packet. Solution • The router follows three steps: • The router must know the mask. We assume it is /19, as shown in Figure 19.23. • The router applies the mask to the address, 190.240.33.91. The subnet address is 190.240.32.0. • The router looks in its routing table to find how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  39. Figure 9.23 Multicasting over a LAN: (a) address allocation principle;

  40. Figure 9.31 IPv6 addresses: (a) prefix formats and their use;

  41. Figure 9.31 IPv6 addresses: (b) IPv4 address types;

  42. ICMP (Internet Control Message Protocol) Fel inträffar Skickar felmeddelande, diagnostik tillbaks. Sändningen lyckas Skickar paket Används för överföring av information om tillgänglighet och kommunikationsproblem. Ping-programmet använder ICMP för att kontrollera om en extern dator är påslagen och går att nå från Internet. ICMP används också för att meddela när att ett system inte går att hitta. Ping 211.181.211.30 Svar, TTL, storlek, osv. Dator 211.181.211.30 Dator

  43. Figure 14.3 Some examples of DNS zones.

  44. Figure 14.4 Example showing the sequence of messages exchanged for a local name resolution.

  45. Table 19.2 Default masks

  46. Figure 19.25NAT

  47. Figure 19.26Address translation

  48. Figure 19.27Translation

  49. Table 19.3 Five-column translation table

  50. Figure 20.2ARP operation

More Related