critical thinking the key to learning and...
TRANSCRIPT
![Page 1: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/1.jpg)
Sanjay Goel, School of Business 1
Internet
Communications, Networking & Computer Security
Sanjay Goel
University at Albany
![Page 2: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/2.jpg)
Sanjay Goel, School of Business 2
Outline
• What is Internet?• Internet Protocols • Protocol hierarchies• The OSI reference model• Services in the OSI model
![Page 3: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/3.jpg)
• It is a network of networks• Any network connected to the internet
– Conform to certain naming conventions– Must run the IP protocol– IP protocol is also called Internet dial tone
• Internet has a hierarchical topology– End Systems connected to local ISPs through access networks– Access Network examples – LAN, telephone line with a modem, high
speed cable networks– Local ISPs connected to regional ISPs, regional ISPs connected to
national & international ISPs– Construction analogous with Lego construction
InternetWhat is it?
Sanjay Goel, School of Business 3
![Page 4: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/4.jpg)
• Allows distributed applications to exchange data with each other
• Applications include: FTP, Telnet, Mail, WWW, distributed games, video conferencing
• Provides two kinds of services– Connection Oriented Service (TCP): Establish connection prior to
data exchange, coupled with reliable data transfer, flow control, congestion control etc.
– Connectionless Service (UDP): No handshake prior to data exchange, No acknowledgement of data received, no flow/congestion control
Internet Role
Sanjay Goel, School of Business 4
![Page 5: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/5.jpg)
Internet Information Flow
Home
ISP
ISP
Multi-mediaModem
University Ethernet
Lan Security
Hosting Platform
Origins of Online Content
Sanjay Goel, School of Business 5
![Page 6: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/6.jpg)
• Internet is a very complex system• Set of layers and protocols represents the Network
Architecture.• Protocols are stacked vertically as series of ‘layers’.• Each layer has a well defined interface.
– Allows for easy replacement of layer• Each layer offers Services to layer above, shielding
implementation details.• Each layer on one machine communicates with
corresponding layer on another machine using Protocol for the Layer.
Internet Protocol Hierarchies
Sanjay Goel, School of Business 6
![Page 7: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/7.jpg)
Sanjay Goel, School of Business 7
Internet Layering Principle
(N+1) EntityService User
(N) EntityService Provider
(N+1) EntityService User
(N) EntityService Provider
Layer N ServiceAccess Point (SAP)
Layer N protocol
N+1PDU
Layer N+1 protocol
SDU
PDU - Protocol Data UnitSDU - Service Data Unit
NPDU
NPDU
• Service = set of primitives provided by one layer to layer above.• Service defines what layer can do (but not how it does it).• Protocol = set of rules governing data communication between peer
entities, i.e. format and meaning of frames/packets.• Service/protocol decoupling very important.
![Page 8: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/8.jpg)
• Connections– Layers can offer connection-oriented or connectionless services.– Connection-oriented like telephone system.– Connectionless like postal system.– Each service has an associated Quality-of-service (e.g. reliable
or unreliable).• Reliability
– Reliable services never lose/corrupt data.– Reliable service costs more.– Typical application for reliable service is file transfer.– Typical application not needing reliable service is voice.– Not all applications need connections.
Internet Connections & Reliability
Sanjay Goel, School of Business 8
![Page 9: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/9.jpg)
Sanjay Goel, School of Business 9
Internet Layers, Protocols & Information Flow
Physical communications medium
Layer 1 Layer 1Layer 1 protocol
Layer 2 Layer 2Layer 1/2interface
Layer 1/2interface
Layer 2 protocol
Layer n protocolLayer n Layer n
Layer 2/3interface
Layer n-1/ninterface
Layer 2/3interface
Layer n-1/ninterface
Layer n/n+1interface
Layer n/n+1interface
![Page 10: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/10.jpg)
Sanjay Goel, School of Business 10
• A protocol defines the format and order of messages exchanged between two of more communicating entities as well as the actions taken on the transmission and/or receipt of a message or event.
Protocol Definition
TCP Connection Request
TCP Connection Response
Get http://www.ibm.com/
Index.html
Hi
Hi
Got the Time?
8:50
![Page 11: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/11.jpg)
Sanjay Goel, School of Business 11
Internet Architecture
Application Layer
Transport Layer
Network Layer
Link Layer
Physical Network
Application Layer
Transport Layer
Network Layer
Link Layer
Message
Packet (Bridge)
Datagram (Router)
Frame (Hub)
Host A Host B
Port-to-Port
Host-to-Host
Node-to-Node
Http, Ftp, Smtp,Telnet
TCP, UDP
Ethernet, FDDI
IP
Examples
• Analogous to the mail system in context of layering & standardized protocols.
![Page 12: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/12.jpg)
• Implements application protocol– Users invoke applications using this protocol
• Application Layer Protocol defines– Types of messages exchanged e.g. request or response– Syntax of the various message types, such as, fields in the
messages and how they are delineated– Semantics of the fields i.e. meaning of information in each
field– Rules for determining when and how a process sends
messages and responds to messages
Application LayerFunction
Sanjay Goel, School of Business 12
![Page 13: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/13.jpg)
• Different applications use different protocols– Web Servers/Browsers use HTTP– File Transfer Utilities use FTP– Electronic Mail applications use SMTP– Naming Servers use DNS
• Interacts with transport layer to send messages– Choose the transport layer protocol– Fix transport layer parameters, such as, buffer/segment
sizes
Application LayerFunction
Sanjay Goel, School of Business 13
![Page 14: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/14.jpg)
Sanjay Goel, School of Business 14
Application LayerFormat
Method sp URL sp Version ctr lf
Header Field Name : Value cr lf
Header Field Name : Value cr lf
cr lf
Message Body
Http Request Message Format
Get /somedir/page.html HTTP/1.1Connection: closeUser-agent: MozillaAccept: text/html, image/gif, image/jpegAccept-language: fr(extra carriage return, line feed)
Request Line
••
Header Lines
Http Request Message Example
• Types of messages– HTTP request, HTTP response, HTTP head
![Page 15: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/15.jpg)
Application LayerInterface
TCP/UDP with
Buffers and
Variables
Controlled byApplicationDeveloper
Controlled byOperating
System
HOST
Process Process
Controlled byOperating
System
Controlled byApplicationDeveloper
HOST
TCP/UDP with
Buffers and
Variables
Socket
Internet
Socket
• Socket is the interface between the application layer and the transport layer
• Two parameter are required for identifying receiving process– Host machine identifier - IP Address– Host machine process identifier - Port
Sanjay Goel, School of Business 15
![Page 16: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/16.jpg)
• Provides for logical communication between applications running on different hosts– Application multiplexing and de-multiplexing
• Implemented in the end systems but not in network routers• On sending side
– Divides stream of application message into smaller units (packets), – Adds the transport header to each chunk– Sends message to network layer
• On receiving side– Takes the header off the message packets– Reassembles the packets in order– Sends message to the application layer
• Two internet transport protocols available– TCP, UDP
Transport LayerFunction
Sanjay Goel, School of Business 16
![Page 17: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/17.jpg)
• TCP (Transmission Control Protocol)• Connection Oriented Service (requires handshake)
– Duplex– Simplex
• Reliable Data Transfer– Guaranteed delivery of packets
• Congestion Control– Throttles process when network is congested
• No guarantee of a minimum transmission rate• Suitable for reliability critical/ non time critical applications
– FTP, SMTP, Telnet, HTTP
Transport LayerProtocol: TCP
Sanjay Goel, School of Business 17
![Page 18: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/18.jpg)
• Stands for User Datagram Protocol• Lightweight transport protocol• Connectionless (no handshake)• Unreliable data transport service
– No acknowledgements (lost packets not resent)
• Messages may arrive out of order• No congestion control
– Application can pump as many packets over the socket as it chooses
• Suitable for loss-tolerant time critical applications– Audio/Video streaming– Internet Telephony
Transport LayerProtocol: UDP
Sanjay Goel, School of Business 18
![Page 19: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/19.jpg)
• Source / Destination Port Numbers– Multiplexing / Demultiplexing
• Sequence Number & Acknowledgement Number– Congestion Control
• Window size– Flow control
• Length Field– Length of TCP header in 32-bit words
• Unused field is currently unused• Flag Field contains 6 bits
– ACK: shows value in acknowledgement field is valid
– RST, SYN, FIN bits used for connection setup and teardown
– PSH bit indicates data should be passed to upper layer immediately
– URG – indicates that there is data in the segment which is marked as urgent
• Ptr to urgent data Points to last byte of the urgent data
• Options field is used when sender and receiver negotiate the maximum segment size.
Transport LayerTCP ExampleSource Port Number Destination Port Number
Sequence Number
Acknowledgement NumberURG
ACK
PSH
R S T
S Y N
F I N
HeaderLength
Unused Receiver Window Size
Source Port Pointer to Urgent Data
Options
Data
32-bits
GET /directory/dirsearch.html HTTP/1.1Host: www.phoenix.co.uk
Src: 1081 Dst: 80Chksum: 0xa858
HTTP MessageTCP header
Sanjay Goel, School of Business 19
![Page 20: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/20.jpg)
• Provides communication service between two hosts– Transports packets from sending host to receiving host
• Encapsulates packets in IP datagram with IP header• Three primary tasks
– Path Determination: Determine the route taken by a packet as it flows from sender to receiver
– Switching: Arriving packet is moved to the appropriate output link– Call Setup: Handshake prior to routing packets (required by some
network architectures)
• If addressed to local machine, remove the IP datagram header and pass up to transport layer.
Network LayerFunction
Sanjay Goel, School of Business 20
![Page 21: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/21.jpg)
• Network Layer contains several protocols including– Internet Protocol– Address Resolution Protocol (ARP)– Internet Control Message Protocol (ICMP)– Internet Group Message Protocol (IGMP)
Network LayerProtocols
Sanjay Goel, School of Business 21
![Page 22: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/22.jpg)
• Internet Protocol– Determines the source and destination IP address of all
packets– IP address is a unique address on a network assigned to a
device– If the packet is meant for a device on the local host IP
gets the MAC address for the device and sends it directly to the host
– For a remote packet it first looks up the routing table for an explicit route to the network.
– If an explicit route is not available it sends it to a default gateway
Network LayerInternet Protocol
Sanjay Goel, School of Business 22
![Page 23: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/23.jpg)
Sanjay Goel, School of Business 23
• Version: IP protocol version• Header Length• TOS
– Allows different types of IP datagrams to be differentiated
• Datagram Length– Length of data + header
• Identifiers, Flags Fragmentation offset– Deal with fragmentation
• Time-to-live (TTL)– Decremented each time a router processes a
datagram Datagram dropped when field is zero• Protocol
– Indicates transport level protocole.g. 6 indicates TCP, 17 indicates UDP
• Checksum: Used for error checking • Data – Contains the transport layer segment
Network LayerInternet Protocol: Example
32-bit destination IP Address
Packet Length (bytes)
Time to Live Headerchecksum
Options (if any)
Data
32-bits
32-bit source IP Address
VersionHeaderLength
Type of Service
16-bit identifier 13-bit Fragm-entation OffsetFlags
Upper Layer Protocol
GET /directory/dirsearch.html HTTP/1.1Host: www.phoenix.co.uk
Src: 1081 Dst: 80Chksum: 0xa858
Src: 192.168.0.40Dst: 192.168.0.50 TTL: 128
HTTP MessageIP datagram header TCP header
![Page 24: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/24.jpg)
Sanjay Goel, School of Business 24
Network LayerMAC vs. IP
• Physical (MAC) addresses identify the hardware and are configured by the manufacturer
• Logical (IP) addresses identify the node and are configured by the customer– IP addresses may be reused if a machine is replaced– IP addresses depend on the customers location
• Network number
• Configuring client nodes is tedious and error-prone
![Page 25: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/25.jpg)
• Translates MAC address to IP addresses and vice-versa
• 2 types of ARP packets: replies and requests• Using ARP for each packet causes a 2 packet overhead for
each packet• ARP thus caches the packets
– Cache flushed at startup– Cache periodically cleaned up– Cache searched prior to sending the ARP request
Network LayerAddress Resolution Protocol
2
HardType
ProtType
HardSize
ProtSize Opcode Sender
Hardware Address
1 22 1 466
bytes
TargetIP Address
SenderIP Address
4
TargetHardware Address
Sanjay Goel, School of Business 25
![Page 26: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/26.jpg)
Sanjay Goel, School of Business 26
Network LayerDynamic Host Configuration Protocol
• DHCP server maintains configuration information about clients– IP addresses– default router
• Clients broadcastto locate server
• Server replies withconfiguration information
• Client IP addresses may be temporary (leased)
H1
DHCPrelay network DHCP
server
Bro
adca
st
Unicast
![Page 27: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/27.jpg)
Sanjay Goel, School of Business 27
Network LayerAddress Assignment
DHCPDISCOVER
DHCPOFFER
DHCPREQUEST
DHCPACK
HostDHCP-Server
DHCPRELEASE(Shutdown)
![Page 28: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/28.jpg)
• Purpose is to defines the interface between device & network– It contains a driver that is compatible with the network that the
device is connected to
• Transfers network layer datagrams over a link from node to node– A node is a router or a host– A link is the communication path along two nodes
• Link Layer protocol defines the format of the packets exchanged between the nodes
• The packets exchanged by link layer are called frames– Each frame typically encapsulates one datagram– e.g. Ethernet, token ring, FDDI, PPP
Link LayerFunction
Sanjay Goel, School of Business 28
![Page 29: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/29.jpg)
Sanjay Goel, School of Business 29
• Each frame contains the physical address of the hardware of the packet destination.
• This physical address is called the Media Access Control (MAC) address and is burned into the network interface card– This is a 12 character hexadecimal number (analogy social security #)– Example: 00:A0:C9:0F:92:A5– Here the first six digits are the manufacturers ID and the last six
digits are the device ID– As each packet arrives at the network interface card the MAC address
on the packet is compared to the MAC address of the device– If the addresses match the packet is accepted
Link layerHardware Address
![Page 30: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/30.jpg)
• Framing and Link Access• Reliable delivery• Flow Control• Error Detection• Error Correction• Two types of services are provided
– Half-Duplex and Full-Duplex• Implemented in adapters commonly called Network Interface
Cards (NIC)
Link LayerServices
IP Module Frame IP ModuleFrameTransmitting
AdapterReceiving AdapterSending
NodeReveiving
Node
Communication Link
Sanjay Goel, School of Business 30
![Page 31: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/31.jpg)
• Ethernet is the dominant protocol in the LAN market– Primary factors are cost and complexity
• Many topologies of Ethernet– Bus Topology– Star Topology
• Supports multiple medium– Coaxial Cable– Copper Wire– Fiber Optic
• Can transmit data at different rates – 10Mbps, 100Mbps, 1Gbps
Link LayerExample
Sanjay Goel, School of Business 31
![Page 32: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/32.jpg)
Sanjay Goel, School of Business 32
Physical LayerFunction• Accepts IP datagrams and transmits over specific networks.• Maybe a simple device driver (e.g. an Ethernet driver) or a
complex subsystem with further data link protocols.
![Page 33: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/33.jpg)
Sanjay Goel, School of Business 33
OSI Model
![Page 34: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/34.jpg)
• OSI Reference Model - internationally standardised network architecture.
• OSI = Open Systems Interconnection: deals with open systems, i.e. systems open for communications with other systems.
• Specified in ISO 7498.• Model has 7 layers.
OSI Reference Model
Sanjay Goel, School of Business 34
![Page 35: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/35.jpg)
• Layers 1-4 relate to communications technology.
• Layers 5-7 relate to user applications.
7-Layer OSI Model
Layer 7
Layer 6
Layer 5
Layer 4
Layer 3
Layer 2
Layer 1
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
Communications subnet boundary
Sanjay Goel, School of Business 35
![Page 36: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/36.jpg)
Sanjay Goel, School of Business 36
ProtocolsComparison
ApplicationPresentation
SessionTransportNetworkData LinkPhysical
Application
TCPIP
Network Interface
Hardware
• No Explicit Presentation and session layers in Internet Protocol
• Data Link and Network Layers redesigned
OSI Model Internet Model
• In OSI model, each layer provide services to layer above, and ‘consumes’services provided by layer below.
• Active elements in a layer called entities.• Entities in same layer in different machines called peer entities.
![Page 37: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/37.jpg)
Sanjay Goel, School of Business 37
ApplicationFunction
• Level at which applications access network services.– Represents services that directly support software
applications for file transfers, database access, and electronic mail etc.
![Page 38: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/38.jpg)
Sanjay Goel, School of Business 38
PresentationFunction
• Related to representation of transmitted data– Translates different data representations from the
Application layer into uniform standard format• Providing services for secure efficient data
transmission– e.g. data encryption, and data compression.
![Page 39: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/39.jpg)
Sanjay Goel, School of Business 39
SessionFunction
• Allows two applications on different computers to establish, use, and end a session.– e.g. file transfer, remote login
• Establishes dialog control– Regulates which side transmits, plus when and how long it
transmits.• Performs token management and synchronization.
![Page 40: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/40.jpg)
Sanjay Goel, School of Business 40
Internet Addressing
![Page 41: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/41.jpg)
Sanjay Goel, School of Business 41
Internet AddressIntroduction
• Host identifiers are classified in three categories– Names: Identify what an object is– Addresses: Identify where object is– Routes: Identify how to get to the object
• Each host on a TCP/IP internet is assigned a unique 32-bit internet address that is used in all communications with that host.– Bits of IP addresses on the same host Provide unique address to each host– Written as four decimal integers separated by decimal points– Each integer gives the value of one octet of the IP address
• The 32-bit internet address– 10000000 00001010 00000010 00011110– 128.10.2.30
![Page 42: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/42.jpg)
Sanjay Goel, School of Business 42
Internet AddressIntroduction
• Conceptually each address is a pair (hostid, netid)– Netid identifies a network– Hostid identifies a host on that network
• Since IP addresses encode both a network and a host on that network, they do not specify individual computers, but a connection to a network– A router which connects to n networks will have n addresses– A multi-homed host will have multiple addresses
![Page 43: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/43.jpg)
• Class of address assigned depends network size• Each IP address should be class A, B, or C
– Class A used for more than 216 hosts on network– Class B used when more than 28 but less than 216 hosts on
network– Class C used for less than 28 hosts on network
IP AddressesClasses
hostid
hostid
hostid
0
1 1 0
0
netid0
netid1
1 netid1
Multicast address1
0
1 1 1 Reserved for future use1
Class A
Class B
Class C
Class D
Class E
8 16 24 310
32-bits
Sanjay Goel, School of Business 43
![Page 44: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/44.jpg)
Sanjay Goel, School of Business 44
IP AddressesNetwork & Broadcast Address
• Internet addresses can be used to refer to networks as well as individual hosts– An address with all bits of the hostid equal to 0 is reserved to refer to the
network
• IP addresses can be used to specify a broadcast– Directed broadcasts are used to broadcast messages to target networks– A directed broadcast address has a valid netid hostid with all bits set to 1– Local network broadcast address is used for broadcast to local network
independent of any host address– Local broadcast address consists of 32 1’s
![Page 45: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/45.jpg)
Sanjay Goel, School of Business 45
IP AddressesNetwork & Broadcast Address
• A field consisting of zeros means this– IP address with all hostid fields 0 means this host
– A netid of 0 means the current network• 127.0.0.0 is the loop back address and used primarily for testing
TCP/IP as well as for inter-process comm.• Dotted Decimal Notation is used to represent IP addresses
– IP addresses are written as four decimal integers separated by decimal points
– Each integer gives the value of one octet of the IP address– 10000000 00001010 00000010 00011110 128.10.2.30
![Page 46: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/46.jpg)
Sanjay Goel, School of Business 46
IP AddressesSummary of Exceptions
This host1all 0s
Host on this net1all 0s host
all l s Limited broadcast (local net)2
net all 1s Directed broadcast for net2
127 Anything (often 1) Loopback3
Footnotes:1 Allowed only at system startup and is never a valid destination address.2 Never a valid source address.3 Should never appear on a network.
![Page 47: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/47.jpg)
Sanjay Goel, School of Business 47
IP AddressesIssues
• Inadequate to respond to the fast growth of networks– Immense administrative overhead to manage network addresses– Routing tables in routers extremely large causing large overheads when
routers exchange routing table information– Address space of networks will be eventually exhausted (Already short of
class B addresses)
• Original scheme modified to allow sharing of network addresses– Transparent Routers– ARP– Standard IP Subnets
![Page 48: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/48.jpg)
• Allows multiple networks to share the same network address• The IP address is redefined such that
– The network id is left intact– The host id portion is split into subnetwork id and hostid
• TCP/IP subnet standard permits subnet interpretation to be chosen independently of each physical network.
• Once a subnet partition is selected all the machines on the network must honour it.
IP AddressesSubnets
host id0 netid1
host id0 Netid (Internet)1 Netid (Local)
Original Scheme
Subnet Scheme
Sanjay Goel, School of Business 48
![Page 49: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/49.jpg)
Sanjay Goel, School of Business 49
IP AddressesHierarchical Addressing
• Allows multiple networks to share the same network address
R1
R3R2
R5R4
To the internet
Network 1
Network 2 Network 3
Network 4 Network 5
![Page 50: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/50.jpg)
Sanjay Goel, School of Business 50
IP AddressesSubnet Masks
• Sites that use subnet addressing must also choose a 32-bit subnet mask for each network.– Bits for network identifier are set to 1– Bits for the host identifier are set to 0
• For a class B address if the third octet is used for local netid– Subnet Mask 11111111 11111111 11111111 00000000
• Dotted Decimal Notation is also popular for subnet masks– {<network number>, <subnet number>, <host number>}– e.g. 128.10.6.62
![Page 51: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/51.jpg)
Sanjay Goel, School of Business 51
![Page 52: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/52.jpg)
Sanjay Goel, School of Business 52
MailRFC 822
• Messages consist of a primitive envelope (described in RFC 821), some number of header fields, a blank line, and then the message body.
• Each header field (logically) consists of a single line of ASCIItext containing the field name, a colon, and, for most fields a value.
• RFC822 was designed decades ago and does not clearly distinguish the envelope fields from the header fields.
![Page 53: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/53.jpg)
Sanjay Goel, School of Business 53
MailRFC 822 Cont’d.
Header Meaning
To: E-mail address(es) of primary recipient(s)
Cc: E-mail address(es) of secondary recipient(s)
Bcc: E-mail address(es) for blind carbon copies
From: Person or people who created the message
Sender: E-mail address of the actual sender
Received: Line added by each transfer agent along the route
Return-path: Can be used to identify a path back to the sender
RFC 822 header fields related to message transport.
![Page 54: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/54.jpg)
Sanjay Goel, School of Business 54
MailRFC 822 Cont’d.Header Meaning
Date: The date and time the message was sent
Reply-To: E-mail address to which replies should be sent
Message-Id: Unique number used for referencing this message later
In-Reply To: Message-Id of to which this is a reply
References: Other relevant message-Ids
Keywords: User-chosen keywords
Subject: Short summary of the message for the one-line display
Some fields used in the RFC 822 message header.
![Page 55: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/55.jpg)
Sanjay Goel, School of Business 55
MailMultipurpose Internet Mail Extensions (MIME)
• Allows multilingual ability for mail• Messages in languages with accents
– (e.g., French and German)
• Messages in non-Latin alphabets – ( e.g., Hebrew and Russian)
• Messages in languages without alphabets – (e.g., Chinese and Japanese)
• Messages not containing text at all – (e.g., audio or images)
![Page 56: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/56.jpg)
Sanjay Goel, School of Business 56
MailMIME Header
Header Meaning
MIME-Version: Identifies the MIME version
Content-Description:
Human- readable string telling what is in the message
Content-Id: Unique identifier
Content-Transfer-Encoding
How the body is wrapped for transmission
Content-Type: Type and format of the content
RFC 822 headers added by MIME.
![Page 57: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/57.jpg)
• Simple Mail Transfer Protocol- SMTP is a simple ASCII protocol for transfer of email from source to
destination- To deliver mail the source machine establishes a TCP connection to port
25 of the destination machine. - Listening to this port (25) is an e-mail daemon that speaks SMTP.- After establishing the TCP connection to port 25, the sending machine,
operating as the client, waits for the receiving machine, operating as the server, to talk first.
MailSMTP
Source(Client)
Destination(Server)
TCP Connection25
Sanjay Goel, School of Business 57
![Page 58: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/58.jpg)
Sanjay Goel, School of Business 58
MailSMTP
- The server starts by sending a line of text giving its identity and telling whether it is prepared to receive mail.
- If it is not, the client releases the connection and tries again later.
- Otherwise the client starts sending the messages
![Page 59: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/59.jpg)
Sanjay Goel, School of Business 59
MailPost Office Protocol (Version 3) : POP3• Allows messages to be delivered even when the receiver is not
online• This protocol allows mail stored on the server to be
downloaded to the client• POP3 is invoked when the user starts the mail reader
– The mail reader calls up the ISP and establishes a TCP connection with the message transfer agent at port 110.
– Once the connection has been established, the POP3 protocol goesthrough three states in sequence:
• Authorization• Transaction• Update
![Page 60: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/60.jpg)
Sanjay Goel, School of Business 60
MailPost Office Protocol (Version 3) : POP3
• POP3 protocol supports the ability to download a specific message or set of messages and leave them on the server– most e-mail programs however just download everything
and empty the mailbox.
• This behavior means that in practice, the only copy is on the user’s hard disk. – If that crashes, all e-mail may lost permanently.
![Page 61: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/61.jpg)
Sanjay Goel, School of Business 61
MailInternet Message Access Protocol (IMAP)• IMAP assumes that all the e-mail will remain on the server
indefinitely in multiple mailboxes.– Unlike POP3, which assumes that user will empty the mailbox on
every contact and work off-line after that
• IMAP provides extensive mechanisms for reading messages or even parts if messages– This feature is useful when a slow modem is used to read the text
part of multipart message with large audio and video attachments.
![Page 62: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/62.jpg)
Sanjay Goel, School of Business 62
MailInternet Message Access Protocol (IMAP)
– IMAP provides mechanisms for creating, destroying, and manipulating multiple mailboxes on the server.
– Unlike POP3, IMAP can also accept outgoing e-mail for shipment to the destination as well as deliver incoming e-mail.
![Page 63: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/63.jpg)
Sanjay Goel, School of Business 63
Routing
![Page 64: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/64.jpg)
Sanjay Goel, School of Business 64
World Wide Web Protocols
Application Layer
Transport Layer
Internet Layer
Network Layer
Physical Network
Application Layer
Transport Layer
Internet Layer
Network Layer
HTTP Message
TCP Packet
IP Datagram
Ethernet Frame
Web Browser Web Server
• The data may be routed via numerous nodes called routers
![Page 65: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/65.jpg)
Routing Protocols
Application Layer
Transport Layer
Network Layer
Link Layer
Physical Network
Application Layer
Transport Layer
Network Layer
Link Layer
Message
Packet
Frame Frame
Datagram DatagramNetwork Layer
Link Layer
Physical Network
Host BHost A
Router
• The data may be routed via numerous nodes called routers
Sanjay Goel, School of Business 65
![Page 66: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/66.jpg)
Sanjay Goel, School of Business 66
• In TCP/IP any machine on the same network can be contacted directly, but machines on another network must be contacted through a router or gateway.
• Router is a specific device (software or hardware) that forwards a transmission from a local network to other networks.
• Since the router is another device on the network, it needs to have its own internal IP address that the computers can contact.
RoutingProtocols
Web Browser
Web Server
Router
NetworkA
NetworkB
![Page 67: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/67.jpg)
Sanjay Goel, School of Business 67
RoutingProtocols
• Objective: Determining optimum path through a sequence of routers that packets should take in going from one host to destination
• Graph abstraction for routing algorithms:– Graph nodes are routers– Graph edges are physical links– link cost: delay, $ cost, or congestion level
A
D
B C
F
E1
22 3
1
1
2
53
![Page 68: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/68.jpg)
Sanjay Goel, School of Business 68
• Logic for deciding the path• Two kinds of routing algorithms
– Link State Algorithm: Global routing algorithm that uses knowledge of the entire network while making selection
– Distance Vector Algorithm: Decentralized algorithm compues least cost path in iterative distributed manner
• The routing algorithms can also be classified as– Static: Routes change slowly over time (usually via manual
intervention)– Dynamic: Routing paths change as network traffic loads or network
topology changes.
RoutingAlgorithms
![Page 69: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/69.jpg)
Sanjay Goel, School of Business 69
RoutingDijkstra’s Algorithm• Net topology, link costs known to all nodes
– accomplished via “link state broadcast”– all nodes have same info
• Computes least cost paths from one node (‘source”) to all other nodes– gives routing table for that node
• iterative: after k iterations, know least cost path to k dest.’s• Notation:
– c(i,j): link cost from node i to j. cost infinite if not direct neighbors– D(v): current value of cost of path from source to dest. V– p(v): predecessor node along path from source to v, that is next v– N: set of nodes whose least cost path definitively known
![Page 70: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/70.jpg)
Sanjay Goel, School of Business 70
RoutingDijkstra’s Algorithm - StepsInitialization:
N = {A} for all nodes v {
if v adjacent to A then D(v) = c(A,v) else D(v) = infty
}Loop (until all nodes in N) {
find w not in N such that D(w) is a minimum add w to N update D(v) for all v adjacent to w and not in N: D(v) = min( D(v), D(w) + c(w,v) )
/* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */
}
• Algorithm complexity (n nodes)– each iteration: need to check all
nodes, w, not in N– n*(n+1)/2 comparisons: O(n**2)– Efficient implementations O(nlogn)
possible
![Page 71: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/71.jpg)
Sanjay Goel, School of Business 71
RoutingDijkstra’s Algorithm - Example
Step012345
start NA
ADADE
ADEBADEBC
ADEBCF
D(B),p(B)2,A2,A2,A
D(C),p(C)5,A4,D3,E3,E
D(D),p(D)1,A
D(E),p(E)infinity
2,D
D(F),p(F)infinityinfinity
4,E4,E4,E
A
D
B C
F
E1
22 3
1
1
2
53
5Compute Distance Vector for node A
Node Distance
A -
B 2
C 3
D 1
E 2
F 4
![Page 72: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/72.jpg)
Sanjay Goel, School of Business 72
RoutingDijkstra’s Algorithm - Problem
A
D
B C
F
E5
103
4
2
6
6
51
5
![Page 73: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/73.jpg)
Sanjay Goel, School of Business 73
RoutingDistance Vector Algorithm
• Each router starts with a distance table consisting of the value “0” for itself and the value “infinity” for every other destination
• Each router will transmit its distance vector to each of its neighbors whenever the information changes (as well as when a link to a neighbor first comes up)
• Each router saves the most recently received distance vector from each of its neighbors, and calculate its own distance vector, based on minimizing the cost to each destination
![Page 74: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/74.jpg)
Sanjay Goel, School of Business 74
RoutingDistance Vector Algorithm (Kurose)
iterative:continues until no nodes exchange info.self-terminating: no “signal” to stop
asynchronous:nodes need notexchange info/iterate in lock step!
distributed:each node communicates only with directly-attached neighbors
Distance Table data structureeach node has its ownrow for each possible destinationcolumn for each directly-attached neighbor to nodeexample: in node X, for dest. Y via neighbor Z:
D (Y,Z)X
distance from X toY, via Z as next hop
c(X,Z) + min {D (Y,w)}Zw
=
=
![Page 75: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/75.jpg)
Sanjay Goel, School of Business 75
RoutingDistance Table (Example)
A
E D
CB7
81
2
1
2D ()
A
B
C
D
A
1
7
6
4
B
14
8
9
11
D
5
5
4
2
Ecost to destination via
dest
inat
ion
D (C,D)E
c(E,D) + min {D (C,w)}Dw=
= 2+2 = 4
D (A,D)E
c(E,D) + min {D (A,w)}Dw=
= 2+3 = 5
D (A,B)E
c(E,B) + min {D (A,w)}Bw=
= 8+6 = 14
loop!
loop!
![Page 76: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/76.jpg)
Sanjay Goel, School of Business 76
RoutingDistance Table Gives Routing Table
D ()
A
B
C
D
A
1
7
6
4
B
14
8
9
11
D
5
5
4
2
Ecost to destination via
dest
inat
ion
A
B
C
D
A,1
D,5
D,4
D,4
Outgoing link to use, cost
dest
inat
ion
Routing tableDistance table
![Page 77: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/77.jpg)
Sanjay Goel, School of Business 77
Distance RoutingOverview
Each node:Iterative, asynchronous: each local iteration caused by: local link cost change message from neighbor: its least cost path change from neighbor
Distributed:each node notifies neighbors only when its least cost path to any destination changes– neighbors then notify their
neighbors if necessary
wait for (change in local link cost of msg from neighbor)
recompute distance table
if least cost path to any desthas changed, notifyneighbors
![Page 78: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/78.jpg)
Sanjay Goel, School of Business 78
Distance RoutingDistance Vector Algorithm
At all nodes, X:
1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infty /* the * operator means "for all rows" */ 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor /* w over all X's neighbors */
XX
Xw
![Page 79: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/79.jpg)
Sanjay Goel, School of Business 79
8 loop9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) 11 12 if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */ 14 /* note: d could be positive or negative */15 for all destinations y: D (y,V) = D (y,V) + d 16 17 else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */19 /* V has sent a new value for its min DV(Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: D (Y,V) = c(X,V) + newval22 23 if we have a new min D (Y,w)for any destination Y 24 send new value of min D (Y,w) to all neighbors 26 forever
w
XX
XX
X
ww
Distance RoutingDistance Vector Algorithm Cont’
![Page 80: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/80.jpg)
Sanjay Goel, School of Business 80
Distance RoutingDistance Vector Algorithm Example:
X Z12
7
Y
![Page 81: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/81.jpg)
Sanjay Goel, School of Business 81
X Z12
7
Y
D (Y,Z)X c(X,Z) + min {D (Y,w)}w=
= 7+1 = 8
Z
D (Z,Y)X c(X,Y) + min {D (Z,w)}w=
= 2+1 = 3
Y
Distance RoutingDistance Vector Algorithm Example:
![Page 82: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/82.jpg)
Link cost changes:• node detects local link cost change • updates distance table (line 15)• if cost change in least cost path,
notify neighbors (lines 23,24)
X Z14
50
Y1
algorithmterminates“good
news travelsfast”
Distance RoutingDistance Vector Algorithm: Link Cost Changes
Sanjay Goel, School of Business 82
![Page 83: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/83.jpg)
Sanjay Goel, School of Business 83
Distance RoutingDistance Vector Algorithm: Example
Count to infinity
A CB1 1
![Page 84: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/84.jpg)
Sanjay Goel, School of Business 84
Distance RoutingDistance Vector Algorithm: Link Cost Changes
Link cost changes:• good news travels fast • bad news travels slow - X Z
14
50
Y60
“count to infinity”problem!
algorithmcontinues
on!
![Page 85: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/85.jpg)
Sanjay Goel, School of Business 85
Distance RoutingDistance Vector Algorithm: Position Reverse
If Z routes through Y to get to X :• Z tells Y its (Z’s) distance to X is
infinite (so Y won’t route to X via Z) X Z14
50
Y60
• will this completely solve count to infinity problem?
algorithmterminates
![Page 86: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/86.jpg)
Sanjay Goel, School of Business 86
Distance RoutingComparison of LS & DV
Message complexityLS: with n nodes, E links, O(nE) msgs sent each DV: exchange between neighbors only– convergence time varies
Speed of ConvergenceLS: O(n**2) algorithm requires O(nE) msgs– may have oscillations
DV: convergence time varies– may be routing loops– count-to-infinity problem
Robustness: what happens if router malfunctions?
LS:– node can advertise
incorrect link cost– each node computes only
its own table
DV:– DV node can advertise
incorrect path cost– each node’s table used by
others o error propagate thru
network
![Page 87: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/87.jpg)
Sanjay Goel, School of Business 87
Routing Algorithms Summary
• LS and DV are representative• There are other type of routing algorithms,
especially in circuit switching world, e.g., hot potato algorithm
• Most of the internet routing protocols (think OSPF, BGP etc.) are based on these fundamental algorithms we introduced just now
![Page 88: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/88.jpg)
Sanjay Goel, School of Business 88
Physical Hardware - Routers
![Page 89: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/89.jpg)
• In TCP/IP any machine on the same network can be contacted directly, but machines on another network must be contacted through a router or gateway.
• Router is a specific device (software or hardware) that forwards a transmission from a local network to other networks.
• Since the router is another device on the network, it needs to have its own internal IP address that the computers can contact.
RoutersDevices
Sanjay Goel, School of Business 89
![Page 90: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/90.jpg)
Sanjay Goel, School of Business 90
RoutersEthernet
• There can only be one device transmitting on a segment at any given time. If two or more devices attempt to transmit at the same time, a collision occurs.
• After a collision, all devices must retransmit. As you can imagine, as the number of devices on an Ethernet segment increases, the probability for collisions increase.
• Because devices must spend more time re-transmitting data, the network is perceived to be slow.
![Page 91: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/91.jpg)
Sanjay Goel, School of Business 91
RoutersLAN Topology
• Logical topology is how the network works conceptually
• Physical topology is how the network is physically installed
• Logical topology is not necessarily the same as the physical topology
Bus
Hub
Star
![Page 92: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/92.jpg)
• Switch is a generic term for a device that switches data (packets or frames)
• Hub is link layer switch (node to node)– Operates on ethernet frames– L2 switch– Uses physical addresses (MAC addresses)
• Bridge connects two LANS or two segments of the same LAN– Protocol Independent– Operates on ethernet frames – L2 switch– Uses physical addresses (mac addresses)
RoutingDevices
Sanjay Goel, School of Business 92
![Page 93: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/93.jpg)
• Router is a network layer switch (host to host)– Also called L3 switch– Uses network addresses– Operates on packets
• Gateway is a generic term for an internetworking system – Can be implemented in software and/or hardware– Can operate at any level of the OSI model from
application protocols to low-level signaling.
RoutingDevices
Sanjay Goel, School of Business 93
![Page 94: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/94.jpg)
Sanjay Goel, School of Business 94
RoutersHUB• A device that connects several
computer on Ethernet• A hub has 4/8/16/24 RJ-45
ports. – Signals are broadcast all the cables
connected to all other ports.• Hubs do no processing on
network traffic– they simply repeat the incoming
signal to all available ports.• A hub is an alternative to the
bus topology– make network connection easier– Hubs can act as repeaters or
amplifiers
Hub
HubHub
• Hubs can be used hierarchically
![Page 95: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/95.jpg)
Sanjay Goel, School of Business 95
RoutersMulti-HUB Ethernet
![Page 96: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/96.jpg)
Sanjay Goel, School of Business 96
RoutersRepeater
• Copies bits from one network to another• Does not look at any bits• Allows the extension of a network beyond
physical length limitations
REPEATER
![Page 97: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/97.jpg)
Sanjay Goel, School of Business 97
RoutersBridges
• Network can be divided into segments with a bridge• Have two Ethernet ports• Bridge learns which devices are on each side by MAC
address• It makes decision to forward or not to forward each
packet to the other side– Check the destination MAC address in frame
• Extends the network beyond physical length limitations.
• Improve network efficiency
![Page 98: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/98.jpg)
Sanjay Goel, School of Business 98
RoutersSwitch
• Connects several computers in a network by a number of RJ-45 ports– Same as Hubs
• Every port works as a Bridge– A switch has table of (MAC, port) pairs
• Each device can act independently from other devices
![Page 99: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/99.jpg)
Sanjay Goel, School of Business 99
RoutersSwitch Cont’d.
• Consider a switch with the following devices attached: – computer 1 – computer 2 – computer 3 – printer – file server – uplink to the Internet – In this case:
• computer 1 could be printing a document• computer 2 connects to a files server• computer 3 accesses the Internet. • Because the switch intelligently forwards traffic only to the devices
involved, there can be multiple independent simultaneous conversations.
![Page 100: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/100.jpg)
Sanjay Goel, School of Business 100
RoutersHub vs. Switch
Bandwidth Limitations• Total network bandwidth is limited to the speed of the hub, i.e. a 10Base-
T hub provides 10Mb bandwidth max, no matter how many ports it has.• Total network bandwidth is determined by the number of ports on the
switch. i.e. an 8 port 100Mb switch can support up to 800Mb/s bandwidth.
![Page 101: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/101.jpg)
Sanjay Goel, School of Business 101
RoutersLocal Area Network (Example)
![Page 102: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/102.jpg)
Sanjay Goel, School of Business 102
RoutersLayer 3 Switch
• Layer 3 switching refers to a class of high-performance routers optimized for the campus LAN or intranet.
• Difference with router:– software (router) vs. hardware (switch)
• Layer 3 switch: basically an optimization of Internet class routers for the campus intranet
![Page 103: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/103.jpg)
Sanjay Goel, School of Business 103
Sniffing
![Page 104: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/104.jpg)
Sanjay Goel, School of Business 104
SniffingDefinition
• Network sniffing is used to eavesdrop the network to capture the packets transmitted over the network.
• Components of a Sniffer– The hardware: adapter with promiscuous mode capability– Driver: capture the packets and store them in the buffer.– Packet filter: filter the packets according to user rules.– Packet analyzer: analyses the packets, and generate human
readable reports.– Examples:
• TcpDump, WinDump, Ethereal
![Page 105: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/105.jpg)
Sanjay Goel, School of Business 105
SniffingHow
• Frames are transmitted on Ethernet– Broadcast Frames
• Examples?• All computers read the frame
– Non-broadcast frames• Examples?• Only the target computer reads the frame• Can the frame be read by other computers?
– Hub?– Switch?
![Page 106: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/106.jpg)
Sanjay Goel, School of Business 106
SniffingPromiscuous Mode
• Machines can be set in promiscuous mode– This allows them to intercept all the packets coming into it– Introduced in the specification to allow debugging & testing
of networks
![Page 107: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/107.jpg)
Sanjay Goel, School of Business 107
SniffingPromiscuous Mode
• For most network card, you only need to set a register bit– Then, you can get every frame on the wire– More overhead to computer
• At higher level use Windows NDIS to set promiscuous mode– NDIS: Network Driver Interface Specification
• Standard API to Network Interface Card
– Promiscuous mode is required part of NDIS specification
![Page 108: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/108.jpg)
Sniffer
HUB
Switch
Sniffer
• Able to sniff the packets• Able to receive broadcast• Why?
• Unable to sniff the packets• Able to receive broadcast• Why?
SniffingHUB vs. Switch
Sanjay Goel, School of Business 108
![Page 109: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/109.jpg)
Sanjay Goel, School of Business 109
SniffingARP Spoofing (Redirecting)
• Broadcast a response to ARP request by containing the victim’s IP address and this hacker’s MAC address as the source.
• Others will believe that the hacker has the victim’s IP address, and send packets for the victim to this host.
• The hacker would then forward the packets to the victim.
![Page 110: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/110.jpg)
Sanjay Goel, School of Business 110
SniffingARP (Mapping IP Addresses to MAC Addresses)
Request
140.252.13
.1 .2 .3 .4 .508:00:20:03:F6:42 00:00:C0:C2:9B:26
Reply
140.252.13
.1 .2 .3 .4 .508:00:20:03:F6:42 00:00:C0:C2:9B:26
arp req | target IP: 140.252.13.5 | target eth: ?
arp rep | sender IP: 140.252.13.5 | sender eth: 00:00:C0:C2:9B:26
![Page 111: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/111.jpg)
Sanjay Goel, School of Business 111
SniffingARP Redirect
Switch
Internet
B VA
ARP Req
ARP Req
• An ARP request is made by the Sender
![Page 112: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/112.jpg)
Sanjay Goel, School of Business 112
SniffingARP Redirect
switch
Internet
Hacker VictimSender
ARP Reply
• Hacker Replies to the Request
![Page 113: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/113.jpg)
Sanjay Goel, School of Business 113
SniffingARP Redirect
• Sender sends the data on the network
Switch
Internet
Hacker VictimSender
Data
![Page 114: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/114.jpg)
Sanjay Goel, School of Business 114
SniffingARP Redirect
Switch
Internet
Hacker VictimSender
Data
• Sender sends the data on the network
![Page 115: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/115.jpg)
Sanjay Goel, School of Business 115
SniffingARP Command• Displays and modifies the IP-to-Physical address translation tables used by address
resolution protocol • Command
ARP -s inet_addr eth_addr [if_addr]ARP -d inet_addr [if_addr]ARP -a [inet_addr] [-N if_addr]
• Options-s: Adds the host and maps Internet address inet_addr to Physical address eth_addr. The entry is
permanent.-d: Deletes the host specified by inet_addr. inet_addr may be wildcarded with * to delete all
hosts.-a: Displays current ARP entries by interrogating the current protocol data.
(Note: If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed.)
-N if_addr: Displays the ARP entries for the network interface specified by if_addr.(Note: The Physical address is given as 6 hexadecimal bytes separated by hyphens.
Example:> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.> arp -a .... Displays the arp table.
inet_addr: internet address.eth_addr: physical address.if_addr: Interface address
![Page 116: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/116.jpg)
Sanjay Goel, School of Business 116
SniffingARP Detection
• Detection– A LAN with many computers, we want to detect
which one of them is sniffing– We know all IP addresses of those computers– What happens if we send a ARP request with an
IP address and a non-broadcasting MAC address?
• E.g. fake broadcast FF:FF:FF:FF:FF:FE
![Page 117: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/117.jpg)
Sanjay Goel, School of Business 117
SniffingARP Protection
• Set the ARP table static• Replace Hub with Switch
– Makes sniffing harder
• Sniff the network for sniffing– Monitor changes of mapping of IP and MAC address
• Encryption– Ultimate solution: never transmit plain-text information
![Page 118: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/118.jpg)
Sanjay Goel, School of Business 118
Ethereal
![Page 119: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/119.jpg)
Sanjay Goel, School of Business 119
EtherealFunctionality
• ?
![Page 120: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/120.jpg)
Sanjay Goel, School of Business 120
EtherealDownload and Install
• ?
![Page 121: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/121.jpg)
Sanjay Goel, School of Business 121
EtherealLab 1
• ?
![Page 122: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/122.jpg)
Sanjay Goel, School of Business 122
EtherealLab 2
• ?
![Page 123: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/123.jpg)
Sanjay Goel, School of Business 123
Junk
![Page 124: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/124.jpg)
Sanjay Goel, School of Business 124
TransportFunction
• Manages transmission packets– Repackages long messages when necessary into small
packets for transmission – Reassembles packets in correct order to get the original
message. • Handles error recognition and recovery.
– Transport layer at receiving acknowledges packet delivery. – Resends missing packets
![Page 125: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/125.jpg)
Sanjay Goel, School of Business 125
NetworkFunction
• Manages addressing/routing of data within the subnet – Addresses messages and translates logical addresses and
names into physical addresses. – Determines the route from the source to the destination
computer – Manages traffic problems, such as switching, routing, and
controlling the congestion of data packets.• Routing can be:
– Based on static tables– determined at start of each session– Individually determined for each packet, reflecting the
current network load.
![Page 126: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/126.jpg)
Sanjay Goel, School of Business 126
DatalinkFunction
• Packages raw bits from the Physical layer into frames (logical, structured packets for data).
• Provides reliable transmission of frames– It waits for an acknowledgment from the receiving
computer.– Retransmits frames for which acknowledgement not
received
![Page 127: Critical Thinking The Key to Learning and Communicationgoel/classes/spring2007/itm604/notes/net… · • Any network connected to the internet – Conform to certain naming conventions](https://reader033.vdocument.in/reader033/viewer/2022043014/5fb08d620220ed6db912f7d1/html5/thumbnails/127.jpg)
Sanjay Goel, School of Business 127
PhysicalFunction
• Transmits bits from one computer to another• Regulates the transmission of a stream of bits over a
physical medium. • Defines how the cable is attached to the network
adapter and what transmission technique is used to send data over the cable. Deals with issues like– The definition of 0 and 1, e.g. how many volts represents a
1, and how long a bit lasts?– Whether the channel is simplex or duplex?– How many pins a connector has, and what the function of
each pin is?