380 likes | 605 Vues
IP Addressing. Background. There are 3 types of networks. Individual computer, computer network(homogeneous network),non homogeneous network. A message pertaining to a non-homogeneous network is . SIO. OPC. DPC. CIC. Actual Message . label. Service information octet. Identifying a node.
E N D
Background • There are 3 types of networks. • Individual computer, computer network(homogeneous network),non homogeneous network. • A message pertaining to a non-homogeneous network is SIO OPC DPC CIC Actual Message label Service information octet
Identifying a node • A node has to be identified so that in the label we can input from which node a message has to be transferred ,to the recipient node. • These information will be given in OPC(Originating point code) and DPC(Destination .. ….) • CIC stands for (Circuit identification code), the route the message travels from the origination to the termination. In order to understand this we will first examine how a telephone network operates.
Sri Lanka Telephone Networks Fixed Lines Mobile .A SLT Dialog Suntel Mobitel Hutch Lanka Bell Tigo There are 3 operators Airtel There are 5 operators
How to identify the network? • In a fixed network • SLT digit 2 indicates for wire lines Digit 3 indicates CDMA(wireless lines) All the other operators suntel and lankabell will have 4 and 5 to identify their network. 7 digits Area code 2,3 SLT 5 Lanka bell 5 Suntel
In a fixed telephone Network • Identifying the network will be from the network number , this number is available after the area code (Area Code+ Network Number) for fixed operators. • For eg: Ratnapura area code is 45 , Ratnapura SLT numbers starting with 45 2 or 3, Lankabell no’s 45 5 • How many telephones can SLT provide to Ratnapura area? • How many telephones the Lanka Bell can provide in Ratnapura area? • Area code of Sri Lanka is given in the attached annexure • How many telephones each operator can provide in Sri Lanka”? • How many mobile telephones and how many fixed telephones in a given geographical area?
Sri Lankan numbering plan Fixed Line • , Area code Network number Individual customer identification Mobile
How to identify the operator in the mobile network? • No Area code • How many telephones could be provided by dialog for the whole of Sri Lanka? • Answer: 10 million subscribers. 9 digits
Sub-Network • Local Area Network or PBX(Private Branch Exchanges) • Suppose there are 800 telephones in your university. • Do you want to have direct lines? • Within the campus , do you want to dial full number of a given telephone?
Sub Network Numbering • Sabaragamuwa campus can be provided with 3 digits to identify each telephone in the campus.(Assume 1000 telephones in the campus) • Hence the least significant 3 digits of the numbering plan has to be privately used by the campus . • Let’s analyze that the campus has decided to select SLT as the network operator. • The campus should have the national numbering ,045 2 XXX YYY . • The SLT operator will allocate XXX from their numbering resources, for eg: We assume 200 • Then the campus authority is having the freedom to allocate 1000 numbers for a particular location, i.eYYY digits • Hence the telephone number of the campus for external uses will be 045 2 200YYY, where as with in the campus , it can be only YYY
The concept of sub numbering(Local Area Network) If any extension dials more than 3 digits implies an outbound call from the university network, this will be analyzed by the campus PAPX and call be routed accordingly (Direct outward dialing) • . SLT Network 000 University Of Sabaragamuwa 001 002 Local Numbers 999 045 2 200 999 (Direct inward dialing)
The concept of sub numbering(Wide Area Network) • Assume 4 universities such as sabaragamuwa, Ruhuna, peradeniya and colombo to be provided with 10,000 extensions with the following breakdown • Peradeniya-4000, Colombo- 3000, Sabaragamuwa-2000, Ruhuna-1000 • Assume that the entire network is interconnected as 1 network so that 1 area code could be allocated . • Assume 90 as the area code which will be provided by the government. • Assume SLT as the network operator, then the network operator code will be 2. • Since there are 10,000 extensions in the numbering plan , the least significant 4 digits are allocated for extension numbers. • The Wide area internal numbering plan can be as follows:
Wide area network internal numbering. • Peradeniya 0YYY , 1YYY, 2YYY,3YYY (4000 extensions) • Colombo 4YYY,5YYY,6YYY(3000 extensions) • Sabaragamuwa 7YYY,8YYY(2000 extensions) • Ruhuna 9YYY(1000 extensions ) • Any srilankan dialing this Wide area network will dial 10 digits.They are as follows: • 090 2 XX YYYY , XX can be any 2 digits which will be allocated by SLT, assume it as 00 • Then the wide area network numbering will be • 090 2 00 Y1 Y2 Y3 Y4 , where Y1 denotes the University , • Y1=0,1,2,3 represents ‘Peradeniya’ … etc
Wide Area Network working (Direct outward dialing) • . SLT Network Sabaragamuwa 000 001 002 Ruhuna Colombo Peradeniya 9999 090 2 00 9999 (Direct inward dialing)
Telephone network in the world • Inorder to complete the analysis on telephone numbering let’s try 2 understand about how the world telephones operates. • CCITT has decided 15 digits as the total length • How many telephones in the world you can have? • 1 peta telelphones(10 10) Country code …….. 15 digits
Numbering of computer networks. • Similar to the telephones a computers to communicate through the internet the packets transmitted may pass through several LANs and WANs before reaching the destination computer • For this level of communication we need a global addressing scheme • Today the term IP address is used to mean a logical address in the network layer of the TCP/IP protocol suite. • IPv4 was standardised by Internet Engineering Task Force (IETF) in 1981 • Every machine on internet has a unique identifying number which is known as IP Address. An example of an IP address is shown below • 216.27.61.137
Basics of IP address • Any computer element connected to a computer network such as internet will be identified by 32 bits(We learned analogy in the telephone network this as 15 digits) • The number of computers that could be connected to the internet is : 2 to the power 32) • In order to save the addresses unlike telephones the IP addresses will be provided to customers as dynamic(means only when the computer is connected to the network , a temporary IP address will be provided by the service provider.) or static (similar to telephone network , one permanent IP address will be allocated) The ADSL line will provide static IP addresses while ILL will provide dynamic IP addresses. • IP address is normally shown in dot decimal format : 32 bits consists of 4 bytes and each byte will be converted to denary • What we have studied up to now is IPv4(version 4 , still using) • In future IPv6 will be used and where 128 bits are there instead of 32 bits , so that much more computers can be provided with fixed (static) IP address.
The characteristics of IP Address • World Wide Web(WWW) doesn’t differentiate countrywise,unlike telephone networks. • Each terminal will be defined by 32 bits , as an IP address. • The IP address has been structured according to the networks and the number of computers in that network that is going to be operated . • Hence the IP address can be segregated into network and the host . • There are two types of addressing method in IP. Classful and Classless • At the inception of IP, Classful addressing was used. However later moved towards Classless addressing. • In classful addressing consist of 5 types. They are Class A, Class B, Class C, Class D, Class E
Dot decimal IP Address . 8 Bits 8 Bits 8 Bits 8 Bits 0 7 Bits Class A Class B Class C Class D Class E Hosts Network 10 14 Bits Network Hosts 110 Network Hosts 1110 0
Summary of Classful addressing contd… • Disadvantage of classful addressing is each class is divided into a fixed number of blocks consisting of fixed number of addresses. • A large part of the available addresses are wasted. Hence this method is becoming obsolete. • To somewhat overcome the wastage of addresses subnetting was introduced during classful addressing era
Introduction to Subnet • The two level hierarchy (network and host numbers) were initially thought to be sufficient, but by 1984, it became clear that a third hierarchical level was needed and so the “subnet” was added to the hierarchy at that time • Large block of class A and B is divided into several groups and each group is assigned to smaller networks (called subnets) • A subnet was added into the HOST • Shown in the diagram. • Why?
Introduction to Subnet contd… • Because we can control the number of hosts we want to allocate if we have another function. • That is, if we want more hosts there will be less subnet bits and if we want less hosts we can have more subnets. • In that way, Hosts wont be wasted neither used less!
Subnet Example 1 Let’s find the corresponding Network, Subnet and Host for a given IP address and a subnet Mask. IP Address : 10.27.32.100 Subnet Mask : 0xFFFF0000 Step 1 Turn both of them into Binary format IP address : 0000 1010 0001 1011 0010 0000 0110 0100 Subnet Mask : 1111 1111 1111 1111 0000 0000 0000 0000 Step 2 Identify which class is IP address. Since it starts from 0, The class is A. Class A : 7 bit Net , 24 bits Host
Step 3 AND both Subnet and IP address together IP Add : 0000 1010 0001 1011 0010 0000 0110 0100 Sub Net : 1111 1111 1111 1111 0000 0000 0000 0000 Result : 0000 1010 0001 1011 0000 0000 0000 0000 Step 4 Observe the result. The last bits which are 0’s represent number of Host. In this example, Number of 0’s (in the end of result ) are 16 bits. So the corresponding binary of the 0’s in results are taken in the IP address. Which would come to 0010 0000 0110 0100 = 32.100 So the HOST is 32.100
Step 5 IP Add : 0000 1010 0001 1011 0010 0000 0110 0100 Sub Net : 1111 1111 1111 1111 0000 0000 0000 0000 Result : 0000 1010 0001 1011 0000 0000 0000 0000 We know that number of host bits in this example are 16 bits. This is Class A address and they have 24 bits for Host + Subnet So the Subnet bits are 24 – 16 = 8 bits Imagine you have no 0’s in the end of the result (It is for the HOST not for subnet!) That would leave the result as 0000 1010 0001 1011 Take 8 bits from the least significant bit which would give 0001 1011 = 27 So the SUBNET is 27.
Step 6 The rest is simple! Result : 0000 1010 0001 1011 0000 0000 0000 0000 Ignore the bits allocated for Host and Subnet in the result. That would leave 0000 1010 = 10 So the Network is 10 Result IP Address : 10.27.32.100 : 0000 1010 0001 1011 0010 0000 0110 0100 Subnet Mask : 0xFFFF0000 : 1111 1111 1111 1111 0000 0000 0000 0000 Network : 10 Host : 32.100 Subnet : 27
Now, few examples for you 1. IP Address : 136.27.33.100 Subnet Mask : 0xFFFFFE00 2. IP Address : 136.27.34.141 Subnet Mask : 0xFFFFFE00 3. IP Address : 193.27.32.197 Subnet Mask : 0xFFFFFFC0
Answers 1.
Answers 2.
Answers 3.
Classless Addressing • To overcome address depletion classless addressing was designed • In this scheme there are no classes but the addresses are still granted in blocks • Restrictions: • The addresses in a block must be contiguous, one after another. • No. 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. • Example A block of 4 addresses is granted to a small office. First 205.16.37.32 Last 205.16.37.35 • We see that the addresses are contiguous. The number of addresses is a power of 2 (4= 22), an the first address is divisible by 4. The first address, when converted to a decimal number is 3,440,387,360, which when divided by 4 results is860,096,840
Classless Addressing contd.. • Mask…….
Example A block of addresses is granted to a small organisation. We know that one address is 205.16.37.39/28.Find the first address, last address and the number of addresses assigned to the organisation. Solution Binary representation is 11001101 00010000 00100101 00100111. we set 32-28 rightmost bits to 0 11001101 00010000 00100101 00100000 Hence the first address is 205.16.37.32 Last address Set 32-n rightmost bits in binary to 1s 11001101 00010000 00100101 00101111 Hence the last address is 205.16.37.47 Number of addresses The value of n is 28. Hence the no. of addresses is 232-28 = 16 NOTE: The first address in a block is used as the network address to represent the organisation to the rest of the world and is not assigned to any device.