Presentation is loading. Please wait.

Presentation is loading. Please wait.

3 Het IP-Protocol. 3 IP-protocol Services Routing Multiple client protocols Datagram delivery Independant from the Network Interface Layer Fragmentation.

Similar presentations


Presentation on theme: "3 Het IP-Protocol. 3 IP-protocol Services Routing Multiple client protocols Datagram delivery Independant from the Network Interface Layer Fragmentation."— Presentation transcript:

1 3 Het IP-Protocol

2 3 IP-protocol Services Routing Multiple client protocols Datagram delivery Independant from the Network Interface Layer Fragmentation and reassembly Extensible through IP options Packet switching technology

3 3  IP Header 20 bytes 4-bit version 4-bit hea- der length 8-bit type of service(TOS) 16-bit total length (in bytes) 16-bit identification 3-bit flag 13-bit fragment offset 8-bit time to live (TTL) 8-bit protocol16-bit header checksum 32-bit source IP address 32-bit destination IP address Options (if any) data 0 151631

4 3

5 3 Conversie IP Adres van Binair naar Decimaal Formaat 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 128 64 32 16 8 8 4 4 2 2 1 1 8 Bits 255 Decimal Value

6 3 Netwerk ID en Host ID Network IDHost ID 32 Bits w. x. y. z. 131.107.3.24 Example: Class B

7 3

8 3 Address Class Summary Number of Networks Number 126 16,384 2,097,152 Number of Hosts per Network Number of Hosts per Network 16,777,214 65,534 254 Class A Class B Class C Range of Network IDs (First Octet) Range of Network IDs (First Octet) 1 – 126 128 – 191 192 – 223

9 3 Assigning Network IDs

10 3 Network Addressing Guidelines Network ID Must Be Unique 127 Is Reserved for Diagnostic Loopback Functions Network ID Cannot Be all 255 (All Bits Set to 1) 255 is a broadcast address Network ID Cannot Be all 0 (All Bits Set to 0) 0 indicates a local network

11 3 Assigning Host IDs

12 3 Host Addressing Guidelines Host ID Must Be Unique to the Network ID Host ID Cannot Be 255 (All Bits Set to 1) 255 is a broadcast address Host ID Cannot Be 0 (All Bits Set to 0) 0 means “this network only”

13 3 Common Addressing Problems Network IDs on the Local Network Don’t Match Local hosts cannot communicate Host IDs on the Local Network Are Duplicate Windows NT–based hosts cannot initialize Other TCP/IP-based hosts may not be able to communicate Other TCP/IP-based hosts could hang

14 3 How to choose/assign IP-addresses ? Internet Service Provider ICANN - Internet Corporation for Assigned Names and Number RIPE – ARIN – APNIC – LACNIC - AfriNIC Private Address Space (RFC 1918) 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255

15 3 Loopback interface 127.0.0.1 name localhost IP output function IP input function Place on IP input queue Loopback driver Ethernet driver Dest. IP = broadcast or multicast ? Place on IP input queue yes Dest. IP = interface address ? no yes Ethernet IP driver

16 3 Exercise

17 3 Excercise Connect two pc’s to a hub and assign an ip-address from the same network. Issue a ping command from one to the other. Do the same with ip-addresses from different networks Find the public address space assigned to your company (or any company that you know)

18 3 The Domain Name System An Alias Used to Reference a TCP/IP Host A Fully Qualified Domain Name (FQDN) Example: ftp.microsoft.com Provides a Simplified Way to Access a TCP/IP Host Used by Ping and Other TCP/IP Utilities Entries Are Stored in the HOSTS File or DNS Viewed with the nslookup Utility

19 3 IP addressing summary Network part: all host bits 0 193.58.9.0 First ip address : 193.58.9.1 Broadcast address: all host bits 1 193.58.9.255

20 3 Overview Subnetting What Is a Subnet? Subnet Addressing What Is a Subnet Mask? Defining a Subnet Mask Defining Network IDs for an Internetwork Defining Host IDs for Subnets

21 3 What Is a Subnet Mask? Distinguishes the Network ID from the Host ID Used to Specify Whether the Destination Host is Local or Remote

22 3 Default Subnet Masks (No Subnetting) Bits Used for Subnet Mask AddressClass Dotted Decimal Notation Notation Class A Class B Class C Class A Class B Class C 11111111000000000000000000000000 11111111111111110000000000000000 11111111111111111111111100000000 11111111000000000000000000000000 11111111111111110000000000000000 11111111111111111111111100000000 255.0.0.0 255.255.0.0 255.255.255.0 255.0.0.0 255.255.0.0 255.255.255.0 Class B Example 16.200131.107. 0.0255.255. 131.107. w.x. IP Address Subnet Mask Network ID Host ID 16.200 y.z

23 3 10011111111000000000011110000001 11111111111111110000000000000000 10011111111000000000011110000001 11111111111111110000000000000000 10011111111000000000000000000000 IP Address Subnet Mask IP Address Subnet Mask Result How IP Determines If a Packet Is Destined Locally or Remotely Local IP and Destination IP are ANDed with Mask 1 AND 1 = 1 Other combinations = 0 If ANDed results of source and destination hosts match, the destination is local

24 3 Problem : Waste of address space ! Inefficient use of address space 193.107.8.z 193.107.16.z 193.107.24.z 193.107.8.1 193.107.16.2 193.107.16.1 193.107.24.1 AB We only use 2 address out of 254

25 3 How is subnetting done? 131.107.3.27 Subnet 1 131.107.10.0 255.255.255.0 Subnet 1 131.107.10.0 255.255.255.0 131.107.10.12 Subnet 2 131.107.3.0 255.255.255.0 Subnet 2 131.107.3.0 255.255.255.0 131.107.12.7 131.107.12.0 131.107.12.31 Main Network Borrow bits from host part All hosts on same segment have same subnet number Subnet 3 131.107.12.0 255.255.255.0 Subnet 3 131.107.12.0 255.255.255.0

26 3 Examples of a Custom Subnet Mask (Subnetting) Bits Used for Subnet Mask AddressClass Dotted Decimal Notation Notation Class ? 11111111 11111111 0000000000000000 11111111111100000000000000000000 11111111111111111111111100000000 11111111111111111111000000000000 11111111 11111111 0000000000000000 11111111111100000000000000000000 11111111111111111111111100000000 11111111111111111111000000000000 255.255.0.0 255.240.0.0 255.255.255.0 255.255.240.0 255.255.0.0 255.240.0.0 255.255.255.0 255.255.240.0 Class B Example 131.107.16. 255.255.255. 131.107. w.x. IP Address Subnet Mask Network ID Subnet ID Host ID w.x.y. 200 0 y.z 16. 200 z

27 3 IP Addresses 131.107.35.200 131.107.61.26 Subnet Mask Using the Subnet Mask to Determine If a Host Is Local or Remote Comparing Two Network IDs Does Not Always Indicate a Local or Remote Host Example 1 153.170.37.16 217.170.172.233 Example 2 131.107.35.200 131.107.61.26 Compare Both Addresses to a Subnet Mask to Determine Location 255.255.0.0, or 255.255.255.0 Same Network? Yes No

28 3 Determining the Number of Subnet Mask Bits Class B Network IDHost ID 1 Subnet Mask Number of Subnets 0 2... 254 Number of Hosts Subnet Mask Host ID 16,382...... 254

29 3 Defining a Subnet Mask Determine the Number of Subnets Convert the Number of Subnets to Binary Convert the Required Number of Bits to Decimal (High Order) 1 1 2 2 3 3 Example of Class B Address Number of Subnets Binary Value Convert to Decimal 6 0 0 0 0 0 1 1 0 = 6 (3 Bits) 4+2 255. 255. 224. 0 11111111111111111110000000000000 3

30 3 Shortcut to Defining Network IDs List the Number of Bits (High Order) Used for Subnet Mask Convert the Bit with the Lowest Value to Decimal Increment the Value for Each Bit Combination 11100000 32 w.x.32.1w.x.63.254 w.x.64.1w.x.95.254 1 1 2 2 3 3 0 + 32 = 32 + 32 = 64 + 32 = 96 + 32 = 128 + 32 = 160 w.x.96.1w.x.127.254 w.x.128.1w.x.159.254 w.x.160.1w.x.192.254

31 3 Defining Host IDs for a Subnet Subnet IDs Host ID Range “Invalid” x.y.32.1 – x.y.63.254 x.y.64.1 – x.y.95.254 x.y.96.1 – x.y.127.254 x.y.128.1 – x.y.159.254 x.y.160.1 – x.y.191.254 x.y.192.1 – x.y.223.254 “Invalid” x.y.32.1 – x.y.63.254 x.y.64.1 – x.y.95.254 x.y.96.1 – x.y.127.254 x.y.128.1 – x.y.159.254 x.y.160.1 – x.y.191.254 x.y.192.1 – x.y.223.254 “Invalid” 00000000 = 0 00100000 = 32 01000000 = 64 01100000 = 96 10000000 = 128 10100000 = 160 11000000 = 192 11100000 = 224 00000000 = 0 00100000 = 32 01000000 = 64 01100000 = 96 10000000 = 128 10100000 = 160 11000000 = 192 11100000 = 224 Each Subnet ID Indicates the Beginning Value in a Range The Ending Value Is One Less Than the Beginning Value of the Next Subnet ID

32 3 Subnet Addressing Determine the Number of Required Network IDs One for each subnet One for each wide area network connection Determine the Number of Required Host IDs per Subnet One for each TCP/IP host One for each router interface Define One Subnet Mask Based on Requirements Define a Unique Network ID for Each Subnet Based on the Subnet Mask Define Valid Host IDs for Each Subnet Based on the Network ID

33 3 Exercise: Subnetting

34 3 Example : Assign subnets 210.10.10.0/24 10

35 3 Excercise : Assign subnets (subnet zero is valid) Internet 100 193.58.2.0 / 24 28 50 10 40 193.58.1.0 /24 6 193.58.3.0 / 24 2 2 40

36 3 Solution Network#bitsMask#hostsFirstLastBroadcast 193.58.9.024255.255.255.0254193.58.9.1193.58.9.254193.58.9.255 193.58.9.025255.255.255.128126193.58.9.1193.58.9.126193.58.9.127 193.58.9.12825255.255.255.128126193.58.9.129193.58.9.254193.58.9.255 100 193.58.2.0 / 24 193.58.1.0 /24 193.58.3.0 / 24 1111111111111111 11111111 10000000 255. 255. 255. 128

37 3 Excercise : Assign subnets (subnet zero is valid) Internet 193.58.1.0 /25 193.58.1.128 /25 193.58.2.0 /25 193.58.2.0 / 24 193.58.3.192 / 27 193.58.3.0 / 26 193.58.2.192 /26 193.58.2.128 /26 193.58.3.224 / 28 193.58.3.64 / 26 193.58.1.0 /24 193.58.3.240 / 29 193.58.3.0 / 24 193.58.3.248 / 30 193.58.3.252 / 30 193.58.3.128 / 26

38 3 50 Internet 192.168.1.0 / 24 10 20 30 40 Excercise : Assign subnets (subnet zero is valid)

39 3 Exercise 25.158.7.89/19 Define network mask Define network Define first ip address Define last ip address Define broadcast address

40 3 Review What Is a Subnet? Subnet Addressing What Is a Subnet Mask? Defining a Subnet Mask Defining Network IDs for an Internetwork Defining Host IDs for Subnets

41 3 Commands netstat Network connections and routing table Unix - Windows NT ifconfig interface information Unix winipcfg Windows 95/98 ipconfig Windows NT/2000

42 3 Classless Interdomain Routing (CIDR) Exhaustion IP address space No class A - B and C w.x.y.z/s with 1 <= s < = 32 Route aggregation


Download ppt "3 Het IP-Protocol. 3 IP-protocol Services Routing Multiple client protocols Datagram delivery Independant from the Network Interface Layer Fragmentation."

Similar presentations


Ads by Google