CS计算机代考程序代写 algorithm dns DHCP 3/5/2021

3/5/2021
1
CS 118 Discussion Week 9: The Link Layer and Wireless

Questions
• Any questions from last week’s material or Project 2?
3/5/2021 2

Ethernet Switches
• Link Layer
• store, forward Ethernet frames
• examine incoming frame’s MAC address, selectively forward frame to one-or- more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment
• Sort of like a Layer 2 Router • Transparent
• PnP, Self-Learning
3/5/2021 3

Switches II
B
612
C’ A
• Switches can take simultaneous transmissions.
• A-to-A’ and B-to-B’ can transmit simultaneously, without collisions • but A-to-A’ and C to A’ can not happen simultaneously
• Self-learning: how does the switch learn hosts location? • Interconnecting Switches
• Spanning Tree Protocol
5
4 3
A’
switch with six interfaces (1,2,3,4,5,6)
B’
C
3/5/2021
4

Switches vs. routers
both are store-and-forward:
routers: network-layer devices (examine network-layer headers)
switches: link-layer devices (examine link-layer headers)
both have forwarding tables:
routers: compute tables using routing algorithms, IP addresses
switches: learn forwarding table using flooding, learning, MAC addresses
switch
datagram
application
transport
network
frame
link
physical
link
frame
physical
network
link
datagram
frame
physical
application
transport
network
link
physical
3/5/2021
Link La6y-e5r: 6-5

VLANs
• Why use VLANs? • Scalability
• Administrative convenience
• (logical location vs physical location)
port-based VLAN: switch ports grouped (b switch management software) so that single physical switch ……
1
7
9
15
2
8
10
16

EE (VLAN ports 1-8)

CS (VLAN ports 9-15)
… operates as multiple virtual switches
9
15
10
16
1
7
2
8
3/5/2021
Link Layer: 6-6
6

EE (VLAN ports 1-8)

CS (VLAN ports 9-15)
y

MPLS
• goal: high-speed IP forwarding among network of MPLS-capable routers, using fixed length label (instead of shortest prefix matching)
• faster lookup using fixed length identifier
• borrowing ideas from Virtual Circuit (VC) approach • but IP datagram still keeps IP address!
20 315
IP sses
Ethernet remainder of Ethernet frame, including IP
MPLS header
remainder of Ethernet frame, including
header header with IP source, destination addresses
header with IP source, destination addre
label
Exp
S
TTL
3/5/2021
7

Datacenters
• Extreme scale: 10,000-100,000+ hosts. • E.g. Amazon, Google, Netflix, etc
• Scale produces challenges
• Multiple apps, huge number of clients
• Reliability
• Managing/balancing load, avoiding processing, Networking/data bottlenecks
3/5/2021 8

Datacenter networks: network elements
…………
…………
Border routers
 connections outside datacenter Tier-1 switches
 connecting to ~16 T-2s below Tier-2 switches
connectingto ~16TORsbelow
Top of Rack (TOR) switch
 one per rack
 40-100Gbps Ethernet to blades
Server racks
 20- 40 server blades: hosts
Link Layer: 6-9
3/5/2021

Datacenter networks: protocol innovations
• link layer:
• RoCE: remote DMA (RDMA) over Converged Ethernet
• transport layer:
• ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP, DCQCN)
• experimentation with hop-by-hop (backpressure) congestion control
• routing, management:
• SDN widely used within/among organizations’ datacenters
• place related services, data as close as possible (e.g., in same rack or nearby rack) to minimize tier-2, tier-1 communication
3/5/2021
Link Layer: 6-10

Putting everything Together
• We’ve now covered basically the whole protocol stack! • Let’s go over a quick example (web request)
3/5/2021 11

A day in the life: scenario
scenario:
 arriving mobile client attaches to network …
 requests web page:
www.google.com
Sounds simple!
browser
DNS server
Comcast network 68.80.0.0/13
school network 68.80.2.0/24
web page
web server 64.233.169.105
Google’s network 64.233.160.0/19
3/5/2021
Link Layer: 6-12

A day in the life: connecting to the Internet
DHCP DHCP DHCP
DHCP
DHCP
UDP
DHCP
IP
Eth
arriving mobile: DHCP client
connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use DHCP
DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet
Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server
Ethernet demuxed to IP demuxed, UDP demuxed to DHCP
Phy
DHCP
DHCP
DHCP DHCP
DHCP
UDP
IP
Eth
Phy
3/5/2021
Link Layer: 6-13
router has DHCP server

A day in the life: connecting to the Internet
DHCP
DHCP DHCP
DHCP
arriving mobile: DHCP client
DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server
encapsulation at DHCP server, frame forwarded (switch learning) through LAN, demultiplexing at client
DHCP client receives DHCP ACK reply
DHCP
DHCP
DHCP DHCP
DHCP
UDP
IP
Eth
Phy
DHCP
3/5/2021
Link Layer: 6-14
DHCP
UDP
IP
Eth
Phy
router has DHCP server
Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router

DNS
DNS
DNS
UDP
DNS
ARP IP Eth
ARP query
Phy
ARP
Eth
ARP reply
Phy
A day in the life… ARP (before DNS, before HTTP)
arriving mobile: ARP client
 before sending HTTP request, need IP address of www.google.com: DNS
 DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth. To send frame to router, need MAC address of router interface: ARP
 ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface
 client now knows MAC address of first hop router, so can now send frame containing DNS query
3/5/2021
Link Layer: 6-15
router has ARP server

A day in the life… using DNS
DNS DNS DNS
DNS
DNS
DNS
DNS
UDP
DNS
UDP
IP
IP
Eth
DNS server
 demuxed to DNS
 DNS replies to client with IP address of www.google.com
Eth
Phy
DNS DNS
DNS
DNS
Phy
 IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
Comcast network 68.80.0.0/13
 IP datagram forwarded from campus network into Comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server
3/5/2021
Link Layer: 6-16

SYSNYANCK
A day in the life…TCP connection carrying HTTP
HTTP
HTTP
TCP
SYSNYANCK
IP
Eth
SYSNYANCK
Phy
Comcast network 68.80.0.0/13
 to send HTTP request, client first opens TCP socket to web server
 TCP SYN segment (step 1 in TCP 3-way handshake) inter- domain routed to web server
 web server responds with TCP SYNACK (step 2 in TCP 3-
way handshake)
 TCP connection established! Link Layer: 6-17
SYSNYANCK
TCP
SYSNYANCK
IP
Eth
SYSNYANCK
Phy
Google web server 64.233.169.105
3/5/2021

A day in the life… HTTP request/reply
HTTP HTTP
HTTP HTTP
HTTP
TCP
 web page finally (!!!) displayed
 HTTP request sent into TCP socket
 IP datagram containing HTTP request routed to www.google.com
 web server responds with HTTP reply (containing web page)
 IP datagram containing HTTP reply routed back to client
HTTP
IP
Eth
HTTP
Phy
Comcast network 68.80.0.0/13
HTTP
HTTP
HTTP
HTTP
TCP
IP
Eth
HTTP
Phy
Google web server 64.233.169.105
3/5/2021
Link Layer: 6-18

3/5/2021
19
Wireless

Elements in a Wireless Network (Infrastructure Mode)
• Wireless Hosts
• E.g. laptops, smartphones
• Base Stations
• Connected to wired network
• Works as a relay
• Connects mobiles into the wired network (acts as a relay)
• Wireless Links
• typically used to connect mobile(s) to base station, also used as backbone link
3/5/2021 20

wired network infrastructure
3/5/2021
21

Elements of a Wireless Network
• Can also run in ‘ad hoc’ mode
• no base stations
• nodes can only transmit to other nodes within link coverage
• nodes organize themselves into a network: route among themselves
3/5/2021 22

Characteristics of selected wireless links
802.11ac
802.11 af,ah
802.11g
802.11b
Bluetooth
802.11ax
802.11n
5G
4G LTE
14 Gbps 10 Gbps
3.5 Gbps 600 Mbps
54 Mbps 11 Mbps
2 Mbps
3/5/2021
Wireless and Mobile Networks: 7- 23
Indoor Outdoor 10-30m 50-200m
Midrange outdoor
200m-4Km
Long range outdoor
4Km-15Km

Wireless Links
• Now that we know what the network looks like, what do the links look like?
• Important differences from a wired link: • Decreased signal strength over distance
• Interference
• Multipath propagation
• etc
3/5/2021 24

More Wireless Link Issues
• Hidden Terminal Problem
• Results in signal attenuation
C
B
AB
A’s signal strength
C
C’s signal strength
A
3/5/2021
25

Wi-Fi (IEEE 802.11 Wireless LAN)
• wireless host communicates with base station • base station = access point (AP)
Internet
• Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains: • wireless hosts
• access point (AP): base station • ad hoc mode: hosts only
switch or router
BSS 1
3/5/2021
26
BSS 2

802.11: Channels, association
 spectrum divided into channels at different frequencies
• AP admin chooses frequency for AP
• interference possible: channel can be same as that chosen by neighboring AP!
BSS
 arriving host: must associate with an AP • scans channels, listening for beacon frames
containing AP’s name (SSID) and MAC address
• selects AP to associate with
• then may perform authentication [Chapter 8]
• then typically run DHCP to get IP address in AP’s subnet
3/5/2021
Wireless and Mobile Networks: 7- 27

802.11 frame: addressing
2 2 6 6 6 2 6 0-2312 4
frame control
duration
address 1
address 2
address 3
seq control
address 4
payload
CRC
Address 1: MAC address of wireless host or AP to receive this frame
Address 2: MAC address of wireless host or AP
transmitting this frame
Address 4: used only in ad hoc mode
Address 3: MAC address of router interface to which AP is attached
3/5/2021
Wireless and Mobile Networks: 7- 28

802.11 frame: addressing
H1
Internet
R1
R1 MAC addr
MAC dest addr
802.3 Ethernet frame MAC source addr
H2 MAC addr
AP MAC addr
H1 MAC addr
R1 MAC addr
3/5/2021
Wireless and Mobile Networks: 7- 29
address 1
802.11 WiFi frame
address 2
address 3

IEEE 802.11 MAC Protocol: CSMA/CA
802.11 sender
1 if sense channel idle for DIFS then transmit entire frame (no CD)
2 if sense channel busy then
start random backoff time
timer counts down while channel idle
transmit when timer expires
if no ACK, increase random backoff interval, repeat 2
802.11 receiver
if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender DIFS
data
ACK
receiver
SIFS
3/5/2021
Wireless and Mobile Networks: 7- 30

4G
• Feel free to make all relevant jokes here.
• How wide-spread mobility support for the Internet works.
• widespread deployment/use:
• more mobile-broadband-connected devices than fixed-broadband-connected
devices (5-1 in 2019)!
• 4G availability: 97% of time in Korea (90% in US)
• transmission rates up to 100’s Mbps
3/5/2021 31

Elements of 4G LTE architecture
Mobile device:
 smartphone, tablet, laptop, IoT, … with 4G LTE radio
 64-bit International Mobile Subscriber Identity (IMSI), stored on SIM (Subscriber Identity Module) card
 LTE jargon: User Equipment (UE)
Mobility Management Entity (MME)
Home Subscriber Service (HSS)
to Internet
PDN gateway (P-GW)
Mobile device (UE)
Base station
(eNode-B)

radio access network
Serving Gateway (S-GW)
all-IP Enhanced Packet Core (EPC)
3/5/2021
Wireless and Mobile Networks: 7- 32

Elements of 4G LTE architecture
Base station:
 at “edge” of carrier’s network
 manages wireless radio
resources, mobile devices in its coverage area (“cell”)
 coordinates device authentication with other elements
 similar to WiFi AP but:
• activeroleinusermobility
• coordinates with nearly base
stations to optimize radio use  LTE jargon: eNode-B
Mobility Management Entity (MME)
Home Subscriber Service (HSS)
to Internet
PDN gateway (P-GW)
Mobile device (UE)
Base station
(eNode-B)
3/5/2021
Wireless and Mobile Networks: 7- 33

Serving Gateway (S-GW)

Elements of 4G LTE architecture
Home Subscriber Service
 stores info about mobile devices for which the HSS’s network is their “home network”
 works with MME in device authentication
Mobile device (UE)
Base station
Mobility Management Entity (MME)
Home Subscriber Service (HSS)
to Internet
PDN gateway (P-GW)
(eNode-B)
3/5/2021
Wireless and Mobile Networks: 7- 34

Serving Gateway (S-GW)

Elements of 4G LTE architecture
Serving Gateway (S-GW), PDN Gateway (P-GW)
 lie on data path from mobile to/from Internet
 P-GW
• gateway to mobile cellular
network
• Looks like nay other internet gateway router
• provides NAT services  other routers:
• extensive use of tunneling 3/5/2021
Mobility Management Entity (MME)
Home Subscriber Service (HSS)
to Internet
PDN gateway (P-GW)
Mobile device (UE)
Base station
(eNode-B)

Serving Gateway (S-GW)
Wireless and Mobile Networks: 7- 35

Elements of 4G LTE architecture
Mobile device (UE)
Mobility Management Entity
 device authentication (device-to-network, network- to-device) coordinated with mobile home network HSS
 mobile device management:
Base station
Mobility Management Entity (MME)
Home Subscriber Service (HSS)
to Internet
PDN gateway (P-GW)
(eNode-B)
• device handover between cells
• tracking/paging device location
 path (tunneling) setup from mobile
device to P-GW

Serving Gateway (S-GW)
3/5/2021
Wireless and Mobile Networks: 7- 36

5G
• goal: 10x increase in peak bitrate, 10x decrease in latency, 100x increase in traffic capacity over 4G
• 5G NR (new radio):
• two frequency bands: FR1 (450 MHz–6 GHz) and FR2 (24 GHz–52 GHz):
millimeter wave frequencies
• not backwards-compatible with 4G
• MIMO: multiple directional antennae
• millimeter wave frequencies: much higher data rates, but over shorter distances
• pico-cells: cells diameters: 10-100 m
• massive, dense deployment of new base stations required
3/5/2021 37