Transcript Link Layer
Link Layer and LANs
Partly adapted from slides for
Computer Networking: A Top Down Approach
5th edition. Jim Kurose, Keith Ross, Addison-Wesley, April 2009.
Data Link Layer
5-1
Internet protocol stack
application: supporting network
applications
FTP, SMTP, HTTP
transport: process-process data
transfer
TCP, UDP
network: routing of datagrams from
source to destination
IP, routing protocols
link: data transfer between
neighboring network elements
application
transport
network
link
physical
Ethernet, 802.111 (WiFi), PPP
physical: bits “on the wire”
Zhang, Net. Admin, Spring 2012
Encapsulation
source
message
segment
M
Ht
M
datagram Hn Ht
M
frame Hl Hn Ht
M
application
transport
network
link
physical
link
physical
switch
layer-2 packet is a frame
encapsulates datagram
destination
M
Ht
M
Hn Ht
Hl Hn Ht
M
M
application
transport
network
link
physical
Hn Ht
Hl Hn Ht
M
M
network
link
physical
Hn Ht
M
router
Zhang, Net. Admin, Spring 2012
Link Layer: Terminology
Nodes: hosts and routers
Links: communication
channels that connect
adjacent nodes along
communication path
wired or wireless links
data-link layer has responsibility of
transferring datagram from one node
to physically adjacent node over a link
Data Link Layer
5-4
Where is the link layer implemented?
in each and every node
link layer implemented in
“adaptor” (aka network
interface card NIC)
Ethernet card, PCMCI
card, 802.11 card
implements link, physical
layer
attaches into host’s
system buses
combination of
hardware, software
(driver), firmware
host schematic
application
transport
network
link
cpu
memory
host
bus
(e.g., PCI)
controller
link
physical
physical
transmission
network adapter
card
Data Link Layer
5-5
Adaptors Communicating
datagram
datagram
controller
controller
receiving host
sending host
datagram
frame
sending side:
encapsulates datagram in
frame
adds error checking bits,
rdt, flow control, etc.
receiving side
looks for errors, rdt, flow
control, etc
extracts datagram, passes
to upper layer at receiving
side
Data Link Layer
5-6
Two types of “links”
point-to-point
router
Point-to-point link
PPP for dial-up access
point-to-point link between Ethernet switch and host
broadcast (shared wire or medium)
old-fashioned Ethernet
802.11 wireless LAN
shared wire (e.g.,
cabled Ethernet)
shared RF
(e.g., 802.11 WiFi)
shared RF
(satellite)
humans at a
cocktail party
(shared air, acoustical)
Data Link Layer
5-7
Outline
General link layer topics
Service
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer
5-8
Link Layer Services
framing, link access:
encapsulate datagram into frame, adding header, trailer
Multiple channel access if shared medium
“MAC” addresses used in frame headers to identify
source, dest
error detection/correction (without
retransmission)
reliable delivery between adjacent nodes
seldom used on low bit-error link
flow control:
pacing between adjacent sending and receiving nodes
half-duplex and full-duplex
with half duplex, nodes at both ends of link can transmit,
Data Link Layer
but not at same time
5-9
MAC Addresses and ARP
MAC (or LAN or physical or Ethernet) address
function: get frame from one interface to another
physically-connected interface (same network)
48 bit MAC address (for most LANs)
• burned in ROM
allocation administered by IEEE
• manufacturer buys portion of MAC address space
MAC flat address ➜ portability
can move LAN card from one LAN to another
IP hierarchical address NOT portable
address depends on IP subnet to which node is attached
Data Link Layer 5-10
LAN Addresses and ARP
Each adapter on LAN has unique LAN address
1A-2F-BB-76-09-AD
71-65-F7-2B-08-53
LAN
(wired or
wireless)
Broadcast address =
FF-FF-FF-FF-FF-FF
= adapter
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
Data Link Layer 5-11
ARP: Address Resolution Protocol
Question: how to determine
MAC address of B
knowing B’s IP address?
137.196.7.78
1A-2F-BB-76-09-AD
137.196.7.23
137.196.7.14
LAN
71-65-F7-2B-08-53
137.196.7.88
Each IP node (host,
router) on LAN has
ARP table
IP/MAC address
mappings for some LAN
nodes
< IP address; MAC address; TTL>
•
TTL (Time To Live): time
after which address
mapping will be forgotten
(typically 20 min)
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
Data Link Layer 5-12
ARP protocol: Same LAN (network)
A wants to send datagram
to B, and B’s MAC address
not in A’s ARP table.
A broadcasts ARP query
packet, containing B's IP
address
dest MAC address = FFFF-FF-FF-FF-FF
all machines on LAN
receive ARP query
B receives ARP packet,
replies to A with its (B's)
MAC address
frame sent to A’s MAC
address (unicast)
A caches (saves) IP-toMAC address pair in its
ARP table 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
Data Link Layer 5-13
Linux command: arp
used to create, modify, display or delete
ARP table entries on the device.
arp -e - Display all ARP table entries (for all interfaces)
arp -en - Display all ARP table entries (for all interfaces)
but do not resolve IP addresses to host names
arp -d 1.1.1.1 - Delete the ARP table entry for
host 1.1.1.1
arp -i eth0 -s 1.1.1.1 A123.ABCF.321A - Create a
static ARP table entry associating IP address 1.1.1.1 with
MAC address A123.ABCF.321A available through eth0
interface
Data Link Layer 5-14
Outline
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-15
Multiple Access Links and Protocols
Two types of “links”:
point-to-point
PPP for dial-up access
point-to-point link between Ethernet switch and host
broadcast (shared wire or medium)
old-fashioned Ethernet
802.11 wireless LAN
shared wire (e.g.,
cabled Ethernet)
shared RF
(e.g., 802.11 WiFi)
shared RF
(satellite)
humans at a
cocktail party
(shared air, acoustical)
Data Link Layer 5-16
Multiple Access protocols
Problem
single shared broadcast channel
two or more simultaneous transmissions by nodes:
interference
collision if node receives two or more signals at same time
Solution: multiple access protocol
distributed algorithm to determine how nodes share
channel, i.e., determine when node can transmit
communication about channel sharing must use channel itself!
Three categories:
Channel Partition, Random Access, Take-turn
Data Link Layer 5-17
MAC Protocols: Channel Partitioning
divide channel into smaller “pieces” (time
slots, frequency, code), allocate piece to
node for exclusive use
TDMA
6-slot
frame
1
FDMA
FDM cable
3
4
1
3
4
frequency bands
Data Link Layer 5-18
MAC Protocols: Random Access
When node has packet to send
transmit at full channel data rate R, i.e., channel not divided
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 :
slotted ALOHA
ALOHA
CSMA, CSMA/CD, CSMA/CA
Data Link Layer 5-19
CSMA (Carrier Sense Multiple Access)
CSMA: listen before transmit:
If channel sensed idle: transmit entire frame
If channel sensed busy, defer transmission
human analogy: don’t interrupt others!
What if two people start to speak at same time?
CSMA/CD (Collision Detection) used in wired LAN (where
collisions can be detected within short time)
colliding transmissions aborted, reducing channel
wastage
human analogy: the polite conversationalist
Data Link Layer 5-20
MAC Protocols: “Taking turns”
nodes take turns, but nodes with more to
send can take longer turns
channel partitioning MAC protocols: efficient
and fair at high load, inefficient at low load(1/N
bandwidth allocated even if only 1 active node!)
random access MAC protocols: efficient at low
load: single node can fully utilize channel; high
load: collision overhead
“taking turns” protocols: look for best of both
worlds!
Data Link Layer 5-21
“Taking Turns” MAC protocols
Polling:
master node
“invites” slave nodes
to transmit in turn
concerns:
polling overhead
latency
single point of
failure (master)
Examples: Bluetooth
data
poll
master
data
slaves
Data Link Layer 5-22
“Taking Turns” MAC protocols
Token passing:
control token passed
from one node to next
sequentially.
concerns:
token overhead
latency
single point of failure
(token)
Examples: FDDI
(100 Mbit/s optical standard
for data transmission in
a LAN) , IBM Token Ring
=>802.5 (Token Ring LAN)
T
(nothing
to send)
T
data
Data Link Layer 5-23
Outline
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-24
Ethernet
“dominant” wired LAN technology:
cheap $20 for NIC
first widely used LAN technology
simpler, cheaper than token LANs and ATM
kept up with speed race: 10 Mbps – 10 Gbps
Metcalfe’s Ethernet
sketch
Data Link Layer 5-25
802.3 Ethernet Standards: Link & Physical Layers
many different Ethernet standards
common MAC protocol and frame format
different speeds: 2 Mbps, 10 Mbps, 100 Mbps,
1Gbps, 10G bps
different physical layer media: fiber, cable
application
transport
network
link
physical
MAC protocol
and frame format
100BASE-TX
100BASE-T2
100BASE-FX
100BASE-T4
100BASE-SX
100BASE-BX
copper (twister
pair) physical layer
fiber physical layer
Data Link Layer 5-26
Ethernet CSMA/CD algorithm
1. NIC receives datagram
4. If NIC detects another
from network layer,
transmission while
creates frame
transmitting, aborts and
sends jam signal
2. If NIC senses channel idle,
starts frame transmission 5. After aborting, NIC
If NIC senses channel
enters exponential
busy, waits until channel
backoff: after mth
idle, then transmits
collision, NIC chooses K at
random from
3. If NIC transmits entire
{0,1,2,…,2m-1}. NIC waits
frame without detecting
K·512 bit times, returns to
another transmission, NIC
Step 2
is done with frame !
connectionless: No handshaking between sending and receiving NICs
Data Link Layer
unreliable:
5-27
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or other network
layer protocol packet) in Ethernet frame
Preamble: used to synchronize receiver, sender clock rates
7 bytes with pattern 10101010 followed by one byte with
pattern 10101011
Addresses: 6 bytes
if adapter receives frame with matching destination address, or
with broadcast address (e.g. ARP packet), it passes data in
frame to network layer protocol; otherwise, adapter discards
frame
Type: higher layer protocol (IP, Novell IPX, AppleTalk)
CRC: checked at receiver, if error is detected, frame is
dropped
Data Link Layer 5-28
Bus topology
all nodes in same collision domain (can collide with
each other), popular through mid 90s
Hub: physical-layer (“dumb”) repeaters:
bits coming in one link go out all other links at same rate
all nodes connected to hub can collide with one another
no frame buffering
no CSMA/CD at hub: host NICs detect collisions
twisted pair
hub
bus: coaxial cable
Data Link Layer 5-29
Star topology
today: star topology prevails
Switch: link-layer device,
switch
smarter than hubs, take active role
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, uses CSMA/CD to access segment
So-called layer-2 switch
Transparent,
hosts are unaware of presence of switches
plug-and-play, self-learning
switches do not need to be configured
Data Link Layer 5-30
Switch Table
multiple simultaneous
transmissions
A
C’
B
E.g., A-to-A’ and B-to-B’
simultaneously, without collisions
Q: how does switch know that A’
reachable via interface 4, B’
reachable via interface 5?
A: each switch has a switch table,
each entry:
(MAC address of host, interface to
reach host, time stamp)
6
looks like a routing table!
1
5
2
3
4
C
B’
A’
switch with six interfaces
(1,2,3,4,5,6)
Data Link Layer 5-31
Switch: self-learning
switch learns which hosts
can be reached through
which interfaces
Source: A
Dest: A’
A A A’
C’
when frame received,
switch “learns” location of
sender: incoming LAN
segment
records sender/location
pair in switch table
B
1
6
5
2
3
4
C
B’
A’
MAC addr interface TTL
A
1
60
Switch table
(initially empty)
Data Link Layer 5-32
Switch: frame filtering/forwarding
When frame received:
1. record link associated with sending host
2. index switch table using MAC dest address
3. if entry found for destination
then {
if dest on segment from which frame arrived
then drop the frame
else forward the frame on interface indicated
}
else flood
forward on all but the interface
on which the frame arrived
Data Link Layer 5-33
Self-learning,
forwarding:
example
Source: A
Dest: A’
A A A’
C’
B
frame destination
unknown: flood
A6A’
1
2
4
5
destination A
location known:
selective send
C
A’ A
B’
3
A’
MAC addr interface TTL
A
A’
1
4
60
60
Switch table
(initially empty)
Data Link Layer 5-34
Interconnecting switches
switches can be connected together
S4
S1
S2
A
B
S3
C
F
D
E
I
G
H
Q: sending from A to G - how does S1 know to
forward frame destined to F via S4 and S3?
A: self learning! (works exactly the same as in
single-switch case!)
Data Link Layer 5-35
Institutional network
to external
network
mail server
router
web server
IP subnet
Data Link Layer 5-36
Switches vs. Routers
both store-andforward devices
routers: network-layer
devices (examine
network-layer headers)
switches are link-layer
devices (examine linklayer headers)
routers maintain
routing tables,
implement routing
algorithms
switches maintain
switch tables,
implement filtering,
learning algorithms
application
transport
datagram network
frame
link
physical
frame
link
physical
switch
network datagram
link
frame
physical
application
transport
network
link
physical
Data Link Layer 5-37
Outline
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-38
wireless link
used to connect
mobile(s) to base
station
also used as backbone
link
multiple access protocol
coordinates link access
various data rates,
transmission distance
wireless network
network
infrastructure
base station
wireless hosts
laptop, PDA, IP phone
run applications
may be stationary (nonmobile) or mobile
typically connected to
wired network
relay - sending packets
between wired network
and wireless host(s) in
its “area”
e.g., cell towers,
802.11 access points
Wireless, Mobile Networks 6-39
Wireless Link Characteristics (1)
Differences from wired link ….
decreased signal strength: radio signal
attenuates as it propagates through matter
(path loss)
interference from other sources: standardized
wireless network frequencies (e.g., 2.4 GHz)
shared by other devices (e.g., phone); devices
(motors) interfere as well
multipath propagation: radio signal reflects off
objects ground, arriving ad destination at
slightly different times
…. make communication across wireless link much
more “difficult”
Wireless, Mobile Networks 6-40
Characteristics of selected wireless link
standards
Data rate (Mbps)
200
54
5-11
802.11n
802.11a,g
802.11b
4
1
802.11a,g point-to-point
data
802.16 (WiMAX)
UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO
3G cellular
enhanced
802.15
.384
UMTS/WCDMA, CDMA2000
.056
3G
2G
IS-95, CDMA, GSM
Indoor
Outdoor
10-30m
50-200m
Mid-range
outdoor
Long-range
outdoor
200m – 4 Km
5Km – 20 Km
Wireless, Mobile Networks 6-41
IEEE 802.11 Wireless LAN
all use CSMA/CA for multiple access
all have base-station and ad-hoc network versions
802.11b
2.4-5 GHz unlicensed
spectrum
up to 11 Mbps
network
infrastructure
802.11a
5-6 GHz range
up to 54 Mbps
802.11g
2.4-5 GHz range
up to 54 Mbps
802.11n: multiple antennae
2.4-5 GHz range
up to 200 Mbps
base station connects
mobiles into wired
network
Wireless, Mobile Networks 6-42
802.11 LAN architecture
wireless host communicates
with base station, i.e.,
access point (AP)
Basic Service Set (BSS)
(aka “cell”) contains:
wireless hosts
access point (AP)
802.11b: 2.4GHz-2.485GHz
spectrum divided into 11
channels at different
frequencies
Internet
AP
hub, switch
or router
BSS 1
AP
BSS 2
AP admin chooses frequency
for AP
interference possible:
channel can be same as that
chosen by neighboring AP!
Wireless, Mobile Networks 6-43
802.11: association
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
may perform authentication
• E.g., WPA personal: each wireless host configured
with same passphrase (password)
will typically run DHCP to get IP address in AP’s
subnet
Wireless, Mobile Networks 6-44
IEEE 802.11: CSMA/CA
no collision detection!
difficult to receive (sense collisions) when transmitting due
to weak received signals (fading)
avoid collisions: CSMA/C(ollision)A(voidance)
sender can “reserve” channel rather than random access of
data frames: avoid collisions of long data frames
Wireless, Mobile Networks 6-45
Collision Avoidance: RTS-CTS exchange
A
B
AP
reservation collision
DATA (A)
defer
time
Wireless, Mobile Networks 6-46
Home Wireless Network
A broadband (DSL or cable)
Internet connection
a DSL modem or a cable modem
(provided by your ISP).
A wireless router, or
DSL/cabel modem+wireless
router all in one
A wireless router is basically a
router and access point all in
one
Typically support NAT, port
forwarding, firewall
Data Link Layer 5-47
Outline
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-48
Institutional network
Point-to-point link
to external
network
mail server
web server
router
AP
IP subnet
BSS 1
Data Link Layer 5-49
Point to Point Data Link Control
one sender, one receiver, one link: easier than
broadcast link:
no Media Access Control
no need for explicit MAC addressing
e.g., dialup link, ISDN line, T1 leased line
popular point-to-point DLC protocols:
PPP (point-to-point protocol)
HDLC: High level data link control
• default protocol on all Cisco serial interfaces
SLIP: the book
Frame Relay
Data Link Layer 5-50
Point to Point Protocol (PPP)
used for dial up connection to Internet
(RFC 1661)
Books talk about configuration of PPP
Dial-up Internet connection
Uses public switched telephone network (PSTN) to
establish a connection to an ISP via phone lines
Modem: encode and decode Internet Protocol packets
into and from analogue audio frequency signals
USB port
56kbps Modem
Data Link Layer 5-51
Outline
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-52
Configure Network Interface
Card (NIC), i.e., Adapter
TCP/IP: independent of
underlying physical
network
Need to identify network
interface to TCP/IP
Assign IP address, subnet
mask, broadcast address
host schematic
application
transport
network
link
cpu
memory
controller
link
physical
physical
transmission
network adapter
card
Data Link Layer 5-53
Determine available interface
Need to find out what interfaces are
available, and their names
Recall: dmesg display system messages
displayed on console during last boot
dmesg | grep eth
Here | is pipeline, feed the output of dmesg as
input to grep
search lines in dmesg that contain “eth”, typical
name for ethernet NIC
Data Link Layer 5-54
dmesg | grep eth
[ 19.490092] e1000e 0000:00:19.0: eth0: (PCI Express:2.5GT/s:Width x1)
00:16:d3:c2:e6:bd
[ 19.490097] e1000e 0000:00:19.0: eth0: Intel(R) PRO/1000 Network
Connection
[ 19.490131] e1000e 0000:00:19.0: eth0: MAC: 6, PHY: 6, PBA No:
FFFFFF-0FF
[ 25.714699] NetworkManager[754]: NetworkManager[754]: <info> (eth0):
carrier is OFF
[ 25.719530] NetworkManager[754]: <info> (eth0): carrier is OFF
[ 25.720162] NetworkManager[754]: NetworkManager[754]: <info> (eth0):
new Ethernet device (driver: 'e1000e' ifindex: 2)
[ 25.720184] NetworkManager[754]: <info> (eth0): new Ethernet device
(driver: 'e1000e' ifindex: 2)
[ 25.720687] NetworkManager[754]: NetworkManager[754]: <info> (eth0):
exported as /org/freedesktop/NetworkManager/Devices/0
[ 25.720709] NetworkManager[754]: <info> (eth0): exported as
/org/freedesktop/NetworkManager/Devices/0
…..
Data Link Layer 5-55
Sample output of netstat -in
To see hardware interface & software interface
netstat -in
[xiaolan@thinkpad ~]$ netstat -ni
Kernel Interface table
Iface
MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TXDRP TX-OVR Flg
eth0
1500 0
0
0
0
0
0
0
0
0 BMU
lo
16436 0
32
0
0
0
32
0
0
0 LRU
wlan0
1500 0
598
0
0
0
550
0
0
0 BMRU
Data Link Layer 5-56
Loopback device
a virtual/software network interface, usually
named lo, lo0
implemented in software only
Any traffic that sent to loopback interface is
immediately received on same interface
commonly used IPv4 address on loopback device is
127.0.0.1
Usage: test IP stack, services without exposing
host to security risks
Accessing web server:
http://127.0.0.1/ or http://localhost/
Test IP stack in operating system: ping 127.0.0.1
Data Link Layer 5-57
Check interface configuration
ifconfig <interface_name>
[xiaolan@thinkpad ~]$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:1D:E0:03:C5:AF
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21d:e0ff:fe03:c5af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1675 errors:0 dropped:0 overruns:0 frame:0
TX packets:1152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1634505 (1.5 MiB) TX bytes:171812 (167.7 KiB)
[xiaolan@thinkpad ~]$ ifconfig eth0
eth0
Link encap:Ethernet HWaddr 00:16:D3:C2:E6:BD
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:20 Memory:f8200000-f8220000
Data Link Layer 5-58
Configure NIC manually
Various configuration using ifconfig
IP address, netmask,broadcast addr, ARP,
promiscuous mode, MTU, …
Details: P 141-148 of textbook
Problem:
Ifconfig does NOT store this information
permanently. Upon reboot this information is
lost.
Solution:
Put commands to system boot sequence by
adding them to file /etc/rc.d/rc.local (for
linux)
Data Link Layer 5-59
Network GUI Configuration
Tools
Various tools for make permanent changes, i.e.,
change is retained and used upon system boot.
GUI Network configuration:
/usr/sbin/system-config-network
TUI configuration tool:
/usr/sbin/system-config-network-tui
TUT network configuration tool.
/usr/sbin/netconfig
/usr/bin/netcfg (GUI)
Data Link Layer 5-60
Most brute force approach
Manually modify system TCP/IP Network
configuration files:
/etc/resolve.conf: List DNS servers for
internet domain name resolution.
etc/hosts: Lists hosts to be resolved locally
(not by DNS)
/etc/nsswitch.conf: List order of host name
search. Typically look at local files,
then NIS server, then DNS server.
/etc/sysconfig/network-scripts/ifcfg-device:
configuration for NIC
Data Link Layer 5-61
Next class: lab class
To prepare:
Install Linux on your laptop
Try commands/tools mentioned today (homework to be
assigned)
Bring your laptop to class
simplest form of connection between two
computers is a direct connection
using a single Ethernet cable to enable data transfer
• Category 5 Crossover Ethernet Cable
using WiFi ad-hoc mode
• no base stations
• nodes can only transmit to other
nodes within link coverage
Data Link Layer 5-62
Summary
General link layer topics
Service, Network Interface Card
Link layer address (MAC), ARP
shared-link and Multiple Access Control
802.3 Ethernet
Overview
Bus topology, start
topology, switch
802.11 Wireless LAN
Ethernet
802.11 WiFi
AP, CSMA/CD, association, wireless router
Point-to-Point Link Layer protocols
NIC/Network configuration in Linux
Loopback interface
Data Link Layer 5-63