程序代写 FF-55

• Link-layer addressing • ARP
• Switched LAN

Copyright By PowCoder代写 加微信 powcoder

LAN Addresses and ARP
Network Layer Address:
 32-bit IP address
 used to get datagram to destination network (recall IP network
definition)
LAN or Media Access Control (MAC) or physical address:
 used to get datagram from one interface to another physically-connected interface (same network)
 48-bit MAC address (for most LANs e.g Ethernet and
802.11 LANs)
burned in the adapter ROM (reconfigurable by
software nowadays)
5: DataLink Layer

LAN Addresses and ARP
Network Layer Address:
 32-bit IP address
 used to get datagram to destination network (recall IP network
definition)
LAN or Media Access Control (MAC) or physical address:
 used to get datagram from one interface to another physically-connected interface (same network)
 48-bit MAC address (for most LANs e.g Ethernet and
802.11 LANs)
burned in the adapter ROM (reconfigurable by
software nowadays)
5: DataLink Layer

LAN Addresses and ARP
Network Layer Address:
 32-bit IP address
 used to get datagram to destination network (recall IP network
definition)
LAN or Media Access Control (MAC) or physical address:
 used to get datagram from one interface to another physically-connected interface (same network)
 48-bit MAC address (for most LANs e.g Ethernet and 802.11 LANs); burned in the adapter ROM (reconfigurable by software nowadays)
5: DataLink Layer

LAN Addresses and ARP
Each adapter on LAN has a unique IP address (not shown here) and a link-layer address called a MAC address/Physical address/LAN address.
layers to be largely independent building blocks in a network architecture, different layers need to have their own addressing scheme.
MAC broadcast address:
FF-FF-FF-FF-FF-FF
5: DataLink Layer
In order for the

LAN Address (more)
 MAC address allocation administered by IEEE
 manufacturer buys portion of MAC address space (to
assure uniqueness)  Analogy:
(a) MAC address: like an IRD Number (does not change) (b) IP address: like postal address (depends on subnet)
 MAC flat address => portable
 can move LAN card from one LAN to another
 IP is a hierarchical address, it is NOT portable  IP address depends on which subnet one connects to
5: DataLink Layer

LAN Address (more)
 MAC address allocation administered by IEEE
 manufacturer buys portion of MAC address space (to
assure uniqueness)  Analogy:
(a) MAC address: like an IRD Number (does not change) (b) IP address: like postal address (depends on subnet)
 MAC flat address => portable
 can move LAN card from one LAN to another
 IP is a hierarchical address, it is NOT portable  IP address depends on which subnet one connects to
5: DataLink Layer

LAN Address (more)
 MAC address allocation administered by IEEE
 manufacturer buys portion of MAC address space (to
assure uniqueness)  Analogy:
(a) MAC address: like an IRD Number (does not change) (b) IP address: like postal address (depends on subnet)
 MAC flat address => portable
 can move LAN card from one LAN to another
 IP is a hierarchical address, it is NOT portable  IP address depends on which subnet one connects to
5: DataLink Layer

LAN Address (more)
 MAC address allocation administered by IEEE
 manufacturer buys portion of MAC address space (to
assure uniqueness)  Analogy:
(a) MAC address: like an IRD Number (does not change) (b) IP address: like postal address (depends on subnet)
 MAC flat address => portable
 can move LAN card from one LAN to another
 IP is a hierarchical address, it is NOT portable  IP address depends on which subnet one connects to
5: DataLink Layer

Recall routing process
Starting at A, given IP datagram addressed to B:
 look up net. address of B, find B on same net. as A
223.1.1.2 223.1.1.4
223.1.2.1 223.1.2.9
 link layer send datagram to B inside link-layer frame
223.1.2.2 223.1.3.2
frame source MAC address
frame destination MAC address
How do we get the MAC address of B in the first place?
address address
A’s IP addr
B’s IP addr
IP payload datagram
5: DataLink Layer
datagram source, dest address
223.1.3.27

Question: given B’s IP address, how to determine MAC address of B?
 Each Host and Router on LAN has an ARP module and table in its memory
Address Resolution Protocol
ARP Table: IP/MAC address mappings in a subnet
< IP address; MAC address; TTL> < ................................ >
• TTL (Time To Live): time after which address mapping will be deleted (typically 20 min)
• ARP resolves addresses for
hosts and router interfaces on
5: DataLink Layer
the same subnet only.

Address Resolution Protocol
5: DataLink Layer

ARP protocol
 A knows B’s IP address, wants to learn physical address of B (A and B are in the same LAN)
 A broadcasts an ARP query pkt, containing B’s IP address  dest MAC address = FF-FF-FF-FF-FF-FF
 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
 ARP is “plug-and-play”: nodes create their ARP tables
without intervention from net administrator
5: DataLink Layer

ARP protocol
Includes sending and receiving IP and MAC addresses
 A knows B’s IP address, wants to learn physical address of B (A and B are in the same LAN)
 A broadcasts an ARP query pkt, containing B’s IP address  dest MAC address = FF-FF-FF-FF-FF-FF
 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
 ARP is “plug-and-play”: nodes create their ARP tables
without intervention from net administrator
5: DataLink Layer
We have an example later

ARP protocol
Includes sending and receiving IP and MAC addresses
 A knows B’s IP address, wants to learn physical address of B (A and B are in the same LAN)
 A broadcasts an ARP query pkt, containing B’s IP address  dest MAC address = FF-FF-FF-FF-FF-FF
 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
 ARP is “plug-and-play”: nodes create their ARP tables
without intervention from net administrator
5: DataLink Layer
We have an example later

ARP protocol
Includes sending and receiving IP and MAC addresses
 A knows B’s IP address, wants to learn physical address of B (A and B are in the same LAN)
 A broadcasts an ARP query pkt, containing B’s IP address  dest MAC address = FF-FF-FF-FF-FF-FF
 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
 ARP is “plug-and-play”: nodes create their ARP tables
without intervention from net administrator
5: DataLink Layer
We have an example later

Addressing: routing to another LAN
walkthrough: send datagram from A to B via R.
focus on addressing – at both IP (datagram) and MAC layer (frame) assume A knows B’s IP address
assume A knows B’s MAC address (how?)
assume A knows IP address of first hop router, R (how?)
assume A knows MAC address of first hop router interface (how?)
In this scenario, hosts A and B belong to different subnets.
111.111.111.111 74-29-9C-E8-FF-55
222.222.222.222 49-BD-D2-C7-56-2A
111.111.111.112 CC-49-DE-D0-AB-7D
111.111.111.110 E6-E9-00-17-BB-4B
222.222.222.221 88-B2-2F-54-1A-0F
222.222.222.220 1A-23-F9-CD-06-9B
Data Link Layer 5-17

Addressing: routing to another LAN
 A creates an IP datagram with IP source A, destination B
 A creates link-layer frame with R’s MAC address as dest, frame
IP Eth Phy
contains A-to-B IP datagram MAC src: 74-29-9C-E8-FF-55
111.111.111.111 74-29-9C-E8-FF-55
222.222.222.222 49-BD-D2-C7-56-2A
MAC dest: E6-E9-00-17-BB-4B IP src: 111.111.111.111
111.111.111.112 CC-49-DE-D0-AB-7D
111.111.111.110
222.222.222.221 88-B2-2F-54-1A-0F
IP dest: 222.222.222.222
E6-E9-00-17-BB-4B
222.222.222.220 1A-23-F9-CD-06-9B
Data Link Layer 5-18

Addressing: routing to another LAN
 frame sent from A to R
 frame received at R, datagram removed, passed up to IP
IP Eth Phy
IP Eth Phy
111.111.111.111 74-29-9C-E8-FF-55
222.222.222.222 49-BD-D2-C7-56-2A
MAC src: 74-29-9C-E8-FF-55 MAC dest: E6-E9-00-17-BB-4B
111.111.111.112 CC-49-DE-D0-AB-7D
111.111.111.110 E6-E9-00-17-BB-4B
222.222.222.221 88-B2-2F-54-1A-0F
IP src: 111.111.111.111
IP dest: 222.222.222.222
222.222.222.220 1A-23-F9-CD-06-9B
Data Link Layer 5-19

Addressing: routing to another LAN
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B’s MAC address as dest, frame
contains A-to-B IP datagram
111.111.111.111 74-29-9C-E8-FF-55
222.222.222.222
111.111.111.112 CC-49-DE-D0-AB-7D
111.111.111.110 E6-E9-00-17-BB-4B
222.222.222.221 88-B2-2F-54-1A-0F
IP Eth Phy
222.222.222.220 1A-23-F9-CD-06-9B
MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP Eth Phy
49-BD-D2-C7-56-2A
Data Link Layer 5-20

Addressing: routing to another LAN
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B’s MAC address as dest, frame
contains A-to-B IP datagram
111.111.111.111 74-29-9C-E8-FF-55
222.222.222.222
111.111.111.112 CC-49-DE-D0-AB-7D
111.111.111.110 E6-E9-00-17-BB-4B
222.222.222.221 88-B2-2F-54-1A-0F
222.222.222.220 1A-23-F9-CD-06-9B
MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111
IP dest: 222.222.222.222
49-BD-D2-C7-56-2A
Data Link Layer 5-21
IP Eth Phy

Switched LAN (Institutional network)
to external network
mail server
web server
Computer Science
Statistics
switch switch

• link‐layerdevice:smarterthanhubs(replacedhubs in early 2000s)
– store, forward Ethernet frames transparently (therefore, the interfaces in a switch do not have a MAC address)
– examines incoming frame’s MAC address,
– indexes its table with the MAC address, then
– selectively forwards the frame to one-or-more outgoing links when frame is to be forwarded on segment; uses CSMA/CD to access segment (collision-less!), operates in full-duplex mode; gather statistics on bandwidth usage, etc.
• transparent
– Hosts and routers in the subnet are unaware of the presence
of switches
• plug‐and‐play,self‐learning
– switches do not need to be configured
Data Link Layer 5-23

Switch: self-learning
Source: A Dest: B’
• switch learns which hosts can be reached through which interfaces
– whenaframeisreceived,the switch “learns” the location of the sender: incoming LAN segment
– Theswitchrecordssender(MAC address)‐location (interface) pair in switch table
Note: Link-layer switches do not have link-layer addresses associated with their interfaces
Switch table (initially empty)
Data Link Layer

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com