Lecture2 Network Hardware
Lecture2 Network Hardware
Lecture2 Network Hardware
1
OSI model
• OSI model
– Seven layers
– Protocol encapsulation
– Five layers in Internet: physical, data link, network,
transport (including presentation and session layers of
OSI model), application
• A guideline for writing network software and
understanding the principle of internetworking
• You can’t see the layers as a network user
2
Basic components
• Repeaters
– Regenerate signals
• Hubs
– Similar to repeaters but with multiple ports
4
Autonegotiation and flow control
• Autonegotiation is defined in IEEE 802.3
– Two connected devices can choose common
transmission parameters such as speed
• How can a NIC work with different cables with
different speed?
– Media Independent Interface (MII) defined by IEEE
802.3u
• How can a slow NIC handle fast traffic from a fast
NIC?
– PAUSE frame in IEEE 802.3x
– Eventually should be handled by higher layer protocols
5
Basic components (cont.)
• Bridges (with multiple ports)
– Store and forward frames (up to OSI layer 2)
• Switches: similar to multiport bridges (up to 1.5
layer)
– Mainly work at MAC sublayer.
• Router
– Route and forward network packets (OSI layer 3)
• Modems (hard to say, could be up to layer 3)
– ADSL modem/router
6
Basic components (cont.)
• Firewall (up to layer 3 or 4)
– a dedicated software (maybe with hardware
support), which inspects network traffic passing
through it, and denies or permits passage based
on a set of rules.
• Gateway (up to application layer)
– a device that serves as an entrance to a network.
– Similar to a firewall, but has more knowledge
of application protocols and better security.
7
Network hardware
• Cables
– Twisted pair, coaxial cable, optical fibre
• Connectors
– RJ-45 for UTP
8
Twisted-pair cables
• Twisted-pair categories
– Cat 1 and 2, Cat 3, Cat 4, Cat 5 and 5e, Cat 6
• Crosstalk
– Signal crosstalk occurs when the signals in one wire are
eletromagnetically coupled (or cross over) into another
wire. This happens because wires in close proximity to
one another can pick up each other’s signal.
– Problem: phantom collisions can be detected.
• Crossover cable
– Directly networking two computers.
9
Structured cabling
• High-quality cabling is essential to network
performance
• Structured cabling provides a reliable and
manageable cabling system
• TIA/EIA cabling standards
– Telecommunications Industries Association
(TIA)
– Electronic Industries Association (EIA)
– Refer to Ethernet: The Definitive Guide
10
Structured cabling (cont.)
11
Network hardware (cont.)
– BNC T connector for coaxial
12
Network hardware (cont.)
• Transceivers (normally embedded)
– Used in Ethernet to connect nodes to the
physical medium
13
Network hardware (cont.)
• Network Interface Card (NIC)
14
Network hardware (cont.)
• Network Interface Card (NIC)
– CSMA/CD
– Network device driver is used by OS to interact with
NIC. An interrupt is used when a request is completed
or when a packet arrives.
– DMA: Direct Memory Access is used to copy data from
NIC (device) memory to main memory (RAM)
– Protocol stack: layer 1, layer 1.5 (MAC)
15
Internet Protocol
• MAC address
– Six octets for Ethernet NIC
• • 3b-00-65-fa-4a-68
• IP address (IPv4)
• – 4 bytes (octets), e.g. 132.65.33.24
– Traditionally addresses are divided into class A,
B and C
– Classless Inter-Domain Routing (CIDR)
16
Internet Protocol
• Subnets
– Use net mask to identify a subnet
– E.g. divide class B network 132.65. into 254 subnets.
Net mask is 255.255.255.0
– Subnets are
• 132.65.1/24
• 132.65.2/24
• …
• 132.65.254/24
• Broadcast address and network address
– E.g. 132.65.255.255, 132.65.0.0
• More exercises for subnetting in Lab 19.
17
Ethernet frame
18
IP packet
19
UDP datagram
20
TCP segment
21
Topology & Protocols
• Network topology
– Star, bus, ring, mesh, hybrid
– Physical vs. logical topology
• LAN protocols
– Ethernet/Fast
Ethernet/Giga
bit
Ethernet/10
Gigabit
– Token ring
– Token bus
– FDDI 22
– IPX
Protocols
• WAN protocols
– X.25
– Frame relay
– ATM
– ISDN
• Internetworking
– TCP/IP
– IPv4 vs IPv6
– PPP for dial up
networking
– ARP/RARP
23
High speed interconnects
• DSL e.g. ADSL, VDSL
– Use telephone line, with upstream 128kbps, and
downstream up to 8Mbps
• InfiniBand
– Primarily used for high performance computing
– Point to point bi-directional link, 2.5 Gbps in each
direction, between processor and storage device
– 12x links are used for cluster computers
• FibreChannel
– Gigabit speed network technology similar to
InfiniBand
24
IEEE standards
• 802.3 for Ethernet
– Includes supplements for fast Ethernet, Gigabit
Ethernet, and 10 Gigabit Ethernet
• 802.5 for Token Ring
• 802.4 for Token Bus
• 802.11 for wireless LAN
– Includes supplements a, b and g
25
I/O Bus standards
• Industry Standard Architecture (ISA)
– Good old standard
– Used for slower devices such as mice and modem
• Peripheral Component Interconnect (PCI)
– Used to connect performance critical devices such as
video card and NIC to memory
– Will be succeeded by PCI Express
• Refer to http://www.techfest.com/hardware
/bus.htm for other I/O bus standards
26
Client/server model
• Many network functions are implemented in
client/server model
– Client: make a request
– Server: process requests from clients and reply
• Clients and servers are programs.
– Many servers are just installed on a single powerful
machine for easy administration. Therefore that
machine is normally called a “server” machine.
– Port numbers/well-known port numbers
• The counterpart is Peer-to-Peer (P2P) model.
27
Client/server model (cont.)
• Typical servers
– Name server: provide a mapping between IP addresses and IP
names.
• Try dig www.hotmail.com
– File server: provide network file service
• Exmple - NFS
– email server: provide email service
• Example - sendmail, smtpd
– www server: provide web service
• Example - apache
– Printer server: provide print service
• Example - lpd
– ftp server: ftpd
– ssh server: sshd
28
The journey of an IP packet –
a
holistic view
29
Kernel space and user space
• The memory of a computer system (like a client or
server machine) is separated into kernel space and
user space.
• User data like email or HTTP request are in user
space but transferred to the kernel space for
processing via system calls.
• Functions like TCP/UDP, IP are in the privileged
kernel space and handle the encapsulation of
packets like creating headers for the packets or
frames and the sending/receiving of the packets.
30
Data path between client/server
• Copy data from the user process (user memory) to socket
in OS kernel (kernel memory)
• Add headers to the data to make a frame
• Copy to NIC memory using DMA
• Send the frame by NIC to the a router
• The IP packet travels from router to router, finally to the
server
• Receive the frame by the NIC of the server
• NIC sends interrupts to CPU
• CPU invokes NIC driver to copy the frame to RAM (using
DMA)
• Headers are processed by related protocols
• Copy data from the receiving socket (kernel memory) to
the buffer of the user process (maybe a web server)
31
Linux commands today
• touch
• find
– find /bin –name wh*
• grep
32
Summary
• Which OSI layers are these devices involved?
– Switching hub, switch, bridge, router, firewall,
gateway.
• What is crosstalk in twisted pair?
• How is an IP packet sent from a client machine
to a server machine in Internet?
33