Datakommunikasjon høsten 2002
description
Transcript of Datakommunikasjon høsten 2002
![Page 1: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/1.jpg)
Datakom høsten 2002 1
Datakommunikasjon høsten 2002
Forelesning nr 10, mandag 21. oktoberHub, bridge, switch and router.Wireless links and LANs (802.11x)PPP (Point-to-Point Protocol)
![Page 2: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/2.jpg)
Datakom høsten 2002 2
ØvingsoppgaverOppgave 1
Per og Kari benytter hvert sitt sett med asymmetriske nøkler, dvs en privat nøkkel og en offentlig nøkkel.
a) Forklar hvordan Per kan sende en kryptert fil til Kari som bare Kari kan dekryptere.b) Kari ønsker å være sikker på at filen kommer fra Per. Hva kan Per gjøre for at dette
skal være tilfelle? Forklar.
Oppgave 2
a) Hva er IPSec?b) Hvilke sikkerhetstjenester tilbyr IPSec.c) Forklar forskjellen på ”Transport mode” og ”tunnel mode”.
Oppgave 3.
Forklar hvordan ping og traceroute fungerer. Angi hvilke typer ICMP meldinger som blir brukt og hvordan.
![Page 3: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/3.jpg)
Datakom høsten 2002 3
Hubs, bridges, and switches
![Page 4: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/4.jpg)
Datakom høsten 2002 4
Internetworking devices
![Page 5: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/5.jpg)
Datakom høsten 2002 5
Interconnecting LAN segmentsRepeaterHubsBridgesSwitches
Remark: switches are essentially multi-port bridges.
What we say about bridges also holds for switches!
Routers
![Page 6: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/6.jpg)
Datakom høsten 2002 6
![Page 7: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/7.jpg)
Datakom høsten 2002 7
![Page 8: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/8.jpg)
Datakom høsten 2002 8
Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large collision
domian if a node in CS and a node EE transmit at same time: collision
Can’t interconnect 10BaseT & 100BaseT
![Page 9: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/9.jpg)
Datakom høsten 2002 9
Bridges Link layer device
stores and forwards Ethernet frames examines frame header and selectively forwards
frame based on MAC dest address when frame is to be forwarded on segment, uses
CSMA/CD to access segment transparent
hosts are unaware of presence of bridges plug-and-play, self-learning
bridges do not need to be configured
![Page 10: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/10.jpg)
Datakom høsten 2002 10
![Page 11: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/11.jpg)
Datakom høsten 2002 11
Bridges: traffic isolation Bridge installation breaks LAN into LAN segments bridges filter packets:
same-LAN-segment frames not usually forwarded onto other LAN segments
segments become separate collision domains
bridge collision domain
collision domain
= hub
= host
LAN (IP network)
LAN segment LAN segment
![Page 12: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/12.jpg)
Datakom høsten 2002 12
Bridges
![Page 13: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/13.jpg)
Datakom høsten 2002 13
Forwarding
How do determine to which LAN segment to forward frame?
![Page 14: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/14.jpg)
Datakom høsten 2002 14
Self learning
A bridge has a bridge table entry in bridge table:
(Node LAN Address, Bridge Interface, Time Stamp) stale entries in table dropped (TTL can be 60 min)
bridges learn which hosts can be reached through which interfaces when frame received, bridge “learns” location of
sender: incoming LAN segment records sender/location pair in bridge table
![Page 15: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/15.jpg)
Datakom høsten 2002 15
Filtering/Forwarding
When bridge receives a frame:
index bridge table using MAC dest addressif entry found for destination
then{ if dest on segment from which frame arrived
then drop the frame else forward the frame on interface indicated } else flood
forward on all but the interface on which the frame arrived
![Page 16: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/16.jpg)
Datakom høsten 2002 16
Bridge exampleSuppose C sends frame to D and D replies back
with frame to C.
Bridge receives frame from from C notes in bridge table that C is on interface 1 because D is not in table, bridge sends frame into
interfaces 2 and 3
frame received by D
![Page 17: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/17.jpg)
Datakom høsten 2002 17
Bridge Learning: example
D generates frame for C, sends bridge receives frame
notes in bridge table that D is on interface 2 bridge knows C is on interface 1, so selectively
forwards frame to interface 1
![Page 18: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/18.jpg)
Datakom høsten 2002 18
Interconnection without backbone
Not recommended for two reasons:- single point of failure at Computer Science hub- all traffic between EE and SE must path over CS segment
![Page 19: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/19.jpg)
Datakom høsten 2002 19
Backbone configuration
Recommended !
![Page 20: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/20.jpg)
Datakom høsten 2002 20
Svitsj (lag 2) og ruter
![Page 21: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/21.jpg)
Datakom høsten 2002 21
Eksempel (1)
BRIDGE
![Page 22: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/22.jpg)
Datakom høsten 2002 22
Eksempel (2)
BRIDGE
![Page 23: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/23.jpg)
Datakom høsten 2002 23
Eksempel (3)
![Page 24: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/24.jpg)
Datakom høsten 2002 24
Eksempel (4)
![Page 25: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/25.jpg)
Datakom høsten 2002 25
Bridges Spanning Tree for increased reliability, desirable to have redundant,
alternative paths from source to dest with multiple paths, cycles result - bridges may
multiply and forward frame forever solution: organize bridges in a spanning tree by
disabling subset of interfaces
Disabled
![Page 26: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/26.jpg)
Datakom høsten 2002 26
Some bridge features Isolates collision domains resulting in higher
total max throughput Can connect different Ethernet types Transparent (“plug-and-play”): no
configuration necessary
![Page 27: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/27.jpg)
Datakom høsten 2002 27
Bridges vs. Routers both store-and-forward devices
routers: network layer devices (examine network layer headers) bridges are link layer devices
routers maintain routing tables, implement routing algorithms
bridges maintain bridge tables, implement filtering, learning and spanning tree algorithms
![Page 28: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/28.jpg)
Datakom høsten 2002 28
Routers vs. BridgesBridges + and - + Bridge operation is simpler requiring less packet
processing+ Bridge tables are self learning - All traffic confined to spanning tree, even when
alternative bandwidth is available- Bridges do not offer protection from broadcast
storms
![Page 29: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/29.jpg)
Datakom høsten 2002 29
Routers vs. Bridges
Routers + and -+ arbitrary topologies can be supported, cycling is
limited by TTL counters (and good routing protocols)
+ provide protection against broadcast storms- require IP address configuration (not plug and play)- require higher packet processing
bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)
![Page 30: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/30.jpg)
Datakom høsten 2002 30
Ethernet Switches
Essentially a multi-interface bridge
layer 2 (frame) forwarding, filtering using LAN addresses
Switching: A-to-A’ and B-to-B’ simultaneously, no collisions
large number of interfaces often: individual hosts, star-
connected into switch Ethernet, but no
collisions!
![Page 31: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/31.jpg)
Datakom høsten 2002 31
Ethernet Switchescut-through switching: frame forwarded
from input to output port without awaiting for assembly of entire frame slight reduction in latency
store and forward switchingcombinations of shared/dedicated,
10/100/1000 Mbps interfaces
![Page 32: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/32.jpg)
Datakom høsten 2002 32
![Page 33: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/33.jpg)
Datakom høsten 2002 33
Ruter
![Page 34: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/34.jpg)
Datakom høsten 2002 34
Ethernet
![Page 35: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/35.jpg)
Datakom høsten 2002 35
Routing to another LANwalkthrough: send datagram from A to B via R assume A know’s B IP address
Two ARP tables in router R, one for each IP network (LAN)
In routing table at source Host, find router 111.111.111.110 In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc
A
RB
![Page 36: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/36.jpg)
Datakom høsten 2002 36
A
RB
A creates datagram with source A, destination B A uses ARP to get R’s MAC address for 111.111.111.110 A creates link-layer frame with R's MAC address as dest,
frame contains A-to-B IP datagram A’s data link layer sends frame R’s data link layer receives frame R removes IP datagram from Ethernet frame, sees its
destined to B R uses ARP to get B’s physical layer address R creates frame containing A-to-B IP datagram sends to B
![Page 37: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/37.jpg)
Datakom høsten 2002 37
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Preamble: 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver, sender clock
rates
![Page 38: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/38.jpg)
Datakom høsten 2002 38
Ethernet Frame Structure (more) Addresses: 6 bytes
if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to net-layer protocol
otherwise, adapter discards frame
Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC: checked at receiver, if error is detected, the frame is simply dropped
![Page 39: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/39.jpg)
Datakom høsten 2002 39
5. 6 Wireless links and LANs
![Page 40: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/40.jpg)
Datakom høsten 2002 40
IEEE 802.11 Wireless LAN 802.11b
2.4-5 GHz unlicensed radio spectrum
up to 11 Mbps widely deployed, using
base stations
802.11a 5-6 GHz range up to 54 Mbps
802.11g 2.4-5 GHz range up to 54 Mbps
•All use CSMA/CA for multiple access(CSMA/CA – Carrier Sense Multiple Access / Collision Avoidance)•All have base-station and ad-hoc network versions
![Page 41: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/41.jpg)
Datakom høsten 2002 41
Base station approch
Wireless host communicates with a base station base station = access point (AP)
Basic Service Set (BSS) (a.k.a. “cell”) contains: wireless hosts access point (AP): base station
BSS’s combined to form distribution system (DS)
![Page 42: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/42.jpg)
Datakom høsten 2002 42
Ad Hoc Network approach No Access Point (i.e., base station) wireless hosts communicate with each other
to get packet from wireless host A to B may need to route through wireless hosts X,Y,Z
Applications: “laptop” meeting in conference room, car interconnection of “personal” devices battlefield
IETF MANET (Mobile Ad hoc Networks) working group
![Page 43: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/43.jpg)
Datakom høsten 2002 43
IEEE 802.11: multiple access
Collision if 2 or more nodes transmit at same time
CSMA makes sense: get all the bandwidth if you’re the only one transmitting shouldn’t cause a collision if you sense another
transmission
Collision detection doesn’t work: hidden terminal problem
Location
Signalstrength
![Page 44: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/44.jpg)
Datakom høsten 2002 44
IEEE 802.11 MAC Protocol: CSMA/CA802.11 CSMA: sender- if sense channel idle for
DISF sec. (Distributed Inter Frame Space)
then transmit entire frame (no collision detection)
-if sense channel busy then binary backoff
802.11 CSMA receiver- if received OK return ACK after SIFS (Short
Inter Frame Spacing)
(ACK is needed due to hidden terminal problem)
![Page 45: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/45.jpg)
Datakom høsten 2002 45
Collision avoidance mechanisms Problem:
two nodes, hidden from each other, transmit complete frames to base station
wasted bandwidth for long duration !
Solution: small reservation packets nodes track reservation interval with
internal “network allocation vector” (NAV)
![Page 46: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/46.jpg)
Datakom høsten 2002 46
Collision Avoidance: RTS-CTS exchange
sender transmits short RTS (request to send) packet: indicates duration of transmission
receiver replies with short CTS (clear to send) packet notifying (possibly
hidden) nodes
hidden nodes will not transmit for specified duration: NAV (Network Allocation Vector)
![Page 47: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/47.jpg)
Datakom høsten 2002 47
Collision Avoidance: RTS-CTS exchange RTS and CTS short:
collisions less likely, of shorter duration
end result similar to collision detection
IEEE 802.11 allows: CSMA CSMA/CA: reservations polling from AP
![Page 48: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/48.jpg)
Datakom høsten 2002 48
Bluetooth
Low-power, small radius, wireless networking technology 10-100 meters
omnidirectional not line-of-sight infared
Interconnects gadgets 2.4-2.5 GHz
unlicensed radio band up to 721 kbps
Interference from wireless LANs, digital cordless phones, microwave ovens: frequency hopping helps
MAC protocol supports: error correction ARQ (Automatic Repeat
reQuest)
Each node has a 12-bit address
![Page 49: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/49.jpg)
Datakom høsten 2002 49
5.8 PPP
![Page 50: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/50.jpg)
Datakom høsten 2002 50
Point to Point Data Link Control one sender, one receiver, one link: easier than
broadcast link: no Media Access Control no need for explicit MAC addressing e.g., dialup link, ISDN line
popular point-to-point Data Link Control protocols: PPP (point-to-point protocol) HDLC: High level data link control (Data link
used to be considered “high layer” in protocol stack!
![Page 51: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/51.jpg)
Datakom høsten 2002 51
PPP Design Requirements [RFC 1557]
packet framing: encapsulation of network-layer datagram in data link frame carry network layer data of any network layer
protocol (not just IP) at same time ability to demultiplex upwards
bit transparency: must carry any bit pattern in the data field
error detection (no correction) connection liveness: detect, signal link failure to
network layer network layer address negotiation: endpoint can
learn/configure each other’s network address
![Page 52: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/52.jpg)
Datakom høsten 2002 52
PPP non-requirements
no error correction/recovery no flow control out of order delivery OK no need to support multipoint links (e.g.,
polling)
Error recovery, flow control, data re-ordering all relegated to higher layers!
![Page 53: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/53.jpg)
Datakom høsten 2002 53
PPP Data Frame Flag: delimiter (framing) Address: does nothing (only one option) Control: does nothing; in the future possible
multiple control fields Protocol: upper layer protocol to which frame
delivered (eg, PPP-LCP, IP, IPCP, etc)
![Page 54: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/54.jpg)
Datakom høsten 2002 54
PPP Data Frame info: upper layer data being carried check: cyclic redundancy check for error
detection
![Page 55: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/55.jpg)
Datakom høsten 2002 55
Byte Stuffing “data transparency” requirement: data field
must be allowed to include flag pattern <01111110> Q: is received <01111110> data or flag?
Sender: adds (“stuffs”) extra < 01111110> byte after each < 01111110> data byte
Receiver: two 01111110 bytes in a row: discard first
byte, continue data reception single 01111110: flag byte
![Page 56: Datakommunikasjon høsten 2002](https://reader035.fdocuments.us/reader035/viewer/2022062806/56814f9d550346895dbd5bdc/html5/thumbnails/56.jpg)
Datakom høsten 2002 56
PPP Data Control ProtocolBefore exchanging network-
layer data, data link peers must
configure PPP link (max. frame length, authentication)
learn/configure network layer information
for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address