0% found this document useful (0 votes)
28 views45 pages

U3C3

The document summarizes key concepts about the network layer in the Internet, including: 1. It describes 10 design principles for network layer protocols, such as keeping it simple, avoiding static options, and considering performance and cost. 2. It provides an overview of the Internet's structure as a collection of interconnected networks and the role of IP as the network layer protocol. 3. It discusses the IPv4 protocol, including the IP datagram structure, fields like TTL, protocols, and addressing including prefixes and subnets.

Uploaded by

shruthi chithu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views45 pages

U3C3

The document summarizes key concepts about the network layer in the Internet, including: 1. It describes 10 design principles for network layer protocols, such as keeping it simple, avoiding static options, and considering performance and cost. 2. It provides an overview of the Internet's structure as a collection of interconnected networks and the role of IP as the network layer protocol. 3. It discusses the IPv4 protocol, including the IP datagram structure, fields like TTL, protocols, and addressing including prefixes and subnets.

Uploaded by

shruthi chithu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

UNIT 3

THE NETWORK LAYER


CHAPTER 3
-SHRUTHI K ANCHAN
THE NETWORK LATER IN THE INTERNET
Principles of network layer in the internet:
1. Make Sure It Works: Before finalizing a design or standard, ensure that multiple prototypes can successfully
communicate with each other. This approach prevents the development of flawed standards and promotes practicality.
2. Keep It Simple: Simplicity is favored when designing network protocols. When in doubt, opt for the simplest solution.
Reducing complexity minimizes the potential for errors and interoperability issues.
3. Make Clear Choices: When there are multiple ways to accomplish a task, choose one method. Avoid having multiple,
potentially conflicting options, as this can lead to confusion and compatibility problems.
4. Exploit Modularity: Design network protocols in a modular fashion, with independent layers. This way, changes to one
layer don't affect others, promoting flexibility and maintainability.
5. Expect Heterogeneity: Anticipate the presence of different hardware, transmission facilities, and applications on a large
network. Design the network to handle this diversity with simplicity and flexibility.
6. Avoid Static Options and Parameters: Instead of fixed parameters, allow negotiation between sender and receiver,
particularly for settings like maximum packet size. This flexibility accommodates variations in network conditions.
7. Look for a Good Design: Prioritize a good overall design even if it can't handle every extreme case. Instead of
complicating the design for rare scenarios, focus on a strong foundation and require those with special needs to adapt.
8. Be Strict When Sending and Tolerant When Receiving: Enforce strict adherence to standards when sending data, but
be prepared to accept non-conforming packets when receiving. This approach balances robustness and compatibility.
9. Think About Scalability: Consider scalability from the outset. Large-scale networks must avoid centralized databases
and distribute load evenly across available resources to handle millions of hosts and billions of users effectively.
10. Consider Performance and Cost: The network should provide good performance without incurring exorbitant costs. If
a network is too slow or costly, it may not be widely adopted or used effectively.
Overview of the Internet's network layer, focusing on the structure, components, and the role of the
Internet Protocol (IP) in enabling communication:
Internet Structure: The Internet's network layer can be understood as a collection of interconnected networks
or Autonomous Systems (ASes). Major backbones, consisting of high-bandwidth lines and fast routers, form the
core of the Internet. The largest of these backbones, known as Tier 1 networks, serve as the primary gateways
for connecting to the rest of the Internet. These backbones are connected to various entities, including Internet
Service Providers (ISPs), data centers, regional networks, and edge networks.
Internet Hierarchy: The Internet exhibits a quasi-hierarchical organization, with Tier 1 networks at the top,
regional networks, and ISPs in the middle, and various edge networks at the bottom. Data centers play a
significant role in hosting and serving Internet content.
Network Layer Protocol (IP): The glue holding the Internet together is the network layer protocol, Internet Protocol (IP).
Unlike older network layer protocols, IP was designed with internetworking in mind. Its primary role is to provide a best-
effort, non-guaranteed method of transporting packets from source to destination, regardless of whether the machines are on
the same network or if there are intermediary networks in between.
Communication Process: Communication in the Internet follows a sequence. The transport layer breaks up data streams
into IP packets, which can be up to 64 KB in theory but are usually around 1500 bytes in practice. IP routers forward these
packets through the Internet, from one router to the next, until they reach the destination. Once at the destination, the
network layer hands the data to the transport layer, which, in turn, delivers it to the receiving process. The network layer also
reassembles all the pieces of a datagram before passing it to the transport layer.
Path and Routing: In practice, packets can traverse multiple networks and routers before reaching their destination. The
Internet's interconnected nature means that there are often many possible paths between two hosts. The responsibility of IP
routing protocols is to determine which paths to use, taking into account factors like efficiency, redundancy, and availability.
THE IP VERSION 4 PROTOCOL:
1. IP Datagram Structure: An IPv4 datagram, the basic unit of data in Internet communication, consists of two parts: a
fixed 20-byte header and a variable-length body or payload.
2. Header Length (IHL): The header's length can vary based on optional features. The IHL field specifies how long the
header is, in terms of 32-bit words. The minimum length is 5 (when no options are used), and the maximum is 15.
3. Differentiated Services: Originally called Type of Service, this field distinguishes between different classes of service,
indicating various combinations of reliability and speed. It's now used to mark packets with service class and explicit
congestion notification.
4. Total Length: This field specifies the total length of the datagram, including both header and data. The maximum length
is 65,535 bytes.
5. Identification: Helps identify which packet fragments belong to the same original datagram. All fragments of a packet
share the same Identification value.
6. Don't Fragment (DF) and More Fragments (MF): DF indicates that routers should not fragment the packet. MF
marks all fragments except the last one. It helps determine when all fragments of a datagram have arrived.
7. Fragment Offset: Indicates where a specific fragment fits within the original packet. All fragments, except the last one,
must be multiples of 8 bytes.
8. Time to Live (TTL): Serves as a counter to limit the lifetime of a packet. It counts hops (router-to-router transitions)
rather than seconds. When TTL reaches zero, the packet is discarded, preventing it from endlessly wandering in the
network.
9. Protocol: Informs the network layer which transport process should handle the packet. This could be TCP, UDP, or other
protocols. The numbering is global across the Internet.
10. Header Checksum: A checksum for the header to detect errors while the packet travels through the network. It must be
recalculated at each hop.
11. Source and Destination Addresses: These fields indicate the IP addresses of the source and destination network
interfaces.
12. Options: This field was designed to provide flexibility for future versions of the protocol. It allows for various options,
but they are rarely used today due to inefficiencies and partial support by routers. Options include Security, Strict source
routing, Loose source routing, Record route, and Timestamp.
IP ADDRESSES:
• IPv4 Addresses: IPv4, the version of the Internet Protocol, uses 32-bit addresses. Every device connected to the
Internet, whether it's a computer, smartphone, or router, is assigned an IP address. These addresses are used in the Source
and Destination address fields of IP packets.
• Network Interfaces: It's important to understand that an IP address is not tied to a specific device but to a network
interface on a device. If a device is connected to multiple networks, it must have a unique IP address for each network
interface it uses. For example, a computer with both Wi-Fi and Ethernet connections will typically have two IP
addresses, one for each interface.
• Hosts and Routers: Most devices, like laptops and smartphones, are usually connected to a single network interface and
have one IP address. However, routers, which play a role in forwarding data between networks, have multiple network
interfaces, and therefore, they have multiple IP addresses. These addresses help routers facilitate data routing between
different networks.
 PREFIXES:
 Hierarchical IP Addresses:
• Unlike Ethernet addresses, IP addresses are hierarchical, consisting of two parts: a network portion and a
host portion.
• The network portion contains the same value for all hosts within a single network, creating a contiguous
block of IP address space known as a prefix.
• IP addresses are commonly written in dotted decimal notation, with each of the 4 bytes represented in
decimal, such as "128.208.2.151."
• Prefixes are expressed by providing the lowest IP address in the block and specifying the size of the block in
terms of bits in the network portion. This size must be a power of two, e.g., "128.208.0.0/24."
 Routing with Prefixes:
• Routers can route packets based on the network portion of the address, making routing more efficient. The
host portion doesn't affect routing because all hosts within the same network go in the same direction.
• Routing tables are much smaller, which is crucial considering the large number of hosts on the Internet.
 Advantages:
• Scalability: Hierarchical addressing allows for efficient routing by focusing on the network portion. It reduces the size of
routing tables, especially important with the growing number of Internet hosts.
 Disadvantages:
• Host Location Dependency: IP addresses are location-dependent; they are associated with specific networks. Moving
hosts between networks while retaining the same IP address requires special solutions like mobile IP.
• Address Wastage: Inefficient address allocation within the hierarchy can result in many unused IP addresses. This was a
concern as the Internet expanded rapidly. IPv6 was introduced as a solution to address the shortage of IP addresses and
encourage efficient allocation.
SUBNETS:
 IP Address Management:
• IP address management is overseen by a nonprofit organization called ICANN (Internet Corporation for Assigned Names
and Numbers) to prevent conflicts.
• ICANN delegates portions of the IP address space to regional authorities responsible for allocating IP addresses to
Internet Service Providers (ISPs) and other companies.
 Address Allocation Challenge:
• Allocating IP addresses to companies is an ongoing process as they grow. However, routing by prefix requires all hosts
within a network to have the same network number.
• This can pose challenges when organizations need multiple networks, like departments in a university or different
divisions within a company, but don't want to allocate more addresses from external authorities.
 Subnetting Solution:
• Subnetting is the solution. It allows a single block of IP addresses to be divided into several smaller parts, each acting as
its own network (subnet) internally while appearing as a single network to the outside world.
• Subnets help organizations efficiently use their IP address allocations.
 How Subnets Work:
• Subnets are created by dividing the original IP address block into parts. These parts do not need to be equal but must
align to allow flexibility in allocating addresses.
• Each subnet is associated with a subnet mask that defines the network portion and host portion of an IP address.
 Routing with Subnets:
• Routers determine which subnet a packet belongs to based on the destination address.
• This is done by ANDing the destination address with the subnet mask for each subnet and checking if it matches the
subnet's prefix.
• The router forwards the packet to the appropriate interface leading to the corresponding subnet.
 Flexibility and Scalability:
• Subnet divisions can be adjusted as needed by updating subnet masks within the organization's routers. This flexibility is
achieved without needing external changes or approvals.
• Subnetting allows for efficient usage of IP addresses while preserving the hierarchical structure of the Internet.
CLASSLESS INTER-DOMAIN ROUTING

 CIDR and Route Aggregation:


• CIDR stands for Classless Inter-Domain Routing.
• CIDR is a method used to reduce the size of routing tables in the Internet by aggregating
multiple IP address prefixes into larger, more efficient ones.
 Challenges in Routing Tables:
• Routers at the edge of a network can use a simple default rule for outgoing packets.
However, core routers in the middle of the Internet must know how to reach all networks,
and there are many networks connected to the Internet.
 Route Aggregation Solution:
• Route aggregation or CIDR is a method to reduce routing table sizes.
• Instead of keeping entries for numerous small IP address prefixes, routers combine them
into fewer, larger "super-prefixes" or "supernets."
 Aggregating Prefixes:
• Suppose several universities request IP address blocks. Instead of creating separate prefixes for each university, they can
be combined into a larger prefix that covers all of them. For example, 194.24.0.0/19 includes addresses for multiple
universities.
• By aggregating prefixes, routers near the universities still need to know about the smaller prefixes. However, routers in
distant locations only need to know about the aggregated, larger prefix.
 Automatic Process:
• Aggregation is automatic and depends on the location of prefixes in the Internet, not administrative assignments. Routers
in central locations perform the aggregation.
 Handling Overlapping Prefixes:
• Overlapping prefixes are allowed. When multiple matching prefixes exist, the most specific (longest) prefix with the
fewest IP addresses is used.
• This approach streamlines routing and ensures efficient packet forwarding.
 Complex Algorithms:
• Routers use complex algorithms and hardware acceleration, like VLSI chips, to speed up the matching process for
address prefixes in the routing tables.
• CIDR significantly reduces the size of routing tables and contributes to the scalability of the Internet.
CLASSFUL & SPECIAL ADDRESSING:
 Transition from Classful Addressing to CIDR:
• Prior to 1993, IP addresses were divided into five categories based on classful addressing, namely Class A, B, C, D, and
E.
• Classful addressing was a hierarchical design, with fixed sizes for address blocks, but it proved inefficient for many
organizations' needs.
 The Classful Addressing Problem:
• Class A networks had too many addresses, Class C had too few, and Class B was often too large for most organizations.
• Class B addresses, which allowed up to 65,536 hosts, were commonly requested, but studies showed that most of these
networks had far fewer than 50 hosts.
 Introduction of Subnets:
• To address the limitations of classful addressing, subnets were introduced to allow organizations to flexibly assign
address blocks.
• Subnets allowed for more efficient use of address space within an organization.
 Introduction of CIDR:
• CIDR, or Classless Inter-Domain Routing, was introduced in 1993 to tackle global routing table size issues.
• With CIDR, prefixes of various sizes could be aggregated, reducing the size of routing tables.
• CIDR eliminated the strict distinction between Class A, B, and C addresses.
 Complexity in Routing:
• The transition to CIDR made IP address forwarding more complex than in the classful system.
• In classful addressing, packets were easily categorized based on class (A, B, C, etc.) and then routed accordingly.
• In CIDR, a longest matching prefix operation replaced the simple class-based categorization, making routing more
intricate.
 Special IP Addresses:
• Class D addresses (e.g., 224.0.0.0) are used for multicast communication in the Internet.
• Several other special IP addresses, such as 0.0.0.0 (for host booting), 255.255.255.255 (broadcasting), and 127.xx.yy.zz
(loopback testing), have specific meanings and functions.
 NAT(NETWORK-ADDRESS TRANSLATION)
 Network Address Translation (NAT):
• NAT is a technique used to address the scarcity of IP addresses by allowing multiple
devices within a private network to share a single public IP address.
• It is commonly used in home networks, small businesses, and even some larger networks
as a temporary solution to the IPv4 address shortage.
• NAT involves translating the source IP address of packets leaving a private network to a
shared public IP address just before they reach the Internet. Upon receiving responses, the
NAT box reverses the translation.
 Challenges and Concerns with NAT:
1. Violation of IP Architecture: NAT contradicts the fundamental architecture of IP, where every IP address should
uniquely identify a single machine worldwide. NAT allows multiple machines to use the same private IP address.
2. End-to-End Connectivity Breakdown: NAT disrupts the end-to-end connectivity model of the Internet, making it
challenging for remote users to initiate connections with devices behind NAT. Special configurations or NAT traversal
techniques are required.
3. Connection State Maintenance: NAT forces the network to maintain connection state, which is typically a property of
connection-oriented networks. If the NAT box crashes, all TCP connections may be destroyed.
4. Protocol Layering Violation: NAT violates the principle of protocol layering, where one layer should not make any
assumptions about the payload field of the layer above it. Changes in transport protocols could render NAT ineffective.
5. Issues with Non-TCP/UDP Protocols: Processes on the Internet are not restricted to using only TCP or UDP. NAT may
not handle new transport protocols or customized applications properly.
6. Problems with Applications Using Multiple Ports: Applications like FTP and H.323 Internet telephony protocols may
fail in the presence of NAT, as it might not properly handle the dynamic behavior of these protocols.
7. Limited Port Availability: The TCP Source port field is limited to 16 bits, allowing a finite number of machines (up to
65,536) to be mapped onto a single IP address.
 IP VERSION 6:
 Transition to IPv6:
• IPv4 addresses were running out rapidly due to the explosive growth of the Internet, even
with the use of CIDR and NAT.
• A long-term solution was needed, leading to the development of IPv6 (IP version 6) to
provide an effectively unlimited supply of Internet addresses.
• Despite its advantages, IPv6 deployment has been slow due to compatibility issues with
IPv4 and a lack of immediate incentives for companies and users.
 IPv6 Features:
1. 128-Bit Addresses: IPv6 uses 128-bit addresses, solving the IPv4 address scarcity problem. This change allows for an
almost unlimited number of unique addresses.
2. Header Simplification: IPv6 simplifies the header by reducing it to seven fields, compared to the 13 fields in IPv4. This
simplification improves packet processing speed, increasing throughput and reducing delay.
3. Improved Support for Options: IPv6 enhances the support for options by simplifying their representation and making
them easier for routers to process. This results in faster packet processing.
4. Security Enhancements: IPv6 focuses on security, offering features such as authentication and privacy. These security
enhancements were later retrofitted to IPv4 but are a significant part of IPv6.
5. Quality of Service (QoS): IPv6 gives more attention to Quality of Service (QoS) to cater to the growing need for
multimedia services on the Internet, ensuring that data can be delivered with the required level of service quality.
 THE MAIN IPV6 HEADER
 IPv6 Header Features and Changes:
1. Version: The Version field is always set to 6 for IPv6, distinguishing it from IPv4, which has a value of 4. This field
helps routers identify the protocol type.
2. Differentiated Services: IPv6 retains the Differentiated Services field, which is used for marking packets with different
real-time delivery requirements. It helps with quality of service (QoS) and can also signal explicit congestion
indications.
3. Flow Label: IPv6 introduces the Flow Label field, allowing a source and destination to mark groups of packets with
similar requirements. It can be used to create a pseudo-connection and ensures that packets within a flow are treated
consistently across the network.
4. Payload Length: The Payload Length field indicates the length of the payload following the header. Unlike IPv4, it no
longer includes the header's length, resulting in a larger maximum payload size.
5. Next Header: IPv6 uses the Next Header field to identify the type of extension headers that follow the main header. It
also indicates which transport protocol to use when this header is the last IP header.
6. Hop Limit: The Hop Limit field, similar to the Time to Live field in IPv4, is used to prevent packets from circulating
endlessly. It is decremented at each hop in the network.
7. Source and Destination Addresses: IPv6 addresses are 128 bits long, providing a vast address space to accommodate the
future growth of the Internet. These addresses use a notation with colons to represent long sequences of zeros, and IPv4
addresses can be expressed as a pair of colons and a dotted decimal number.
8. Header Simplification: The IPv6 header is simplified with a fixed length and a reduced number of fields compared to the
IPv4 header, which results in faster packet processing by routers.
9. Fragmentation: IPv6 adopts a different approach to fragmentation compared to IPv4. Instead of routers performing
fragmentation, IPv6 hosts are expected to dynamically determine the packet size and handle it, reducing the processing load
on routers.
10. Checksum: IPv6 removes the Checksum field from the header because the performance impact of calculating the
checksum was considered unwarranted, given the reliability of modern networks and the presence of checksums in the data
link and transport layers.
EXTENSION HEADERS:
 Extension headers introduced in IPv6 and their purposes:
1. Hop-by-Hop Header: The hop-by-hop extension header is used for information that all routers along the path must
examine. It includes options such as support for datagrams exceeding 64 KB, allowing the use of jumbograms, which are
important for supercomputer applications.
2. Destination Options Header: This extension header is intended for fields that need to be interpreted only at the
destination host. In the initial version of IPv6, it primarily includes null options for padding and potential future use.
3. Routing Header: The routing extension header lists one or more routers that must be visited on the way to the
destination. It is similar to IPv4's loose source routing, specifying the order of routers to visit, but allowing other routers
not listed to be visited in between.
4. Fragment Header: The fragment extension header deals with fragmentation, allowing the source host to fragment a
packet if it's too large. Routers in the path do not perform fragmentation; instead, they may discard packets that are too
large and send back ICMP error messages to the source.
5. Authentication Header: The authentication header provides a mechanism for the receiver of a packet to verify the
sender's identity. It ensures the authenticity and integrity of the packet by using cryptographic techniques.
6. Encrypted Security Payload: This extension header enables the encryption of the packet's contents, ensuring that only
the intended recipient can decrypt and read it.
INTERNET CONTROL PROTOCOLS:

 Overview of ICMP (Internet Control Message Protocol) and some of its key message types:
1. DESTINATION UNREACHABLE: This message is used when a router cannot locate the destination or when a packet
with the DF (Don't Fragment) bit set cannot be delivered due to network restrictions.
2. TIME EXCEEDED: Sent when a packet is dropped because its Time to Live (TTL) counter has reached zero. It's
useful for detecting looping packets or low TTL values.
3. PARAMETER PROBLEM: Indicates that an illegal value has been detected in a header field, pointing to a possible
issue in the sender's or a router's IP software.
4. SOURCE QUENCH: Historically used to throttle hosts sending too many packets. It's now rarely used, and congestion
control is primarily handled at the transport layer.
5. REDIRECT: Sent when a router detects that a packet is routed incorrectly, informing the sender to update to a better
route.
6. ECHO and ECHO REPLY: These messages are used to check if a destination is reachable and alive. ECHO messages
are used in the "ping" utility to verify a host's connectivity.
7. TIMESTAMP REQUEST and TIMESTAMP REPLY: These messages record the arrival and departure times in the
reply and can be used to measure network performance.
8. ROUTER ADVERTISEMENT and ROUTER SOLICITATION: These messages help hosts find nearby routers,
enabling hosts to learn the IP address of at least one router on the local network.
Address Resolution Protocol(ARP):
It serves the purpose of mapping IP addresses to Ethernet addresses. This mapping is crucial because network devices at the
data link layer, such as Ethernet cards, do not understand IP addresses. Here's how ARP works:
1. Address Resolution: When a sender with an IP address (e.g., host 1) wants to communicate with another device on the
same local network (e.g., host 2) and doesn't know its Ethernet address, it sends an ARP broadcast to the entire local
network asking, "Who has IP address X?" In response, the target device (host 2) replies with its Ethernet address,
creating an IP-to-Ethernet address mapping. Host 1 can then use this mapping to send Ethernet frames to host 2.
2. ARP Cache: Devices often cache the ARP responses to avoid repeating the ARP request for the same IP address in the
near future. This caching optimizes performance and minimizes broadcast traffic.
3. Gratuitous ARP: To keep the ARP cache information current, devices can send gratuitous ARP broadcasts when they
are configured, updating other devices with their new mappings. If multiple devices respond to a gratuitous ARP for the
same IP address, it indicates a conflict that needs resolution by the network manager.
4. Routing Between Networks: When a sender (host 1) needs to communicate with a device on a different network (e.g.,
host 4 on the EE network), it sends the packet to its default gateway (router) on the local network. The sender must first
discover the router's Ethernet address using ARP, as it doesn't have this information in advance.
5. Proxy ARP: In some cases, a router can respond to ARP requests on behalf of devices on another network, allowing
hosts to communicate with devices on different networks without needing to know the specific network configuration
details.
DHCP, or Dynamic Host Configuration Protocol:
 It simplifies the process of configuring IP addresses and related network parameters for hosts on a network. Here's how DHCP
works:
1. DHCP Server: Each network that uses DHCP must have a DHCP server. This server is responsible for managing IP address
assignments and other configuration settings.
2. DHCP Discover: When a device, like a computer, is connected to the network and needs an IP address, it sends a DHCP
DISCOVER packet as a broadcast message on the network. This packet may reach the DHCP server directly, or if the server is on
a different network, the router relays the broadcast to the DHCP server.
3. DHCP Offer: The DHCP server receives the DISCOVER request and allocates an available IP address. It sends a DHCP OFFER
packet back to the requesting device, suggesting an IP address for use.
4. Request and Acknowledgment: The device may receive multiple offers if multiple DHCP servers are available. It then sends a
DHCP REQUEST packet to confirm which IP address it will use. The DHCP server that provided the accepted offer sends a
DHCP ACKNOWLEDGMENT to the device, finalizing the IP address assignment.
5. Configuration Parameters: DHCP can also configure additional network settings, such as the network mask, default gateway
(router), DNS servers, and more. These parameters are conveyed along with the IP address assignment in the DHCP
ACKNOWLEDGMENT packet.
6. Lease Period: DHCP IP address assignments are temporary. The DHCP server allocates an IP address for a specific lease period.
Just before the lease expires, the host must request a DHCP renewal. If the renewal request is not made or is denied, the host may
no longer use the previously assigned IP address. This mechanism helps prevent the permanent loss of IP addresses.
7. Extensive Use: DHCP is widely used in various network environments, including businesses, home networks, and by Internet
Service Providers (ISPs). It has replaced earlier protocols like RARP and BOOTP due to its ability to configure a broader range of
network parameters automatically.
 LABEL SWITCHING & MPLS
 MultiProtocol Label Switching (MPLS) is a technology used by Internet Service Providers (ISPs) and large networks to
efficiently route Internet traffic. MPLS is different from traditional packet-based routing and bears some resemblance to
circuit switching. Here's a brief overview of MPLS:
1. Label-Based Forwarding: MPLS adds a label in front of each packet, and instead of routing based on the destination
address (as in traditional IP routing), forwarding decisions are made based on these labels. Labels serve as indices for a
lookup table, allowing routers to quickly determine the appropriate output line for a packet.
2. Label Header: The MPLS header is 4 bytes long and consists of several fields, including the Label field (holding the
index), QoS (Quality of Service), S (used for stacking labels), and TtL (Time to Live, for loop prevention).
3. Layer 2.5 Protocol: MPLS doesn't neatly fit into the OSI model. It operates between the network layer (Layer 3) and the
data link layer (Layer 2). This categorization sometimes leads to referring to MPLS as a "Layer 2.5" protocol.
4. Independence: MPLS headers are independent of both network and data link layers. This independence allows MPLS
switches to forward not only IP packets but also non-IP packets, making it "multiprotocol."
5. Label Aggregation: Rather than assigning a unique label to each flow, routers often group multiple flows with the same
destination and service class (Forwarding Equivalence Class or FEC) under a single label. This grouping optimizes network
efficiency.
6. Stacking Labels: MPLS can stack labels on a packet, allowing it to operate at multiple levels simultaneously. The
outermost label guides the packet along a path, and as the packet progresses, labels are removed and used for further
forwarding.
7. Control Protocol: MPLS forwarding tables are set up by control protocols, which are a combination of routing and
connection setup protocols. The control protocols decide how packets should follow MPLS paths without requiring user
involvement.
OSPF (Open Shortest Path First)
It is an interior gateway routing protocol used in computer networks.
1. Introduction to Routing: The text starts by introducing the concept of routing in the Internet, emphasizing the
presence of independent networks or ASes (Autonomous Systems) operated by various organizations. It differentiates
between intradomain routing (routing within a single network) and interdomain routing (routing between different
networks).
2. Evolution of Routing Protocols: The text mentions the historical development of routing protocols. Initially,
distance vector protocols like RIP were used, but they had limitations, including slow convergence and the count-to-
infinity problem. OSPF was developed as a link state protocol to address these issues and became a standard in 1990.
3. OSPF Requirements: The design of OSPF had specific requirements, including being published openly, supporting
various distance metrics, dynamic adaptation to topology changes, supporting routing based on type of service, load
balancing, support for hierarchical systems, security measures, and handling routers connected via tunnels.
4. Types of Links: OSPF supports both point-to-point links and broadcast networks, including multiaccess networks
that allow direct communication between routers.
5. Hierarchical Organization: OSPF divides networks into areas, each containing routers. The backbone area (area 0)
connects all areas, and routers in different areas communicate via the backbone. This hierarchical structure helps in
managing large networks.
6. Role of Routers: Routers in OSPF perform various roles, including internal routers (within an area), area border
routers (connecting multiple areas), and AS boundary routers (injecting routes to external destinations).
7. Shortest Path Calculation: OSPF uses a link state method to compute the shortest path from each router to all other
nodes within the AS. It can find multiple equally short paths and uses Equal Cost MultiPath (ECMP) to distribute traffic
among them.
8. Neighbor Discovery: Routers in OSPF discover their neighbors by sending HELLO messages on point-to-point links
and multicasting them on LANs. A designated router represents the LAN and exchanges information with other routers
on the same LAN.
9. Message Exchange: OSPF routers exchange various types of messages, including LINK STATE UPDATE,
DATABASE DESCRIPTION, and LINK STATE REQUEST messages to keep their link state databases up to date. These
messages are sent as IP packets.
10. Routing Process: Through flooding and information exchange, each router constructs a graph of the network and
calculates the shortest paths. The backbone routers help in computing the best routes, which are then advertised within
the areas. Internal routers use this information to select the best route to destinations outside their area.
BGP (Border Gateway Protocol)
It is an exterior gateway routing protocol used for routing between Autonomous Systems (ASes) in the Internet. Here's a
brief summary of the key points:
1. Intradomain vs. Interdomain Routing: Intradomain routing protocols like OSPF and IS-IS are used within a single
AS, while BGP is used for routing between ASes. BGP has to deal with political and policy considerations in addition
to efficient packet routing.
2. Routing Policies: BGP allows for the implementation of various routing policies that can be based on political,
security, or economic factors. These policies determine which routes are taken for specific traffic. Examples include
avoiding carrying commercial traffic on educational networks, avoiding certain paths for political reasons, choosing
routes based on cost, and ensuring that traffic starting or ending at certain organizations doesn't transit others.
3. Transit and Peering: BGP enables the definition of different relationships between ASes. One common scenario is
transit service, where a customer AS pays a provider AS to deliver and receive traffic to/from anywhere on the
Internet. Another scenario is peering, where two ASes directly exchange traffic for specific destinations. These
policies affect how traffic is routed between ASes.
4. Routing Information and AS Path: BGP routers maintain routes along with the path taken to reach those routes. This
path is known as the AS path, consisting of a sequence of ASes the route has traversed. This information helps prevent
routing loops.
5. Route Advertisement and Propagation: BGP routes are advertised across links between ASes, and ASes propagate
these routes within their network. BGP ensures that all routers within an AS are aware of the routes available.
6. Path Selection: Each BGP router must choose the best route among the possible routes it learns for a destination. This
decision is often guided by policies, such as preferring peered routes over transit routes, customer routes over others,
shorter AS paths, or the lowest cost within the AS. This selection process can lead to asymmetrical routing, where
different paths are taken in each direction.
7. Integration with Interior Gateway Protocols: BGP and interior gateway protocols (e.g., OSPF) are integrated to
determine the best exit point from one ISP to another and within an AS. This integration requires careful configuration to
ensure compatible routing decisions.
8. Complexity: BGP is a highly complex protocol, with much of its complexity related to the implementation of routing
policies. The RFC 4271 specification and related RFCs provide detailed information about the protocol.
 Let's provide brief explanations of the specific examples mentioned in the provided passage:
1. Transit Service vs. Peering: The passage discusses the distinction between transit service and peering. Transit
service is when one AS (e.g., AS1) provides network connectivity to other ASes (e.g., AS2, AS3) and carries their
traffic to and from any destination on the Internet. Peering, on the other hand, involves two ASes (e.g., AS3 and AS4)
directly exchanging traffic for specific destinations without paying for transit service. The key difference is that
transit involves payment, while peering typically does not.
2. Default Route for Stub Networks: The passage mentions that some networks (referred to as "stub networks") have
only one connection to the Internet, and they use a default route. A default route simplifies routing by directing all
traffic through a single link, as there is no other path out of the network.
3. Multihoming: Some organizations connect to multiple ISPs to enhance network reliability. If one ISP's link fails,
they can use the other ISP's link. Multihoming allows for redundant Internet connections, improving network
resilience.
4. Early Exit or Hot-Potato Routing: The passage describes a routing strategy called "hot-potato routing" or "early
exit." In this strategy, packets exiting an AS choose the quickest exit point, often based on the principle of minimizing
the cost or time spent within the AS. As a result, routes can become asymmetric, with different paths taken for
incoming and outgoing traffic.
 Internet Multicasting
 Internet Protocol (IP) typically supports one-to-one communication between a sender and a receiver. However,
there are scenarios where a sender needs to transmit data to multiple receivers simultaneously. This is achieved
through IP multicasting, using class D IP addresses. These addresses are used to identify groups of hosts, and when a
sender sends a packet to a class D address, it is delivered to all members of that group, but there are no guarantees
that all members will receive it.
1. Local Multicast Addresses: The range of IP addresses 224.0.0.0/24 is reserved for multicast communication on a
local network. No routing protocol is required in this case. The packets are simply broadcasted on the LAN with a
multicast address, and all hosts on the LAN receive the broadcasts. Examples of local multicast addresses include
224.0.0.1 (all systems on a LAN) and 224.0.0.2 (all routers on a LAN).
2. Multicast on Different Networks: When multicast groups have members on different networks, a routing protocol is
needed. Multicast routers must know which hosts belong to a group. Hosts can join or leave multicast groups, and
each host keeps track of its group memberships. Multicast routers periodically send query packets to hosts on their
LAN, asking for information about the groups to which they belong. This process is facilitated by the Internet Group
Management Protocol (IGMP).
3. Multicast Routing Protocols: Multicast routing protocols are used to create multicast spanning trees that provide
paths from senders to all members of a group. The main protocol used within an Autonomous System (AS) is Protocol
Independent Multicast (PIM). PIM has two main modes: Dense Mode PIM, which creates a pruned reverse path
forwarding tree and is suitable for scenarios where group members are distributed throughout the network, and Sparse
Mode PIM, which builds spanning trees similar to core-based trees and is used for cases like content providers
delivering multicast content to subscribers.
4. Inter-AS Multicast: When group members span multiple ASes, multicast extensions to BGP (Border Gateway
Protocol) or tunnels are used to create multicast routes that span across different ASes. This is necessary to ensure
multicast traffic is efficiently routed across the Internet.

You might also like