CST-5404 AdvNet L1
CST-5404 AdvNet L1
On the sending side, the controller takes a On the receiving side, the controller receives the
datagram that has been created and stored in host entire frame, and extracts the network layer
memory by the higher layers of the protocol stack, datagram. If the link layer performs error
encapsulates the datagram in a link-layer frame detection, then it is the sending controller that sets
(filling in the frame’s various fields), and then the error-detection bits in the frame header, and it
transmits the frame into the communication link, is the receiving controller that performs error
following the link-access protocol. detection.
Advanced Networking Faculty of Computer Systems and Technologies 5
Error-Detection and Error-Correction Techniques
Error-detection and -correction techniques allow the receiver to sometimes, but not always, detect that bit errors have
occurred.
datagram datagram
otherwise
Error detection is not 100%
all
bits in D’ N reliable!
OK detected ▪ protocol may miss some
? error errors, but rarely
d data bits
▪ larger EDC field yields better
D EDC D’ EDC’ detection and correction
1110011001100110 1110011001100110
1101010101010101 1101010101010101
1 1011101110111011 1 1011101110111011
+ +
Sum 1011101110111100 1011101110111100
0100010001000011
Checksum 0100010001000011
1111111111111111
Advanced Networking Faculty of Computer Systems and Technologies 8
Error-Detection and Error-Correction Techniques (Contd.)
Cyclic Redundancy Check (CRC)
▪ Consider the Data, D (d-bit), that the sending node wants to send to the receiving node.
▪ The sender and receiver must first agree on an CRC Generator, G (r +1) bit pattern will require that the most significant
(leftmost) bit of G be a 1.
▪ For a given piece of data, D, the sender will choose CRC bit, R (r additional bits) and append them to D such that the
resulting d + r bit pattern is exactly divisible by G (i.e., has no remainder) using modulo-2 arithmetic.
Controlled access
▪ Deterministic access where each node has its own time on the medium.
▪ Used on legacy networks such as Token Ring and ARCNET.
Field Description
Frame Start and Stop Identifies beginning and end of frame
Addressing Indicates source and destination nodes
Type Identifies encapsulated Layer 3 protocol
Control Identifies flow control services
Data Contains the frame payload
Error Detection Used for determine transmission errors
Advanced Networking Faculty of Computer Systems and Technologies 15
Data Link Frame (Contd.)
▪ The minimum Ethernet frame size is 64 bytes and the maximum is 1518 bytes. The preamble field is not
included when describing the size of the frame.
▪ Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame” and is automatically
discarded. Frames with more than 1500 bytes of data are considered “jumbo” or “baby giant frames”.
▪ If the size of a transmitted frame is less than the minimum, or greater than the maximum, the receiving device
drops the frame. Dropped frames are likely to be the result of collisions or other unwanted signals. They are
considered invalid. Jumbo frames are usually supported by most Fast Ethernet and Gigabit Ethernet switches
and NICs.
Advanced Networking Faculty of Computer Systems and Technologies 16
LAN Addressing and ARP
MAC Address
▪ 32-bit IP address:
network-layer address for interface
used for layer 3 (network layer) forwarding
e.g., 128.119.40.136
▪ MAC (or LAN or physical or Ethernet) address:
function: used “locally” to get frame from one interface to another physically-connected interface (same subnet, in IP-
addressing sense)
48-bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable
e.g., 1A-2F-BB-76-09-AD
ARP
Advanced Networking
D
Faculty of Computer Systems and Technologies 21
LAN Addressing and ARP (Contd.)
Address Resolution Protocol in Action
Example: A wants to send datagram to B
B’s MAC address not in A’s ARP table, so A uses ARP to find B’s MAC address
ARP message into Ethernet frame
(sent to 71-65-F7-2B-08-53)
C Target IP address: 137.196.7.14
Target MAC address:
ARP table in A 58-23-D7-FA-20-B0
…
IP addr MAC addr TTL
TTL
A B
2
71-65-F7-2B-08-53 58-23-D7-FA-20-B0
137.196.7.23 137.196.7.14
C
ARP table in A
IP addr MAC addr TTL
TTL
137.196. 58-23-D7-FA-20-B0 500
A B
7.14
71-65-F7-2B-08-53 58-23-D7-FA-20-B0
137.196.7.23 137.196.7.14
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F
Advanced Networking Faculty of Computer Systems and Technologies 24
LAN Addressing and ARP (Contd.)
Routing to Another Subnet
▪ A creates IP datagram with IP source A, destination B
▪ A creates link-layer frame containing A-to-B IP datagram
• R's MAC address is frame’s destination
MAC src: 74-29-9C-E8-FF-55
MAC dest: E6-E9-00-17-BB-4B
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP
Eth
Phy
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 25
Advanced Networking Faculty of Computer Systems and Technologies
LAN Addressing and ARP (Contd.)
Routing to Another Subnet
▪ frame sent from A to R
▪ frame received at R, datagram removed, passed up to IP
IP IP
Eth Eth
Phy Phy
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 26
Advanced Networking Faculty of Computer Systems and Technologies
LAN Addressing and ARP (Contd.)
Routing to Another Subnet
▪ R determines outgoing interface, passes datagram with IP source A, destination B to link layer
▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination address: B's MAC address
IP
Eth
Phy
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 27
Advanced Networking Faculty of Computer Systems and Technologies
LAN Addressing and ARP (Contd.)
Routing to Another Subnet
▪ R determines outgoing interface, passes datagram with IP source A, destination B to link layer
▪ R creates link-layer frame containing A-to-B IP datagram. Frame destination address: B's MAC address
▪ transmits link-layer frame
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
IP Eth
Eth Phy
Phy
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 28
Advanced Networking Faculty of Computer Systems and Technologies
LAN Addressing and ARP (Contd.)
Routing to Another Subnet
▪ B receives frame, extracts IP datagram destination B
▪ B passes datagram up protocol stack to IP
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP
IP Eth
Eth Phy
Phy
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F 29
Advanced Networking Faculty of Computer Systems and Technologies
Link Layer Switches
▪ The role of the switch is to receive incoming link-layer frames (Ingress) and forward them onto outgoing links
(Egress).
▪ Filtering is the switch function that determines whether a frame should be forwarded to some interface or should just
be dropped.
▪ Forwarding is the switch function that determines the interfaces to which a frame should be directed, and then moves the
frame to those interfaces.
▪ A switch will use the destination MAC address to determine the egress interface. Before a switch can make this decision it
must learn what interface the destination is located.
▪ A switch builds a MAC address table, also known as a Content Addressable Memory (CAM) table, by recording the
source MAC address into the table along with the port it was received.
B’ C
A’ A A’
A 1 60 switch table
A’ 4 60 (initially empty)
Protocol Function
Fast Port Speeds Depending on the model, switches may have up to 100Gbps port speeds.
Fast Internal Switching This uses fast internal bus or shared memory to improve performance.
Large Frame Buffers This allows for temporary storage while processing large quantities of frames.
High Port Density This provides many ports for devices to be connected to LAN with less cost.
This also provides for more local traffic with less congestion.