d = number of links (hops), tp = propagation delay per link,
L = message size (bits), R = link rate (bits/s).
Once the circuit exists, the message streams continuously; it is not stored at each switch, so the bits flow like water in a pipe.
Tcircuit=setupS+propagation along pathdtp+transmission of messageRL
Why this form? After setup, the first bit travels across all d links (cost dtp), and the source pushes all L bits at rate R (cost L/R). There is no store-and-forward⇒ no ×d on the transmission term.
HOW the table works: each router looks at the destination address and consults a forwarding/routing table → outgoing link. State is not per-connection; it's per-destination (global routes).
Send one message of L bits split into nothing (single packet) across d links, rate R, propagation tp per link.
Because each switch must receive the whole packet before sending it on, each of the d links costs a transmission time L/R, serially:
T1 packet=d⋅RL+dtp
Why d⋅L/R? The packet is reborn at each hop — switch 1 finishes receiving (time L/R) before pushing to switch 2, etc. This serial replay is the cost of store-and-forward.
Now the magic — pipelining with P packets. Split L into P packets of size L/P each (ignoring header). The first packet reaches the destination after d⋅RL/P transmission, then the remaining P−1 packets stream behind it pipeline-style, one RL/P apart:
Why pipelining helps: while link 2 carries packet 1, link 1 already carries packet 2. As P grows, Pd+P−1→1, so transmission cost →L/R — the same as if there were a single hop! Smaller packets ⇒ more pipelining ⇒ lower delay (until headers dominate).
HOW label swapping works: at each hop the switch reads the incoming VC number, looks it up, swaps it for the outgoing number from its table, and forwards. The label is locally meaningful only.
Imagine sending toy cars to a friend across a city of crossroads.
Circuit switching: you call ahead and policemen clear a whole private road just for your cars — fast and smooth, but the road sits empty while you decide which car to send, and nobody else can use it.
Packet switching: you write your friend's full address on every car and just push them into normal traffic. They take whatever streets are open, maybe arrive jumbled — but the roads are shared so nothing is wasted.
Virtual circuit: you first drive once to mark a route with little colored stickers at each crossroad. Then your cars just follow the stickers (cheap to read) and stay in order — but other people's cars still use the same roads.
Switching ka matlab simple hai: network ek bada sheher hai jisme bahut saare crossroads (switches) hain, aur humein decide karna hai ki data ko kaunse raste se bheja jaaye. Iska teen tareeke hote hain. Circuit switching phone call jaisa hai — pehle pura raasta reserve kar lo (setup), phi aaram se baat karo, phir hang up (teardown). Iska fayda: ek hi baar transmission cost (L/R) lagti hai kyunki har switch pe packet ruk-ruk ke store nahi hota. Nuksaan: bandwidth reserve rehti hai, aur agar tum chup ho to wo waste ho rahi hai.
Packet switching (datagram) mein data ko chhote tukdo (packets) mein todte hain, har packet pe poora destination address likha hota hai, aur har packet alag-alag raste se ja sakta hai. Problem ye hai ki har hop pe "store-and-forward" hota hai — switch pura packet receive karke phir aage bhejta hai, isliye 1 packet ka delay d⋅L/R ban jaata hai. Lekin trick ye hai: agar bahut saare chhote packets bhejo to pipelining hoti hai — jab link 2 pe packet 1 chal raha hota hai, link 1 pe packet 2 already chal raha hota hai. Isse effective transmission ghatkar lagbhag L/R reh jaati hai. Yahi reason hai ki internet packet switching use karta hai.
Virtual circuit dono ka mix hai — best of both worlds. Pehle ek baar setup karke har switch mein chhota sa label (VC number) install kar dete hain. Phir packets sirf label dekhke forward hote hain (full address nahi chahiye), aur sabhi ek hi raste se in-order jaate hain. Important baat: VC mein bandwidth reserve nahi hoti — sirf logical path fix hota hai. ATM, Frame Relay, MPLS isi pe based hain.
Yaad rakhne ka mantra: Call = Circuit, Mail = Packet, Tour = Virtual Circuit. Exam mein delay formulas ko ratne ki jagah unka why samjho — circuit mein store-and-forward nahi hota isliye sirf ek L/R; datagram mein hota hai isliye d⋅L/R; aur pipelining se Pd+P−1⋅RL.