Below is a session example, some part of the server answers are replaced with the pseudo-text<blah blah>
:iamthebest$ nc mail.someplace.com 25 220 ESMTP mail.someplace.com ready <blah blah> HELO iamthebest.someplace.com 250 pleased to meet you MAIL FROM:<wizeman@someplace.com> 250 Sender ok RCPT TO:<punchingball@someplace.com> 250 Recipient ok DATA Subject: Test subject Test . 250 Message accepted for delivery QUIT
Below is a session example, the answers of the server are replaced with the pseudo-text<blah blah>
and the message text with the pseudo-text<message text>
.iamthebest$ nc imap.someplace.com 143 * OK <blah blah> . login wizeman imustnotforgetit . OK User logged in . select INBOX * <blah blah> * 360 EXISTS . <blah blah> . fetch 100 body[text] * <blah blah> <message text> . logout * <blah blah> iamthebest$
Since S3 has to emits 192× 8 bits and a preamble of 8× 8 time bits , it will take 200× 8/10,000,000=160.0µ s. So S3 ends its transmission at t=160.0µ s.
The two stations S1 and S2 are not at the same distance of S1. So they will receive the last bit sent by S3 at different moments. The dates of reception of this bit (which are also the dates at which the stations will think that the medium is free) will be t=160.0µ s+100/200,000,000s=160.5µ s for S1 and t=160.0µ s+400/200,000,000s=162.0µ s for S3.
The Ethernet protocol uses a CSMA/CD method. The first part of this acronym means "Carrier Sense", hence the network interface will wait until the medium is free before sending its packet. So S1 network interface send the packet it received from S1 CPU at t=54µ s when the medium appears to be free, that is at t=160.5+9.6=170.1µ s. And in the same way, S2 network interface send its packet at t=171.6µ s. Note that S2 thinks the medium is free because the first bit sent by S1 would have taken 500/200,000,000s=2.5µ s to reach S2 (would have arrived at t=172.6µ s).
Since S1 and S2 have simultaneously beginning to send a packet a collision is sure to occur. To know the exact date at which the collision happens, one must solve an equation. If S1 is said to be at the coordinate x=0 on the cable and S2 at the coordinate x=500 then the position, at time t (given in µ s), of the first bit sent by S1 is x(t)=200×(t-170.1). For the first bit sent by S2, the position is x'(t)=500-200×(t-171.6). The crash occurs when x(t)=x'(t), hence the equation to solve is 200×(t-170.1)=500-200×(t-171.6). After some simplifications, the equation becomes 400× t=68840.0. In conclusion the collision occurs at time t=172.1µ s, that is half a µ s after S2 sent its first bit.
First we must compute at which time the collision signal comes back to the stations. That can be done by finding where the collision occurs, for example by computing x(172.1)=400. We found that the location of the collision is 400 meters from S1 and 100 meters from S2. The collision signal will reach S1 after 400/200,000,000s=2µ s (at t=174.1µ s) and S2 after 0.5µ s (at t=172.6µ s). We must add to this the time needed to send the 4 padding bytes: 4× 8/10,000,000s=3.2µ s: the dates at which the stations finished the transmission of the padding bytes are t=177.3µ s for S1 and t=175.8µ s for S2.
After a first collision S1 will have to wait for zero or one time slot (51,2µ s). Since its random generator gives only zeros S1 is going to send its packet as soon as possible, that is at t=177.3µ s but padding bits from S2 are busying the medium until t=178.3µ s. After that S1 must wait for the inter-frame space of 9.6µ s, hence the first bit of the message will be sent at t=187.9µ s. The transmission will last 64× 8+7× 8/10,000,000s=57.6µ s, which means that it ends at t=245.5µ s. The station S2 will wait for 51.2µ s since its random generator only draws ones, but at time t=227.0µ s the medium is busy. The network interface waits for the last bit of S1 which it receives at t=245.5+2.5=248.0µ s, then it waits for the inter-frame and emits its packet at t=248.0+9.6=257.6µ s.
The virtual and real machines are directly linked by an Ethernet-like network (a virtual one but with the same characteristics as a plain one). In this context an FTP connection between the two machines is obviously allowed and the transfers can be done in active or passive mode.
The virtual machine is not on the same Ethernet network as the school FTP server. Only the real machine is on the same Ethernet network as the FTP server. Hence the virtual machine cannot connect directly to this FTP server but must ask the real machine to forward its packets to the school FTP server. Moreover the virtual network between real and virtual machine is not known by the school network, so the virtual machines cannot be reached from the school network by their own IP addresses. To allow its virtual machine an access to the school machines, the real machine forwards the virtual machine packets using a special mechanism called Network Address Translation. To make it short, this mechanism consists in replacing the virtual machine IP address with the IP address of the real one. The NAT mechanism allows the virtual machine to initiate TCP connections but does not allow virtual machines to be contacted by machines not on the virtual network. So the FTP server can be contacted by the virtual machine (the FTP command connection works without problem). But when the client tries to initiate a transfer in active mode, it creates a small server to receive the FTP server data. This small server cannot be contacted by the FTP server (since the virtual machine is on a virtual network not reachable from the FTP server). Note that passive transfers can be used since in passive transfers, the small server is created on the FTP server side. This small server can be contacted by the virtual machine using the NAT mechanism. To allow active transfers from the virtual machine one may modify the virtual machine setting in VMware by switching the network from "host only" mode to "bridged" mode. In this new mode the virtual machine shares the network interface of the real machine and so appears to be on the same Ethernet network as the real machine (and as the school FTP server). One must take care to give to the virtual machine an IP address not used by another school machine.