Lan and Wan
Lan and Wan
3
Introduction
A local area network is a communication network that
interconnects a variety of data communicating devices within
a small geographic area and broadcasts data at
• high data transfer rates
• very low error rates.
(WANs now do this too)
Since the local area network first appeared in the 1970s, its
use has become widespread in commercial and academic
environments.
4
Data Communications and Computer Networks
Chapter 7
5
Data Communications and Computer Networks
Chapter 7
6
Data Communications and Computer Networks
Chapter 7
8
Data Communications and Computer Networks
Chapter 7
11
Data Communications and Computer Networks
Chapter 7
Bus/Tree Topology
The original topology – 1970’s
Workstation has a network interface card (NIC) provides a
physical connection to a network
Data can be transferred using either
1.baseband digital signals
2.broadband analog signals.
12
Data Communications and Computer Networks
Chapter 7
Bus/Tree Topology
Workstation has a network interface card (NIC) provides a
physical connection to a network
Attaches to the bus (a coaxial cable) via a tap.
NIC is an electronic device that performs the necessary signal
conversions and protocols operations so that the workstation can send
and receive data on the network.
Tap is a passive device
Does not alter the signal
Does not require electricity to operate
13
Data Communications and Computer Networks
Chapter 7
14
LAN Topologies: Bus
• Consists of a single wire to which
individual stations are attached
• Each end has a terminator attached to it
• Data travels the entire length of the cable
• Transmission from any stations travels
entire medium (both directions)
• Inexpensive and easy to install
• Ethernet is the common form of a bus
topology system
15
Data Communications and Computer Networks
Chapter 7
16
Bus/Tree Topology
Baseband signals
Digital signals – 10 Mbps
Bidirectional and more outward in both directions from the
workstation transmitting.
Easy to install and maintain
Fewer than 100 workstations
Buses can be split and joined, creating trees.
17
Data Communications and Computer Networks
Chapter 7
18
Data Communications and Computer Networks
Chapter 7
Advantages/disadvantages of a bus
Difficult to add new devices if no tap exists.
No tap existing means cutting into the line
As such, this topology is loosing popularity
Plenty still around; Ethernet uses this.
19
Data Communications and Computer Networks
Chapter 7
Star-wired Topologies
Stars versus a single line
Two types:
1.Star-wired bus
(often call the star topology)
2.Star-wired ring
20
Star-wired Bus Topology
Logically operates as a bus, but physically looks like a star.
Star design is based on hub. All workstations attach to hub.
Hub is an unintelligent device that immediately transmits whatever
data it receives to all connections
Unshielded twisted pair usually used to connect workstation
to hub.
Hub takes incoming signal and immediately broadcasts it out
all connected links.
Hubs can be interconnected to extend size of network.
Very popular!
21
Hubs
• Active central element of star layout
• Each station connected to hub by two lines
— Transmit and receive
• Hub acts as a repeater
• When single station transmits, hub repeats signal on outgoing line to each
station
• Line consists of two unshielded twisted pairs
• Limited to about 100 m
— High data rate and poor transmission qualities of UTP
• Optical fiber may be used
— Max about 500 m
• Physically star, logically bus
• Transmission from any station received by all other stations
• If two stations transmit at the same time, collision
Hub Layouts
• Multiple levels of hubs cascaded
• Each hub may have a mixture of stations and other hubs
attached to from below
• Fits well with building wiring practices
— Wiring closet on each floor
— Hub can be placed in each one
— Each hub services stations on its floor
Star-wired bus physical topology for a LAN
24
Interconnection of two hubs in a star-wired bus LAN
25
Data Communications and Computer Networks
Chapter 7
26
Data Communications and Computer Networks
Chapter 7
28
Data Communications and Computer Networks
Chapter 7
Network A Network B
Higher Higher
Layers Layers
Repeater
Physical Physical Physical
30
Three possible operations of the workstation repeater
on a ring topology
31
Physical organization of a ring topology
Looks like a star!
32
Data Communications and Computer Networks
Chapter 7
33
Data Communications and Computer Networks
Chapter 7
34
Data Communications and Computer Networks
Chapter 7
Contention-Based Protocols
Essentially first come first served.
Most common example is Carrier Sense Multiple Access with
Collision Detection (CSMA/CD).
If no one is transmitting, a workstation can transmit.
If someone else is transmitting, the workstation “backs off”
and waits.
Half duplex protocol.
35
Data Communications and Computer Networks
Chapter 7
36
Data Communications and Computer Networks
Chapter 7
40
Data Communications and Computer Networks
Chapter 7
41
Frame format for IEEE 802.3 CSMA/CD Protocol
42
Frame Format for IEEE 802.5 Token Ring Protocol
43
Data Communications and Computer Networks
Chapter 7
44
Data Communications and Computer Networks
Chapter 7
Ethernet
Originally, CSMA/CD was 10 Mbps.
Then 100 Mbps was introduced. Most NICs sold today are
10/100 Mbps.
Then 1000 Mbps (1 Gbps) was introduced.
10 Gbps is now available.
45
Data Communications and Computer Networks
Chapter 7
Ethernet
Cabling can be either UTP (unshielded twisted pair) or
optical (but 10 Gbps Ethernet may not work over UTP due to
radio frequency interference).
Where 10 Mbps Ethernet has less than 30% utilization due to
collisions, 1000 Mbps is limited only by traffic queueing.
Distance with 10 Mbps is limited by CSMA/CD propagation
time, whereas 1000 Mbps limited only by media.
46
47
Data Communications and Computer Networks
Chapter 7
48
Layer 2 and Layer 3 Switches
• Now many types of devices for interconnecting LANs
• Beyond bridges and routers
• Layer 2 switches
• Layer 3 switches
Layer 2 Switches
• Central hub acts as switch
• Incoming frame from particular station switched to
appropriate output line
• Unused lines can switch other traffic
• More than one station transmitting at a time
• Multiplying capacity of LAN
Layer 2 Switch Benefits
• No change to attached devices to convert bus LAN or hub LAN
to switched LAN
• For Ethernet LAN, each device uses Ethernet MAC protocol
• Device has dedicated capacity equal to original LAN
— Assuming switch has sufficient capacity to keep up with all devices
— For example if switch can sustain throughput of 20 Mbps, each device
appears to have dedicated capacity for either input or output of 10
Mbps
• Layer 2 switch scales easily
— Additional devices attached to switch by increasing capacity of layer 2
Types of Layer 2 Switch
• Store-and-forward switch
— Accepts frame on input line
— Buffers it briefly,
— Then routes it to appropriate output line
— Delay between sender and receiver
— Boosts integrity of network
• Cut-through switch
— Takes advantage of destination address appearing at beginning of
frame
— Switch begins repeating frame onto output line as soon as it
recognizes destination address
— Highest possible throughput
— Risk of propagating bad frames
• Switch unable to check CRC prior to retransmission
Layer 2 Switch v Bridge
• Layer 2 switch can be viewed as full-duplex hub
• Can incorporate logic to function as multiport bridge
• Bridge frame handling done in software
• Switch performs address recognition and frame forwarding in
hardware
• Bridge only analyzes and forwards one frame at a time
• Switch has multiple parallel data paths
— Can handle multiple frames at a time
• Bridge uses store-and-forward operation
• Switch can have cut-through operation
• Bridge suffered commercially
— New installations typically include layer 2 switches with bridge
functionality rather than bridges
Problems with Layer 2 Switches (1)
• As number of devices in building grows, layer 2 switches
reveal some inadequacies
• Broadcast overload
• Lack of multiple links
• Set of devices and LANs connected by layer 2 switches have
flat address space
— Allusers share common MAC broadcast address
— If any device issues broadcast frame, that frame is delivered to all
devices attached to network connected by layer 2 switches and/or
bridges
— In large network, broadcast frames can create big overhead
— Malfunctioning device can create broadcast storm
• Numerous broadcast frames clog network
Problems with Layer 2 Switches (2)
• Current standards for bridge protocols dictate no closed loops
— Only one path between any two devices
— Impossible in standards-based implementation to provide multiple
paths through multiple switches between devices
• Limits both performance and reliability.
• Solution: break up network into subnetworks connected by
routers
• MAC broadcast frame limited to devices and switches
contained in single subnetwork
• IP-based routers employ sophisticated routing algorithms
— Allow use of multiple paths between subnetworks going through
different routers
Bridges
• Ability to expand beyond single LAN
• Provide interconnection to other LANs/WANs
• Use Bridge or router
• Bridge is simpler
—Connects similar LANs
—Identical protocols for physical and link layers
—Minimal processing
• Router more general purpose
—Interconnect various LANs and WANs
—see later
Bridge
Connects 2 or more LAN segments and uses data link layer addresses
(e.g.MAC addresses) to make data forwarding decisions
Copies frames from one network to the other
Layer 2 of the “OSI model”
Higher Higher
Layers Bridge Layers
Data Link Data Link
23-01-88-A8-77-45 Data Link Data Link 53-F1-A4-AB-67-4F
Higher Higher
Layers Router Layers
Network Network
137.22.144.6 145.65.23.102
Network Network
Data Link Data Link Data Link
Data Link
Physical Physical 1 Physical 2 Physical
68
Routers Connect Local and Remote Networks
Device parameters
If a host needs to communicate ANYWHERE that isn’t on the
local LAN, you must use an intermediary device (router).
Default Gateway
Necessary if you are going to communicate with the outside world. You
have to key this in on the host device
If not configured, can only communicate locally on your LAN
The host and the default gateway MUST be on the same network.
Use ipconfig to view ip address, subnet mask, and default gateway
information.
May also use netstat –r, or route print to view routing details on your PC
(stop and do this now…look at your default gateway.
For any given host, it is the NEAR-SIDE Router interface.
What is the first router interface a packet would encounter if it left
your PC? The IP address of that interface on the router becomes your
default gate in the PC.
Packet Forwarding
Decisions have to be made at each DEVICE along the path
until the packet reaches its final destination
Routing packets
Routers and routing tables
3 main features: Destination network, next-hop, and the
metric. Discuss the routing table below.
Discuss
routing table
information –
know these !
Functions of a router
82
Example of WAN application
Sprint
Network
LA
Runs a 100 Mbps LAN