1 Subnetting,Supernetting, VLSM & CIDR
2 WHAT - IP Address Unique 32 or 128 bit Binary, used to identify a system on a Network or Internet. Network Portion Host Portion
3 CLASSFULL ADDRESSING IP address space is divided into five classes: A, B, C, D, and E.
4 Network and Host IDs Each IP address is divided into two parts Network part, defined by netid identifies a network Host part, defined by hostid identifies a host within a network
5 Class A Address 0 NET HOST HOST HOST Network Bits = 7 No.of Networks = = 127 Host Bits = 24 No.of Host/NW = = 16 Million Range : to
6 Class B Address 10 NET NET HOST HOST Network Bits = 14 No.of Networks = = 16,383 Host Bits = 16 No.of Host/NW = = 65,234 Range : to
7 Class C Address 110 NET NET NET HOST Network Bits = 21 No.of Networks = = 2 Million Host Bits = 8 No.of Host/NW = = 254 Range : to
8 Special Purpose IP Addresses Private IP Address Default NW Address Broadcast Address Loopback Address
9 Private IP Addresses Private addresses are not recognized globally Private address often used together with NAT techniques
10 Other Special Addresses There are several addresses within each class that are reserved for such special purposes as broadcast.
11 Direct Broadcast Direct broadcast sends a message to all the hosts within a specific network. Direct broadcast address consists of network id followed by all 1s.
12 Limited Broadcast Limited broadcast sends a message to all the hosts within THIS network. Limited broadcast address consists of all 1s.
13 This Host on This network The network address that consists of all 0s indicates this host on this network. Used at the bootstrap time when host does not know its IP address. This address is used as a source address in limited broadcast message to determine its IP address. Can only be used as a source address.
14 Specific Host on This network The network address that consists of all 0s for netid and specific value for hostid is destined to a specific host on THIS network Used a host to send a message to another host on same network. This address can only be used as destination Usually class A addresses
15 Loopback Address IP address with first byte value of 127 is used for the loopback address. Packets with such destination address never leave the machine Loopback can be used only as destination address Loopback is class A address which reduces the number of class A addresses by 1 block Loopback address can be used for Testing IP software, Sending a message between client and server programs located on the same machine, etc
16 SUBNETTING & NETMASKS
17 SUBNETTING WHAT Subnetting is dividing a network into several smaller parts (subnets), each having its own sub-network address. Traditional Internet uses two-level address hierarchy: netids and hostids Subnetting provides another, third, level of hierarchy. Network Portion Subnet Portion Host Portion
18 SUBNETTING WHY More EFFICIENT & STRUCTURED utilization of IP Address In subnets we use Subnet Mask or NetMask
19 SUBNET MASK OR NETMASK WHAT A Bit stream of Contiguous ONES & ZEROS WHY Its used to determine network part of the address for a given IP address.
20 SUBNET MASK OR NETMASK TYPES Natural / Default Network Mask Custom / Subnet Mask
21 Creating Subnets Using Masks WE EXTEND THE NETWORK PORTION INTO HOST Mask is a 32 bit number that consists of Consecutive 1s indicating bits that belong to the network part of address followed by Consecutive 0s indicating bits that do not belong to network part of the address Bit-wise AND operation between the IP address and mask results in the network part of the address
22 Subnet Masks Subnet masks operate the same way as default masks. Unlike default classful masks, subnet masks are required to identifying the subnetwork.
24 SUPERNETTING Supernetting is combining several small networks (e.g. of class C) into a big one to create a large range of addresses.
25 Supernetting In supernetting, the first address of the supernet and the supernet mask define the range of addresses. CIDR notation is applicable to suppernetting as well. For example: /21 Shows that address belongs to supernet of class C networks with mask Since 248 = , 8 class C networks were combined together to create a supernet.
26 VLSM Variable Length Subnet Mask
27 VLSM - Purpose To increase usability of Subnets Using classical subnetting the subnets are of same size Using VLSM the subnets can be of VARIABLE SIZE
28 VLSM Eg : a Class C, NW need to be divided into 110,45,50 Hosts? Available Options 1 : Natural NW Mask Class C is Which will provide nothin but 254 hosts under 1 NW
29 VLSM Eg : a Class C, NW need to be divided into 110,45,50 Hosts? Available Options 2 : The Subnet Mask of the form X X(in Binary) X No of Subnets No of Hosts
30 VLSM -option Eg : a Class C, NW need to be divided into 110,45,50 Hosts? > Hierarchical Subnetting
31 ARP ARP Cache Package
32 Encapsulation of ARP packet
33 Hardware Type Protocol Type Hardware Length Protocol Length Sender Hardware address Operation Sender Protocol address Target Hardware address Target Protocol address
34 ARP Packet Format Hardware Type Protocol Type Hardware Length Protocol Length Sender Hardware address Operation Sender Protocol address Target Hardware address Target Protocol address
35 Proxy ARP
36 ARP Package
37 ARP Package Cache Table Queues Output Module Input Module Cache Control Module
38 ARP Cache Table STATE H/W Type Protcol Type H/W Length Protcol Length I/F Num Q Num Attempt TO H/W Addr Protcl Addr Res Pen Free
39 ICMP Internet Control Message Protocol
40 Why ICMP
41 What it Does IP Deficiencies Lack of Error Control Lack of Assistance Mechanisms I C M P Error Reporting Query Messages
42 ICMP TYPES OF MESSAGES MESSAGE FORMAT ERROR REPORTING MSG QUERY MSG ICMP PACKAGE
43 ICMP Encapsulation
44 ICMP Encapsulation ARP Reply / Request
45 ICMP TYPES OF MESSAGES MESSAGE FORMAT ERROR REPORTING MSG QUERY MSG ICMP PACKAGE
46 ICMP TYPES OF MESSAGES
47 ICMP MESSAGE TYPES
48 ICMP MESSAGE FORMAT ERROR REPORTING MSG QUERY MSG
49 General format of ICMP messages Category Type Message Error Reporting Messages Query Messages 3 Destination Unreachable 4 Source Quench 11 Time Exceed 12 Parameter Problem 5 Redirection 8 / 0 Echo Req / Rep 13 / 14 Timestamp Req / Rep
50 ICMP MESSAGE FORMAT ERROR REPORTING MSG QUERY MSG
51 Error Reporting Messages ICMP always reports error messages to the original source 1. No ICMP error message for a datagram carrying an ICMP error message. 2. No ICMP error message for a fragmented datagram that is not the first fragment. 3. No ICMP error message for a datagram having a multicast address. 4. No ICMP error message for a datagram with a special address such as or
52 Error reporting message Types
53 Destination Unreachable
54 CODE 0 : Network Unreachable CODE 1 : Host unreachable CODE 2 : Protocol Unreachable CODE 3 : Port Unreachable CODE 4 : Fragmentation is required, but DF (do not Frag) is enabled CODE 5 : Source routing enabled, but couldn t accomplish CODE 6 : Dest N/W is unknown CODE 7 : Dest Host is unknown CODE 8 : Source Host Isolated CODE 9 : Dest N/W is administratively Prohibited CODE 10 : Dest Host is administratively Prohibited
55 CODE 11 : Network Unreachable for a specified type of service CODE 12 : Host Unreachable for a specified type of service CODE 13 : Communication administratively prohibited (administrative filtering prevents packet from being forwarded) CODE 14 : Host precedence violation (permission denied for the combination of host or network and port) CODE 15 : Precedence cutoff in effect (precedence of datagram is below the level set by the network administrators)
56 CODE 11 : Network Unreachable for a specified type of service CODE 12 : Host Unreachable for a specified type of service CODE 13 : Communication administratively prohibited (administrative filtering prevents packet from being forwarded) CODE 14 : Host precedence violation (permission denied for the combination of host or network and port) CODE 15 : Precedence cutoff in effect (precedence of datagram is below the level set by the network administrators)
57 Error reporting message Types
58 Source Quench
59 Source Quench A source quench message informs the source that a datagram has been discarded due to congestion in a router or the destination host. The source must slow down the sending of datagrams until the congestion is relieved. One source quench message is sent for each datagram that is discarded due to congestion.
60 Error reporting message Types
61 Time Exceeded
62 Time Exceeded Whenever a router decrements a datagram with a time to live value to zero, it discards the datagram and sends a time exceeded message to the original source. When the final destination does not receive all of the fragments in a set time, it discards the received fragments and sends a timeexceeded message to the original source.
63 Error reporting message Types
64 Parameter problem message Code 0 : Error on Header (Value of pointer points to the byte with problem) Code 1 : Options missing
65 Error reporting message Types
66 Redirection Message
67 Redirection Concept
68 Query message Types
69 Echo Request Reply Message
70 Echo Request Reply An echo request message can be sent by a host or router. An echo reply message is sent by the host or router which receives an echo request message. Echo request and echo reply messages can be used by network managers to check the operation of the IP protocol. Echo request and echo reply messages can test the reachability of a host. This is usually done by invoking the ping command.
71 Timestamp Request Reply Message
72 Timestamp Request Reply Message Timestamp request and timestamp reply messages can be used to calculate the round trip time between a source and a destination machine even if their clocks are not synchronized. The timestamp request and timestamp reply messages can be used to synchronize two clocks in two machines if the exact one way time duration is known.
73 Checksum In ICMP the checksum is calculated over the entire message (header and data).
74 Lets have an example of checksum calculation for a simple echorequest message. We randomly chose the identifier to be 1 and the sequence number to be 9. The message is divided into 16 bit (2 byte) words. The words are added together and the sum is complemented. Now the sender can put this value in the checksum field.
75 DEBUGGING TOOLS Ping Traceroute
76 PING The ping program to test the server fhda.edu. The result is shown below $ ping fhda.edu PING fhda.edu ( ) 56 (84) bytes of data. 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=0 ttl=62 time=1.91 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=1 ttl=62 time=2.04 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=2 ttl=62 time=1.90 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=3 ttl=62 time=1.97 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=4 ttl=62 time=1.93 ms
77 PING 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=5 ttl=62 time=2.00 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=6 ttl=62 time=1.94 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=7 ttl=62 time=1.94 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=8 ttl=62 time=1.97 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=9 ttl=62 time=1.89 ms 64 bytes from tiptoe.fhda.edu ( ): icmp_seq=10 ttl=62 time=1.98 ms --- fhda.edu ping statistics packets transmitted, 11 received, 0% packet loss, time 10103ms rtt min/avg/max = 1.899/1.955/2.041 ms
78 Traceroute We use the traceroute program to find the route from the computer voyager.deanza.edu to the server fhda.edu : $ traceroute fhda.edu traceroute to fhda.edu ( ), 30 hops max, 38 byte packets 1 Dcore.fhda.edu ( ) ms ms ms 2 Dbackup.fhda.edu ( ) ms ms ms 3 tiptoe.fhda.edu ( ) ms ms ms
79 ICMP PACKAGE
80 SLIP & POINT TO POINT PROTOCOL
81 Serial Line IP Protocol SLIP - SLIP is a standard protocol for point-topoint serial connections, using TCP/IP. SLIP was a predecessor of PPP. PROBLEM WITH SLIP PROTOCOL No Error detection. It supports only IP. It is not possible to dynamically assign the address during the set up. Slip does not provide any Authentication. It is not approved internet standard.
82 POINT TO POINT PROTOCOL PPP provides router to router and host to network connections over synchronous and asynchronous circuits. SERVICES PROVIDED BY PPP: The PPP protocol can operate over a full duplex point to point transmission link as well as over asynchronous links. The PPP was an improvement over the SLIP.
83 PPP TRANSITIONSTATES 1.DEAD: It means that the link is not being used. 2.ESTBLISHING: When one of the end machine starts the communication, the connection goes into the establishing state. 3.AUTHENATICATING: The user sends the authenticate request packet & includes the user name & password. 4.NETWORKING: The exchange of user control and data packets can started. 5.TERMINATING: The users sends the terminate the link. With the reception of the terminate.
84 PPP STACK PPP is a data link protocol. But it uses stack of other protocols in order to establish the link, to authenticate the users and to carry the network layer data. 1.Link Control Protocol (LCP). 2.Authenticating Protocols. 3.Network Control Protocols (NCP).
85 PPP Stack
86 PPP STACK FLAG: The PPP frame always begins & Ends with the Boundary ADDRESS: Since PPP is used for a point to point connection, it uses the broadcast address used in most LAN to avoid a data link address in the protocol. CONTROL: This field uses the value to show that the frame does not contain any sequence numbers and Its Independent PROTOCOL: It defines what type of data is being carried in the data field DATA FIELD: It carries the user data or other information. FCS: The Frame Check Sequence is simply a2 or 4 byte CRC used for error detection