Professional Documents
Culture Documents
WHAT - IP Address
Unique32or128bitBinary,usedto
identifyasystemonaNetworkorInternet.
NetworkPortion Host
Portion
CLASSFULL ADDRESSING
IPaddressspaceisdividedintofiveclasses:A,
B,C,D,andE.
Network and Host IDs
EachIPaddressisdividedintotwoparts
Networkpart,definedbynetid identifiesanetwork
Hostpart,definedbyhostid identifiesahostwithinanetwork
Class A Address
0NET HOST HOST HOST
Network Bits = 7
No.of Networks = 27 1 = 127
Host Bits = 24
No.of Host/NW = 224 2 = 16 Million
Range :
0.0.0.0 to 127.255.255.255
Class B Address
10 NET NET HOST HOST
Network Bits = 14
No.of Networks = 214 1 = 16,383
Host Bits = 16
No.of Host/NW = 216 2 = 65,234
Range :
128.0.0.0 to 191.255.255.255
Class C Address
110 NET NET NET HOST
Network Bits = 21
No.of Networks = 221 1 = 2 Million
Host Bits = 8
No.of Host/NW = 28 2 = 254
Range :
192.0.0.0 to 223.255.255.255
Special Purpose IP Addresses
Private IP Address
Default NW Address
Broadcast Address
Loopback Address
Private IP Addresses
Direct broadcast sends a message to all the hosts within a specific network.
Direct broadcast address consists of network id followed by all 1s.
Limited Broadcast
Limited broadcast sends a message to all the hosts within THIS network.
Limited broadcast address consists of all 1s.
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.
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
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
WHAT
WHY
WHAT
A Bit stream of Contiguous ONES & ZEROS
WHY
Its used to determine network part of the address
for a given IP address.
SUBNET MASK OR NETMASK
TYPES
ToincreaseusabilityofSubnets
Usingclassicalsubnettingthesubnetsareof
samesize
UsingVLSMthesubnetscanbeofVARIABLE
SIZE
VLSM
Eg:aClassC,NWneedtobedividedinto
110,45,50Hosts?
AvailableOptions1:
NaturalNWMask ClassCis255.255.255.0
Whichwillprovidenothinbut254hostsunder1NW
VLSM
Eg:aClassC,NWneedtobedividedinto 110,45,50
Hosts?
AvailableOptions2:
TheSubnetMaskoftheform255.255.255.X
X (in Binary) X Noof Subnets NoofHosts
10000000 128 2 128
11000000 192 4 64
11100000 224 8 32
11110000 240 16 16
11111000 248 32 8
11111100 252 64 4
VLSM -option
Eg:aClassC,NWneedtobedividedinto110,45,50Hosts?
>HierarchicalSubnetting
ARP ARPCache
Package
Encapsulation of ARP
packet
HardwareType ProtocolType
SenderProtocoladdress
TargetHardwareaddress
TargetProtocoladdress
ARP PacketFormat
HardwareType ProtocolType
SenderProtocoladdress
TargetHardwareaddress
TargetProtocoladdress
Proxy ARP
ARP Package
ARP Package
CacheTable
Queues
OutputModule
InputModule
CacheControlModule
ARP Cache Table
Res
Pen
Free
ICMP
InternetControl
MessageProtocol
Why ICMP
WhatitDoes
LackofError I ErrorReporting
Control
IPDeficiencies
C
Lackof
Assistance M QueryMessages
Mechanisms
P
ICMP
TYPES OF MESSAGES
MESSAGE FORMAT
ERROR REPORTING MSG
QUERY MSG
ICMP PACKAGE
ICMP Encapsulation
ICMP Encapsulation
ARPReply/Request
ICMP
TYPES OF MESSAGES
MESSAGE FORMAT
ERROR REPORTING MSG
QUERY MSG
ICMP PACKAGE
ICMP
TYPES OF MESSAGES
ICMPMESSAGETYPES
ICMP
MESSAGE FORMAT
ERROR REPORTING MSG
QUERY MSG
General format of ICMP messages
Category Type Message
Error 3 DestinationUnreachable
Reporting 4 SourceQuench
Messages
11 TimeExceed
12 ParameterProblem
5 Redirection
Query 8/0 EchoReq /Rep
Messages 13/14 TimestampReq /Rep
ICMP
MESSAGE FORMAT
ERROR REPORTING MSG
QUERY MSG
ErrorReportingMessages
ICMPalwaysreportserrormessagestotheoriginalsource
1.NoICMPerrormessageforadatagramcarryinganICMPerror
message.
2.NoICMPerrormessageforafragmenteddatagramthatisnot
thefirstfragment.
3.NoICMPerrormessageforadatagramhavingamulticast
address.
4.NoICMPerrormessageforadatagramwithaspecialaddress
suchas127.0.0.0or0.0.0.0.
ErrorreportingmessageTypes
DestinationUnreachable
CODE0:NetworkUnreachable
CODE1:Hostunreachable
CODE2:ProtocolUnreachable
CODE3: PortUnreachable
CODE4:Fragmentationisrequired,butDF(donotFrag)isenabled
CODE5:Sourceroutingenabled,butcouldntaccomplish
CODE6: DestN/Wisunknown
CODE7: DestHostisunknown
CODE8: SourceHostIsolated
CODE9:DestN/WisadministrativelyProhibited
CODE10:DestHostisadministrativelyProhibited
CODE11:NetworkUnreachableforaspecifiedtypeofservice
CODE12:HostUnreachableforaspecifiedtypeofservice
CODE13:Communicationadministrativelyprohibited
(administrativefilteringpreventspacketfrombeingforwarded)
CODE14:Hostprecedenceviolation(permissiondeniedforthecombinationof
hostornetworkandport)
CODE15:Precedencecutoffineffect
(precedenceofdatagramisbelowthelevelsetbythenetwork
administrators)
CODE11:NetworkUnreachableforaspecifiedtypeofservice
CODE12:HostUnreachableforaspecifiedtypeofservice
CODE13:Communicationadministrativelyprohibited
(administrativefilteringpreventspacketfrombeingforwarded)
CODE14:Hostprecedenceviolation(permissiondeniedforthecombinationof
hostornetworkandport)
CODE15:Precedencecutoffineffect
(precedenceofdatagramisbelowthelevelsetbythenetwork
administrators)
ErrorreportingmessageTypes
SourceQuench
SourceQuench
Asourcequenchmessageinformsthesource
thatadatagramhasbeendiscardeddueto
congestioninarouterorthedestinationhost.
Thesourcemustslowdownthesendingof
datagramsuntilthecongestionisrelieved.
Onesourcequenchmessageissentforeach
datagramthatisdiscardedduetocongestion.
ErrorreportingmessageTypes
TimeExceeded
TimeExceeded
Code0:ErroronHeader(Valueofpointer
pointstothebytewithproblem)
Code1:Optionsmissing
ErrorreportingmessageTypes
RedirectionMessage
RedirectionConcept
QuerymessageTypes
EchoRequestReplyMessage
EchoRequestReply
Timestamprequestandtimestampreplymessages
canbeusedtocalculatetheroundtriptimebetween
asourceandadestinationmachineeveniftheir
clocksarenotsynchronized.
Thetimestamprequestandtimestampreply
messagescanbeusedtosynchronizetwoclocksin
twomachinesiftheexactonewaytimedurationis
known.
Checksum
In ICMP the checksum is calculated over the entire
message (header and data).
Lets have an example of checksum calculation for a simple echo
request message. We randomly chose the identifier to be 1 and the
sequence number to be 9. The message is divided into 16bit (2
byte) words. The words are added together and the sum is
complemented. Now the sender can put this value in the checksum
field.
DEBUGGINGTOOLS
Ping
Traceroute
PING
$ ping fhda.edu
PING fhda.edu (153.18.8.1) 56 (84) bytes of data.
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=0 ttl=62 time=1.91 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=1 ttl=62 time=2.04 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=2 ttl=62 time=1.90 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=3 ttl=62 time=1.97 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=4 ttl=62 time=1.93 ms
PING
$ traceroute fhda.edu
traceroute to fhda.edu (153.18.8.1), 30 hops max, 38 byte packets
1 Dcore.fhda.edu (153.18.31.254) 0.995 ms 0.899 ms 0.878 ms
2 Dbackup.fhda.edu (153.18.251.4) 1.039 ms 1.064 ms 1.083 ms
3 tiptoe.fhda.edu (153.18.8.1) 1.797 ms 1.642 ms 1.757 ms
ICMPPACKAGE
SLIP&POINTTOPOINTPROTOCOL
SerialLineIPProtocol
9 SERVICESPROVIDEDBYPPP:
ThePPPprotocolcanoperateoverafullduplexpointtopoint
transmissionlinkaswellasoverasynchronouslinks.
ThePPPwasanimprovementovertheSLIP.
PPP TRANSITIONSTATES
1.DEAD:Itmeansthatthelinkisnotbeingused.
2.ESTBLISHING:Whenoneoftheendmachinestarts
thecommunication,theconnectiongoesintothe
establishingstate.
3.AUTHENATICATING:Theusersendstheauthenticate
requestpacket&includestheusername&password.
4.NETWORKING:Theexchangeofusercontrolanddata
packetscanstarted.
5.TERMINATING:Theuserssendstheterminatethe
link.Withthereceptionoftheterminate.
PPP STACK
PPPisadatalinkprotocol.Butitusesstackofother
protocolsinordertoestablishthelink,toauthenticate
theusersandtocarrythenetworklayerdata.
1.LinkControlProtocol(LCP).
2.AuthenticatingProtocols.
3.NetworkControlProtocols(NCP).
PPPStack
PPP STACK
FLAG:ThePPPframealwaysbegins&EndswiththeBoundary 01111110
ADDRESS:SincePPPisusedforapointtopointconnection,itusesthe
broadcastaddressusedinmostLANtoavoidadatalinkaddressinthe
protocol.
CONTROL:Thisfieldusesthevalue11000000toshowthattheframedoesnot
containanysequencenumbersandItsIndependent
PROTOCOL:Itdefineswhattypeofdataisbeingcarriedinthedatafield
DATAFIELD:Itcarriestheuserdataorotherinformation.
FCS:TheFrameCheckSequenceissimplya2or4byteCRCusedforerror
detection