CS 352- Spring 2007

volleyballbeginnerΔίκτυα και Επικοινωνίες

27 Οκτ 2013 (πριν από 3 χρόνια και 5 μήνες)

107 εμφανίσεις

1

CS 352
-

Spring 2007

TA: Tuan Phan

Email:
tphan@cs.rutgers.edu

732
-
445
-
6450 (ext 9644) :


Just leaving msg( prefer using Email)


Recitation:
Th 8:10


9:00 PM @ ARC 107

Office Hour:
Th 7:00


8:00 PM @ Hill 367


Extra: Email to setup appointment on Monday afternoon.


Instructor’s Web Site:
http://remus.rutgers.edu/cs352/F07/


TA’s Web Site:
http://paul.rutgers.edu/~tphan/cs352/

Slides for recitation, Useful Links


2

Introduction


Email


Email Header: [CS352]…


Grading



Midterms: 30 % (15% each)



Project: 35% (part 1: 10%, part 2: 10% & part 3: 15%)


Final: 35 %




Homework


We won’t grade

, BUT, we highly suggest you doing
them


Important Dates


Midterm 1: Oct 9th


Project 1: Oct 15th


Project 2: Nov 5th


Midterm2: Nov 13th


Project 3: Nov 26th


Final : Dec 11


3

4

What will be in recitations


Summary of lectures


Sample Questions


Projects


More technical stuff


5

Tools for CS352


PuTTy : ssh client without GUI


XManager: ssh client with GUI


WinSCP: to upload files to CEREAL
clusters


Ethereal: capturing packet program


IDE: Eclipse, emacs, vi …

6

CEREAL cluster


Link:
http://cereal.rutgers.edu/



Use Linux machines; DO NOT use Sun
machines (including cereal.rutgers.edu)


Java programming:


http://java.sun.com/docs/books/tutorial/



ILab: Hill 248


Use Rutgers ID


Transfer students: use temporary ID


Problem: meet Robert Toth @ CoRE 232

7

Sample Question 1: OSI
LAYERING


Fill in the boxes with the function (1
-
7) and protocol (A
-
G) belonging
to them.


Layer

Typical Functions

Example Protocol

Application

Presentation

Session

Transport

Network

DataLink

Physical

8

Sample Question 1(cont.)


Functions
:

1 Provides reliable end
-
to
-
end communication.

2 Represent bytes as different voltages.

3 Implement communication between two applications of the same type.

5 Groups several user
-
level connections into a single entity.

6 Provides reliable transfer of information between two adjacent nodes.

7 Decides the route a packet will take across the network.

4 Transform between big and little endian representations.


Protocols
:

A Telnet

B Ethernet

C User Datagram Protocol

D Category
-
5 Twisted Pair

E Internet Protocol

F Point
-
to
-
Point Protocol

G Tranmission Control Protocol


9

Internet Architecture




FTP

HTTP

RTP

TFTP

TCP

UDP

IP

Ethernet

802.11

PPP

CAT
-
5

Single
-
Mode

Fiber

RS
-
232

10

Network programming in Java



TCP/IP stack

Application Protocol

Transport Protocols (UDP and TCP)

Application

Layer

Transport

Layer

Network

Layer

Host
-
to
-

Net Layer

Host A

Host B

Application

Layer

Transport

Layer

Network

Layer

Host
-
to
-

Net Layer

Network

Layer

Host
-
to
-

Net Layer

Network

Layer

Host
-
to
-

Net Layer

IP

IP

IP

Data

Data

TCP/UDP
header

Data

TCP/UDP
header

IP
header

11

Sample Question2:
ENCAPSULATION

Fit the following headers in the correct order in the frame
provided. UDP, Ethernet, DNS and IP.



If the application wants to send a payload (data) of 400
bytes to the destination and the headers are of the sizes
given below, what will be the size of the entire frame as
presented to the IP layer at the destination?

UDP: 50bytes, Ethernet:40bytes, DNS:20 byes, IP:30bytes



12

Why DNS?


On Internet, each machine has an unique IP
address, e.g, 100.100.1.201.


The IP addresses are used to communicate
between 2 machines.


Human is familiar with names:
www.google.com
,
mail.yahoo.com .


Need a mechanism to convert from name to IP
address: DNS(Domain Name Service)

13

Sample Question 8: DNS


Consider the internet in the figure below, in which zones are indicated with a
dashed line. There is only one DNS server per zone and it happens to have
the same name as the highest node in each zone: yale.edu, cs.yale.edu,
rutgers.edu, cs.rutgers.edu and root
-
servers.net.












The only servers supporting
recursive querying are cs.yale.edu and
cs.rutgers.edu
.


For each of the queries below, list in order all the DNS servers contacted by
the resolver (located in the OS of the machine running the query). Assume
there is no caching performed at any level of the hierarchy.


14

Sample Question 8: DNS(cont.)


A. (4 points) A machine called lab1.bio.yale.edu exists in the biology
department at Yale, and a user on eden.rutgers.edu launches this query:
"nslookup lab1.bio.yale.edu’’ .



B. (4 points) At the prompt of paul.cs.rutgers.edu somebody launches this
query: "nslookup lab1.bio.yale.edu" .



C. (4 points) Later, lab1.bio.yale.edu is assigned a new IP (but keeps the
same name) and is physically moved in the science building onto a local
Ethernet with other machines such as electron.eng.yale.edu and
theorem.eng.yale.edu. At the prompt of eden.rutgers.edu you launch this
query: "nslookup lab1.bio.yale.edu".



D. (4 points) In the science building, on lab1.bio.yale.edu, somebody
queries: "nslookup paul.cs.rutgers.edu".



E. (4 points) Follow the same scenario as in part (B), but this time indicate,
in order, all the queries involved in the process. Use this notation to
represent a query:
rutgers.edu
-
> rootservers.net

to indicate that
rutgers.edu is generating/forwarding a query to
rootservers.net.

15

Homework

1.
Try to do all sample questions again.

2.
Set
-
up account on CEREAL cluster.

3.
Type the code in text book, p. 151 &
p155 for the 3
rd

version)


(p. 164 & 168 for the 4
th

version)

1.
Compile and run them in CEREAL
cluster


16

Build your own network


3 CS students live together
-
> How about a small
network connecting to Internet??? What equipments do
they need to buy?? Is it very expensive ???



System Admin of a small company want to build a
network that connect 20 machines in the company. The
office locates in 2 floors of a building. What equipments
does he need to buy?



HUB, switch, router … how to distinguish them?



How to “touch” the network theories in class??


TCP/IP, DNS, HTTP


Packet capturing !!!


17

ETHERNET


TOPOLOGY: Bus & Tree


BUS TOPOLOGY


Host

T
-
Connector/Transceiver

Coaxial Cable

Terminator

NIC

Send

Transfer !!

Receive

Receive

18

ETHERNET


Tree Topology



HUB

Backbone HUB

SWITCH

B

A

C

X

Y

Z

T

send

forward

Crossover
cable

CAT 5
-

UTP cable


straight
through


cable

19

Straight through cable & crossover cable

Fig1:
Typical RJ45 Connector


Figure 2: 8 wires in RJ45 that is labeled from 1 to 8


Figure 3: Wiring for straight thru and crossover cables


20

MAC address


Network Interface Card (NIC)


Each NIC has its own MAC address , it is
stored on the chip!!


Length of MAC : 48 bites = 6 bytes



For examples: 00:C1:71:01:AB:F0



Prefix: Company ID: 3Com, Netgear …


Postfix: Serial Number


Command to show MAC: ifconfig, ipconfig


21

Ethernet Frame Structure



Type(2 bytes) specifies the network layer protocol: IP or
Novel IPX or ARP or RARP…



CRC: check sum



Broadcast:


MAC Broadcast Address = FF:FF:FF:FF:FF:FF



Host A sends a msg to host B:


MAC dest = MAC B, MAC src = MAC A


MAC Dest.
address

MAC Source
address

Type

DATA ….

CRC

22

HUB vs. SWITCH





HUB

MAC A
-
> MAC C

SWITCH

B

A

C

A

B

C

send

DATA

Ethernet Frame

forward

B can CAPTURE the packet
from A to C !!!!

send

SWITCH can learn the MACs of
all nodes

B CAN’T capture the packet
from A to C !!!!

23

How to build your own network!


NICs



HUB or SWITCH !!!



2 machines can be connected by using crossover
cable!!!



Assign IP address


Static


Dynamic



Crossover cable

DNS Protocol

Example

remus

ns
-
lcsr

a.root
-
servers.net

yale.edu

cs.yale.edu

1

2

3

4

8

7

6

5

Scenario:


remus tries to

resolve an IP address for

venus.cs.yale.edu

using a
recursive query

DNS Protocol

Another Example

remus

ns
-
lcsr

a.root
-
servers.net

yale.edu

cs.yale.edu

1

2

Scenario:


remus tries to

resolve an IP address for

venus.cs.yale.edu

using an
iterative query

3

4

5

6

7

8

Some servers do not support

Recursive queries