01_Chapter_18_Introduction_to_Network_Layer_FF.pptx
01_Chapter_18_Introduction_to_Network_Layer_FF.pptx
• Loopback address:
• The block 127.0.0.0/8 is called the loopback address. A packet with one of
the addresses in this block as the destination address never leaves the host;
it will remain in the host. Any address in the block is used to test a piece of
software in the machine
• Private addresses:
• Four blocks are assigned as private addresses:
10.0.0.0/8,
172.16.0.0/12,
192.168.0.0/16, and
169.254.0.0/16.
• Multicast addresses:
• The block 224.0.0.0/4 is reserved for multicast addresses.
Dynamic Host Configuration Protocol (DHCP)
• Address assignment in an organization can be done automatically using the Dynamic Host
Configuration Protocol (DHCP).
• DHCP is an application-layer program, using the client-server paradigm, that actually helps
TCP/IP at the network layer.
• DHCP has found such widespread use in the Internet that it is often called a plugand- play
protocol.
• A network manager can configure DHCP to assign permanent IP addresses to the host and
routers.
• DHCP can also be configured to provide temporary, on demand, IP addresses to hosts.
• The second capability can provide a temporary IP address to a traveller to connect her
laptop to the Internet while she is staying in the hotel.
• It also allows an ISP with 1000 granted addresses to provide services to 4000 households,
assuming not more than one-forth of customers use the Internet at the same time.
• In addition to its IP address, a computer also needs to know the network prefix (or address
mask).
• Most computers also need two other pieces of information, such as the address of a default
router to be able to communicate with other networks and the address of a name server to
be able to use names instead of addresses
DHCP Message Format
• DHCP is a client-server protocol in which the client sends a request message and the server
returns a response message.
A 64-byte option field has a dual purpose: It can carry either additional
information or some specific vendor information.
DHCP Option Field
• The 64-byte option field has a dual purpose.
• It can carry either additional information or some specific vendor information.
• The server uses a number, called a magic cookie, in the format of an IP address with the
value of 99.130.83.99.
• When the client finishes reading the message, it looks for this magic cookie.
• If present, the next 60 bytes are options.
• An option is composed of three fields: a 1-byte tag field, a 1-byte length field, and a
variable-length value field.
• There are several tag fields that are mostly used by vendors.
• If the tag field is 53, the value field defines one of the 8 message types shown below:
Operation of DHCP: DHCPDISCOVER
• The DHCP server or servers (if more than one) responds with a
DHCPOFFER message in which the your address field defines the offered
IP address for the joining host and the server address field includes the IP
address of the server.
• The message also includes the lease time for which the host can keep the
IP address.
• This message is encapsulated in a user datagram with the same port
numbers, but in the reverse order.
• The user datagram in turn is encapsulated in a datagram with the server
address as the source IP address, but the destination address is a broadcast
address, in which the server allows other DHCP servers to receive the
offer and give a better offer if they can.
Operation of DHCP: DHCPREQUEST
• The joining host receives one or more offers and selects the best of
them.
• The joining host then sends a DHCPREQUEST message to the
server that has given the best offer.
• The fields with known value are set.
• The message is encapsulated in a user datagram with port
numbers as the first message.
• The user datagram is encapsulated in an IP datagram with the source
address set to the new client address, but the destination address still
is set to the broadcast address to let the other servers know that
their offer was not accepted.
Operation of DHCP: DHCPACK
• The server does not send all of the information that a client may
need for joining the network.
• In the DHCPACK message, the server defines the pathname of a
file in which the client can find complete information such as the
address of the DNS server.
• The client can then use a file transfer protocol to obtain the rest of
the needed information.
Error Control
• Translation Tables
• Forwarding of IP Packets
• Forwarding Based on Destination Address
• Address Aggregation
• Longest Mask Matching
• Hierarchical Routing
• Forwarding Table Search Algorithm
• Geographical Routing
• Forwarding based on Tables
• MPLS Multi-Protocol Label Switching
• A New Header
• MPLS Header Stack
• Hierarchical Switching
• Router on Packet Switches
Translation Table: Using One IP Address
• In its simplest form, a translation table has only two columns: the private address and
the external address (destination address of the packet).
• When the router translates the source address of the outgoing packet, it also makes note of
the destination address— where the packet is going.
• When the response comes back from the destination, the router uses the source address of
the packet (as the external address) to find the private address of the packet.
• In this strategy, communication must always be initiated by the private network.
Translation Table: Using a Pool of IP Addresses
• The use of only one global address by the NAT router allows only one
private-network host to access a given external host.
• To remove this restriction, the NAT router can use a pool of global addresses.
• For example, instead of using only one global address (200.24.5.8), the NAT router
can use four addresses (200.24.5.8, 200.24.5.9, 200.24.5.10, and 200.24.5.11).
• In this case, four private-network hosts can communicate with the same external
host at the same time because each pair of addresses defines a separate connection.
Solution
Table below shows the corresponding table.
Forwarding table for router R1
Example 18.8
Instead of previous Table, we can use Table below, in
which the network address/mask is given in bits.
Forwarding table for router R1 using prefix bits
Solution
1. The first mask (/26) is applied to the destination address.
The result is 180.70.65.128, which does not match the
corresponding network address.
• When the forwarding algorithm gets the destination address of the packet, it needs to
delve into the mask column.
• For each entry, it needs to apply the mask to find the destination network address.
• It then needs to check the network addresses in the table until it finds the match.
• The router then extracts the next-hop address and the interface number to be delivered
to the data-link layer.
Example 18.12
• Figure below shows a simple example of using a label to access a switching
table. Since the labels are used as the index to the table, finding the
information in the table is immediate.
Multi-Protocol Label Switching (MPLS)
• Label: This 20-bit field defines the label that is used to index the forwarding table
in the router.
• Exp: This 3-bit field is reserved for experimental purposes.
• S: The one-bit stack field defines the situation of the subheader in the stack. When
the bit is 1, it means that the header is the last one in the stack.
• TTL: This 8-bit field is similar to the TTL field in the IP datagram. Each visited
router decrements the value of this field. When it reaches zero, the packet is
discarded to prevent looping.
Hierarchical Switching