IT 605 Computer Networks
Introduction Prof . Anirudha Sahoo KReSIT IIT Bombay
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.1
About the course • a graduate entry-level course • designed to give students a background in – Networking concepts – Internet technologies – Introduction to few advanced areas in networking
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.2
Emphasis of the course • The main emphasis of the course will be – conversant with the modern day network technologies – Sufficient background in analysis of networks/protocols. – stepping stone to future research in the field of networks
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.3
Course contents The topics covered in this course include • Core Computer Network: – – – – – –
Various layers of network, LAN technologies Various MAC protocols Data link control protocols Network layer, IP routing protocols Transport layer, TCP, UDP Scheduling algorithms
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.4
Course contents • Network Applications: – Client-Server Architecture, Sockets Applications, DNS, email etc.
• Network Security: – Basic Network and Data Security
• Voice over IP & voice routing • Introduction to QoS in networks
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.5
Lecture Schedule • • • • • • • • • • • • • • • • •
1. Introduction (1) 2. Introduction (2) 3. Network Layers (1) 4. Network Layers (2) 5. MAC Protocols (1) 6. MAC Protocols (2) 7. MAC Protocols (3) 8. Network devices (1) 9. Data Link Control (1) 10. Data Link Control (2) 11. Network Layer (1) 12. Network Layer (2) 13. Network Layer (3) 14. Transport Layer (1) 15. Transport Layer (2) 16. socket programming (1) 17. socket programming (2)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.6
Lecture Schedule • • • • • • • • • • •
18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28.
Scheduling (1) Scheduling (2) Introduction to Mobile Computing Network Security (1) Network Security (2) Network Applications (1) Network Applications (2) Voice over IP (1) Voice over IP (2) QoS in networks (1) QoS in networks (2)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.7
Texts/References
• 1. Computer Networks, Latest edition Andrew Tanenbaum • 2. Computer Networks, A Systems Approach – L. Peterson and B. Davie • 3. An Engineering Approach to Computer Networking, S. Keshav • 4. Internetworking with TCP/IP Vol.-1, ed.-3, Douglas E. Comer • 5. Unix Network Programming : Networks APIs : Sockets and XTI. Vol.-1 ed.-2, W.Richard Stevens • 6. Unix Network Programming: Interprocess Communications. Vol.-2. ed.-2, W.Richard Stevens Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.8 • 7. Data and Computer Communications, 6th
Prerequisites • Familiarity with basic networking concepts is necessary • An undergraduate course in networks is desirable – but not mandatory
• Familiarity with C and unix-based system is required • Background in computer algorithm is required (undergrad level computer algorithm) Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.9 • Background in basic probability theory
Evaluation (Credit Students)
• 30% - 1 mid-term Exam • 50% - Final End-semester Exam • 20% - 4 Quizzes • Attendance – Minimum attendance absolutely required as per DEP rules
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.10
Evaluation (Non-credit Students)
• Exactly same as credit students • Need to get a passing grade to get a completion certificate
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.11
Policy for Academic Dishonesty
• Academic Dishonesty (a.k.a. cheating) in any form will not be tolerated at all – Will not hesitate to take the extreme measure: give you a fail grade and will not be allowed to take any courses in the future
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.12
Logical View of Internet
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.13
Physical View of Internet
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.14
Perspectives • Network designers: Concerned with cost-effective design
– Need to ensure that network resources are efficiently utilized and fairly allocated to different users.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.15
Perspectives (contd.) • Network users: Concerned with application services
– Need guarantees that each message sent will be delivered without error within a certain amount of time.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.16
Perspectives (contd.) • Network providers: Concerned with system administration
– Need mechanisms for security, management, fault-tolerance and accounting.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.17
Connectivity Building Blocks: • nodes: general-purpose workstations, special boxes ... • links: coax cable, optical fiber...
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.18
Connectivity (contd.) Direct Links: • point-to-point
Point-to-point network
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.19
Connectivity (contd.) • multiple access
…
multiple access network Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.20
Switched networks
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.21
Internetworks
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.22
Networking at Different Stages
• Different technologies and protocols work at different stages of networks. – Local Area Network (LAN) – Metropolitan Area Network (MAN) – Wide Area Network (WAN)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.23
LAN • Network owned by offices, enterprises – Spans a room or a building – Restricted in size – Often use a transmission technology consisting of a single cable to which all the machines are attached. – Typically runs at 10-100 Mbps range. – Examples • IEEE 802.3 ethernet • IEEE 802.5 token ring Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.24
MAN • Basically a bigger version of a LAN • Normally uses similar technology like LAN • Covers a group of nearby offices or a city – May be either a private or public network
• Examples – IEEE 802.6 DQDB (Distributed Queue Dual Bus) Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.25 – Metro Ethernet (gigabit ethernet based
WAN • Spans a large geographical area – Often a country or a continent
• Point-to-point WAN – Usually leased from a carrier network e.g. telephone company
• Circuit Switched WAN – ISDN based
• Packet Switched WAN – Share resources provided by the service provider – ATM, frame relay, X.25Introduction Prof . Anirudha sahoo, KReSIT, IIT Bombay
1.26
Effective resource sharing Need to share (multiplex) network resources (nodes and links) among multiple users.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.27
Strategies • Time-Division Multiplexing (TDM):
– Each user periodically gets the entire bandwidth for a small burst of time.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.28
Common Multiplexing Strategies (contd.) • Frequency-Division Multiplexing (FDM):
– Frequency spectrum is divided among the logical channels. – Each user has exclusive access to his channel.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.29
Statistical Multiplexing • Time-division, but on demand rather than fixed • Reschedule link on a per-packet basis • Packets from different sources interleaved on the link
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.30
Statistical Multiplexing
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.31
Statistical Multiplexing (contd.) • Buffered packets contend for the link • Packet queue may be processed FIFO, but not necessarily • Buffer (queue) build up is called congestion • Buffer (queue) overflow : packet loss
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.32
Switching Strategies • Circuit Switching: dedicated circuit; send/receive a bit stream
– end-to-end path setup before actual communication. – no congestion for an established circuit connection.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.33
Circuit Switching – resources are reserved; only propagation delays. – unused bandwidth on an allocated circuit is wasted.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.34
Switching Strategies (contd.) • Packet Switching: store-and-forward; send/receive messages (packets)
– no prior setup of end-to-end path from the source to the destination. – packets are forwarded one hop at a time.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.35
Packet Switching – greater network utilization, multiplexing possible. – typically ``best-effort" service; may face congestion.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.36
Addressing • Address: byte-string that identifies a node; usually unique
– physical address: device level – network address: network level – logical address: application level
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.37
Addressing (contd.) – unicast: node-specific – broadcast: all nodes on the network – multicast: some subset of nodes on the network
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.38
Routing • Mechanisms of forwarding messages towards the destination node based on its address • Need to learn global information
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.39
Network Architecture • To reduce design complexity:
– Use abstractions to hide complexity; Abstraction naturally leads to layering – Can have alternative abstractions at each layer
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.40
Network Architecture (contd.)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.41
Protocols and Services • Each protocol module/object has two different interfaces – service interface: defines operations on this protocol. Each layer provides a service to the layer Above. – peer-to-peer interface: defines messages exchanged with peer. Protocol of “conversation” between corresponding Layers in Sender and Receiver. Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.42
Protocols and Services (contd.) • Term ``protocol'' is also used to denote the implementation of the peer-to-peer interface. • Multiplexing and Demultiplexing. • Headers and Encapsulation.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.43
TCP/IP Layers • Physical Layer: Concerned with transmitting bits over a communication channel.
– Issues largely deal with electrical and procedural interface to the physical transmission medium.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.44
TCP/IP Layers (contd.) • Data Link Layer: Concerned with transforming the raw physical layer into a `link' for the higher layer.
– Issues largely deal with framing, error detection/correction and multiple access.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.45
TCP/IP Layers (contd.) • Internet Layer: Concerned with addressing and routing of packets.
– Issues largely deal with addressing, subnetting and route determination.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.46
TCP/IP Layers (contd.) • Transport Layer: Concerned with endto-end connection characteristics.
– Issues largely deal with retransmissions, sequencing and congestion control.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.47
TCP/IP Layers (contd.) • Application Layer: Concerned with ``application'' protocols.
– Issues largely deal with providing services to users and application developers.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.48
Layering Summary • Advantages of layering: – Allows a ``divide-and-conquer'' strategy for building networks. – Easier to understand and implement as compared to a monolithic approach. – If the service interface remains unchanged, implementation of a layer can be changed without affecting other layers.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.49
Layering Summary (contd.) – Specification is separated from implementation. – Reuse of functionality. – Upper layers can share the services provided by the lower layers. The lower layers implement some of the common functionalities
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.50
Layering Summary (contd.) • Disadvantages of layering: – Implementation may not be the most “efficient”. – Major concern in low bandwidth networks and low power hosts.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.51
OSI Reference Model - The ISO Model of Architecture for Open • ExistsSystems Interconnection theoretically • Services Each Application layer (7) layer provides to Presentation layer (6) Session layer(5) layer Above Transport Layer (4) • Protocols Network layer (3) Between Data Link Layer (2) Physical Layer (1) corresponding Layers in Sender and Receiver Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.52 • Good Software
Physical layer Moves bits from one end to other • Media Dependent – Copper: Coaxial/Twisted Pair; Typically upto 100 Mbps – Fibre: Single/Multi Mode; Can transmit in Gigabits/second – Satellite: Channels of 64 kbps, 128 kbps – Radio waves: Ranges from Kbps to Mbps Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.53
Physical layer • Media Independent – Connectors: Interface between equipment and link – Control, clock and ground signals – Protocols: RS 232 (20 kbps, 10 ft), RS 449 (2 Mbps, 60 ft)
•
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.54
Data Link layer
Controls a single physical link • Logical Link Control (LLC): – – – –
Framing (start and stop) Error Detection Error Correction Optimal Use of Links (Sliding Window Protocol) – Examples: HDLC, LAP-B, LAP-D Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.55
Data Link layer • Medium Access Control (MAC): – Multiple Access Protocols – Channel Allocation – Contention, Reservation, Round-robin – Examples: Ethernet (IEEE 802.3), Token Ring (802.5)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.56
How to share a channel with/without a Coordinator: Medium Access Control (MAC) • Scheduled Access (GSM) – Time Slotted, User knows when to transmit
• Random access (CSMA/CD) – Carrier Sense • POLITENESS: If you hear some one talking, wait until s/he finishes.
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.57
MAC • PERSISTENT: Start immediately after line becomes free. This leads to COLLISION. If channel is busy, senses the medium persistently – 1-persistent – stations waits until channel is idle and then immediately send – p-persistent – transmits with a probability p when channel is idle
• NON-PERSISTENT: Wait for some (random) time when channel is busy and then transmit immediately when idle
– Collision Detection • Station must listen when transmitting • Minimum transmission time needed to detect collision
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
– Binary Exponential Backoff
1.58
Network Layer • Why do we need a network layer? – Can all machines in the world be Ethernet? – Other Technologies (modems, token ring)
• Goals and Services: – Hide type of subnets (Ethernet, Token Ring, FDDI ... ) – Hide topology of subnets – Choose good routes Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.59 – Uniform addressing scheme
Transport Layer • Accepts data from session layer and split it into smaller units (if needed) and pass them to network layer • Typical transport layer would provide errorfree point-to-point data channel that delivers message/bytes in the order in which they were sent • However, other possible kind could be transport of isolated messages with no guarantee • It is a true end-to-end layer from source to destination (in lower layers protocols are 1.60 Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction between each machine and its immediate
Session Layer • Allows users on different machines to establish sessions between them • Allows ordinary data transport (as does transport layer) and also provides enhanced services useful for some applications (e.g. checkpointing of sessions, dialog control)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.61
Presentation Layer • Performs certain functions that are requested sufficiently often to warrant finding a general solution for them • Unlike lower layers, this layer is concerned with syntax and semantics of the information transmitted • Manages abstract data structures and converts from the representation inside the computer (e.g. ASCII, Unicode) to the network standard and Profback . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.62
Application Layer • Handles application specific issues/protocols – e.g. different file naming conventions, different ways of representing text lines – Various special and general purpose facilities are taken care of by application layer while two remote applications communicate with each other. Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.63
Comparison of two models OSI Application
TCP/IP Application
Presentation Session Transport
Transport
Network
Internet
Data Link
Data Link
Physical
Physical
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.64
Internet Application
• • • •
Client-Server Paradigm Servers run ``service'' (Mail, News, WWW, ...) Clients access using ``protocols'' (SMTP, HTTP, ...) Prof . Anirudha sahoo, KReSIT, IIT Bombay Communication using ports and sockets
Introduction
1.65
Sockets
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.66
Socket Programming
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.67
Socket Programming • Typical sequence – Allocate Local Resources – Specify communication End Points (ports) – Initiate/Listen for connections – Send/receive data – Terminate connections gracefully – Release resources
• Design Issues – for scalability, State full/Stateless servers, Concurrent, Iterative service Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.68
Network Applications • Domain Name Service ( DNS) • Simple Mail transfer Protocol (SMTP) • Network File System ( NFS) • Network Management (SNMP) • Network Security ( Secured Socket Layer SSL, IPSec)
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.69
Packet Scheduling • Packet switched network shares resources – Hence scheduling is important to decide which packet should be served when
• Can be very simple (FIFO) to quite complex (WFQ) • An important aspect of providing QoS
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.70
Advanced Topics • Voice over IP (VOIP) – An emerging technology • Same IP network can be used for telephony
– But voice traffic needs better treatment from the network • Low delay • Low packet loss
– Hence needs QoS from the network Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.71
Advanced Topics • QoS Networks – Standard QoS Architectures in IP • IntServ • DiffServ • MPLS
Prof . Anirudha sahoo, KReSIT, IIT Bombay
Introduction
1.72