24
Course : Bachelor Applied Physical Sciences (Computer Science) Year 3 rd (Sem V) Paper title : Computer Networks Paper No. 17 Lecture No. 6 Tittle : Reference Models and Network Addressing Difference between the OSI and TCP/IP model Hello Dear viewers, today we shall discuss about difference between the OSI and TCP/IP model and addressing. OSI MODEL: The Open System Inter connection (OSI) Model is a layered framework for the design of network systems that allow communication between all types of computer systems. It consists of seven layers: Physical layer, Data link layer, Network layer, Transport layer, Session layer, Presentation layer, Application Layer. Sometimes OSI model is called as vertical Approach. It defines the services, interfaces and protocols very clearly and makes a clear distinction between them. In OSI Model, the protocols came after the model was described.

cec.nic.incec.nic.in/wpresources/Module/EPAT_BAPS/195/NIC and... · Web viewDifference between the OSI and TCP/IP model Hello Dear viewers, today we shall discuss about difference

  • Upload
    ledung

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Course : Bachelor Applied Physical Sciences (Computer Science)Year 3rd(Sem V)Paper title : Computer NetworksPaper No. 17Lecture No. 6Tittle : Reference Models and Network Addressing

Difference between the OSI and TCP/IP model

Hello Dear viewers, today we shall discuss about difference between the OSI and TCP/IP model and addressing.

OSI MODEL:

The Open System Inter connection (OSI) Model is a layered framework for the design of network systems that allow communication between all types of computer systems.

It consists of seven layers: Physical layer, Data link layer, Network layer, Transport layer, Session layer, Presentation layer, Application Layer.

Sometimes OSI model is called as vertical Approach. It defines the services, interfaces and protocols very clearly and makes a

clear distinction between them. In OSI Model, the protocols came after the model was described. In OSI Model each layer performs specific functions. The OSI model supports both connectionless and connection–oriented

communication in the network layer, but only connection-oriented communication in the transport layer.

It has a problem of protocol filtering into a model. The protocols are better hidden and can be easily replaced as the technology

changes.

TCP/IP MODEL:

The TCP/IP protocol stack is the de-facto standard in networking. TCP/IP model is an open standard is really been implemented in practice.

TCP/IP Model has four layers: Physical and Data link layer, Network layer, Transport layer, Application layer.

In TCP/IP different protocols may be defined within a layer, each performing different functions.

Sometime it is called Vertical approach TCP/IP model is an implementation of OSI model. TCP/IP model is defined after the advent of Internet. TCP/IP model doesn’t clearly distinguish between service, interval and

protocols. In TCP/IP model, the protocols came first and the model was really just a

description of existing protocols. In TCP/IP model the protocols are not hidden. The TCP/IP model supports both connection and connection-oriented

communication in transport layer. In TCP/IP it is not easy to replace the protocols. In TCP/IP there is no session layer; characteristics are provided by transport

layer. In TCP/IP there is no presentation layer; characteristics are provided by

application layer.

Physical Address

The Physical address is also known as link address. The address of a node is defined by its LAN or WAN. It is lowest-level address. The physical address uniquely identifies computer on the network. It is hexadecimal address hard coded into the network card. The size and format of the physical address vary, depending on the network. For example: Ethernet uses a 6-byte physical address that is imprinted on the NIC. Physical layer address is also known as a MAC address.

A MAC address is most often represented in hexadecimal, using one of two accepted formats:

00: 43: AB: F2: 32: 13 0043. ABF2. 3213

The first six hexadecimal digits of a MAC address identify the manufacturer of the physical network interface and referred to as the OUI (Organizational Unique

Identifier). The last six digits uniquely identify the host itself, and are referred to as the host ID

Obtaining your computer’s Physical address:

Click on start button and then select “Run” from menu. Type cmd and press Enter Then type ipconfig/all and press enter Then copy the Physical address exactly as it appears, for example in this

case Physical address: 00-19-D1-A4-F6-8E.

Example: In this figure, a node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 is the sender, and the computer with physical address 87 is the receiver.

Logical addressing

As we know that there is a host to host communication at the network layer and a computer needs to communicate with another computer somewhere in the world. The computers usually communicate through internet. For this level of communication, we need a global addressing scheme called logical addressing. The logical addressing is also known as IP addressing.

An IP address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. It is a numeric identifier that is assigned to each machine on an IP network. IPv4

addresses are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address at the same time. If a device operating at the network layer has m connections to the Internet, it needs to have m addresses. It designates the specific location of a device on the network. An IP address is a software address not a hardware address. The hardware address is coded on a network interface card (NIC) and is used for finding local hosts on a local network. IP addressing is used to provide communication between hosts on one network to host on a different network if the hosts are on different LANs.

Few terms related to the IP addressing are:

Octet – An octet is made up of 8 bits and is just an 8-bit ordinary binary number.

Network address – this is the designation of the address used in routing to send packets to a remote network. For example, 10.0.0.0, 192.168.10.0 is network addresses.

Broadcast address – the address that is used by applications and hosts to send information to all nodes on a network is called broadcast address. For example, 255.255.255.255, 10.255.255.255 etc.

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. IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion). This means that if there were no restrictions, more than 4 billion devices could be connected to the Internet.

Notations - There are two notations that are used to show an IP address – Binary notation and Decimal dotted notation.

Binary notation – In this type of notation, the IP address is denoted in the form of 32 bits. There are four octets which display the IP address.

For example: 01110101 10010101 00011101 00000010

Decimal dotted notation – in this type of notation, the addresses are written in the decimal form with a decimal point or dot separating the bytes. The decimal dotted notation is used to make the IP address more compact and easier to read. The value of each number in dotted decimal notation ranges from 0 to 255.

For example: 117.149.29.2

Types of IP addressing

The concept of IP addressing is divided into two types – Classful addressing and Classless addressing.

Classful Addressing

In this type of addressing, the address space is divided into five classes A, B, C, D and E. We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class.

Class A addresses – In a class A network address, the first byte is assigned to the network address and the remaining bytes are used for the host addresses. The first bit of class A address is always 0. Now if we turn the other 7 bits all off and then turn them all on, we will find the range of class A network addresses.00000000 - 001111111 - 127The format of class A address is given as: network.host.host.host

Class B addresses – In a class B network address, the first two bytes are assigned to the network address and the remaining two bytes are assigned to the host addresses. The first bit of the first byte must always be turned on but the second bit must always be turned off. If we turn off the other 6 bits all off and then all on, we will find the range of class B network addresses.10000000 – 12810111111 – 191The format of class B address is given as: network.network.host.host

Class C addresses – In a class C network address, the first 3 bytes are assigned to the network addresses and 1 byte to the host address. The first two bits of first byte must be always turned on but the third bit can never be on. Similarly, we can find the range of class C addresses as follows:11000000 – 19211011111 – 223The format of class B address is given as: network.network.network.host

Classes D and E addresses –The class D addresses ranges from 224 – 239 and is used for multicast addresses and the Class E ranges from 240-255 which is used for scientific purposes.

Blocks – The main problem of Classful addressing is that each class is divided into a fixed number of blocks with each block having a fixed size. Class A addresses were designed for large organizations with a large number of attached hosts or routers. Class B addresses was designed for midsize organizations with tens of thousands of attached hosts or routers. Class C addresses were designed for small organizations with a small number of attached hosts or routers. A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used. A block in class B is also very large, probably too large for many of the organizations that received a class B block. A block in class C is probably too small for many organizations.

Class Number of blocks Block size Application

A 128 16,777,216 Unicast

B 16,384 65,536 Unicast

C 2,097,152 256 Unicast

D 1 268,435,456 Multicast

E 1 268,435,456 Reserved

Mask – The length of the net id and host id (in bits) is predetermined in classful addressing but we can also use a mask. Mask is a 32-bit number made of contiguous 1s followed by contiguous 0s. But this concept does not apply to classes D and E. Default masks for classes A, B and C is given below:

Class Binary Dotted Decimal CIDR

A 11111111 00000000 00000000 00000000

255.0.0.0 /8

B 11111111 11111111 00000000 00000000

255.255.0.0 /16

C 11111111 11111111 11111111 00000000

255.255.255.0 /24

Subnetting and Supernetting

Subnetting

If an organization was granted a large block in class A or B, it could divide the addresses into several contiguous groups and assign each group to smaller networks (called subnets) or, in some cases, it can share part of the addresses with neighbors. Subnetting increases the number of 1s in the mask. Some important features of subnetting are:

Reduced Network traffic Optimized network performance Simplified management

Class A Subnetting Example

Consider the following subnetted Class A network: 10.0.0.0 225.225.248.0 Then the address and Subnet Mask

Clearly, 13 bits have been stolen to create the new subnet mask. To calculate the total number of new networks: 2n = 213= 8192 new networks created

There are clearly 11 bits remaining in the host portion of the mask:2n – 2 = 211 – 2 = 2048 – 2 = 2046 usable hosts per network

Supernetting

Due to fast growing of networks, time came when most of the class A and class B addresses were depleted but there was still a huge demand for midsize blocks. The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most organizations. Even a midsize organization needed more addresses. Then the concept of Supernetting was used. In supernetting, an organization combines several class C blocks to create a larger range of addresses. In other words, several networks are combined to create a super network or a super net. An organization can apply for a set of class C blocks instead of just one. For example, an organization that needs 1000 addresses can be granted four contiguous class C blocks. The organization can then use these addresses to create one super network. Supernetting decreases the number of 1s in the mask. For example, if an organization is given four class C addresses, the mask changes from /24 to /22.

Example:  Let's say we have four IP subnets on the four LAN interfaces of our router: 1.1.0.0/24, 1.1.1.0/24, 1.1.2.0/24, and 1.1.3.0/24. We want to summarize these networks into a single route that we can advertise across the WAN, which reduces the number of routes in the remote routers.

We could summarize these routes with this super net IP address: 1.1.0.0/22. This single IP address references all four of the IP subnets. Here's a look at it in binary form:

IP address : 00000001 00000001 00000000 0000000Supernet subnet mask : 11111111 11111111 11111100 0000000

Notice the third octet of the supernet subnet mask: 11111100. This allows the last two bits of the third octet to be any combination of 00, 01, 10, or 11. So this supernet mask would show that any of the four subnets are available from the router.

Classless Addressing

Classful addressing is almost obsolete therefore to overcome address depletion and give more organizations access to the Internet, classless addressing was designed and implemented. In this type of addressing, there are no classes, but the addresses are granted in blocks. In classless addressing, when an entity, small or large, needs to be connected to theInternet, it is granted a block (range) of addresses. The size of the block varies based on the nature and size of the entity. For example, a house may be given only

two addresses, a large organization may be given thousands of addresses, an ISP, as the Internet service provider, may be given thousands or hundreds of thousands based on the number of customers to whom it is providing services.

Rules for Classless addressing The addresses in a block must be continuous, one after another. The number of addresses in a block must be a power of 2 (1, 2, 4, 8…..) The first address must be evenly divisible by the number of addresses.

For Example: The figure shows a block of addresses, in both binary and dotted-decimal notation, granted to a small business that needs 16 addresses.

Mask in classless addressing:

In classless addressing a mask is a 32-bit number in which the n leftmost bits are 1s and the 32 − n rightmost bits are 0s. We can say that in IP addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask

First Address: The first address in the block can be found by setting the rightmost 32 − n bits to 0s. Last Address: The last address in the block can be found by setting the rightmost 32 − n bits to 1s.

For example: A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28 then we have to find out that which is the first and last address in the block? The binary representation of the addresses 205.16.37.39/28 = 11001101 00010000 00100101 00100111.

First address: If we set 32 − 28 rightmost bits to 0 then it become 11001101 0001000 00100101 0010000 or 205.16.37.32.

Last address: If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111 or 205.16.37.47.

Thank You.

Course : Bachelor Applied Physical Sciences (Computer Science)Year 3rd(Sem V)

Paper title : Computer NetworksPaper No. 17Lecture No. 6Tittle : Reference Models and Network Addressing

Summary

In this lecture, first we have discussed about the Network Interface Card which provides the hardware interface between a computer and a network. It helps in maintaining the computer’s network connections. It has a unique identifier called MAC address which is a 48 byte address written in hexadecimal form and is programmed onto the ROM chip. Then we explained the process of physical and logical addressing. In physical addressing, we discussed the physical address that uniquely identifies computer on the network. It is hexadecimal address hard coded into the network card. The size and format of the physical address vary, depending on the network. Then in logical addressing, we studied that the there is an IP address of 32 bits that uniquely defines the connection of a device to the Internet. It is a numeric identifier that is assigned to each machine on an IP network. Then we discussed about the binary notation and the decimal dotted notation used to denote the IP addresses. After that we explained the two types of IP addressing i.e. classful and classless addressing. In classful addressing, the addresses are divided into five classes labeled as A, B, C, D and E. Each class has its own range of addresses. Then we discussed about the subnetting and the supernetting of the classful addressing. Subnetting is the process of dividing the addresses into several contiguous groups and assigns each group to smaller networks called subnets whereas supernetting is the process of combining several networks to create a super network or a super net. In classless addressing, we studied that there are no classes, but the addresses are granted in blocks. The size of the block varies based on the nature and size of the entity.

Objective type

1. Which of these is the range of class C address ?a) 224-239b) 0-127c) 240-255d) 192-223

2. What is the subnet mask of class A address ?a) 11111111.00000000.11111111.00000000b) 11111111.11111111.11111111.00000000c) 11111111.00000000.00000000.00000000d) 11111111.11111111.00000000.00000000

3. Full form of NIC isa) Network Internet Cardb) Network Interface Cardc) Network Implementation Cardd) Network Internal Card

4. Which one of these is the another name for physical address ?a) IP addressb) Logical addressc) MAC address

KEY: 1 – d, 2 – c, 3 – b, 4 - c

Course : Bachelor Applied Physical Sciences (Computer Science)Year 3rd(Sem V)Paper title : Computer NetworksPaper No. 17Lecture No. 6Tittle : Reference Models and Network Addressing

FAQ

1. Explain the concept of Physical addressing.

Ans : The Physical address is also known as link address. The address of a node as defined by its LAN or WAN. It is lowest-level address. The physical address uniquely identifies computer on the network. It is hexadecimal address hard coded into the network card. The size and format of the physical address vary, depending on the network. For example: Ethernet uses a 6-byte physical address that is imprinted on the NIC. LocalTalk (Apple) however has a 1-byte dynamic address that changes each time the station comes up. Physical layer address also known as a MAC address.

2. What is the difference between Classful and classless addressing ?

Ans : In this type of addressing, the address space is divided into five classes A, B, C, D and E. We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class whereas to overcome address depletion and give more organizations access to the Internet, classless addressing was designed and implemented. In this type of addressing, there are no classes, but the addresses are granted in blocks. In classless addressing, when an entity, small or large, needs to be connected to the Internet, it is granted a block (range) of addresses. The size of the block varies based on the nature and size of the entity.

3. Differentiate between Subnetting and Supernetting.

Ans : If an organization was granted a large block in class A or B, it could divide the addresses into several contiguous groups and assign each group to smaller networks (called subnets) or, in some cases, it can share part of the addresses with neighbors and in the case of supernetting

Course : Bachelor Applied Physical Sciences (Computer Science)Year 3rd(Sem V)Paper title : Computer NetworksPaper No. 17Lecture No. 6Tittle : Reference Models and Network Addressing

Glossary

ISO : International organization for standardization.

De-facto : Standards that have not been approved by an organized body but

Have been adopted as standards .

Unicaste: One to one communication between sender and the receiver.

Multicaste : It is the communication process in which there is one sender but

many receivers

ISP: Internet service provider.

IPv4 : The Internet addresses are 32 bits in length, so the a maximum number of address are of 232 =4294967296 addresses. These addresses are referred to as IPv4 (IP version 4) addresses or simply IPaddresses

Course : Bachelor Applied Physical Sciences (Computer Science)Year 3rd(Sem V)Paper title : Computer NetworksPaper No. 17Lecture No. 6Tittle : Reference Models and Network Addressing

References:

CCNA guide, todd lamle.

Links

http://computer.howstuffworks.com/router7.htm

http://www.eng.um.edu.mt/~vjbutt/beng4/TCP-IP-Handouts.pdf

http://novellaqalive2.mhhe.com/sites/dl/free/007000000x/216445/Chap19.pdf

http://networking.xtreemhost.com/wp/?p=326

http://www.techrepublic.com/article/cisco-ip-subnetting-101-an-introduction-to-supernetting/

Course : Bachelor Applied Physical Sciences (Computer Science)Subject : Computer NetworkPaper No. 17Lecture No. 5Tittle : Reference Models and Network Addressing

Objective :

The objective of this lecture is to first understand the difference between OSI /ISO reference model and TCP/IP model .Second to understand the concept of addressing along with its types .