Introduction to Computer Networks



Similar documents
Computer Networks & Security 2014/2015

Distributed Systems. 2. Application Layer

Application-layer protocols

Chapter 3. Internet Applications and Network Programming

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Internet Security [1] VU Engin Kirda

The OSI and TCP/IP Models. Lesson 2

Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

Network Applications

Lecture 28: Internet Protocols

Overview of Computer Networks

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

1 Introduction: Network Applications

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

Ethernet. Ethernet. Network Devices

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

The Transport Layer. Antonio Carzaniga. October 24, Faculty of Informatics University of Lugano Antonio Carzaniga

TCP/IP Protocol Suite. Marshal Miller Chris Chase

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Objectives of Lecture. Network Architecture. Protocols. Contents

Protocols. Packets. What's in an IP packet

DATA COMMUNICATOIN NETWORKING

Communications and Networking

The Application Layer: DNS

FTP: the file transfer protocol

Limi Kalita / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (3), 2014, Socket Programming

How do I get to

EXPLORER. TFT Filter CONFIGURATION

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

Technical Support Information Belkin internal use only

Chakchai So-In, Ph.D.

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Protocols and Architecture. Protocol Architecture.

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

Life of a Packet CS 640,

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? What s the Internet? What s the Internet?

How To Understand The Layered Architecture Of A Network

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

First Midterm for ECE374 03/09/12 Solution!!

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Computer Networks and the Internet

The exam has 110 possible points, 10 of which are extra credit. There is a Word Bank on Page 8. Pages 7-8 can be removed from the exam.

Computer Networks CS321

IT4405 Computer Networks (Compulsory)

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

architecture: what the pieces are and how they fit together names and addresses: what's your name and number?

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Final for ECE374 05/06/13 Solution!!

Network Security. Vorlesung Kommunikation und Netze SS 10 E. Nett

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Mathatma Gandhi University

Networking Applications

CSCI 362 Computer and Network Security

Layered Architectures and Applications

Architecture and Performance of the Internet

Linux MDS Firewall Supplement

User Datagram Protocol - Wikipedia, the free encyclopedia

Cape Girardeau Career Center CISCO Networking Academy Bill Link, Instructor. 2.,,,, and are key services that ISPs can provide to all customers.

Network: several computers who can communicate. bus. Main example: Ethernet (1980 today: coaxial cable, twisted pair, 10Mb 1000Gb).

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Chapter 1 Computer Networks and the Internet

Chapter 8: Computer Networking. AIMS The aim of this chapter is to give a brief introduction to computer networking.

Layered protocol (service) architecture

Chapter 11. User Datagram Protocol (UDP)

Network Programming with Sockets. Process Management in UNIX

Computer Networks CCNA Module 1

How To Understand The Internet Of S (Netware)

Topics. Computer Networks. Let s Get Started! Computer Networks: Our Definition. How are Networks Used by Computers? Computer Network Components

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Overview of TCP/IP. TCP/IP and Internet

Network Models and Protocols

Decentralized Peer-to-Peer Network Architecture: Gnutella and Freenet

Network Programming TDC 561

3.1 TELECOMMUNICATIONS, NETWORKS AND THE INTERNET

CSCI-1680 SMTP Chen Avin

How To Understand The Internet From A Telephone To A Computer (For A Computer)

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Principles of Network Applications. Dr. Philip Cannata

CMSI 182 Intro to Computer Science. Week 13 Tuesday B.J. Johnson Doolan :25 10:40

Domain Name System (DNS)

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Network Layers. CSC358 - Introduction to Computer Networks

Introduction to computer networks and Cloud Computing

The TCP/IP Reference Model

Lecture 2: Protocols and Layering. CSE 123: Computer Networks Stefan Savage

Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Computer Networks. A Top-Down Approach. Behrouz A. Forouzan. and. Firouz Mosharraf. \Connect Mc \ Learn. Hill

Transcription:

Introduction to Computer Networks Chen Yu Indiana University Basic Building Blocks for Computer Networks Nodes PC, server, special-purpose hardware, sensors Switches Links: Twisted pair, coaxial cable, optical fiber, phone line, wireless radio channels Network: two or most hosts connected by links/switches Addressing and Routing Address: something that identifies a node often a unique byte string. Routing: find a route (path) to the destination node based on its address. Types of traffic/addressing Unicast: to a single destination node. Broadcast: to all nodes on the network. Multicast: to some subnet of nodes on the network. 1

Network Protocol A network protocol describes how communication entities (sender/receiver) should interact to accomplish a networking task. Format, order of messages sent and received Actions taken on message transmission, receipt Protocol define interface, not implementations Allow two sides of a communication task to be independently designed / implemented. An example A human protocol A computer protocol Person A hi Person B hi Got the time? 3:30 Build a connection? computer A computer B response Get http://www.iu.edu <file> Network Layers Separation of network functions /features allow independent design and implementation. Layering is a vertical separation of network functions / features. Hidden the complexity: each layer interface hides complexity in this layer and layers below. 2

Internet Architecture Bottom-up: Physical: electromagnetic signals on the wire. Link: data transfer between neighboring network elements. E.g. Ethernet encoding, framing, error correction Network: host-to-host connectivity. E.g. IP routing and addressing Transport: host-to-host data transport reliable data transport, congestion control, flow control. TCP/UDP Application: anything you want to do on computer networks. HTTP, FTP, SMTP Protocols for the Internet Architecture Difference between layers, protocols, protocol implementations. Socket Programming Socket: the interface between application processes and underlying networking systems. 3

Socket Programming Socket: an OS interface into which application processes can communicate with remote application process. Two types of transport services via socket APIs: Connection-oriented byte stream (TCP) Connectionless datagram (UDP) Port Numbers Multiple sockets might exist in each host A port number identifies each such socket in each host Usually, port numbers ranging from 0 to 1023 are called well-known port numbers and are restricted. TCP socket At the server: server must have created socket (door) that welcomes client s contact server process must first be running Client contacts server by: Creating client-local TCP socket Specifying IP address, port number of the server socket When client creates sockets: client TCP establishes connection to server TCP. When contacted by client: server TCP creates a new connection socket for communicating with the client, which allows server to talk with multiple clients. 4

Berkeley Sockets Operations: fd = socket(): create the socket bind(fd,port): binds socket to local port. connect(fd,port): establish a connection to a remote port send(), recv(), write(), read(): operations for sending and receiving data close(fd) Association The 5-tuple that completely specifies the two processes that make us a connection. {protocol, local-addr, local-process, foreign-addr, foreign-process} Server-Client Model 5

UDP Socket UDP: connectionless no handshaking sender explicitly attaches IP address and port of destination to each datagram. Datagram-oriented TCP Segment Structure Protocols vs. Implementation They specify: Syntax and semantics of messages exchanged. Rules for when and how processes send & respond to messages. They don t specify the implementation: Programming languages, data structures The goal: components implemented independently can inter-operate with each other as long as they follow the protocol specification. 6

Network Applications and Application-layer Protocols Network applications: running in end systems (hosts) distributed, communicating using network. use communication services provided by lower layer protocols (TCP, UDP). Application-Layer Protocols define interface between application entities. Network Applications Some commonplace applications Web and HTTP FTP, telnet and ssh E-mail: SMTP, POP3, IMAP DNS Distributed file sharing HTTP and web HTTP: hypertext transfer protocol Web: the application using HTTP protocol Client/Server model Client: browser that requests, receives, and displays web objects Server: web server sends objects in response to requests 7

HTTP and Web HTTP specifies Types of messages exchanged, e.g. request & response messages Syntax of message types: what fields in messages & how fields are delineated. Semantics of the fields, ie. Meaning of information Rules for when and how processes send & respond to messages. Web client and server can inter-operate as long as they follow HTTP Web client (brower): IE, Firefox Web server: Apache, MS IIS Electronic Mail Two types of entities: Mail servers mailbox contains incoming messages for users message queue of outgoing (to be sent) mail messages User agents compose, edit, read mail messages. pine, outlook Electronic Mail Two types of protocols: Mail transfer protocol from sender agent to the receiver s mail server (SMTP simple mail transfer protocol) Mail access protocol the receiver pulls mails from server to agent. E.g. POP3, IMAP, HTTP 8

Example You use your PC to compose a message with Bob s address. Your PC sends the message to her mail server through SMTP; the message is placed in a message queue. Your mail server sends message to Bob s mail server through SMTP. Bob s mail server places the message in Bob s mailbox Bob invokes his user agent to read the message. SMTP interaction between mail servers S: 220 www.example.com ESMTP Postfix C: HELO mydomain.com S: 250 Hello mydomain.com C: MAIL FROM:<sender@mydomain.com> S: 250 Ok C: RCPT TO:<friend@example.com> S: 250 Ok C: DATA S: 354 End data with <CR><LF>.<CR><LF> C: Subject: test message C: From: sender@mydomain.com C: To: friend@example.com C: C: Hello, C: This is a test. C: Goodbye. C:. S: 250 Ok: queued as 12345 C: QUIT S: 221 Bye Example telnet servername 25 See 220 reply from the server Enter hello, mail from, rcpt to, data This allows you Send email without using a normal email client 9

Mail Access Protocols SMTP: delivery/storage to the receiver s server Mail access protocol: retrieve from server POP: Post Office Protocol IMAP: Internet Mail Access Protocol HTTP: Hotmail, yahoo!mail DNS: Domain Name System People: multiple identifiers SSN unique, for tax reporting Name Human friendly, easy to remember Internet hosts: IP address used for addressing, routing on the Internet name : e.g. heart.psyc.indiana.edu human friendly. Question: Map between IP addresses and names? DNS query: find the IP address for a given name core function for Internet applications ssh avidd-b.indiana.edu vs. ssh 192.76.168.10 http://www.cnn.com vs http://64.236.24.20 DNS: decentralized Distributed database implemented with collaboration of many name servers distributed all over the network. No server has all name-to-ip address mappings. Why not centralize DNS? What if massively replicating it? 10

Query Recursive Query: puts the burden of name resolution on the contacted name server. Iterative Query: contacted server replies with name of server to contact I don t know this name, but ask this server DNS Caching Once a name is learned by the name server, it caches mapping so the next query for the same name can be answered directly. This can happen at any step of the name lookup. Cache entries timeout (disappear) after some time (e.g. two days). Timeout is necessary because the mapping can change. DNS Scalability & Reliability Scalability Poor scalability at few root name servers Reliability Problems at a root server can cause big troubles. too many replicated root name servers would make it difficult to synchronize them. 11

Distributed File sharing Napster: central index Gnutella (query flooding) non-hierarchical, equal status Peer-to-Peer Networks Fundamental advantage of p2p networks better scalability no performance bottleneck. better robustness more tolerant to random failures, intentional attaches. Challenge: peer coordination without complete global knowledge. Peer A pure peer-to-peer network does not have the notion of clients or servers, but only equal peer node that simultaneously function as both "clients" and "servers" to the other nodes on the network. 12

Keyword search Users input a few keywords, the system returns a list of documents matching the keywords. E.g. google Google maintains a central search index: a search index contains a list of all searchable words, each of which contains a list of documents relevant to the word. interaction document lists for multiple-word queries. Scalability? Robustness? Peer-to-Peer Keyword Search Splitting the central search index into smaller pieces and distributing them in peer-to-peer fashion. Challenge: make them work collaboratively to achieve similar speed and quality of search. Two solutions Splitting based on keywords split the index database to many pieces based on keywords and distribute them to many nodes in the network. Split based on documents 13

Putting them together Split based on keywords weakness: transferring large data segments for multiple keyword queries. Split based on documents weakness: too many sites to visit for each query. 14