Presentation is loading. Please wait.

Presentation is loading. Please wait.

Final Exam FTP Server Assignment10 Application Layer10 Transport10 Network10 Link-Layer10 Security10 Total60 Coverage and distribution of marks.

Similar presentations


Presentation on theme: "Final Exam FTP Server Assignment10 Application Layer10 Transport10 Network10 Link-Layer10 Security10 Total60 Coverage and distribution of marks."— Presentation transcript:

1 Final Exam FTP Server Assignment10 Application Layer10 Transport10 Network10 Link-Layer10 Security10 Total60 Coverage and distribution of marks

2 Note Wireless Networking is not going to be included in the Final Exam.

3 Types of Questions Define terms, identify technologies, explain purpose Explain concepts and protocols –Using diagrams (label them properly) –Appropriate variables (or parameters) Solve problems (e.g. apply DV Algorithm, CRC)

4 MAC Protocols: a taxonomy Three broad classes: Channel Partitioning Protocols –divide channel into smaller pieces (time slots, frequency bands, multiple access codes) –allocate piece to node for exclusive use Random Access Protocols –allow collisions –recover from collisions Taking turns Protocols –tightly coordinate shared access to avoid collisions Animation

5 Channel Partitioning (CDMA) CDMA (Code Division Multiple Access) Sender: sends encoded data bits simultaneously Receiver: assigned a unique code (i.e. code set partitioning) Has been used by military; now used mostly in wireless broadcast channels (cellular, satellite,etc) all users share same frequency, but each user has own ''chipping'' sequence (i.e., code) to encode data encoded signal = (original data) X (chipping sequence) decoding: inner-product of encoded signal and chipping sequence Advantage: allows multiple users to coexist and transmit simultaneously with minimal interference (if codes are orthogonal)

6 CDMA Encode/Decode M M mini slots are assigned to each data bit

7 CDMA: two-sender interference Assumption: interfering bit signals are additive

8 Random Access protocols When node has packet to send –transmit at full rate (R) of channel –no a priori coordination among nodes two or more transmitting nodes -> collision!!, random access MAC protocol specifies: –how to detect collisions –how to recover from collisions (e.g., via delayed retransmissions) Examples of random access MAC protocols: –slotted ALOHA –ALOHA –CSMA and CSMA/CD

9 CSMA: (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire pkt If channel sensed busy, defer transmission p –Persistent CSMA: retry immediately with probability p when channel becomes idle (may cause instability) –Non-persistent CSMA: retry after random time interval human analogy: don't interrupt others! RULES: Listen before speaking (carrier sensing) If someone else begins talking at the same time, stop talking (collision detection) Animation

10 CSMA collisions collisions can occur: propagation delay means two nodes may not yet hear each other's transmission collision: entire packet transmission time wasted spatial layout of nodes along ethernet note: role of distance and propagation delay in determining collision prob. Channel propagation delay 4 nodes attached to a linear broadcast bus; Horizontal axis shows position of each node in space D senses the channel is idle at t 1

11 CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA –collisions detected within short time –colliding transmissions aborted, reducing channel wastage –persistent or non-persistent retransmission collision detection: –easy in wired LANs: measure signal strengths, compare transmitted, received signals –difficult in wireless LANs: receiver shut off while transmitting human analogy: the polite conversation

12 CSMA/CD collision detection 4 nodes attached to a linear broadcast bus

13 From Network to Link-Layer Datagram to Frame

14 Recall earlier routing discussion 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Starting at A, given IP datagram addressed to B:  look up net. address of B, find B on same net. as A  link layer send datagram to B inside link-layer frame B’s MAC addr A’s MAC addr A’s IP addr B’s IP addr IP payload datagram frame frame source, dest address datagram source, dest address Additional addresses!

15 ARP: Address Resolution Protocol Each IP node (Host, Router) on LAN has ARP module, table ARP Table: IP/MAC address mappings for some LAN nodes –TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine MAC address of B given B's IP address? ARP for Ethernet (RFC 826), Intro to ARP,TCP/IP Tutorial (RFC 1180) Resides in RAM

16 ARP: Address Resolution Protocol How is ARP Table initialized? It’s plug-and-play! Not configured by Network Administrator Tables are automatically updated when one node is disconnected from subnet

17 ARP protocol: A Scenario A knows B's IP address, wants to learn physical address of B A broadcasts ARP query pkt, containing B's IP address –all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) physical layer address A caches (saves) IP-to-physical address pairs until information becomes old (times out) –soft state: information that times out (goes away) unless refreshed Passes ARP packet within the frame up to its parent node Only one node (node with IP address=DEST IP in the ARP packet) sends back to the querying node a response ARP packet with the desired mapping In turn, the querying node can then update its ARP Table and send its IP datagram

18 Routing to another LAN A R B Network 1: Network address: 111.111.111/24 Network 2: Network address: 222.222.222/24 Two Types of Nodes: Hosts Routers Router has an IP address for each of its interfaces has an ARP module for each of its interfaces has an adapter for each of its interfaces each adapter has its own MAC Address 2 interfaces, 2 IP addresses, 2 ARP modules, 2 adapters (2 MAC addresses)

19 Routing to another LAN routing from A to B via R 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 R B Network 1: Network address: 111.111.111/24 Network 2: Network address: 222.222.222/24

20 A creates IP packet with source A, destination B A R B How a HOST on Subnet 1 sends a datagram to a HOST on Subnet 2? Passes datagram to adapter Host A must indicate to its adapter an appropriate MAC address (DEST) Note: Before sending the frame, MAC address must be acquired (should match one of the nodes in subnet; otherwise, will be lost). Then, frame is sent to Subnet.

21 A uses ARP to get R's physical layer address for 111.111.111.110 (adapter side) A R B Note: Router interface handles routing; uses Forwarding Table Adapter uses ARP to find MAC address

22 (adapter) A creates Ethernet frame with R's physical address as dest, Ethernet frame contains A-to-B IP datagram (adapter) A's data link layer sends Ethernet frame (adapter) R's data link layer receives Ethernet frame –Passes frame to Network Layer (network layer) R removes IP datagram from Ethernet frame, sees its destined to B –Using router R’s Forwarding table) – table tells R to forward datagram via router interface 222.222.222.220 R’s interface passes datagram to its adaptor A R B

23 (adapter) R uses ARP to get B's physical layer address (adapter) R creates frame containing A-to-B IP datagram sends to B A R B

24 CRC Pseudo code, Manual Calculation of CRC See sample computations sample

25 Ethernet: uses CSMA/CD A: sense channel, if idle then { transmit and monitor the channel; If another transmission is detected then { abort and send jam signal; update # collisions; delay as required by exponential backoff algorithm; goto A } else {done with the frame; set collisions to zero} } else {wait until ongoing transmission is over and goto A} Run without explicit coordination with other adapters on the Ethernet Connectionless unreliable service to Network Layer No signal energy in channel for 96 bit times

26 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Exponential Backoff: Goal: adapt retransmission attempts to estimated current load –heavy load: random wait will be longer first collision: choose K randomly from {0, 2 m -1}; delay is K x 512 bit transmission times after second collision: choose K from {0,1,2,3}… after ten or more collisions, choose K from {0,1,2,3,4,…,1023} =min(10, num of collisions ) For 10Mbps Ethernet, time to transmit 1 bit = 0.1 microseconds

27 Network Devices Repeaters, Hubs, Bridges, Routers, Switches

28 Hubs Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top Definition of Terms

29 Backbone Bridge

30 Bridges Spanning Tree for increased reliability, it is desirable to have redundant, alternate paths from source to dest with multiple simultaneous paths, cycles result - bridges may multiply and forward frame forever solution: organize bridges in a spanning tree by disabling subset of interfaces Disabled

31 Bridge Learning: example Suppose C sends a frame to D and D replies back with a frame to C  C sends the frame to the bridge, but the bridge has no info. about D, so it floods both LANs  bridge notes that C is on port 1  frame ignored on upper LAN  frame received by D

32 Bridge Learning: example  D generates a reply to C, sends  bridge sees frame from D  bridge notes that D is on interface 2  bridge knows C on interface 1, so it selectively forwards the frame out via interface 1

33 Routers vs. Bridges Routers + and - + arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) + provide firewall protection against broadcast storms - require IP address configuration (not plug and play) - require higher processing bandwidth bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)

34 Ethernet Switches (more) Dedicated Shared Institutional Network using a combination of hubs, Ethernet switches, router

35 Interconnection Devices COMPARISON OF FEATURES HUBSBRIDGESROUTERS ETHERNET SWITCHES Traffic Isolation NoYes Plug-and- Play Yes NoYes Optimal Routing No YesNo Cut- through YesNo Yes

36 Review Pseudo codes as well Let’s see some captured runs of the DV algorithm

37 Node Update 0123Min 0999 0 1 1 1 2 3 3 3 77 Min 03 170 20 32 Rcv event, t=1.484 at 0; Source: 2, Dest: 0 Node 0 srtpkt2 0123Min 0999 0 1 1739991 2 3 3 3 575 3 + 70 = 73

38 Node Update Min 00 11 23 35 Apply Poisoned ReverseNode 0 srtpkt0 0123Min 0999 0 1 1 1 2 3 3 3 575 73 turns 999 Send new mincost to neighbors via tolayer2()

39 DV Algorithm There are four routers connected via certain links (figure). Suppose that the following table is used for the initialisation of C’s routing table: C via ABD dest A1∞∞ B∞3∞ D∞∞2 And the minimum cost is an array of 4 integers in the order A, B, C, D: A advertises its minimum costs as: 0, 4, 1, ∞ B advertises its minimum costs as: 4, 0, 3, 1 D advertises its minimum costs as: ∞, 1, 2, 0 Show the first update on C’s table if C simultaneously receives packets with the minimum cost information from the routers A, B and D

40 The End. Good luck!


Download ppt "Final Exam FTP Server Assignment10 Application Layer10 Transport10 Network10 Link-Layer10 Security10 Total60 Coverage and distribution of marks."

Similar presentations


Ads by Google