




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A lecture note from cpsc 5157 computer networks course, focusing on ip datagrams and datagram forwarding. The concept of connectionless service, virtual packets, ip datagram, forwarding an ip datagram, ip addresses, and routing table entries. It also discusses the mask field and its role in datagram forwarding, as well as destination and next hop addresses. Diagrams and examples to illustrate the concepts.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Topics: Chapter 20: IP Datagrams and Datagram Forwarding Connectionless Service Virtual Packets The IP Datagram Forwarding an IP Datagram IP Addresses and Routing Table Entries The Mask Field and Datagram Forwarding Destination and Next Hop Addresses The IP Datagram Header
The goal of the Internet is for two software applications to exchange data packets without having been coded for the details of the underlying physical network. As mentioned before, there are two service models that could be used: connection–oriented in which a virtual channel is set up between the two applications and maintained for the session connectionless in which the path (sequence of nodes) between the two communicating node is changing dynamically as the session progresses. In a connectionless network, the data packets are forwarded independently, with each node in the path (except the destination) routing each packet as network conditions warrant. In a course on algorithms, this routing might be called “greedy”. A greedy algorithm is one that chooses a graph node or edge based on local optimization considerations, that is – what seems best at the present. For those few of us who can remember telegrams, a connectionless service can be considered as breaking a message into a number of telegrams and sending each one individually and independently of the others.
Remember that on each link in the path from source to destination, the IP datagram is embedded in a data–link frame that is appropriate for that link. Each intermediate router in the path performs three distinct tasks.
On receipt of an IP packet, the router extracts the network ID from the destination address. Based on this, the router will either deliver locally or forward. Recall that a router is physically connected to at least two networks, so that there are at least two distinct sets of nodes to which it can deliver locally. Each router maintains and continually updates a routing table , as shown in figures 20.2 and 20.3 in the textbook. Considered as a database table, the routing table contains three columns: destination addresses masks associated with the destination addresses the address of the next hop for that address/mask pair. All routers have a default address in the routing table. The routing table is scanned “top to bottom” as an array for the first match to the destination address for the IP packet. In this form, the routing table of figure 20.3 might be Destination Mask Next Hop 30.0.0.0 255.0.0.0 40.0.0. 40.0.0.0 255.0.0.0 Deliver direct 128.1.0.0 255.255.0.0 Deliver direct Default 128.1.0.
Recall the diagram showing an IP packet embedded in an Ethernet frame. The destination address for the IP packet never changes; it is always the ultimate destination address for the message. The “next hop address” is really a link–level physical address placed in the link header of the frame. Recall that each router that is an intermediate node in the path, including the router that services the LAN to which the destination node is attached, will extract the IP packet from the incoming frame, create a physical address appropriate for the ultimate destination (it may be another router), and place the IP packet into a frame for the outgoing link. In the “last leg of the journey”, the link header will have the physical address of the ultimate destination.
Figure 20.4 on page 328 of the textbook shows the fields in an IP v 4 datagram header. The important fields are described on that page. There is one assumption that we should mention specifically. Note that the first four bits of the header are the version number. This convention must hold for all IP versions. Imagine the case that might occur in the near future, in which we have intermixed IP v 4 and IP v 6 messages. At this time, each router would examine the first four bits of the IP header to determine which protocol was in use. 0100 this is IP version 4 0110 this is IP version 6. The software to process the header and extract the addresses will depend on which protocol is in use. We shall mention IP version 6 in a future lecture.