Professional Documents
Culture Documents
Protocol Stack
application: supporting network
applications
application
Computer Networks
• HTTP, SMTP, FTP, etc.
Wireless Wireless
Radio:
Microwave:
• satellite: order of Gbps, up-down latency of 250 ms (too long)
• high bandwidth: 1.5 Gbps
• cellular, WiFi, WiMax • can be aimed in a single direction
• Bluetooth: 2.4 GHz short range radio, 721 Kbps – 2.1 Mbps, • requires “line-of-sight”
1-100 m • most useful to connect buildings on campus
• UWB: 3.1 GHz-10.6 GHz, 480-675 Mbps, 10 m, less
interference due to use of short pulses Infrared: shorter distance, no need for antenna
• Wireless USB
• Bluetooth 3.0
• Wireless FireWire
Bit vs. Baud Rate Signals
Bit vs. Baud Example: RS-232
• bits transmitted as electrical or optical signal • negative voltage ( 15V) represents a 1
• bit rate: number of bits per second • positive voltage (+15V) represents a 0
• baud rate: signal/voltage level changes per second • bit rate == baud rate
• 7 bits/character
• each level can represent multiple bits
• to allow asynchronous communication:
• for binary signaling, bit rate == baud rate
1 start bit, 1 stop bit
• for M-ary (M levels) signaling,
voltage
11 10 11 01 00 11 00
bit rate ≠ baud rate +3
-3
7 baud/sec = 14 bps
Framing Framing
Why packetize/frame data? Framing is done by using a special bit pattern
• to denote start & end of frame (soh & eot)
•
Framing allows sources with small amount
of data (e.g., VoIP) to finish promptly
Bit stuffing: if soh & eot shows up in data,
they must be protected/escaped
Ethernet Frame Structure Frame Transmission
Sending adaptor encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame
Frame transmission on a shared bus LAN:
• frames are tagged with destination MAC address
• frames sent to all hosts on the LAN
Preamble: 7 bytes of pattern 10101010 followed by one byte of
• the NIC on each host makes a copy of frame
pattern 10101011, used to synchronize receiver-sender clock
rates • if the frame is addressed to the host, or a broadcast
Addresses: 6 bytes each frame (e.g., ARP packet) the NIC sends the frame up to
Type: indicates the higher layer protocol, e.g., IP, IPX, AppleTalk the CPU, otherwise discards frame
CRC (cyclic redundancy check): checked at receiver, if error is • a frame can also have a broadcast or multicast address
detected, the frame is simply dropped
• NICs could be put in promiscuous mode (e.g., tcpdump,
ethereal, network sniffer, network analyser)
How does a host obtain its IP address? Dynamic Host Configuration Protocol DHCP server
• Dynamic Host Configuration Protocol (DHCP): • limiting DHCP use within a LAN, but DHC
P r
beyond a physical segment (bro equest
dynamically request an address from a server when the host boots adca
st)
• “plug-and-play”
• broadcast preceded by a random DHCP
ACK
• maintain a pool of shared host identities • each host can be assigned a primary server
• if MAC address of a querying host is • on repeated query, non-primary servers wait a random time
not in the database of permanent DHCP server for response from other servers before replying
DHC
identities, assigns (leases) it a
233.1.2.5
P disc
over
temporary identity from pool new Dynamic IP addresses with DHCP:
client o ffer
DHCP
• one or more DHCP servers respond • advantage: doesn’t require manual configuration
DHC
with IP address offer P r
(bro equest
adca
st)
• shortcoming: DHCP’s interaction with DNS unspecified
(dynamic DNS not yet/ever? widely deployed)
ACK
DHCP
Client host:
• chooses one offer and requests it from the offering server
• if no reply, server may be down or busy, retry later
5
[after Rexford]
[after Rexford]
DHCP Packet Format
Opcode:
• DHCPREQUEST
• DHCPACK
Hardware Type:
• Ethernet (1), FireWire (24), etc.
Seconds elapsed:
• seconds since client began an address
acquisition or renewal process