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