Redes de Computadores II - Semana 3 - PDF
Document Details
Uploaded by RejoicingHeliotrope9845
Universidade do Algarve
Néstor Cataño
Tags
Summary
This document is a presentation on computer networking, specifically the network layer, IP addresses, and packet structure. It compares and contrasts IPv4 and IPv6, explaining their differences and functionalities. The document is aimed at an undergraduate audience.
Full Transcript
Redes de Computadores II Universidade do Algarve Semana 3 https://github.com/ncatanoc/redes_algarve Néstor Cataño [email protected] 1  The network layer Goal: To understand th...
Redes de Computadores II Universidade do Algarve Semana 3 https://github.com/ncatanoc/redes_algarve Néstor Cataño [email protected] 1  The network layer Goal: To understand the principles behind the network layer. application transport network link physical 2 Roadmap 1. the network layer application 2. IP addresses 3. IP packet structure transport 4. Routing basics network link physical 3 the network layer The network layer is responsible for connecting multiple local application networks. It makes it possible for my friend transport and myself to exchange messages. It is implemented using the IP network (Internet Protocol). The IP layer sits on the ethernet link layer, but does not depend on it. physical 4 why a new protocol? why don’t we use ethernet for everything? Ethernet MAC addresses only contain information on the manufacturer; you have an idea of where the devices are in the network. To be able to send packets to the correct destination, every switch would need to manage a list of all connected devices. It would be like delivering a Mail only using a person’s name. 5 Why a new protocol? Solution: addresses should be application organised hierarchically like we already do with postcards: country, transport state, city, etc. How does the Internet Protocol network (IP) x this? IP Addressing + routing link/ethernet physical 6 fi Roadmap 1. the network layer 2. IP addresses 3. IP packet structure 4. Routing basics 7 IP addresses IP addresses are dynamically assigned to devices. The rst parts of IP addresses are equal for all the devices in the local network. The rst part of an IP is called a “locator”. One is assigned a new IP address with every new Wi-Fi connection. 8 fi fi what do IP addresses look like? IPv4 addresses. IPv6 addresses 4 groups of bytes 8 groups of 4 hexadecimals 32= 8x4 bits in total 128 = 8 * 4 * 4 Insuf cient! Suf cient! 9 fi fi IPv6 - reduced versions Replace 0000 or groups of 0000: …:0000 with :: remove leading 0s 0015 becomes 15 10 IPv4 vs. IPv6 Currently, most connections are still IPv4 https://www.google.com/ipv6/statistics.html 11 IPv6 adoption per country https://www.google.com/ipv6/statistics.html 12 Reserved IP addresses Loopback address (it means ‘this computer’) 127.0.0.1 (IPv4) ::1 (IPv6) Local/private addresses (IPv4): reserved for local communications between the local network only 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.16.255.255 192.168.0.0 - 192.168.255.255 13 Reserved IP addresses - CIDR Loopback address (it means ‘this computer’) 127.0.0.1 (IPv4) ::1 (IPv6) Local/private addresses (IPv4): reserved for local communications between the local network only 10.0.0.0 - 10.255.255.255 ~ 10.0.0.0/24 172.16.0.0 - 172.16.255.255 ~ 172.16.0.0/16 192.168.0.0 - 192.168.255.255 ~ 192.168.0.0/16 14 Roadmap 1. the network layer 2. IP addresses 3. IP packet structure 4. Routing basics 15 IPv4 packet structure 16 IPv4 packet structure VER: 4 bits, protocol version, 0100 Total length: 2 bytes, total length of the packet (which sometimes is fragmented) TTL (Time To Live): hop limit, the maximum number of hops the package can traverse. Protocol: protocol used in the Transport Layer Source address: where the packet is coming from Destination address: where the packet is going to Payload - the Transport protocol packet (remember the matryoshka image) 17 IPv4 vs IPv6 packet structure 18 IPv4 vs IPv6 packet structure The difference is Source and Destination addresses are 19 128 bits Roadmap 1. the network layer 2. IP addresses 3. IP packet structure 4. Routing basics 20 Arpanet -1974 21 30% of Internet in 2005 22 Internet How do you maintain a routing table? the Internet is divided into ASs (Autonomous Systems). each AS has a unique number and multiple IP ranges. IGP (Interior Gateway Protocols) used for routing within ASs Routing: you need to take your packet to the right AS which will take care of its delivery BGP (Border Gateway Protocol): routing between ASs BGPs are Internet Providers AS25 (UC Berkeley) 23 BGP routes for AS25 AS25 - UC Berkeley Each AS owns multiple IP address ranges 128.32.0.0/16 — UC Berkeley UC Berkeley is directly connected to 2 other systems: AS2152 and AS2153 24 BGP routes for AS25 25 routing - basics Routing Tables contain ranges of IP addresses 10.0.1.0/24 => 10.0.1 10.0.2.0/24 => LAN 10.0.3.0/24 => 10.0.3.1 26 Summary 27