




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Complete file with all the theory covered in class, including everything the professor said. All exam topics are included: IPv4, IPv6, wireless and cellular networks, modern lan design and operation, QoS, routing, VPN, Optical Internet, MPLS, CDN, Pattern Analysis
Tipologia: Appunti
1 / 197
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































Interface: part of device which is capable to connect to the network. One or more IP addresses can be assigned to the same interface (depends from whether the network is subdivided into many subnetworks or not); IP address: IP addresses are represented with the dotted decimal notation. The first part of the address identifies the network (network ID). The last part identifies the specific interface in that network instead (host ID). Switches and access points are layer-2 devices and do not have an IP address; → it identifies routers and hosts A host can have multiple interfaces, but only one is active at a time. A router (layer 3 device) has multiple interfaces, and each interface has its own IP address. Subnetwork: portion of the network characterized by interfaces which have the same high order bits (the same network ID) and share the same physical layer. The network ID has some “random” high orderbits (either 1 or 0) and only 0s in the lower part of its address. In the middle, we have a router (a layer 3 device), and on the left, there is a switch (a layer 2 device). The blue area represents a subnet, which is a layer 3 construct that allows grouping together interfaces that share something in common: the network ID. They are grouped together through a switch. A subnet is a logical construct. On the right, there is a Wi-Fi access point, which acts as an aggregator. Here, we have another subnet, different from the previous one.
There are some special addresses that are never assigned to host/router interface: When all the host bits (the end part of the address) are set to 0s, the address represents the subnet itself. The address 255.255.255.255 is the limited broadcast address. If a packet has this as its destination address, it is delivered to all hosts on the same physical network. At layer 2, the hosts recognize this special address and perform a broadcast to all other hosts connected to the same router. It is called limited broadcast because it is stopped at the router—it does not go beyond that network. Example an host has as destination address 223.1.2.255. The effect is as follows: the packet is sent from the host, then the switch forwards it directly to the router. The router looks up the network ID in its routing table and determines the correct interface where the packet should be sent. Within that subnet, it acts as a limited broadcast, so the packet is delivered to all hosts in that network.
Example: 127.0.0.1. This address is never sent to a network. Instead, it is returned to the same host, where the IP layer immediately recognizes it. It is usually used to check if a local service (e.g., a web server) is working correctly.
In the early days of the Internet, IPv4 addresses were allocated using classful addressing: Class A → very few networks, each with millions of hosts Class B → more networks, each with about 65k hosts Class C → many networks, each with up to 254 hosts This rigid division into fixed blocks soon became inefficient. A typical organization didn’t need 16 million host (Class A), nor was 254 (Class C) enough. They often requested a Class B, which gave 65k addresses, but maybe only used 5k → the rest was wasted. This waste accelerated the depletion of IPv4 addresses. Many networks were underutilized, but the addresses were still consumed.
It no longer relies just on the IP address to distinguish the network ID from the host ID. There’s an extra piece of information: the netmask. All IP addresses now come with a prefix length shown within the IP addresses themselves in the format “/x” at the end of each address (where x is a decimal number). When we want to write the netmask associated with the address shown in the figure, the procedure is as follows. We set all the bits in the network part to 1 and all the bits in the host part to 0. Then, we notice that the network part ends after 23 bits. Of course, it’s not necessary to write the addresses in binary; it’s enough to use dotted decimal notation. For example: 200.23.16.0/23 → This is a valid network ID, since there are 9 zeros in the host part. Since the IP address contains more than 9 zeros, we could also define another, larger netmask that is still valid. For instance: 200.23.16.0/20 → This is also a valid network ID. However, if the address 200.23.16.0/23 has already been allocated, then 200.23.16.0/20 cannot be allocated, because this would create overlapping address spaces. The netmask is a string of bits which has all 1s for the network ID part and all 0s for the host ID part. The netmask can be “built” with a sequence of x-ones followed by as many zeros as needed to reach the 32-bits length of the IP address. Performing a logical bitwise AND operation between the netmask and the IP address returns the network ID as result. Example Let’s consider the following IP address: 196.64.8.2/ As we can see, we have x = 16. That means the netmask of this IP address has the first 16 bits equal to 1 and the others equal to 0. With the dotted decimal representation, we obtain: 255.255.0. Netmask: 11111111 11111111 00000000 00000000 Let’s now convert our IP address from the dotted decimal representation to its binary representation. IP address: 11000100 01000000 00001000 00000010
match between the destination IP address and the result of the bitwise AND operation between the netmask and the incoming datagram address. Let’s do that: In other words, if the result is equal to the destination IP, a match has been found! The length of that match is equal to the length of the applied netmask. In our case we have a 16 bits long match (that means the first 16 bits of the datagram IP address are equal to the first 16 bits of the destination IP address). Let’s consider another example with the same routing table as before. This time, the incoming datagram has the following IP address: 200.23.17.53; We obtain: This time we have 2 matches! So, we choose the longest match (the 2nd one, because 23 > 20). So, the datagram will be forwarded through the interface (output link) 2. Two hosts can communicate directly (without a router) only if both consider each other inside the same subnet, based on their IP address and subnet mask. Examples:
Two or more networks are aggregatable if they can be combined into a single larger network with a shorter subnet mask that includes all their addresses continuously.
It’s a communication model which can be used by IPv4 and IPv6. In IPv6 there’s no broadcast, so broadcast communications will be handled by multicast. Multicast is a form of communication where packet are routed from one single source to multiple destinations simultaneously. Instead of sending multiple copies of the same packet—each addressed to a different host—the source sends just one copy. This packet carries a special address known as a multicast address, which identifies a group of hosts rather than a single destination. In other words, it is not a unicast address for one host, but a collective address for many. This mechanism is especially useful for group communications, such as videoconferencing or live video broadcasting. However, large-scale streaming services like Netflix or Amazon Prime Video do not rely on multicast; they typically use unicast connections, sending individual streams to each client. Multicast is more common in environments where the entire network is managed by a single operator or in local networks, since proper configuration of routers is essential. The principle of multicast is straightforward: a packet is sent to a multicast address, and any host interested in receiving that traffic must explicitly subscribe to the group associated with that address. Membership is dynamic, hosts can join or leave groups at any time. Within a group, hosts can also decide whether they want to receive traffic from all senders or only from specific sources. Routers play a crucial role in managing multicast groups. They keep track of which hosts are subscribed and which host are active in each of this group and ensure that packets are forwarded appropriately. Each group has its own multicast address, but hosts still retain their individual unicast IP addresses. The multicast address simply acts as a placeholder for group membership. Delivery of packets relies on collaboration between Layer 3 (IP) and Layer 2 (typically Ethernet). Multicast addresses belong to Class D that begin with 1110 → 224.0.0.0 - 239.255.255.255. You’ll never find other IP addresses which start with 1110!
More advanced switches implement IGMP snooping. These switches inspect IGMP messages, even though IGMP is encapsulated in IPv4 packets, which switches normally ignore. By “snooping” into Layer 3, the switch learns which ports have hosts that are members of a multicast group. This allows the switch to forward multicast traffic only where it is needed, instead of flooding it across the entire LAN. This is a cross-layer technique because a Layer 2 device (the switch) must interpret Layer 3 control traffic. When a switch receives an IGMP membership report, it becomes aware that the host on that port has joined a multicast group. As a result, the switch activates filtering rules so that the multicast MAC address associated with the group is recognized and forwarded only to that host. This process requires a cross-layer approach: the switch must “snoop” into the IPv4 packet to identify IGMP control traffic and detect which multicast group is being requested. However, IGMP operates only within a local network segment. Membership reports never cross routers; they are delivered only to the nearest router, which records the local group membership. This raises a key challenge: how can a router learn which other routers are responsible for delivering the same multicast traffic, especially when the traffic originates from a remote part of the network? To solve this, routers use Protocol Independent Multicast (PIM), a routing protocol designed specifically for multicast. While IGMP manages host membership locally, PIM allows routers to coordinate globally. Routers use these protocols to build a distribution tree for each multicast group. The tree ensures that packets are delivered only to LANs with active group members, while avoiding unnecessary duplication of traffic. Routers exchange messages to build a multicast distribution tree:
IPv6 is the most recent version of the Internet Protocol, and today most devices are equipped with both an IPv4 and an IPv6 address. The primary motivation for IPv6 was the need for a larger address space. IPv4’s 32-bit address space was running out, and IPv6 expanded this dramatically with 128-bit addresses. There were also other motivations, some of which were later partially addressed within IPv4 itself:
reasons like censorship, surveillance, or geopolitical concerns. IPv6 promised to enable this type of policy- based routing.
IPv4 addresses are 32 bits long, which means there are about 4.3 billion possible addresses in total. At first glance, that number looks large, but in practice it turned out to be insufficient. Not all of those 4 billion addresses are actually available for end hosts. Addresses were divided into classes (A, B, C) for hierarchical management. While this made it easier to interpret addresses, it also led to significant waste of address space. Some ranges (e.g., those starting with 111) were reserved for multicast or other special purposes. As a result, the number of usable IPv4 addresses is closer to 3.5 billion. IPv4 uses hierarchical allocation. Each physical network must have a unique prefix, which cannot be reused elsewhere. This system improves organization but fragments the available space. The subnetting system works in powers of two. If a network requires, for example, 1,048 hosts, you must allocate a block that supports at least that many — the next available size might be 4,096 addresses. That means more than 3,000 addresses are wasted. This inefficiency was unavoidable in the IPv4 design, and it led to many addresses being left unused, even though the global demand for addresses kept increasing. The demand for IP addresses quickly outgrew IPv4’s capacity:
An IPv4 address can be in different states:
Another side effect of IPv4 exhaustion is the explosion in routing table size. Each subnetwork must be advertised separately in BGP. Because address assignments are fragmented and scattered across regions, prefixes that belong to the same larger block may end up in different countries.
For example:
One of the proposed interim solutions to address the growth of routing tables in IPv4 was route aggregation. The idea was to combine multiple contiguous networks into a single, shorter prefix. For example: Instead of advertising 1.2.1.0/24 and 1.2.2.0/24 separately, both could be aggregated into 1.2.0.0/16. This approach was formalized as CIDR (Classless Inter-Domain Routing), which eliminated the rigid boundaries of classful addressing (Class A, B, C). CIDR significantly improved efficiency by allowing flexible prefix lengths and route aggregation. However, CIDR’s effectiveness was limited by the historical, non-rational assignment of IPv4 prefixes. Since addresses had already been allocated in a fragmented and inconsistent way, many blocks could not be aggregated, leaving the routing scalability issue only partially mitigated. Another measure was the introduction of Regional Internet Registries ( RIRs). These organizations began distributing addresses in larger, contiguous blocks only to major ISPs and organizations. For example, instead of handing out small /24s, they would allocate a /20 block (≈4096 addresses) to allow better aggregation. Even with these measures, routing scalability remained a major problem. Routing protocols could not indefinitely keep up with the exponential growth of entries. This limitation was one of the driving factors behind the design of IPv6, although the problem is not yet fully solved.
mathematically infinite for human purposes, but packet headers would become unreasonably large. Thus, IPv6 struck a balance: large enough to ensure scalability and inefficiency tolerance, but not so large as to make packet handling wasteful.
IPv6 addresses are 128 bits long, so their dotted decimal notation would consist in 16 decimal numbers. That’s not really the best, so we use a different notation instead: 8 hexadecimal numbers separated by “:”
Examples:
IPv6 maintains the same routing principles as IPv4. If the source and destination share the same prefix, delivery is direct using the local MAC address. If the prefixes differ, the packet is sent through a router. There are some significant differences between IPv6 and IPv4 addresses structure:
IPv6 defines three main categories of addresses:
IPv6 relies much more heavily on multicast than IPv4, since it replaces some IPv4 functions such as ARP or ICMP-based discovery. In IPv6, multicast addresses start with a sequence of eight 1s. Using IPv6 notation, we can write multicast addresses range as:
which includes all addresses whose prefix is FF FF00:: −→ FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF that corresponds to 2120 multicast addresses! (equivalent to the IPv4 multicast address 224.0.0.0/4 (1111 1111…)) This huge range of addresses is further divided into:
Usually, the first 48 bits (after 001) form the Global Routing Prefix. In the past, those bits were assigned depending on the Internet Service Provider. The top level authority, IANA, assigned the first 13 bits to different areas, the regional level authority assigned the next 32 bits and the subnet level authority assigned the last 16 bits. However, this guide line was soon abandoned because of its complexity. So, because we have so many addresses, a much more straightforward approach consists in assigning chunks of 48 bits. Today’s Global Routing prefix was formerly assigned by multi-level authorities: IPv6 global unicast assignment (deprecated)
Link/site local: 1111 1110 1…. Link local addresses: usually, they have all 0s from the 10th up to the 64th bit; they’re addresses which must never be routed outside a local network. They’re similar to private addresses but they’re not the same (they also belong to different groups); Link local is used for addresses on a single link for auto-address configuration, neighbor discovery, or when no routers are present. Packets sent to these addresses are not supposed to be forwarded across local links
Site local addresses were meant to be confined inside a site but no one could quite agree what exactly the “site” was (a company? a branch of a company?), so they’ve been deprecated.
They’re the equivalent of private IPv4 addresses; Similar to global unicast addresses but just for private use, so they must be routed only in private links (e.g., inside an organization) and not be routed in the global Internet. They must be unique inside the same organization but could
be duplicate within different companies; It is used for devices that never need access to the Internet and never need to be accessible from the Internet. They’re separate from link local addresses;
The 8th bit is the “Local (L) Flag”, dividing the range in:
When you must route packets through a network which includes both IPv4 and IPv6, you may want to preserve your IPv4 address. To do so, IPv6 is chosen to mimic an IPv address. The IPv6 address includes the imprint of the IPv4 address! These addresses will never interfere with other IPv6 addresses, because they don’t overlap on the Global unicast IPv6 addresses range (they don’t start with 001). They are used to represent an IPv4 address inside an IPv6 address → aid the transition from IPv4 to IPv6. The IPv4 address is carried in the low-order 32 bits e.g., IPv6 compressed format of IPv4-mapped 20.10.4.3 → address: ::ffff:20.10.4.
Used by a node to send an IPv6 packet to itself for testing reasons They are identified by the address ::1 (000…1), equivalent to IPv4 address: 127.0.0. Same rules as IPv4:
An unspecified unicast address is an all-0s address. It is used as a source address to indicate the absence of an address. It cannot be assigned to an interface. They’re used in Duplicate Address Detection (DAD) in ICMPv6;
Anycast addresses are assigned to more than one interface (typically different devices). A packet sent to an anycast address is routed to the “nearest” interface having that address, according to the router’s routing table