320 likes | 387 Views
A real layered system. End system. End system. TCP. IP. Application (web browser). Application (web server). User-space. HTML on HTTP. HTML on HTTP. Socket layer (socket interface). TCP. IP. Kernel-space (operating-system). Ethernet. Ethernet. (Card and NIC driver). (Card and
E N D
A real layered system End system End system TCP IP Application (web browser) Application (web server) User-space HTML on HTTP HTML on HTTP Socket layer (socket interface) TCP IP Kernel-space (operating-system) Ethernet Ethernet (Card and NIC driver) (Card and NIC driver) Physical connector Physical connector NIC: Network Interface Card
A real layered system End system End system TCP IP IP TCP Application (web browser) Application (web server) HTML on HTTP HTML on HTTP Ethernet Ethernet (Card and NIC driver) (Card and NIC driver) Physical connector Physical connector Ethernet (data link-layer) Physical connector Physical connector NIC: Network Interface Card
A real layered system End system End system TCP IP TCP IP Application (web browser) Application (web server) HTML on HTTP HTML on HTTP Transport (4) Transport (4) Network (3) Network (3) Ethernet Ethernet (Card and NIC driver) (Card and NIC driver) Data-Link (2) Ethernet (data link-layer) Physical connector Physical connector Physical (1) Physical(1) Data-Link (2) Data-Link (2) Physical connector Physical connector Presentation (6) Session (5) Application (7) Session (5) Application (7) Presentation (6) Physical (1) Physical (1) NIC: Network Interface Card
Line Coding Examples where Baud=bit-rate Non-Return-to-Zero (NRZ) 0 1 0 1 1 0 0 1 0 1 Non-Return-to-Zero-Mark (NRZM) 1 = transition 0 = no transition 0 1 0 1 1 0 0 1 0 1 Non-Return-to-Zero Inverted (NRZI) (note transitions on the 1) 0 1 0 1 1 0 0 1 0 1
Line Coding Examples - II Non-Return-to-Zero (NRZ) (Baud = bit-rate) 0 1 0 0 1 0 0 1 1 1 Clock Manchester example (Baud = 2 x bit-rate) 0 1 0 0 1 0 0 1 1 1 Clock Quad-level code (2 x Baud = bit-rate) 0 1 0 0 1 0 0 1 1 1
Line Coding Examples - III Data to send 0 1 0 0 1 0 0 1 1 1 Line-(Wire) representation • Name 4b 5b Description • 0 0000 11110 hex data 0 • 1 0001 01001 hex data 1 • 2 0010 10100 hex data 2 • 3 0011 10101 hex data 3 • 4 0100 01010 hex data 4 • 5 0101 01011 hex data 5 • 6 0110 01110 hex data 6 • 7 0111 01111 hex data 7 • 8 1000 10010 hex data 8 • 9 1001 10011 hex data 9 • A 1010 10110 hex data A • B 1011 10111 hex data B • C 1100 11010 hex data C • D 1101 11011 hex data D • E 1110 11100 hex data E • F 1111 11101 hex data F Name 4b 5b Description Q -NONE- 00000 Quiet I -NONE- 11111 Idle J -NONE- 11000 SSD #1 K -NONE- 10001 SSD #2 T -NONE- 01101 ESD #1 R -NONE- 00111 ESD #2 H -NONE- 00100 Halt 0 1 0 1 0 1 0 0 1 1 Block coding transfers data with a fixed overhead: 20% less information per Baud in the case of 4B/5B So to send data at 100Mbps; the line rate (the Baud rate) must be 125Mbps. 1Gbps uses an 8b/10b codec; encoding entire bytes at a time but with 25% overhead
Line Coding Examples - IV Scrambling Sequence Scrambling Sequence Communications Channel Message Message Message XOR Sequence Message XOR Sequence
Line Coding Examples - IV Scrambling Sequence Scrambling Sequence Communications Channel Message Message Message XOR Sequence Message XOR Sequence e.g. (Self-synchronizing) scrambler δ δ δ δ δ
Line Coding Examples – V (Hybrid) …100111101101010001000101100111010001010010110101001001110101110100… …10011110110101000101000101100111010001010010110101001001110101110100… Inserted bits marking “start of frame/block/sequence” Scramble / Transmit / Unscramble …0100010110011101000101001011010100100111010111010010010111011101111000… Identify (and remove) “start of frame/block/sequence” This gives you the Byte-delineations for free δ δ δ δ δ δ δ δ δ δ 64b/66b combines a scrambler and a framer. The start of frame is a pair of bits 01 or 10: 01 means “this frame is data” 10 means “this frame contains data and control” – control could be configuration information, length of encoded data or simply “this line is idle” (no data at all)
Single Flow ARQ in operation • Rule for adjusting W • If an ACK is received: W ← W+1/W • If a packet is lost: W ← W/2 Only Wpackets may be outstanding
Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Application (7) Application (7) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Physical layer interconnect (a connector to the rest of us , in this case it connects male connector to male connector) Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Application (7) Application (7) Physical (1) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Physical device – media convertor speaks fluent Physical-layer But only a bit of the Data-Link (Ethernet) Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Data-Link (2) Application (7) Application (7) Physical (1) Physical (1) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Data-Link device aka an Ethernet switch speaks fluent Ethernet and often the extra/new Ethernet-related standards (802.1q for VLAN and 802.1x for Network Access Control) Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Data-Link (2) Application (7) Application (7) Physical (1) Physical (1) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Data-Link device aka an Ethernet switch speaks fluent Ethernet (two standards: wire and wireless!) Another example with media conversion Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Data-Link (2) Application (7) Application (7) Physical (1) Physical (1) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Network device aka an IP Router speaks fluent IP and can convert between any data-link and any physical standard to any other. Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Data-Link (2) Application (7) Application (7) Physical (1) Data-Link (2) Physical (1) Network (3) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Transport-layer mapping (pretty uncommon) speaks fluent TCP and ??? ? Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Data-Link (2) Data-Link (2) Application (7) Application (7) Network (3) Physical (1) Physical (1) Network (3) Transport (4) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
Application device aka a Web-load balancer speaks fluent HTTP Session (5) Data-Link (2) Data-Link (2) Network (3) Network (3) Presentation (6) Presentation (6) Transport (4) Transport (4) Network (3) Network (3) Application (7) Application (7) Transport (4) Transport (4) Physical (1) Physical (1) Physical (1) Physical (1) Data-Link (2) Data-Link (2) Session (5) Session (5)
ARP Recall from the primary slide-stack (slide 8-22) we need a mechanism for higher-layer entities to know what address to utilize in the lower entities. ARP (address resolution protocol) provides a mechanism for establishing a host’s link-layer (e.g. Ethernet) address using only a network-address (e.g. IP address) ARP is not limited to either Ethernet or IP; although that is the most common current use. A linux machine’s ARP table can be shown using the command arp -a
Consider the following situation: Data-Link (2) Data-Link (2) Presentation (6) Presentation (6) Network (3) Network (3) Application (7) Application (7) Physical (1) Physical (1) Data-Link (2) Transport (4) Transport (4) Physical (1) Physical (1) Session (5) Session (5)
ARP D ff.ff.ff.ff.ff.ff SP 128.187.171.2 SH fe.34.56.32.d5.29 DP 128.187.174.10 DH 0.0.0.0.0.0 D ff.ff.ff.ff.ff.ff SP 128.187.171.2 SH fe.34.56.32.d5.29 DP 128.187.174.10 DH 0.0.0.0.0.0 D 128.187.174.10 D 44.fe.34.56.32.d5 S 128.187.171.2 S fe.34.56.32.d5.29 D 128.187.174.10 D 44.fe.34.56.32.d5 S 128.187.171.2 S fe.34.56.32.d5.29 D ff.ff.ff.ff.ff.ff SP 128.187.171.2 SH fe.34.56.32.d5.29 DP 128.187.174.10 DH 0.0.0.0.0.0 D ff.ff.ff.ff.ff.ff SP 128.187.171.2 SH fe.34.56.32.d5.29 DP 128.187.174.10 DH 0.0.0.0.0.0 D fe.34.56.32.d5.29 SP 128.187.174.10 SH 44.fe.34.56.32.d5 DP 128.187.171.2 DH fe.34.56.32.d5.29 D fe.34.56.32.d5.29 SP 128.187.174.10 SH 44.fe.34.56.32.d5 DP 128.187.171.2 DH fe.34.56.32.d5.29 An Ethernet (switch) example Switch H1 H2 H3 H7 H8 H9 H4 H5 H6 H10 H11 H12 H10= IP 128.187.174.10, Ethernet 44.fe.34.56.32.d5
Notes • ARP table entries timeout in about 10 minutes ARP table rules: • update table with source when you are the target • update table if you already have an entry • do not refresh table entries upon reference
142.12/19 CIDR and Longest Prefix Matches • The IP address space is broken into line segments. • Each line segment is described by a prefix. • A prefix is of the form x/y where x indicates the prefix of all addresses in the line segment, and y indicates the length of the segment. • e.g. The prefix 128.9/16 represents the line segment containing addresses in the range: 128.9.0.0 … 128.9.255.255. 128.9.0.0 65/8 128.9/16 0 232-1 216 128.9.16.14
128.9.19/24 128.9.25/24 128.9.16/20 128.9.176/20 Most specific route = “longest matching prefix” Classless Interdomain Routing (CIDR) 128.9/16 0 232-1 128.9.16.14
Topology of Routers Video Server HD Display
Subnet Configuration .1.1 .4.1 .7.1 .10.1 .13.1 .16.1 .1.2 .4.2 .7.2 .10.2 .13.2 .16.2 .3.1 .6.2 .9.2 .12.2 .15.2 .17.1 .3.2 .2.1 .6.1 .9.1 .12.1 .15.1 .30.2 .5.1 .8.1 .11.1 .14.1 .18.1 .30.1 .26.1 .23.1 .18.2 .27.2 .24.2 .21.2 .20.1 .29.1 .24.1 .21.1 .27.1 .28.2 .25.2 .22.2 .19.2 .28.1 .25.1 .22.1 .19.1 Video Server Video Client Shortest Path
Step 1 – Observe the Routing Tables The router is already configured and running on your machines The routing table has converged to the routing decisions with minimum number of hops Next, break a link …
Step 2 - Dynamic Re-routing Break the link between video server and video client Routers re-route traffic around the broken link and video continues playing .1.1 .4.1 .7.1 .10.1 .13.1 .16.1 .1.2 .4.2 .7.2 .10.2 .13.2 .16.2 .3.1 .6.2 .9.2 .12.2 .15.2 .17.1 .2.1 .3.2 .15.1 .6.1 .9.1 .12.1 .30.2 .5.1 .8.1 .11.1 .14.1 .18.1 .30.1 .26.1 .23.1 .18.2 .21.2 .27.2 .24.2 .20.1 .29.1 .24.1 .21.1 .27.1 .28.2 .25.2 .22.2 .19.2 .28.1 .25.1 .22.1 .19.1
Working IP Router Observe PW-OSPF re-routing traffic around a failure Video is temporarily disrupted then resumes playing as TCP recovers from packet-loss
CSMA/CD Ethernet (10Mbps circa 1980) Collision detection can take as long as 2τ A A A A B B B B Packet starts at time 0 Packet arrives at B at τ-ε Packet starts from B at time τ Collision shortly thereafter Noise (the collision) arrives at A at time 2τ
User A In pure Aloha, frames are transmitted at arbitrary (and uncoordinated) times B C D E Time