You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
200 lines
5.8 KiB
HTML
200 lines
5.8 KiB
HTML
4 years ago
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
||
|
<!-- IP.html (C) K. J. Turner 18/12/14 -->
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
|
||
|
<head>
|
||
|
|
||
|
<title>
|
||
|
Internet Protocol
|
||
|
</title>
|
||
|
|
||
|
<link rev="made" href="http://www.cs.stir.ac.uk/~kjt/"/>
|
||
|
|
||
|
<script type="text/javascript" language="JavaScript">
|
||
|
|
||
|
<!--
|
||
|
|
||
|
var simulator;
|
||
|
var userMessageSize;
|
||
|
var maxProtocolMessageSize;
|
||
|
var maxMediumMessageSize;
|
||
|
var lossRate;
|
||
|
|
||
|
function validInteger(name, value, min, max) {
|
||
|
if (!value.match("\\d+") || value < min || value > max) {
|
||
|
alert("Value for " + name + " must be in range " + min + " to " + max);
|
||
|
return false;
|
||
|
}
|
||
|
else
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
function validFloat(name, value, min, max) {
|
||
|
if (!value.match("\\d+\.\\d+") || value < min || value > max) {
|
||
|
alert("Value for " + name + " must be in range " + min + " to " + max);
|
||
|
return false;
|
||
|
}
|
||
|
else
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
function set() {
|
||
|
userMessageSize = document.settings.userMessageSize.value;
|
||
|
maxProtocolMessageSize = document.settings.maxProtocolMessageSize.value;
|
||
|
maxMediumMessageSize = document.settings.maxMediumMessageSize.value;
|
||
|
lossRate = document.settings.lossRate.value;
|
||
|
if (validInteger("User Message Size", userMessageSize, 10, 1000) &&
|
||
|
validInteger(
|
||
|
"Maximum Protocol Message Size", maxProtocolMessageSize, 10, 1000) &&
|
||
|
validInteger(
|
||
|
"Maximum Medium Message Size", maxMediumMessageSize, 10, 1000) &&
|
||
|
validFloat("Loss Rate", lossRate, 0.0, 1.0)) {
|
||
|
simulator.setParameter("userMessageSize", userMessageSize);
|
||
|
simulator.setParameter("maxProtocolMessageSize", maxProtocolMessageSize);
|
||
|
simulator.setParameter("maxMediumMessageSize", maxMediumMessageSize);
|
||
|
simulator.setParameter("lossRate", lossRate);
|
||
|
if (document.settings.Misordering.checked)
|
||
|
simulator.setParameter("misordering","true");
|
||
|
else
|
||
|
simulator.setParameter("misordering","false");
|
||
|
simulator.updateActionList();
|
||
|
}
|
||
|
}
|
||
|
//-->
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body background="simulator.jpeg"
|
||
|
onload="simulator=document.ProtocolSimulator; set();">
|
||
|
|
||
|
<div style="text-align: center">
|
||
|
|
||
|
<h1>Internet Protocol Simulator</h1>
|
||
|
|
||
|
<img src="simulator.gif" alt="Simulator Logo"/>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
IP (Internet Protocol) a simple connection-less protocol for transferring
|
||
|
datagrams in either direction between a pair of hosts.
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
The protocol simulation shows a time-sequence diagram with users A and B,
|
||
|
protocol entities A and B that support them, and a communications medium
|
||
|
that carries messages. Users request data transmissions with
|
||
|
<em>DatReq(DATA<strong>n</strong>),</em> and receive data transmissions
|
||
|
as <em>DatInd(DATA<strong>n</strong>)</em>. Protocol messages are sent as
|
||
|
<em>DT(MID,Offset,Length)</em> that gives the message identifier
|
||
|
<em>n</em>, its byte offset relative to the whole user message, and the
|
||
|
length of the message (fragment). The user message size may exceed the
|
||
|
maximum protocol message size, which leads to fragmentation. The maximum
|
||
|
protocol message size may also exceed that for the medium, in which case
|
||
|
there may be further fragmentation. Each fragment is followed by `+'
|
||
|
to mean that it is not the last; the very last fragment is followed by
|
||
|
`-'. (This is equivalent to the <em>More Fragments</em> flag in the
|
||
|
protocol.)
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
You may choose if the receiving protocol entity should time out a partly
|
||
|
received message. Since the simulation does not run in real-time, a
|
||
|
message's Time-To-Live (TTL) may expire as soon as it has been
|
||
|
received in part. There is no control over fragmentation in the
|
||
|
simulation; this is handled automatically based on the protocol
|
||
|
parameters. Messages may also be randomly lost or misordered, based on
|
||
|
the parameter settings.
|
||
|
</p>
|
||
|
|
||
|
<h2>Protocol Parameters</h2>
|
||
|
|
||
|
<p>
|
||
|
The following settings are adequate for a simple simulation. For a more
|
||
|
advanced exploration, choose different options and click <em>Change
|
||
|
Settings</em>.
|
||
|
</p>
|
||
|
|
||
|
<form name="settings">
|
||
|
|
||
|
<center>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
|
||
|
<tr>
|
||
|
<td align="right">User Message Size (10 to 1000):</td>
|
||
|
<td>
|
||
|
<input type="text" name="userMessageSize" value="400" size="4"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="right">Maximum Protocol Message Size (10 to 1000):</td>
|
||
|
<td>
|
||
|
<input type="text" name="maxProtocolMessageSize" value="200"
|
||
|
size="4"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="right">Maximum Medium Message Size (10 to 1000):</td>
|
||
|
<td>
|
||
|
<input type="text" name="maxMediumMessageSize" value="100"
|
||
|
size="4"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="right">Loss Rate (0.0 = lose none, 1.0 = lose all):</td>
|
||
|
<td><input type="text" name="lossRate" value="0.2" size="4"/> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="right">Medium Message Misordering</td>
|
||
|
<td align="left">
|
||
|
<input type="checkbox" name="Misordering" checked="checked"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" colspan="2">
|
||
|
<input type="button" name="btnSet" value="Change Settings"
|
||
|
onclick="set()"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
|
||
|
</center>
|
||
|
|
||
|
</form>
|
||
|
|
||
|
<h2>Protocol Simulation</h2>
|
||
|
|
||
|
<center>
|
||
|
|
||
|
<applet code="simulator.ProtocolSimulator.class"
|
||
|
archive="ProtocolSimulator.jar" width="750" height="700"
|
||
|
name="ProtocolSimulator">
|
||
|
<param name="protocol" value="IP"/>
|
||
|
</applet>
|
||
|
|
||
|
</center>
|
||
|
|
||
|
<hr/>
|
||
|
|
||
|
<p>
|
||
|
<a href="index.html"><img src="uparrow.gif" alt="Up Arrow"/></a>
|
||
|
Up one level to <a href="index.html">Protocol Simulators</a>
|
||
|
</p>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|
||
|
|