Lecture 1 Course webpage Syllabus and schedule, textbooks Wireshark

advertisement
Lecture 1

Course webpage

http://csserver.evansville.edu/~hwang/f11-courses/cs475.html

Handouts, assignments

Supplemental resources

Syllabus and schedule, textbooks

Wireshark
Thursday, August 25
CS 475 Networks - Lecture 1
1
Outline
Chapter 1 - Foundation
1.1 Applications
1.2 Requirements
1.3 Network Architecture
1.4 Implementing Network Software
1.5 Performance
1.6 Summary
Thursday, August 25
CS 475 Networks - Lecture 1
2
Introduction
Suppose we want to build a new computer
network from the ground up …




What types of applications should it support?
What requirements do the applications impose on
the network structure?
How can hardware and software be arranged into a
complete network architecture?
How would we measure the performance of our
network?
Thursday, August 25
CS 475 Networks - Lecture 1
3
Applications
Assume we want our network to support all of the
applications that have made the Internet popular:

World Wide Web

Email

File Sharing

Streaming Audio and Video

Live Video Conferencing

Other?
Thursday, August 25
CS 475 Networks - Lecture 1
4
Requirements
The expectations you have of the network depend
on your perspective.



An application programmer would list services that
his application needs (guaranteed delivery, minimal
delay, etc.)
A network designer would list properties that result
in a cost-effective design.
A network provider would list characteristics that
make the network easy to manage.
Thursday, August 25
CS 475 Networks - Lecture 1
5
Connectivity
Does our network need to connect many
machines or just a few? Does it need to be
scalable (support growth)?
The physical medium connecting two or more
computers is known as a link.
The computers (or other specialized hardware)
connected by the links are known as nodes.
Thursday, August 25
CS 475 Networks - Lecture 1
6
Connectivity
(a) Point–to–point link
(b) Multiple-access link
Note that all nodes are directly connected to each
other.
Point-to-point examples:
switched Ethernet, RS232 (serial)
Multiple-access examples:
wireless Ethernet, cable TV
Thursday, August 25
CS 475 Networks - Lecture 1
7
Connectivity
We can extend the size of
our network by connecting
nodes indirectly via
switches.
hosts
Switches are nodes that
implement the network.
switches
Hosts are nodes that
support users and run
applications.
Thursday, August 25
CS 475 Networks - Lecture 1
8
Connectivity
There are two types of switched networks.

In a circuit switched network the two communicating
nodes are directly connected.


The plain old telephone system (POTS) is the most
well-known circuit switched network.
In a packet switched network nodes send discrete
blocks of data (packets or messages) over the
network. Each packet has a destination address.

Thursday, August 25
Switches typically use a store-and-forward strategy for
packet handling. Almost all computer networks are
packet switched networks.
CS 475 Networks - Lecture 1
9
Connectivity
We can connect networks
to form an
interconnection of
networks or an internet.
The Internet is the most
well-known internet.
routers
The nodes that connect
networks are known as
routers or gateways.
Thursday, August 25
CS 475 Networks - Lecture 1
10
Connectivity
In order to send data from one node to another
each node must have an address.
When nodes are connected indirectly, the
switches/routers use the destination address to
determine how to forward the message.
We have been discussing unicasting (single
destination), but our network should also support
broadcasting (send to all nodes) and multicasting
(send to subset of nodes).
Thursday, August 25
CS 475 Networks - Lecture 1
11
Terminology Review




The old telephone system is an example of a
______________ network.
A ___________ is the physical medium
connecting two or more computers.
A ___________ link is an an example of a
point-to-point link.
A _________ is used to connect different
networks.
Thursday, August 25
CS 475 Networks - Lecture 1
12
Terminology Review




In a network, the hardware between two links is
known as a __________.
__________ is an example of a multiple-access
link.
The Internet is an example of a
____________ network.
A ___________ can be used to extend a
network.
Thursday, August 25
CS 475 Networks - Lecture 1
13
Terminology Review




The old telephone system is an example of a
circuit-switched network.
A link is the physical medium
connecting two or more computers.
A serial (RS232) link is an an example of a
point-to-point link.
A router is used to connect different
networks.
Thursday, August 25
CS 475 Networks - Lecture 1
14
Terminology Review




In a network, the hardware between two links is
known as a node.
Cable TV is an example of a multiple-access
link.
The Internet is an example of a
packet-switched network.
A switch can be used to extend a
network.
Thursday, August 25
CS 475 Networks - Lecture 1
15
Resource Sharing
Hosts share a network via multiplexing.
Data multiplexer
Thursday, August 25
Data demultiplexer
CS 475 Networks - Lecture 1
16
Resource Sharing
In synchronous time-division multiplexing (STDM)
each host takes a turn transmitting during a time
slot.
In frequency-division multiplexing (FDM) each
host transmits at a different frequency (like radio
and TV).
Most computer networks use statistical
multiplexing. This is similar to STDM, but hosts
transmit only when they have data and they don't
wait for a turn.
Thursday, August 25
CS 475 Networks - Lecture 1
17
Resource Sharing
To ensure that each host gets to transmit data, large
messages are broken into smaller packets. The network
will typically place a limit on the maximum packet size.
a switch multiplexing packets from different hosts
Thursday, August 25
CS 475 Networks - Lecture 1
18
Resource Sharing
Issues for later exploration:

Which packet should the switch send next?
(FIFO or round-robin)


Do we want to guarantee a certain bandwidth
(Quality of Service or QoS) to a particular host?
How to we handle switch congestion?

If packets arrive at a faster rate than the switch can
send them, the switch buffer will overflow and
packets will be dropped.
Thursday, August 25
CS 475 Networks - Lecture 1
19
Support for Common Services
Many applications use common services
(reliability, security, etc) when they communicate
over a network.
Instead of building that functionality into each
application, it is logical to implement the most
common services into the network.
Thursday, August 25
CS 475 Networks - Lecture 1
20
Support for Common Services
We can view the
network as
providing logical
communication
channels.
Each channel
can provide a set
of services
required by an
application.
Thursday, August 25
CS 475 Networks - Lecture 1
21
Support for Common Services
What types of logical channels would be of most
use to applications? File transfer and streaming
multimedia are among the most common
applications on the Internet.
A request/reply channel is useful for file transfer.
Delivery is guaranteed. Privacy may be included.
A message streaming channel might ensure inorder arrival of packets but not guarantee delivery
(packets might be dropped).
Thursday, August 25
CS 475 Networks - Lecture 1
22
Support for Common Services
How might a network provide guaranteed or
reliable delivery?
The network must be able to recover from failure.
There are three general classes of network
failure:

bit errors (single-bit or burst)

packet errors (lost or misrouted packets)

physical errors (broken network links or
crashed routers).
Thursday, August 25
CS 475 Networks - Lecture 1
23
Support for Common Services
Bit errors may be corrected with error detection or
error correction coding (ECC).
Packet errors can be corrected by packet
retransmission. (How do we know if a packet is
lost or just late?)
Physical errors can be corrected by re-routing
packets
Thursday, August 25
CS 475 Networks - Lecture 1
24
In-class Exercises


Refer to the man page for the
gethostbyname() function. Write C++ code
that uses this function to display the IP address
of “www.evansville.edu”. You may find the
inet_ntop() function and the ip(7) man page
useful.
gethostbyname() is now considered obsolete
(you will still find it used in most books on
network programming). Redo exercise 1 using
getaddrinfo().
Thursday, August 25
CS 475 Networks - Lecture 1
25
In-class Exercises

When you have complete this exercise, email
your source file as an attachment to the
instructor at hwang@evansville.edu
SPOILER ALERT
STOP HERE!!
Thursday, August 25
CS 475 Networks - Lecture 1
26
In-class Exercises
gethostbyname Solution
const int buflen = INET_ADDRSTRLEN;
hostent *he_ptr = gethostbyname("www.evansville.edu");
// h_addr contains the memory address of the IP address
// It is not the IP address
in_addr *ipa_ptr1 = (in_addr *)he_ptr­>h_addr;
char *dst = new char[buflen];
inet_ntop(AF_INET, ipa_ptr1, dst, buflen);
cout << dst << endl;
Thursday, August 25
CS 475 Networks - Lecture 1
27
In-class Exercises
getaddrinfo Solution
const int buflen = INET_ADDRSTRLEN;
addrinfo *res;
getaddrinfo("www.evansville.edu", NULL, NULL, &res);
in_addr *ipa_ptr2 = &(*(sockaddr_in *)res­>ai_addr).sin_addr;
char *dst = new char[buflen];
inet_ntop(AF_INET, ipa_ptr2, dst, buflen);
cout << dst << endl;
freeaddrinfo(res);
Thursday, August 25
CS 475 Networks - Lecture 1
28
Download