Presentation laddar. Vänta.

Presentation laddar. Vänta.

Datornätverk A – lektion 12 Repetition: Adresseringstekniker Kapitel 19: Internetworking, addressing and Routing. Kapitel 20: Network Layer Protocols:

Liknande presentationer


En presentation över ämnet: "Datornätverk A – lektion 12 Repetition: Adresseringstekniker Kapitel 19: Internetworking, addressing and Routing. Kapitel 20: Network Layer Protocols:"— Presentationens avskrift:

1 Datornätverk A – lektion 12 Repetition: Adresseringstekniker Kapitel 19: Internetworking, addressing and Routing. Kapitel 20: Network Layer Protocols: ARP, IPv4, ICMP, IPv6 and ICMPv6.

2 Repetition: Fysisk adress och nätverksadress 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.

3 Adresser till min dator Fysisk MAC-adress, 48 bitar: E2-4F IP-adress, 32 bitar: Intern NAT-IP-adress (Network Address Translation): IP-subnetmask: 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: Portnumret är default 80. Många datorer i världen har DNS-alias ”www”. URL till ftp-fil på min dator: Filnamn till fil vid delad diskaccess till min dator: \\mageripc.itm.miun.se\filkatalog\filnamn.typ\\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:

4 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.

5 Network Layer PART IV

6 Position of network layer

7 Network layer duties

8 Chapter 19 Host-to-Host Delivery: Internetworking, Addressing, and Routing

9 Figure 19.1 Internetwork

10 Figure 19.3 Network layer in an internetwork

11 Figure 19.7 Switching

12 Figure 19.8 Datagram approach

13 Switching at the network layer in the Internet is done using the datagram approach to packet switching. Note:

14 Communication at the network layer in the Internet is connectionless. Note:

15 Figure 19.9 Dotted-decimal notation

16 IP-adresser 32-bit adress i dagens IP version bit i IPversion 6. Exempelvis har Utbildningsradions www-server IP- adressen binärt. På punkterad decimalform blir det Hexadecimalt blir det C10C5B1F.

17 The binary, decimal, and hexadecimal number systems are reviewed in Appendix B. Note:

18 Example 1 Change the following IP addresses from binary notation to dotted- decimal notation. a b Solution We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation: a b

19 Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a b Solution We replace each decimal number with its binary equivalent (see Appendix B): a b

20 Hierarchical Addressing Network address – A part used by the router Host address – Specific part or device on the network A networknode An example of hierarchical addressing Each node is actually an interface to the network

21 In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Note:

22 Figure 9.5 IP address formats and classes

23 Figure Finding the class in binary notation

24 Figure Finding the address class

25 Example 3 Find the class of each address: 0 a b Solution See the procedure in Figure 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.

26 Figure Finding the class in decimal notation

27 Example 4 Find the class of each address: a b c Solution a.The first byte is 227 (between 224 and 239); the class is D. b.The first byte is 252 (between 240 and 255); the class is E. c.The first byte is 134 (between 128 and 191); the class is B.

28 Figure Netid and hostid

29 Figure Blocks in class A

30 Figure Blocks in class B

31 Figure Blocks in class C

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

33 Figure Network address

34 Example 5 Given the address , find the network address. Solution The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes ( ) with 0s. Therefore, the network address is

35 Example 6 Given the address , find the network address. Solution The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 0s. Therefore, the network address is

36 Example 7 Given the network address , find the class. Solution The class is A because the netid is only 1 byte.

37 Klasslösa adresser Idag används subnetting och 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 = 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.

38 Figure Addresses in a network with and without subnetting

39 Table 19.1 Default masks Class In BinaryIn Dotted-Decimal Using Slash notation A /8 B /16 C /24

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

41 Example 8 A router outside the organization receives a packet with destination address Show how it finds the network address to route the packet. Solution The router follows three steps: 1.The router looks at the first byte of the address to find the class. It is class B. 2.The default mask for class B is The router ANDs this mask with the address to get 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.

42 Figure Subnet mask

43 Example 9 A router inside the organization receives the same packet with destination address Show how it finds the subnetwork address to route the packet. Solution The router follows three steps: 1.The router must know the mask. We assume it is /19, as shown in Figure The router applies the mask to the address, The subnet address is 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.

44 Broadcast IP address Broadcast IP address is used when information needs to be sent to all the hosts on the same network ○Convenient in broadcast networks (such as Ethernet) Broadcast IP address is obtained when host bits are replaced by 1s.

45 Example: Network addresses Broadcast addresses Host addresses The mask is for all hosts

46 Unicast, Multicast and Reserved Addresses Unicast address is used for one-to-one communication Multicast address is used for one-to-many communication (group communication) – D class Reserved addresses – Besides the addresses in class E reserved addresses are: ○Network addresses – all host bits are 0 ○Broadcast addresses – all host bits are 1 ○All network part 0 – host on this network ○ mask and all host addresses on this network are reserved for testing purposes = localhost. ○ – default route

47 Address Resolution Protocol (ARP) ARP is necessary whenever a device need to send an IP packet to another device on the same LAN ○The two devices can be two hosts, or host and router, or two routers that are on the same network ARP resolves the IP address into a physical address (MAC addresses).

48 Figure 20.2 ARP operation

49 Figure 20.5 Four cases using ARP

50 An ARP request is broadcast; an ARP reply is unicast. Note:

51 How Does ARP Operate? The sending machine issues a low level broadcast onto the network, requesting that the system that is using the specified IP address responds with its hardware address ( ARP request message) All the systems on the network receive the request messge Only the system that has the specified IP address responds. The response is not broadcast over the network, but is instead sent directly to the requesting system (response message).

52 ARP Cache The Ethernet and IP address pair, obtained from the response are stored (cashed) for further by both systems, the one sending the request and receiveing the response and the one recieving the rquest and sending the response The next time, the system checks the local cache and if an entry is found, the need for a broadcast will be eliminated.

53 Example 1 A host with IP address and physical address B has a packet to send to another host with IP address and physical address A46EF45983AB. The two hosts are on the same Ethernet network. Show the ARP request and reply packets encapsulated in Ethernet frames. Solution Figure 20.6 shows the ARP request and reply packets. Note that the ARP data field in this case is 28 bytes, and that the individual addresses do not fit in the 4-byte boundary. That is why we do not show the regular 4-byte boundaries for these addresses. Note that we use hexadecimal for every field except the IP addresses.

54 Figure 20.6 Example 1

55 DHCP and NAT DHCP – Dynamic Host Configuration Protocol ○A protocol that makes possible the IP configuration parameters to the hosts to be assigned from a server. IP addresses are leased for a period of time. Private addresses ○Particular blocks of IP addresses are reserved as private address and can be used for private networks not connected to the Internet ○When these networks connect to the Internet, they need NAT (network address translation) NAT ○NAT software translates private IP addresses into public and vice-versa

56 Table 19.2 Default masks Range Total to to to

57 Figure NAT

58 Figure Address translation

59 Figure Translation

60 Table 19.3 Five-column translation table Private Address Private Port External Address External Port Transport Protocol TCP TCP...

61 Internet Control Message Protocol (ICMP) ICMP is IP helper protocol ○Serves for error reports and for testing purposes ICMP messages are encapsulated in IP packets. ICMP provides a means for transferring control messages from routers and other hosts to a host. ICMP provides feedback about problems such as: ○an unreachable destination ○buffer overflow ○time-to-live expires

62 Useful Programs These programs use ICMP to probe the Internet ○ping Sends packets that is echoed by remote computer Remote computer replies with echo packet Local computer reports receipt of reply ○traceroute Reports path to remote computer Sends packets to the destination starting with TTL=1 Each successive packet identifies next router along path Reports list of packets ○ipconfig – shows network configuration info Displays all configuration information

63 Ping - Example Four packets are sent. Each has different round-trip time (RTT). Minimum, Maximum and average are also given.

64 Round-trip Time (RTT) Time for the packet to be sent and acknowledgement to come back to the sender Why the packets have different RTT? ○They might travel different paths ○The load in some of the routers might be high. Therefore packet’s waiting time at the routers can be different. ○Ping also shows the percentage of lost packets.

65 Traceroute - Example The source is sending three packets with TTL=1, then another three with TTL=2 and so on until TTL is by one bigger then the number of hops. A response is thus obtained from each hop where the packets are dropped. RTT for each packet is presented.

66 VisualRoute A program that displays visually (on a map) traceroute Trial version can be obtained free from

67 Figure IPv6 address

68 Ipconfig Displays all the information about the IP configuration. ○IP address ○Subnet mask ○Default gateway (router) ○DNS servers ○DHCP servers ○MAC (physical) address ○Host name ○Domain suffix ○…

69 Ipconfig /all - Example

70 Figure Tunneling

71 Figure Header translation


Ladda ner ppt "Datornätverk A – lektion 12 Repetition: Adresseringstekniker Kapitel 19: Internetworking, addressing and Routing. Kapitel 20: Network Layer Protocols:"

Liknande presentationer


Google-annonser