Title: ENGS 4 - Lecture 7 Technology of Cyberspace Winter 2004 Thayer School of Engineering Dartmouth College
1ENGS 4 - Lecture 7Technology of Cyberspace
Winter 2004Thayer School of EngineeringDartmouth
College
- Instructor George Cybenko, x6-3843
- gvc_at_dartmouth.edu
- Assistant Sharon Cooper (Shay), x6-3546
- Course webpage www.whoopis.com/engs4
2Todays Class
- Wrap-up routing basics from Lecture 6
- Samss mini-lecture
- Break
- State-based methods for Predicting the Future
3Circuit Switching
Reserve a circuit and that guarantees
services for each user Requires significant
setup time
Good for telephones, bad for web browsing!!!!
4Packet Switching
Send packets into the network, routing each
packet individually, like the post office.
Packets are routed through the network, sorted
at switches. Requires no setup time but no
guarantee of service!!
Bad for telephones, good for web browsing!!!!
5Circuit vs Packet Switching
- Call setup time s seconds
- Bandwidth - b bits per second
- Packet routing overhead p seconds per hop
- Message of B bits
- Distance between end points - d
- EG Circuit switching requires s B/b d/c
seconds - EG Packet switching requires B/b ph d/c
seconds - Which is better depends on values of parameters!!!
6B50,000 b1,000,000 p0.005 h10
Packet switching is better
Circuit switching is better
7IP Packets and routing
- IP is Internet Protocol (also Intellectual
Property sometimes) - IP addresses consist of four numbers between 0
and 255 - How many possible IP addresses are there in
total? - What is www.dartmouth.edus IP address?
Network 1
Router
?
Network 2
A router can be a dedicated piece of hardware or
a computer with several network interfaces.
Cisco, 3Com, etc sell routers.
8Resolving internet addresses
5. Send packets to 207.25.71.82
Rest of the world
Bridge or gateway or router or switch
DNS Server
LAN
4. www.cnn.com is 207.25.71.82
Your computer
1. Can I get an IP address, etc?
DHCP Server
3. What is the address of www.cnn.com?
2. Here is a temporary address and other
information.
9(No Transcript)
10(No Transcript)
11(No Transcript)
12Time vs Frequency Division Multiple Access (TDMA
vs FDMA)
- TDMA Divide a communications resource or
channel using time slots. Users take turns using
the same resource by using it only in their
allotted slots. - FDMA Divide a communications resource or
channel using frequency division. Users
simultaneously use the channel but at different
frequencies. - Space Division Multiple Access (Cellular phone)
- Code Division Multiple Access (Spread spectrum)
- Examples?
13Network routing
Routing table in a router looks
like..... Pattern Next node on
path 129.170.. host 1 125... host
2 105.121.5.21 host 3 default host 4
1
2
Router
3
4
14Bellman-Ford Routing
Computer/host
4
E
D
8
2
A
F
1
1
1
C
B
3
Distance/cost/delay between hosts
15A B C D 4 E 0 F 8
A 2 B C 1 D 0 E 4 F
Initial table has distance to each host one hop
away and otherwise.
4
E
D
8
2
A 0 B 1 C D 2 E F
A
F
1
A B C 1 D E 8 F 0
1
1
A 1 B 0 C 3 D E F
A B 3 C 0 D 1 E F 1
C
B
3
16A 6 B C 5 D 4 4 E 0 0 F 8 8
newdistance to X min( distance to neighbor
distance from neighbor to X) where min is over
all neighbors
A 2 2 B 3 C 1 1 D 0 0 E 4 4 F 2
4
E
D
8
2
A 0 0 B 1 1 C 4 D 2 2 E 6 F
A
F
1
A B 4 C 1 1 D 2 E 8 8 F 0 0
1
1
A 1 1 B 0 0 C 3 3 D 3 E F 4
A 3 B 3 3 C 0 0 D 1 1 E 5 F 1 1
C
B
3
17A 6 6 B 7 C 5 5 D 4 4 4
E 0 0 0 F 8 8 6
A 2 2 2 B 3 3 C 1 1 1 D 0 0 0 E 4
4 4 F 2 2
Repeat it!!!
A 0 0 0 B 1 1 1 C 4 3 D 2 2 2 E
6 6 F 4
4
E
D
8
2
A
F
1
A 4 B 4 4 C 1 1 1 D 2 2 E 8
8 6 F 0 0 0
1
1
A 1 1 1 B 0 0 0 C 3 3 3 D 3 3 E
7 F 4 4
A 3 3 B 3 3 3 C 0 0 0 D 1 1 1 E
5 5 F 1 1 1
C
B
3
18A 6 6 6 B 7 7 C 5 5 5 D
4 4 4 4 E 0 0 0 0 F 8 8 6 6
Repeat it...stop when the table does not change.
A 2 2 2 2 B 3 3 3 C 1 1 1 1 D 0 0
0 0 E 4 4 4 4 F 2 2 2
A 0 0 0 0 B 1 1 1 1 C 4 3 3 D 2 2
2 2 E 6 6 6 F 4 4
4
E
D
8
2
A
F
1
A 4 4 B 4 4 4 C 1 1 1 1 D 2
2 2 E 8 8 6 6 F 0 0 0 0
1
1
A 1 1 1 1 B 0 0 0 0 C 3 3 3 3 D 3
3 3 E 7 7 F 4 4 4
A 3 3 3 B 3 3 3 3 C 0 0 0 0 D 1 1
1 1 E 5 5 5 F 1 1 1 1
C
B
3
19A 6 6 6 D B 7 7 D C 5 5
5 D D 4 4 4 4 D E 0 0 0 0 E F 8 8
6 6 D
A 2 2 2 2 A B 3 3 3 A C 1 1 1 1
C D 0 0 0 0 D E 4 4 4 4 E F 2 2 2
C
The min neighbor determines the paths
A 0 0 0 0 A B 1 1 1 1 B C 4 3 3
D D 2 2 2 2 D E 6 6 6 D F 4 4
D
4
E
D
8
2
A
F
1
A 4 4 C B 4 4 4 C C 1 1 1 1
C D 2 2 2 C E 8 8 6 6 C F 0 0 0 0
F
1
1
A 1 1 1 1 A B 0 0 0 0 B C 3 3 3 3
C D 3 3 3 A E 7 7 A F 4 4 4
C
A 3 3 3 D B 3 3 3 3 B C 0 0 0 0
C D 1 1 1 1 D E 5 5 5 D F 1 1 1 1
F
C
B
3
20A 6 D B 7 D C 5 D D 4 D E 0 E F 6 D
Only need the total distances and the next
neighbor
A 2 A B 3 A C 1 C D 0 D E 4 E F 2 C
A 0 A B 1 B C 3 D D 2 D E 6
D F 4 D
4
E
D
8
2
A
F
1
A 4 C B 4 C C 1 C D 2 C E 6 C F 0 F
1
1
A 1 A B 0 B C 3 C D 3 A E 7 A F 4 C
A 3 D B 3 B C 0 C D 1 D E 5 D F 1 F
C
B
3
21A 6 D B 7 D C 5 D D 4 D E 0 E F 6 D
A 2 A B 3 A C 1 C D 0 D E 4 E F 2 C
Ooops...what if the network changes??
A 0 A B 1 B C 3 D D 2 D E 6
D F 4 D
4
E
D
8
2
A
F
1
A 4 C B 4 C C 1 C D 2 C E 6 C F 0 F
1
1
A 1 A B 0 B C 3 C D 3 A E 7 A F 4 C
A 3 D B 3 B C 0 C D 1 D E 5 D F 1 F
C
B
3
Have enough information to keep updating the
table until it stops changing
22Sams Mini-lecture
23Break
24Predicting the Future
- Newtonian revolution (late 1600s) Fma
- Concept of state introduced
- The state of a system is all that is needed to
predict its future states. - Having additional information about the systems
past states does not help to predict its future. - This defines the notion of state.
25Example
- A cannonball shot from a canon.
- Where will it fall?
position momentum of the canonball is the
state
???
???
26States transition rules for a cannonball
- Four state variables
- horizontal position at time i x(i)
- vertical position at time i y(i)
- horizontal momentum at time i xm(i)
- vertical momemtum at time i ym(i)
- Update rules to go from time i-1 to time i
- x(i)x(i-1)dtxm(i-1)
- if (y(i-1) gt 0 ) y(i)y(i-1)dtym(i-1)
- xm(i)xm(i-1)
- ym(i)ym(i-1)-dtg
27Matlab demo
28Game of Life
- http//www.math.com/students/wonders/life/life.htm
l - Rules are very simple
- Rules describe how to go from one state to the
next - No simple mathematical theory for predicting what
state - will exist in the future.must simulate in
general.
29State-based Prediction
- What are examples of state-based prediction?
- Weather - http//www.ecmwf.int/
- Astronomy - http//science.nasa.gov/RealTime/jtrac
k/Spacecraft.html - Chemistry - http//polymer.bu.edu/java/java/movie/
index.html - Biology - http//arieldolan.com/ofiles/JavaFloys.a
spx - Physics - http//otrc93.ce.utexas.edu/waveroom/Ap
plet/WaveKinematics/WaveKinematics.html - Medicine - http//www.esg.montana.edu/meg/notebook
/example1.html - Others?