Computer Networks and Security: TCP/IP and OSI/ISO reference models, functions and protocols of different layers, characteristics of physical media, multiplexing, medium access protocols, introduction to 802.3, 802.4, 802.5 and 802.11 LAN technology. IP protocol including routing and congestion control, TCP and UDP, DNS, email protocols. Symmetric and asymmetric encryption including DES, AES, IDEA and RSA algorithms, key management in symmetric and asymmetric encryption, viruses and trusted systems, Kerberos.
Network Programming: Sockets programming: TCP programming (TELNET, HTTP), UDP sockets (TFTP, DNS), secure sockets (SSL), TLS, SSH, HTTPS, Remote Method Invocation (RMI), Simple Object Access Protocol (SOAP), UDDI and web services.
OSI layers (bottom-up)
Physical, Data link, Network, Transport, Session, Presentation, Application — Please Do Not Throw Sausage Pizza Away
PDUs
bits → frame → packet → segment / user datagram → data
Nyquist (noiseless)
C = 2B log₂L bps
Shannon (noisy)
C = B log₂(1 + SNR); SNR_dB = 10 log₁₀ SNR (30 dB = 1000)
Baud vs bit rate
bit rate = baud × log₂L; Manchester baud = 2 × bit rate (worst case)
FDM / T1 / E1
FDM BW = n·B + (n − 1)·guard; T1 = 193 × 8000 = 1.544 Mbps; E1 = 256 × 8000 = 2.048 Mbps
Delays
Tt = L/R, Tp = d/v; P packets over k hops: (k + P − 1)·Tt + k·Tp
Link efficiency
stop-and-wait η = 1/(1 + 2a), a = Tp/Tt; sliding window η = min(1, W/(1 + 2a))
ARQ window limits
GBN: Ws ≤ 2ᵐ − 1, Wr = 1; Selective Repeat: Ws = Wr ≤ 2ᵐ⁻¹
Hamming code
2ʳ ≥ m + r + 1; parity at 1, 2, 4, 8…; detect d − 1, correct ⌊(d − 1)/2⌋ errors
CRC & bit stuffing
append r zeros (r = degree), divide mod 2; flag 01111110, stuff 0 after five 1s
ALOHA
pure S = G·e^(−2G), max 18.4% at G = 0.5; slotted S = G·e^(−G), max 36.8% at G = 1
CSMA/CD
Tfr ≥ 2Tp → Lmin = 2·Tp·R (10 Mbps: 512 bits = 64 B); BEB K ∈ 0…2^min(n,10) − 1, give up after 16 tries
Ethernet frame
preamble 7 + SFD 1 | DA 6 | SA 6 | type/len 2 | data 46–1500 | FCS 4 → 64–1518 bytes
IPv4 classes & private
A 0–127 /8, B 128–191 /16, C 192–223 /24, D 224–239, E 240–255; private 10/8, 172.16/12, 192.168/16
Subnet arithmetic
hosts = 2ʰ − 2; IHL × 4 bytes (20–60); fragment offset × 8 bytes
Routing protocols
RIP: UDP 520, hops ≤ 15 (16 = ∞), 30 s; OSPF: IP 89, cost, Dijkstra, area 0; BGP: TCP 179, path vector
Token bucket & TCP cwnd
burst S = C/(M − ρ); slow start ×2 per RTT up to ssthresh, then +1; on loss ssthresh = cwnd/2
TCP RTO (RFC 6298)
SRTT = ⅞SRTT + ⅛R; RTTVAR = ¾RTTVAR + ¼|SRTT − R|; RTO = SRTT + 4·RTTVAR
Well-known ports
20/21 FTP, 22 SSH, 23 Telnet, 25 SMTP, 53 DNS, 67/68 DHCP, 69 TFTP, 80 HTTP, 110 POP3, 143 IMAP, 161/162 SNMP, 443 HTTPS
RMI registry
rmiregistry, default port 1099; Naming.rebind(url, obj) / Naming.lookup(url)
RMI remote interface
extends java.rmi.Remote; every method throws RemoteException
RMI implementation
extends UnicastRemoteObject (or is exported with exportObject)
RMI layers
Stub → Remote Reference Layer → Transport (skeletons not needed since Java 2)
RMI parameter passing
Serializable objects by value (copied); remote objects by reference (stub)
RMI distributed GC
lease-based; default lease 600 000 ms (10 min), renewed at half-time
SOAP message
Envelope (mandatory) → Header (optional) → Body (mandatory) → Fault (inside Body)
SOAP transport
usually HTTP POST (also SMTP); XML payload; W3C standard
WSDL 1.1 → 2.0
portType → interface, port → endpoint; types, message, binding, service
UDDI
registry: white (business), yellow (category), green (technical) pages; tModels
SOA triangle
provider publishes → registry; requester finds → registry; requester binds → provider
REST
Roy Fielding, 2000: resources + URIs, HTTP verbs, stateless, usually JSON
TCP server calls
socket → bind → listen → accept → recv/send → close
TCP client calls
socket → connect → send/recv → close
Byte order
network order = big-endian; htons/htonl host→network, ntohs/ntohl back
UDP socket calls
socket(AF_INET, SOCK_DGRAM, 0) → [bind] → sendto / recvfrom → close (no listen/accept)
TELNET
TCP 23; NVT; IAC = 255, WILL 251 · WONT 252 · DO 253 · DONT 254
TFTP
UDP 69; RRQ 1 · WRQ 2 · DATA 3 · ACK 4 · ERROR 5; 512-byte blocks, short block ends
DNS transport
UDP 53 (classic 512-byte limit, EDNS(0) larger); TC = 1 → retry over TCP 53
Kerberos origin
MIT Project Athena; V4 late 1980s; V5 RFC 1510 (1993), RFC 4120 (2005)
KDC
Authentication Server (AS) + Ticket-Granting Server (TGS)
Message 1-2 (AS)
C→AS: IDc‖IDtgs‖TS1; AS→C: E(Kc,[Kc,tgs‖…‖Tickettgs]) — TGT
Message 3-4 (TGS)
C→TGS: IDv‖Tickettgs‖Authenticator; TGS→C: E(Kc,tgs,[Kc,v‖…‖Ticketv])
Message 5-6 (server)
C→V: Ticketv‖Authenticator; V→C: E(Kc,v,[TS+1]) for mutual auth
Ticket vs authenticator
Ticket: KDC-made, sealed with target's key, reusable. Authenticator: client-made, session key, one-time
Port; tools
UDP/TCP 88; kinit, klist, kdestroy; Windows AD default since Windows 2000
V4 lifetime; skew
8 bits × 5 min = 1275 min ≈ 21 h; typical clock skew 5 min (configurable); V4 realm keys N(N−1)/2