72
Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.1 IT 605 Computer Networks Introduction Prof . Anirudha Sahoo KReSIT IIT Bombay

01 Intro

Embed Size (px)

Citation preview

Page 1: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.1

IT 605Computer Networks

Introduction

Prof . Anirudha Sahoo

KReSIT

IIT Bombay

Page 2: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.2

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

Page 3: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.3

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

Page 4: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.4

Course contentsThe 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

Page 5: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.5

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

Page 6: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.6

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)

Page 7: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.7

Lecture Schedule• 18. Scheduling (1)• 19. Scheduling (2)• 20. Introduction to Mobile Computing• 21. Network Security (1)• 22. Network Security (2)• 23. Network Applications (1)• 24. Network Applications (2)• 25. Voice over IP (1)• 26. Voice over IP (2)• 27. QoS in networks (1)• 28. QoS in networks (2)

Page 8: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.8

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 • 7. Data and Computer Communications, 6th edition. - William

Stallings• Various RFCs and papers will be recommended for reading.

Page 9: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.9

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)• Background in basic probability theory

Page 10: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.10

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

Page 11: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.11

Evaluation (Non-credit Students)

• Exactly same as credit students• Need to get a passing grade to get a completion

certificate

Page 12: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.12

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

Page 13: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.13

Logical View of Internet

Page 14: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.14

Physical View of Internet

Page 15: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.15

Perspectives• Network designers: Concerned with cost-effective

design

– Need to ensure that network resources are efficiently utilized and fairly allocated to different users.

Page 16: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.16

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.

Page 17: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.17

Perspectives (contd.)• Network providers: Concerned with system

administration

– Need mechanisms for security, management, fault-tolerance and accounting.

Page 18: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.18

ConnectivityBuilding Blocks:• nodes: general-purpose workstations, special

boxes ...• links: coax cable, optical fiber...

Page 19: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.19

Connectivity (contd.)Direct Links:• point-to-point

Point-to-point network

Page 20: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.20

Connectivity (contd.)• multiple access

multiple access network

Page 21: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.21

Switched networks

Page 22: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.22

Internetworks

Page 23: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.23

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)

Page 24: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.24

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

Page 25: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.25

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)– Metro Ethernet (gigabit ethernet based platform)– IEEE 802.16 wireless MAN

Page 26: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.26

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.25

Page 27: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.27

Effective resource sharingNeed to share (multiplex) network resources (nodes and

links) among multiple users.

Page 28: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.28

Common Multiplexing Strategies

• Time-Division Multiplexing (TDM): – Each user periodically gets the entire bandwidth

for a small burst of time.

Page 29: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.29

Common Multiplexing Strategies (contd.)

• Frequency-Division Multiplexing (FDM):– Frequency spectrum is divided among the

logical channels.– Each user has exclusive access to his channel.

Page 30: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.30

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

Page 31: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.31

Statistical Multiplexing

Page 32: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.32

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

Page 33: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.33

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.

Page 34: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.34

Circuit Switching– resources are reserved; only propagation

delays.

– unused bandwidth on an allocated circuit is wasted.

Page 35: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.35

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.

Page 36: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.36

Packet Switching– greater network utilization, multiplexing possible.

– typically ``best-effort" service; may face congestion.

Page 37: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.37

Addressing• Address: byte-string that identifies a node; usually

unique– physical address: device level– network address: network level– logical address: application level

Page 38: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.38

Addressing (contd.)– unicast: node-specific– broadcast: all nodes on the network– multicast: some subset of nodes on the network

Page 39: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.39

Routing

• Mechanisms of forwarding messages towards the destination node based on its address

• Need to learn global information

Page 40: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.40

Network Architecture• To reduce design complexity:

– Use abstractions to hide complexity; Abstraction naturally leads to layering

– Can have alternative abstractions at each layer

Page 41: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.41

Network Architecture (contd.)

Page 42: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.42

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.

Page 43: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.43

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.

Page 44: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.44

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.

Page 45: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.45

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.

Page 46: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.46

TCP/IP Layers (contd.)• Internet Layer: Concerned with addressing and

routing of packets.– Issues largely deal with addressing, subnetting

and route determination.

Page 47: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.47

TCP/IP Layers (contd.)• Transport Layer: Concerned with end-to-end

connection characteristics.– Issues largely deal with retransmissions,

sequencing and congestion control.

Page 48: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.48

TCP/IP Layers (contd.)• Application Layer: Concerned with ``application''

protocols.– Issues largely deal with providing services to

users and application developers.

Page 49: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.49

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.

Page 50: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.50

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

Page 51: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.51

Layering Summary (contd.)• Disadvantages of layering:

– Implementation may not be the most “efficient”.– Major concern in low bandwidth networks and low

power hosts.

Page 52: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.52

OSI Reference Model - The ISO Model of Architecture for Open Systems Interconnection

• Exists theoretically• Services Each layer

provides to layer Above • Protocols Between

corresponding Layers in Sender and Receiver

• Good Software engineering pattern. Only specification, not implementation details

Application layer (7)Presentation layer (6)Session layer(5)Transport Layer (4)Network layer (3)Data Link Layer (2)Physical Layer (1)

Page 53: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.53

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

Page 54: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.54

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) •

Page 55: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.55

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

Page 56: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.56

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)

Page 57: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.57

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.

Page 58: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.58

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

– Binary Exponential Backoff

Page 59: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.59

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 – Uniform addressing scheme

• OSPF, BGP in Internet

Page 60: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.60

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 error-free 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 between each machine and its immediate neighbors)

Page 61: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.61

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)

Page 62: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.62

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 back

Page 63: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.63

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.

Page 64: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.64

Comparison of two models

Physical

Data Link

Network

Transport

Session

Presentation

Application Application

Transport

Internet

Data Link

Physical

OSI TCP/IP

Page 65: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.65

Internet Application

• Client-Server Paradigm • Servers run ``service'' (Mail, News, WWW, ...) • Clients access using ``protocols'' (SMTP, HTTP, ...) • Communication using ports and sockets

Page 66: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.66

Sockets

Page 67: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.67

Socket Programming

Page 68: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.68

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

Page 69: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.69

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)

Page 70: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.70

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

Page 71: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.71

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

Page 72: 01 Intro

Prof . Anirudha sahoo, KReSIT, IIT Bombay Introduction 1.72

Advanced Topics

• QoS Networks– Standard QoS Architectures in IP

• IntServ• DiffServ• MPLS