Nixu Oy PL 21
(Mäkelänkatu 91) 00601 Helsinki, Finland tel. +358 9 478 1011 fax. +358 9 478 1030
The Data Link Layer
The Data Link World
• Traditionally the data communications world has been built on
— Local Area Networks
> Ethernet, Token Ring, ATM over physcal media
— Point to point connections between LANs
> PPP, SLIP, ATM, Frame Relay, ISDN over telecoms infrastructure
• Also
— Campus networks
> FDDI, HIPPI, ATM, optical rings
— Mobile wireless networks
> GPRS, UMTS, WLAN
— Plenty of other solutions
> Cable modems, Bluetooth
ATM, Asynchronous Transfer Mode
• Standardized by the ATM Forum, an industry consortium
• When introduced, a competitor for Internet Protocol
> ATM to the desktop
• Currently mostly used as flexible telecoms infrastructure
— Customer connections can be configured immediately from a central control location
— Enables allocation and control of bandwidth (not at the ATM level but at the endpoints)
• ATM network consists of ATM switches that are connected to other switches and ATM nodes using point to point connections
— Different from traditional LAN topologies
How the ATM works
• Two entities want to communicate
• A route over the ATM network is created
— The routing is a separate function from data transmission (switching)
— Currently often done by hand (permanent virtual circuit)
— PNNI protocol exists for creating routes (Private Network to Network Interface)
• The route is named using using a VPI/VCI pair and configured in each switch of the ATM network
— Virtual Path Identifier
— Virtual Channel Identifier
• Now each switch along the route knows where to send a packet with a certain
VPI/VCI header
How the ATM works (cont.)
• The ATM packet, called a cell, is exactly 53 bytes long
• The header is 5 bytes long and contains the
— VPI/VCI address (VPI is 8 or 12 bits, VCI is 16 bits)
— Payload type (3 bits)
— Priority (1 bit)
— Header checksum (8 bits)
• The header contains all needed information for the switches to transmit the packet
• The rest of 48 bytes is the payload (data)
— Now how do we use the 48 bytes?
ATM Addressing
• The VPI/VCI pair need to be unique only in each switch along the path
— It may be changed along the switching path
• 20 octet (byte) ATM addresses exist
— 13 bytes of prefix (network address)
— 6 byte ID (can be Ethernet address)
• Other 20 byte addressing schemes exist also
• These are not really used very much
AAL, ATM Adaptation Layer
• The different AAL layers provide ATM services to higher level protocols
• AAL1 provides a constant rate bitstream
— No error detection, missing cells are reported
— Suits for audio and video
• AAL2 was intended for packet data, but is dead
• AAL3/4 is a connection oriented or connectionless stream or packet data service with or without reliability
— Supports multiplexing several connections/packets over a single VPI/VCI
• AAL5 is a more simple and efficient version of the AAL3/4
— The AAL usually selected for IP traffic
The Ethernet
• IEEE 802.3 standard
• A limited distance LAN protocol and cabling standard
• Several physical cabling and bandwidth options
— Coaxial cable 10Base5 and 10Base2, mostly historical
> All nodes connect to the same coax
— Twisted pair 10BaseT, 100BaseT
> Nodes are connected using a hub or switch
— Also optical and wireless Ethernet and gigabit speeds
How the Ethernet Uses the Shared Media?
• 1-persistent CSMA/CD
— Carrier Sense Multiple Access / Collision Detection
• Each node waits for a free moment to send
• If two or more send simultaneously they detect the collision and each stops sending and waits a random interval
• All nodes listen to all traffic and pick their own as directed by the MAC address
Ethernet Addressing
• Each network card has a unique hardware address (MAC)
— In some hardware can be changed with software
— The MAC address usually has a manufacturer ID part and an unique part
— Duplicate MAC addresses in the same LAN happen, but extremely rarely
• Ethernet frames start with a 48-bit destination address followed by a 48-bit source address
• Hosts can send unicasts or broadcasts
— The broadcast is used to find who else is on the same LAN
— Or to find who has a certain IP address on this LAN (ARP)
— Or to find configuration parameters for this host (DHCP)
— Unicasts are used for normal traffic
Hubs and switches
• Twisted pair Ethernet hosts use a physical star configuration
• A hub repeats all traffic to all stations
• A switch learns which MAC addresses are in which physical ports and transmit only necessary traffic
— Security point: switches are harder to eavesdrop, but can usually be made to enter a fail- safe mode, where they act as a hub
• Switches provide better performance than hubs
• Both may be chained within certain limits
Extending Ethernet
• The physical reach of the Ethernet can be extended using repeaters, bridges and other devices
• However having a large (many hosts) Ethernet is very vulnerable to problems
— Broadcast storms can cripple the whole network (as happened to FUNET once)
• There is a reason for the higher level protocols like IP
Lan topologies
• Lans can be
— Buses
— Stars
— Rings
— Other
> A switch with connections to local hubs, a star of stars
— Wireless
> Raises interesting problems, A can see B, B can see C, A can not see C...
LAN cabling
• Expensive, difficult to change afterwards
— The reason for 10BaseT was the ability to use existing telephone cabling
• Since the analog signals are RF, the quality of cabling and connectors is very important
— CAT 5 minimum
• The physical routing of the cabling creates security considerations
• The physical maximum length of a single hub to workstation and overall cabling
length creates installation considerations
Token Ring
• Instead of collision detection, there is a token (data) circulating in the network
• The node having the token at the moment has the permission to send, all others must wait for their turn
• The protocol must be able to handle situations like the node dieing, while it posesses the token
— Usually if there is no token seen within a certain time period, a new token is created
• IBM Token Ring network was physically a star, logically a ring
ATM LANs
• ATM uses only point to point connections
• IP on a LAN assumes that local network addresses can be reached directly and traffic to other addresses must be sent to the router
• There are several workarounds that make it possible to build an IP LAN using ATM
— Most common is an ATM LAN Emulation server that emulates broadcasts and other serv- ices
• But the 100 Mbps switched Ethernet killed the need for ATM LANs
Point-to-point links
• Need to connect 2 networks or computers with a dedicated link
— dial-up hosts and modem pools, inter-office routing
• Endpoints might be single computers, routers or bridges
• Dial-up connections, on-demand routing
— Dial-up access to networks with telephone/ISDN lines
— Routing between offices over leased lines
— Encapsulating of network routes over different networks (tunneling)
SLIP overview
• Simple packet framing protocol
— Framing is done with END (octal 300) and ESC (octal 333) special characters. Sender just transfers data packet and END
— Occurrances of END and ESC characters in data bytes are escaped with two byte sequences (ESC+octal 334 nad ESC+octal 335, respectively)
• Static IP addresses for endpoints
— Every dial-up client needs own IP address
• No type field for packets
— only one protocol over one SLIP connection
• Old de facto-standard, description in RFC 1055
PPP overview
• Specification in RFCs 1661,1662, 1663 and others
• A protocol capable of multiplexing different network protocols over a single point-to-point link
— For example IP, IPX, XNS and AppleTalk concurrently
• Carefully designed for compatibility with most commonly used hardware
• Independent protocols for link and network control
— Link encapsulation options, authentication and link quality control configured with link control protocol, with reasonable default values
— Extensible with new network protocols: each network protocol has its own network control packets and configuration options
Practical PPP examples
• Dial-up Internet connections
— Physical connection with modem or ISDN
— Dynamic IP addresses and network configuration for clients
— Easy to install and reliable
— Supported for almost all client platforms
• Simple VPN (Virtual private network) over TCP/IP and ssh
— Secure Shell connection from distant location to intranet over untrusted networks
— PPP runs over SSH connection with link ends in secure networks
— Packets from distant location to intranet are routed over PPP to intranet. Cheap, dirty and practical VPN solution
… Practical PPP examples
• PPP over Ethernet
— Specified in RFC 2516
— Used in some DSL and cable modem configurations
— Makes it possible to decouple providing
— Integrates with existing authentication/billing systems
Description of a PPP Session
• Simplified PPP state diagram:
— Session up/down events not shown (from hardware or manually)
— In Network state different network layer protocols may open or close while PPP stays con- nected: different possible states not shown
Dead
Terminate
Establish
Network
Authenticate SUCCESS/NONE
FAIL
DOWN
FAIL
OPENED UP
CLOSING