Monday, March 29, 2010

Lecture 13: FTP

This lecture was about the File Transfer Protocol (FTP). The main purpose of FTP is to transfer files from one computer to another across a network. FTP was implemented to help promote the sharing of files, encourage use of remote computers, and transfer data reliably between different end hosts. You might think at first that transferring files between computers is relatively easy. However, different operating systems have different structures for handling files and could be drastically different from one another. FTP is responsible for handling all these issues to make the transfer seamless for the users.

When an FTP connection is made, two separate connections are established. One is for control information and the other is for data information. First, the control connection is established and the end hosts communicate with one another. When a request is made over the control connection for a file, the data connection is established and the data transfer occurs. As data is transferred over the connections, replies are also sent back and forth. Replies are only sent over the control connection and contain much information about the state of the transfer.

Trivial File Transfer Protocol (TFTP) is a simplified version of FTP. It was designed to be small and simple and able to fit into the ROM of a computer. TFTP is mainly used for bootstrapping diskless systems.

Thursday, March 25, 2010

Lecture 15: Socket Programming

The lecture for Wednesday, March 25, focused itself primarily on Socket Programming. Sockets are and Application Programming Interface (API) for use with TCP/IP. The network API are services that provide an interface between the application and the protocol software. When we look at a network API, we want to have certain features. These features include, a Generic Programming interface which supports multiple communication protocol suits. Other features include support for both message oriented and connection oriented communication, the ability to work with existing I/O services, and be independent of the OS. There are also certain functions needed, such as specify local and remote connection endpoints, initiate the connection, wait for incoming connections, send and recieve data, terminate a connection, and handle errors.

A socket is an abstract representation of a communication endpoint that needs to establish a connection and specify communication endpoint addresses. In order to create a socket we must call a function, int socket(int family, int type, int proto); where family specifies the protocol familty, type specifies the type of service and protocol specifies the specific protocol. This function will return a socket descriptor or -1 on an error, and will allocate the resources needed for a communication endpoint, but endpoint addressing has yet to be dealt with. Generic socket addresses are added through a struct, that contains three values, a address length, family, and the address value. This addressing can be done bothe in IPv4 and IPv6.

Once the addressing has been handled it is time to bind the address to a socket. To do this we use the bind() system call. If the bind returns successfully it will return a 0 or a -1 on error. Calling bind() assigns the address specified by the structure to the socket descriptor. There are a number of uses for bind, such as allowing a client to bind to a port, or a server to a well known address.

At the end of the lecture we went over some more socket system calls, such as the general use ones of read(), write(), or close(). There are also specific calls for connection oriented(TCP), connect(), listen(), and accept(). As well as calls for connectionless service(UDP), send(), and recv().

Monday, March 22, 2010

Lab 3: Transport Layer Protocols

You may post your questions and comments regarding the Transport Layer Protocols lab under this blog post.

You may schedule lab sessions to work in the networking lab using the link posted on WebCT.

Do not forget to turn in the solutions for Question Sheet for the PreLab in Pages 173-174 by Thursday, March 25th by 1pm on WebCT.

Tuesday, March 9, 2010

Lab 2 deadline

Deadline for Routing Information Protocol has been extended to Friday 11:00 pm

Saturday, March 6, 2010

Lecture 12: Telnet, Email, etc.



The lecture given on wednesday, march 3rd, started, as always with a review of the previous lecture and then moved onto the new material: the application level protocols telnet, smtp, pop, imap and mime. From the previous lecture, Dr. Gunes repeated the key functions of a router, how much buffer was necessary, bridges, and spanning trees.
The new information was, in my opinion, more enjoyable. The reason I say this is obvious, application level protocols are easier to understand and experiement with. Almost all of the protocols mentioned in the class on Wednesday were not only explained, but demonstrated.

The first protocol that Dr. Gunes taught us about was telnet. Telnet is simple, bidirectional communication protocol that utilizes byte oriented communication. It is a generic TCP client that sends whatever you type into the host terminal over the TCP socket. Many unix machines have telnet servers offering functionality like echo running by default. The professor demonstrated several such examples during class to the delight of the students.

Next, the instructor educated us on several basic email protocols including smtp, pop, imap, and mime. Smtp, simple message transfer protocol is used to send emails. It can even be used through telnet! It was shown to be unsecure because it is very easy to send fraudulent emails. Next the instructor taught us about POP, post office protocol. This mail receiving protocol allows the client to read their emails by pulling them entirely from the server. this allows the emails to be read offline. After that, he taught us about IMAP, Internet Message Access protocol. This protocol is more flexible than pop3 and more complicated. Finally we discussecd webmail, which we are all quite familiar with.

Monday, March 1, 2010

Lecture 11: Router Architectures

Today's lecture covered the routers architecture. Explaining that there are two key router functions: routing and forwarding. Running routing algorithms to decide best path to reach its destination and fowarding data from the input link to the output link.
Input ports,output ports and switching fabric are important components of a router. Input ports perform the physical layer functions(line termination), the data link layer functions(data-link processing) and the network layer functions(lookup,fowarding and queuing). Import queuing takes place when data arrives faster than it can forward into switching fabic. Head of the Line blocking (HOL) queuing is when data at the front of the queue stops other data in the queue from moving forward. Switching fabric connects the routers input ports to its output ports. There are three types of switching fabrics: memory, bus and crossbar. And the output ports performs the reverse of the input port functions.
The lecture also covered bridges. A bridge connects networks. They are needed for two reasons; it strengthens signals if communication is large and provides autonomy.
The bridge must have a database to keep track of which hosts are on which networks. To do this the system administrator can hard code the addressses or the bridge could learn the information as it goes. A learning bridge can move from one network to another and hosts can be added at any time. This would allow no manual setup from humans. The problem with this is the possibility of looping in a system of two or more bridges. Some of the ways to fix this issue is to have the bridges detect loops and feed it back to the user or design the bridge to prune itself so there is no loops in the network.