# Switching Example Problem

I'm studying for an exam and I'm going over review problems my professor has given me. I'm having trouble understanding Switching. Can someone explain to me how to do the following switching problem?

Two hosts A and B are connected by two switches S1 and S2 as indicated below. Each link has a bandwidth of 1000 Mbps and the delay of 10 ms Calculate the time take to transfer 10^3 bits of data from A to B in the following cases:

``````           A---S1---S2---B
``````

A.) S1 and S2 do message switching.

B.) S1 and S2 do packet switching. Assume that there is no header required for the packets and the packets are p bytes long.

C.) If we have to include a header of length h bits for each packet for routing purposes and we choose to send packets of size p, how much time will it tale to transfer the whole file?

-

## migrated from stackoverflow.comDec 21 '10 at 0:56

This question came from our site for professional and enthusiast programmers.

This isn't a programming question – The Archetypal Paul Dec 20 '10 at 20:40
Please understand that this question reads an awful lot like "Do my homework for me", a pattern that is generally frowned upon on SO. Further, as @Paul pointed out, it isn't really a programming question. At the very least, consider narrowing its focus: present what you've tried and what, specifically, you can't figure out. – Dan J Dec 20 '10 at 20:52
Also consider: If the problem is that you don't know the difference between message and packet switching, the answer is "go back to your notes / textbooks". :) – Dan J Dec 20 '10 at 20:55
We're not here to do your homework for you. You learn it, you pass your exams. Not us. We've already learnt it and passed our exams. – Tom O'Connor Dec 21 '10 at 0:58