Recent posts in Computer Networks

504
504 views

Client–Server Architecture 

In a client–server model, there is one always-on machine called the server and many clients that request services from it. A common example is the Web, where your browser (client) requests a page and the web server sends it back. Clients do not talk directly to each other; all communication goes through the server. The server has a fixed and well-known IP address, so clients always know where to send their requests. Applications like the Web, FTP, Telnet, and e-mail commonly use this architecture.

Peer-to-Peer (P2P) Architecture 

In a P2P architecture, there is little or no dependence on a central server. Instead, users’ computers, called peers, communicate directly with each other. These peers are normal laptops or desktops owned by users and are often connected only sometimes. A popular example is BitTorrent, where users both download and upload files to others.

Why P2P Is Attractive (and Its Problems)

A key advantage of P2P is self-scalability: when more users join, they also add more resources by sharing data with others. This makes P2P systems cost-effective, since they do not need expensive data centers or high server bandwidth. However, because there is no central control, P2P systems can face security, performance, and reliability issues compared to client–server systems.

A process can be thought of as a program that is running within an end system. When processes are running on the same end system, they can communicate with each other with interprocess communication, using rules that are governed by the end system’s operating system. Processes on two different end systems communicate with each other by exchanging messages across the computer network. A sending process creates and sends messages into the network; a receiving process receives these messages and possibly responds by sending messages back.

467
467 views

Two Approaches to Data Transfer

There are two fundamental ways to move data in a network: circuit switching and packet switching. Circuit switching reserves resources before communication begins, whereas packet switching sends data without any prior reservation and shares network resources dynamically. 

Difference: circuit switching is planned and dedicated, packet switching is on-demand and shared.

Resource Reservation vs On-Demand Use

In circuit-switched networks, bandwidth and buffers along the entire path are reserved for the full duration of the session. In packet-switched networks, no such reservation exists, so packets may experience queuing delays when the network is busy. 

Difference: circuit switching guarantees resources, packet switching may cause waiting.

Reservation Analogy

A circuit-switched network is like a restaurant that requires reservations—> you prepare in advance and get immediate service. A packet-switched network is like a walk-in restaurant—> you can enter anytime but might have to wait. 

Difference: circuit switching offers certainty, packet switching offers flexibility.

Telephone Networks as Circuit Switching

Traditional telephone networks use circuit switching. Before communication starts, a dedicated end-to-end circuit is established, and switches along the path maintain connection state. 

Difference: circuit switching maintains a fixed connection, packet switching does not maintain per-session state in the network.

Guaranteed Transmission Rate

Once a circuit is established, a constant transmission rate is reserved on every link, ensuring steady data transfer throughout the session. Packet-switched networks cannot guarantee such a constant rate. 

Difference: circuit switching provides guaranteed bandwidth, packet switching provides best-effort service.

Sharing Links Using Circuits

In a circuit-switched network, each link is divided into a fixed number of circuits, limiting the number of simultaneous connections. Packet-switched networks allow many users to share the same link dynamically. 

Difference: circuit switching has fixed capacity per connection, packet switching has dynamic sharing.

Example of Fixed Bandwidth

If a 1 Mbps link has four circuits, each connection gets 250 kbps for the entire call, even if it is not fully used. In packet switching, bandwidth is used only when packets are transmitted. 

Difference: circuit switching may waste unused bandwidth, packet switching uses bandwidth efficiently.

Packet Switching and Best Effort Delivery

In packet-switched networks like the Internet, packets are sent without reserving resources and may face delays due to congestion. The network makes no strict guarantees on delivery time or rate. 

Difference: circuit switching guarantees performance, packet switching prioritizes scalability and efficiency

1,850
1,850 views
Day Date Contents Slides Assignments
 1  Oct 15 Introduction to Computer Networks
Networks- links and nodes, 
Based on links- simplex, half duplex, full duplex
Based on connection- point to point, multipoint
Circuit switching- dedicated channel is required, not efficient
Packet switching- store and forward, congestion and loss of packets may occur
Unicast, multicast, broadcast
Time division multiplexing, Frequency division multiplexing, statistical multiplexing
Errors- bit error, burst error, packet loss, node/link error
Layering- abstraction, modularity (i)OSI model- 7 layers (ii)TCP/IP- 4 layers
Encapsulation of packets in the seven layers
   
 2  Oct 17 Ethernet - 802.3 
CSMA/CD- carrier sense - detect whether the node is active or not, multiple access
10 Mbps(normal) but maybe 100 Mbps
Physical properties
Coaxial cable- 500 m, optical fibre, twisted pair, transciever- checks cable is idle/active
Host can have more than one ID- in wired connection(only one ID) but in 
wireless(different ID)
Repeater after 500 m(Normal LAN not more than 4 repeaters(upto 2500m))
Access control
MAC-Media Access Control- implemented in network adapters
Frame format of Ethernet- Max. data size is 1500 Bytes
Multicast, unicast, specific
Transmitter algorithm- 1-persistent, p-persistent, non-persistent
Minimum size of packet should be atleast 512 bits.
Exponential backoff algorithm
Network security
Malware,spyware,virus,worms,wiretapping
Confidentiality- encrypt message, Traffic confidentiality- even traffic is not visible, 
Data integrity- change bits in data, Originality -replay attack, Timeliness
DNS attack- valid URL mapped to invalid ID, Authentication, Denial of service attack
Cryptography
Cryptographic blocks, encryption algorithm, block ciphers
Symmetric ciphers(secret key ciphers)- DES, 3DES, AES
Asymmetric ciphers(public key ciphers)- A pair of keys- private key and public key, 
single way communication(authentication)
RSA- 1024 bit key, prime factorisation is exponential
Authenticators- digital signature
Hash-like functions- MAC message authentication code
Keys- session(short time), predistributed- public key infrastructure
Application- PGP,SSH, Transport- TLS, SSL, Internet- IPSec
Wireless- 802.11, WPA- wifi protected access
Firewall- implemented in router or end-host, filter traffic using IP or port address
  Assignment-1
 3 Oct 26 WiFi- 802.11
spread spectrum- depends on how much frequency band is allocated to each user
Frequency hopping-each time slot different frequencies using random number 
generator algorithm
Direct sequence- XOR data with n bit random number
802.11 n- 600Mbps, 802.11 b- direct sequence speed is 11 Mbps, 
802.11 a- OFDM, 54 Mbps, 5GHz, 802.11 g- 54 Mbps, 2.5 GHz
CSMA/CA - hidden node, exposed node, RTS-CTS signals
Access point- scanning- active and passive, probe frame, probe response 
Frame format(WiFi)
Internetworking- switches, bridges, forwarding
Connectionless-datagram, Connection-oriented- Virtual circuit- 4 tuple
Datagram delivery- best effort, no guarantee that receiver may recieve
IPv4 packet frame- fragmentation
IP Address- unique for all host, heirarchical, Class A, Class B, Class C
Subnetting- <subnet number, subnet mask, next hop>
subnet mask + IP Address = Subnet Number
Protocols- ARP, DHCP, ICMP, IGMP,RARP,BOOTP
Routing- (distributed)
Distance vector- count to infinity, RIP
Link State- Dijkstra, reliable flooding, system update
<neighbour, cost, nexthop, seq no, TTL>, OSPF
   
 4 Oct 28 Application layer protocols
SMTP- push, port-25,secure port-465
POP3- pull, 110, secure port 995
FTP- control(21) and data(20)
HTTP- www request-response service
DNS- hostname to IP, heirarchical, distributed database on top of named nodes
IPv4- 32 bit addresses separated by dots, frame format
IPv6- 128 bit hexadecimal rep separated by colons
Additional features- auto config, QoS, privacy security authentication, multicast routing
Sockets- process to process, socket descriptor, socket binding, types- datagram, stream, raw
UDP- unreliable, realtime communication
Frame format- psuedoheader, mapper service port
TCP- reliable, full duplex, inorder communication
flow control, congestion control, frame format- flags
End-to-end connectivity issues- establishment/teardown, timeout, out of order packets, resources required
Advertised window, effective window
Congestion control- 
AIMD- additive increment, multiplicative decrement, congestion window incremented by 1,
Slow start- exponential increase, 
Fast retransmit/fast recovery- retransmit after 3 failed acks and recovery
Error control- 2D parity- even parity , odd parity; Checksum- adding 16 bits of data using 1's complement, CRC
   
 5 Oct 29 CRC- how generator polynomial is used in calculation in both sender and reciever
Flow control- ARQ- automatic repeat request- timeout, Ack
Stop and wait
Four scenarios-(i) in simple one only after Ack next packet is send 
(ii)If a packet is lost it is resend after timeout 
(iii)If Ack is lost the packet is resend 
(iv) If an earlier Ack arrives after timeout still the packet is resend- duplicate packets in receiver
Utilisation is 50%, data packet size is around 1 KB
Sliding window- sender and receiver buffer and window sizes,synchronisation 
and out of order delivery in receiver
Two cases: i) Receiver window size is 1 - Go Back N- if a packet is lost the receiver will not 
receive any other packets and all the packets from the sequence number of lost packet
have to be retransmitted
ii) Receiver window size is equal to sender window size- Selective repeat- 
only the lost packet has to be retransmitted and after receiving the packet, the highest seq 
number packet is acknowledged.
Sequence number selection- problems
Sender window size less than (max seq num + 1)/2
 

 

1,136
1,136 views
Consider a TCP connection with 10 ms round-trip time, max segment size = 2 KB, receiver window = 64 KB. Suppose packet #4 timed out and all other transmissions were successful. RTO value is 50 ms. Calculate the time required to reach the receiver window size. Assume RTT is fixed.
To see more, click for the full list of questions or popular tags.