Network layer (2)

34
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

description

Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331. Network layer (2). T.Najah AlSubaie. IP Address. The communication at the network layer is host-to-host (Source-to-destination); - PowerPoint PPT Presentation

Transcript of Network layer (2)

Page 1: Network layer (2)

1

NETWORK LAYER (2)T.Najah AlSubaie

Kingdom of Saudi Arabia

Prince Norah bint Abdul Rahman University

College of Computer Since and Information System

NET331

Page 2: Network layer (2)

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

Page 3: Network layer (2)

IP Address The Internet addresses are 32 bits in length. This gives us a maximum of 232 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

Page 4: Network layer (2)

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 2N because each bit can have two different values (0 or 1) and N bits can have 2N values.

Page 5: Network layer (2)

Notations There are two prevalent notations to

show an IP address: binary notation and dotted-decimal notation.

Page 6: Network layer (2)

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:

01110101 10010101 00011101 00000010

Page 7: Network layer (2)

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 (01110101 10010101 00011101 00000010)

117.149.29.2

Page 8: Network layer (2)

dotted-decimal notation and binary notation for an IPv4 address

Page 9: Network layer (2)

Example Change the following IP addresses from binary

notation to dotted-decimal notation.a. 10000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111SolutionWe replace each group of 8 bits with its

equivalent decimal number (see Appendix B) and add dots for separation.

c. 129.11.11.239d. 193.131.27.255

Page 10: Network layer (2)

Example Change the following IPv4 addresses from

dotted-decimal notation to binary notation.a. 111.56.45.78b. 221.34.7.82SolutionWe replace each decimal number with its binary

equivalent .a. 01101111 00111000 00101101 01001110b. 11011101 00100010 00000111 01010010

Page 11: Network layer (2)

Example Find the error, if any, in the following IPv4 addresses.a. 111.56.045.78b. 221.34.7.8.20c. 75.45.301.14d. 11100010.23.14.67Solutiona. 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.

Page 12: Network layer (2)

12

Routing 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

Page 13: Network layer (2)

13

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

Page 14: Network layer (2)

14

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

Page 15: Network layer (2)

15

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

Page 16: Network layer (2)

16

Routing Protocols 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.

Page 17: Network layer (2)

17

Routing

Page 18: Network layer (2)

18

Intra and Inter-domain Routing 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.

Page 19: Network layer (2)

19

Distance vector routing tables

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

Page 20: Network layer (2)

20

Distance vector routing tables

Page 21: Network layer (2)

21

Initialization of tables in distance vector routing

Page 22: Network layer (2)

22

Updating in distance vector routing

Page 23: Network layer (2)

23

Two node insatiability

Page 24: Network layer (2)

24

Link State Routing 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.

Page 25: Network layer (2)

25

Concept of link state routing

Page 26: Network layer (2)

26

Link state knowledge

Page 27: Network layer (2)

27

Example of formation of shortest path tree

Page 28: Network layer (2)

28

Routing table for node A

Page 29: Network layer (2)

29

Path Vector Routing 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

Page 30: Network layer (2)

30

Path Vector Routing 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

Page 31: Network layer (2)

31

Initial routing tables in path vector routing

Page 32: Network layer (2)

32

Stabilized tables for three autonomous systems

Page 33: Network layer (2)

33

Multicasting and Broadcasting 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.

Page 34: Network layer (2)

34

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