NETWORK LAYER (2) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331 1
IP Address The communication at the network layer is host-to-host (Source-to-destination); The packet transmitted by the sending computer may pass through several LANs or WANs before reaching the destination computer. For this level of communication, we need a global addressing scheme; we called this logical addressing in Chapter 2 We use the term IP address to mean a logical address in the network layer of the TCP/IP protocol suite
IP Address The Internet addresses are 32 bits in length. This gives us a maximum of 2 32 addresses. These addresses are referred to as IP addresses. An IP address is uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. Two devices on the Internet can never have the same address at the same time
Address Space An address space is the total number of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2 N because each bit can have two different values (0 or 1) and N bits can have 2 N values.
Notations There are two prevalent notations to show an IP address: binary notation and dotted-decimal notation.
Binary Notation In binary notation, the IP address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an IP address referred to as a 32-bit address or a 4-byte address. The following is an example of an IP address in binary notation:
Dotted-Decimal Notation To make the IP address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal point (dot) separating the bytes. The following is the dotted-decimal notation of the address ( )
dotted-decimal notation and binary notation for an IPv4 address
Example Change the following IP addresses from binary notation to dotted-decimal notation. a b Solution We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation. a b
Example Change the following IPv4 addresses from dotted- decimal notation to binary notation. a b Solution We replace each decimal number with its binary equivalent. a b
Example Find the error, if any, in the following IPv4 addresses. a b c d Solution a. There must be no leading zero (045). b. There can be no more than four numbers in an IPv4 address. c. Each number needs to be less than or equal to 255 (301 is outside this range). d. A mixture of binary notation and dotted-decimal notation is not allowed.
Routing 12 Routing means to place the packet in its route to its destination. Routing requires a host or a router to have a routing table. When a host has a packet to send or when a router has received a packet to be forwarded, it looks at this table to find the route to the final destination
Routing 13 A dynamic table, is one that is updated automatically when there is a change somewhere in the internet. For instance, they need to be updated when a router is down, and they need to be updated whenever a better route has been found.
Optimization 14 Router is usually attached to several networks. When it receives a packet, the decision of what network should it pass the packet is based on the optimization criteria.
Optimization 15 Optimality can be defined by several approaches : A cost is assigned for passing through a network. We call this cost a metric. One protocol, allow the administrator to assign a cost for passing through a network based on the type of service required. if maximum throughput is the desired type of service, a satellite link has a lower metric than a fiber-optic line. On the other hand, if minimum delay is the desired type of service, a fiber-optic line has a lower metric than a satellite link. Other protocol treat all network as equals. It is one hop count. If packet passes through networks to reach the destination. The total cost is 10 hope counts.
Routing Protocols 16 Routing protocols have been created in response to the demand for dynamic routing tables. A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
Routing 17
Intra and Inter-domain Routing 18 An autonomous system (AS) is a group of networks and routers under the authority of a single administration. Routing inside an autonomous system is referred to as intradomain routing. Routing between autonomous systems is referred to as interdomain routing.
Distance vector routing tables 19 In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change. In distance vector routing, the least-cost route between any two nodes is the route with minimum distance. In this protocol, each node maintains a vector (table) of minimum distances to every node. The table at each node also guides the packets to the desired node by showing the next stop in the route (next-hop routing).
Distance vector routing tables 20
Initialization of tables in distance vector routing 21
Updating in distance vector routing 22
Two node insatiability 23
Link State Routing 24 In link state routing, if each node in the domain has the entire topology of the domain, the list of nodes and links. The node can use Dijkstra's algorithm to build a routing table. Each node uses the same topology to create a routing table.
Concept of link state routing 25
Link state knowledge 26
Example of formation of shortest path tree 27
Routing table for node A 28
Path Vector Routing 29 Path vector routing proved to be useful for interdomain routing. we assume that there is one node in each autonomous system that acts on behalf of the entire autonomous system. This nod is called a speaker node. Only speaker nodes in each AS can communicate with each other. A speaker node advertises the path, not the metric of the nodes
Path Vector Routing 30 Path vector includes tow phases: Initialization: Each speaker node can know only the reachability of nodes inside its autonomous system. Sharing: A speaker in an autonomous system shares its table with immediate neighbors. Updating When a speaker node receives a two-column table from a neighbor, it updates its own table by: adding the nodes that are not in its routing table adding its own autonomous system and the autonomous system that sent the table
Initial routing tables in path vector routing 31
Stabilized tables for three autonomous systems 32
Multicasting and Broadcasting 33 In multicast communication, there is one source and a group of destinations. The relationship is one-to-many. In this type of communication, the source address is a unicast address, but the destination address is a group address, which defines one or more destinations.
Broadcasting 34 In broadcast communication, the relationship between the source and the destination is one-to-all. There is only one source, but all the other hosts are the destinations.