10/23
- Connectionless (IP, UDP)
- Connection Oriented (TCP)
- No setup is required before transmitting data.
- Each packet is handled independently
- No cleanup is necessary after sending data
- Think of “postcards”
- Sender requests connection to server
- Sender waits until connection is formed
- It leaves the connection open while sending
- Terminates connection when there is no more data to transmit
- Think of “telephone calls”
- Has a set up overhead
- Is reliable
- Can reserve bandwidth in some networks (plane line, ATM)
- Examples: TCP Protocol, telephone system, ATM
- Has less overhead
- Application can have more control in message retransmission, error handling, etc
- Allows broadcasts and multicasts
- Examples: UPC, IP
TCP:
- Used in applications that need high (complete) reliability.
- Email, file transfer
UDP:
- Used in applications that do no need a high degree of reliability but require high response.
- Examples : voice over internet
- Also used in applications that want to have more control in the delivery of messages.
- These applications have to implement reliability on top of UDP.
- Danger: Application may “reinvent” TCP
- Also used in applications that need broadcast/multicast
- TCP is a point to point protocol (host to host)
- Delay
o Time it takes for a packet to arrive at its destination
o Cases :
§ Propagation delay (intrinsic network media)
§ Switching delay (hardware)
§ Queuing delay (time a packet stays in a buffer waiting to be delivered)
o Think of “Length of Pipe”
- Throughput
o Capacity in bits/sec
o Width of pipe
Relationship between delay and throughput:
- when network is idle
o Queue is empty
o Queuing delay is zero
o There is no need to store data in buffer queue
- When load increases
o Queuing delay increases
Load is defined as the ratio between throughputs to capacity
Capacity -> Max throughput
D -> total Delay
D0 = delay when network is idle
U = Utilization (load) 0 <= U <= 1
U=0 (Network is idle)
U=1 ( Network is used)
D = D0 / (1 –U)
Network is idle U =0 -> D = D0
Network is highly used (congested), U =1 -> D= infinite
Consequence:
Any network that operates with utilization close to 100% of capacity is doomed

Delay Throughput Product
· Delay - Time to cross network in seconds
· Throughput – Capacity in bits per second
· Delay(sec) x Throughput(bit) = D x T bits

Delay = 0.5 seconds
Throughput = 128 Kbps
#bits in transit = 0.5 seconds x 128 Kbps = 64Kbits
Protocol:
ISO-7 layer reference model
|
Layer 7 |
Application |
- Individual Application |
|
|
Presentation |
- Data representation |
|
|
Session |
- Login and Passwords |
|
|
Transport |
- Reliability |
|
|
Network |
- Packet Forwarding |
|
|
Data Link |
- Hardware and frame definitions |
|
Layer 1 |
Physical |
- Underlying hardware |
o Connects physical networks and creates a software that makes the resulting system homogeneous
· A device used in the internet to connect heterogeneous networks.
· It is also called - Internet router
- Internet gateway

The Internet is a collection of
Goal of Internet

Friday (27 Oct 2000)
ss = accept (…)
# if defined (DEGUB)
Process HTTP Request(ss);
Close (ss)
# else
// standard procedure
intpd = fork()
if (pd ==0)
{ processHTTPRequest(ss);
exit;
}
close(ss);
#endif
- Debugging a “core” file + process
Crashes write a “core” file
gdb myserver core
gdb > whre (prints stack trace)
strcpy
processHTTPRequest line 100 server.cc
main line 1801 server.cc
gdb > up } go to correct any in stack trace
gdb > down }
gdb > print <variable>
- Disable fork(), so the master server is going to crash if there is a problem.
- Running gdb on a program
gdb myserver
gdb run
……. Running …..
to stop program, ctrl-C
> where
> break file:line -> stop process when it reaches this line
> break
>cont
> help
> next -> execute function, execute program name by line
> step -> Step into function
CGI-BIN:
If a request has the form GET /cig-bin/<prog>?a=b&c=d
Then:
processHTTPrequest()
{ if cgi-bin… in request
- get <prog>
- get <query>
// set env variable
Build string
S1 = query_string = <query>
S2 = Requestmehtod = To_get;
// use putenv to set
putenv(s1)
putenv(s2)
- Redirect stdout to slave socket
- execvp for
http-root-dir/cgi-bin/<prog>