ITEC 350 Week 1 ------- Networks 1

advertisement
ITEC350 Networks I
Lecture 2
Hwajung Lee
Elements of a Network
Applications
Stations
Frames
Switches
Elements of a Network
Applications
Application
Application
Frame
Networks connect applications
on different stations
Copyright 2003 Prentice-Hall
Elements of a Network
Stations
Frame
Server
Station
Client
Station
Mobile Client
Station
Stations are computers
and other devices
such as cellphones and PDAs
Server
Station
Copyright 2003 Prentice-Hall
Elements of a Network
Frames
Frame
Server
Station
Client
Station
Mobile Client
Station
Stations communicate by
sending messages called
Frames
Server
Station
Copyright 2003 Prentice-Hall
Elements of a Network
Switches
Frame
Switch
Switch
Switch
Switch
Frames may pass
through multiple switches and routers;
Each switch or router reads the frame
And passes it on
Copyright 2003 Prentice-Hall
What is Computer Networking? –
Vocabulary and Acronyms
 Computer Networking-- The discipline of study which
examines how bits, in the form of energy, travel across some
medium from a source to a destination.
 Network -- A communication system for connecting computers
using a single transmission technology
 Internetwork -- A communication system for connecting
networks together using routers.
 Router (Packet Switch) -- A computer that attaches two or
more networks , forwarding packets from one network to
another (building block of an internet).
 Ethernet – A physical transmission and link layer standard
suite
 Bit – a single indivisible unit of information
 Byte – 8 bits (an octet; usually represents one character)
 Packets & Frames – A sequence of bytes sent as a single
entity from source to destination
Other Network Terminology
 A Network in the sense of Graph Theory is
 A set of Nodes N={A,B,C…} of cardinality n (n=number
of Nodes in the set N)
 A set of Links L={AB,AC,…}
 Minimal .vs. Maximal connectivity of a given
network
 Minimal connectivity: connecting the nodes with the
least number of links (AKA spanning tree)
• Many ways – Choose n-1 links out of n*(n-1)/2
 Maximal connectivity: connecting every node with every
other node
• Exactly one way – n*(n-1)/2 links
Topics of Networking
 Data Transmission
 Describes the transfer of info through electrical signals
 Packet Transmission
 Need for packets, embedding packets in other packets
 Addressing




How to give a “name” to each source and destination
Routable .vs. Unroutable address spaces
Public .vs. Private address ranges
Domain names .vs. IP addresses .vs. HW addresses
 Internetworking Protocols
 Universal service, end-to-end reliable transport, routing
 Applications
 Client-server paradigm, socket interface, Domain Name System
(DNS), email, and ftp
 Network Operating Systems
Quality of Service (QoS)
Speed
Bits per second (bps)
Multiples of 1,000 (not 1,024)
Kilobits per second (kbps)
Megabits per second (Mbps)
Gigabits per second (Gbps)
Terabits per second (Tbps)
Petabits per second (Pbps)
Latency
Latency or Delay
delay measured in milliseconds (ms)
Especially bad for some services
such as voice communication or
highly interactive applications
Reliability
Availability
Percent of time the network is available to
users for transmission and reception
Telephone network: Five 9s (99.999%)
Error Rate
Percent of lost or damaged messages or bits
Client/Server Architecture
Usually, Two Types of Stations
Clients and Servers
Server
Client PC
Service
Network
Clients
Receive
Services
Servers
Provide
Services
Copyright 2003 Prentice-Hall
Servers
PC
Server
Standard PC Microprocessor
Moderate speed and cost
Microsoft Windows Server
Novell Network
LINUX (Version of UNIX)
Fast (and Expensive)
Custom-Built
Microprocessor (e.g.,
Workstation SUN microsystems)
UNIX Operating System
Server
Highly reliable
Fastest
Servers
UltraReliable
Specialized
Mainframe
Operating
Server
System
Copyright 2003 Prentice-Hall
Network, Server, & Client Oper. Systems
Cisco IOS, JUNOS (Juniper), etc.
Novell NetWare and IntranetWare
UNIX, Linux
Windows NT Server, Win2000 Server(W2K),
Windows Server 2003(W2K3)
Windows NT Workstation, Win2000 Prof.
Windows 95
Windows-for-Workgroups
Switching Decision
Ethernet Switch
1 2 3 4 5 6
Switch Sends
Signal out a
Single Port
Station A
Transmits
to Station C
Station
A
Switch receives
a frame, sends
it back out
-- learns where to send
--by looking at address
Station
B
Station
C
Station
D
Copyright 2003 Prentice-Hall
Packet Switching (Routing) (1)
Packet
Original Message
Switch
(Router)
Computer X
A
Packet
B
1. Break message into
Smaller packets
(carried inside of frames)
C
Switching
Decision
D
2. Route packets individually;
Packet switches along the way
Make decisions about the packet
E
Computer Y
F
Copyright 2003 Prentice-Hall
Packet Switching (2)
Packet Switching Reduces Trunk Line
Costs (Shares Hardware)
 Packets from several conversations are
multiplexed on trunk lines
 Conversations do not need the full capacity of
the shared trunk lines. This reduces trunk line
costs.
Trunk Link
Packet from A to B
Packet from C to D
Copyright 2003 Prentice-Hall
Packet Switching (3)
Packet
Trailer
Data Field
Header
Other
Header
Field
Address
Fields
Packet Structure
Copyright 2003 Prentice-Hall
Frames and Packets (1)
Within a single network, the packet is
carried in the data field of that network’s
frame, probably across multiple switches
Packet
Frame
Network 1
Copyright 2003 Prentice-Hall
Frames and Packets (2)
 The first router removes packet from first
network’s frame, sends back out in a frame
with the second network’s frame format
Same
Packet
Frame
Network 1
Second Router
First Router
Network 2
Frame With
Network 2’s
Frame Format
Copyright 2003 Prentice-Hall
Frames and Packets (3)
The second router removes packet from
second network’s frame, sends back out
in a frame with the third network’s frame
Same
format
Packet
Network 3
Network 2
Frame With
Network 2’s
Frame Format
Frame With
Network 3/s
Second Frame Format
Router
Copyright 2003 Prentice-Hall
Frames and Packets (4)
 Like passing a shipment (the packet) from a
truck (frame) to an airplane (frame) at an
airport.
Receiver
Shipper
Same
Shipment
Truck
Airport
Airport
Truck
Airplane
Copyright 2003 Prentice-Hall
An Internet
Multiple Networks
Connected by Routers
Path of a Packet is its Route
Single Network
Routers
Packet
Single Network
Route
Copyright 2003 Prentice-Hall
An Internet
Single Networks Have Switches
Switches Connect Station-to-Router or Router-to-Router
Network Y
Network X
Switches
Routers
Network Z
Switches
Copyright 2003 Prentice-Hall
The Internet
Browser
The global Internet
Has thousands
of networks
Webserver
Software
Network
Packet
Router
Packet
Route
Router
Router
Packet
User PC
(Host)
IP Address=128.150.50.9
Webserver
(Host)
IP Address=128.171.17.13
Host name=voyager.cba.hawaii.edu
Copyright 2003 Prentice-Hall
Addressing
Addressing (Read pp 195-211, Minasi)
 Domain names: “radford.edu”
 IP Addresses: iii.jjj.kkk.lll, dotted decimal
 Example: Radford University has a computer
(somewhere) with IP address 137.45.192.36
 MAC (Hardware) Address
 Hexadecimal digits separated by colons or dash.
 See figure 4-10 in Panko if you are new to “HEX”
 Example: 00-06-6B-FF-0A-B4
 Specific .vs. Broadcast (FF-FF-FF-FF-FF-FF)
Addresses
IP Addresses (do HW RU01)
 An IP Packet can be sent to
 A single workstation (unicast)
• Efficient for data between pairs of addresses
 A specific list of workstations (multicast)
• Efficient for specific groups, but must specify all individual
workstations IP addresses
 All stations on a network (broadcast)
• Efficient for large (unknown) group – use special
broadcast IP address.
 IP addresses have a special broadcast address
 Class .vs. Classless Addressing.
Special IP Addresses
 THIS computer - all 0’s--both prefix and suffix
 0.0.0.0
 THIS network broadcast - all 1’s prefix and suffix
 255.255.255.255
 remote net broadcast - net prefix all 1’s suffix
 Ex: 137.45.192.255
 Network address - net prefix all 0’s suffix
 137.45.192.0
 loopback - 127.x.x.x but usually 127.0.0.1
 Everything else is a Host IP Address like
137.45.192.96
IP Address Ranges, Or “Classes”
From:
To:
Description
1.x.x.x
126.x.x.x
Class A license
127.x.x.x
127.x.x.x
Loop back
191.x.x.x
Class B license (172.16
thru 31. 0. 0 reserved for
private addresses)
192.x.x.x
223.x.x.x
Class C license (192.
168. x. 0 reserved for
private addresses)
224.0.0.0
224.0.0.255
Multicast: Reserved Link
Local Addresses
224.0.1.0
238.255.255.255
Multicast: Globally
Scoped Addresses
239.0.0.0
239.255.255.255
Multicast: Limited Scope
Addresses
240.x.x.x
255.255.255.254
Experimental
128.x.x.x
255.255.255.255
Broadcast
IP Format
137.45.104.172
Dotted Decimal vs Binary
137.45.104.172
10001001001011010110100010101100
Conversion Between Decimal & Binary
128
64
32
16
8
4
2
1
X
X
X
X
X
X
X
X
1
0
0
0
1
0
0
1
=
=
=
=
=
=
=
=
128
0
0
0
8
0
0
1
137
Conversion Between Decimal & Binary
128
64
32
16
8
4
2
1
1 128
0 0
0 0
0 0
1 8
0 0
0 0
1 1
137
0
0
1
0
1
1
0
1
0
0
32
0
8
4
0
1
45
0
1
1
0
1
0
0
0
0
64
32
0
8
0
0
0
1 128
0 0
1 32
0 0
1 8
1 4
0 0
0 0
104
172
Subnetting
Subnet Mask for Class C
137.45.104.172
255.255.255.0
“Anding” a Binary Subnet Mask
10001001001011010110100010101100
11111111111111111111111100000000
10001001001011010110100000000000
subnet ID = (137.45.104.0)
Why Subnets?
In class A, B, or C networks, there are too
many IP addresses to fit on one segment.
 Thus, need routers and subnets to isolate parts.
Subnets: A new interpretation
 IP Addresses had a new subnet field inserted
between network & local fields
 IP address := <network-number><subnet-number><host-number>
 Ex: A Class A Network with 8-bit subnet field
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|
NETWORK
|
SUBNET
|
Host number
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Class C subnet example
 Read Minasi, pp. 206 – 211
 Also, see www.minasi.com -- newsletters, etc.
 Look at IP Subnetting Tutorial
http://www.ralphb.net/IPSubnet/index.html
WAN Link
Router
Router
Network address:
192.168.1.64
Los Angeles
Mask:
255.255.255.192 Ethernet Sw.
Host addresses
192.168.1.65-126
PC3
PC1
PC2
New York
Ethernet Sw.
Network address:
192.168.1.128
Mask:
255.255.255.192
Host addresses
192.168.1.129-190
PC4
PC5
PC6
PC7
Subnet example
 192.168.1.0 = Basic Class C Network ID
 255.255.255.0 = Class C Mask
Old Class C
Boundary
Between
Network and Local
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|
(Sub)NETWORK
| Local Addr|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Must Use 2 extra bits for the
First feasible sub-division of
Class C into two subnets
New Class C
Subnet Boundary
Between
 192.168.1.64, 192.168.1.128 New sub-Network IDs
Network and Local
 255.255.255.192 = New Subnet Mask
SubNetwork IDs, Host Ranges &
Broadcast Addresses
Using extra two bits in Network ID
 00 – Can’t use because this is the part of the
original Class C’s Network ID
 01 – Available 01000000 = 64
 10 – Available 10000000 = 128
 11 – Can’t use because this is part of the
original Class C’s broadcast address
Hence
 192.168.1.64 is the first sub-Network ID
 192.168.1.128 is the second
Binary for the subnetwork IDs




Byte boundaries shown by dashed lines
Subnet IDs = Local address field of all zeroes (6 bits)
01 or 10 to get bottom byte (8 bits)
Result = 64 or 128 when translated to decimal
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|
(Sub)NETWORK
0 1|0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
.
168
.
1
.
64
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|
(Sub)NETWORK
1 0|0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
.
168
.
1
.
128
Binary for Masks (Old .vs. New)
 A Mask is a device for indicating how long the
(sub)network field is
 All 1’s covering the entire network id portion
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1|1 1 1 1 1 1… OLD NETWORK
MASK …1 1 1 1|0 0 0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
255
.
255
.
255
.
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1|1 1 1 1 1 1… (Sub)NETWORK MASK …1 1 1 1 1 1|0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
255
.
255
.
255
.
192
Host Ranges
 Network Mask is 255.255.255.192
 192.168.1.64 has 62 host addresses
 First available host address = 192.168.1.65
 Last available host address = 192.168.1.126
 Broadcast address = 192.168.1.127
 192.168.1.128 has 62 host addresses
 First available host address = 192.168.1.129
 Last available host address = 192.168.1.190
 Broadcast address = 192.168.1.191
 Minasi p207
Binary for Broadcast addresses
 Broadcast addresses have all 1’s in the host field
 Remember, we always translate 8 bit octets to decimal!
 DO HOMEWORK RU02
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|
(Sub)NETWORK
0 1|1 1 1 1 1 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
.
168
.
1
.
127
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0|
(Sub)NETWORK
1 0|1 1 1 1 1 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
.
168
.
1
.
191
Recap
Network Classes
 IANA (Internet Assigned Numbers Authority)
 Class A
 IP address := <8bits>.<24bits>
 16 Million hosts in a class A network domain
 Class B
 IP address = <16bits>.<16bits>
 65534 hosts in a class B network domain
 Class C
 IP address = <24bits>.<8bits>
 256 hosts in a class C network domain
Routable and Nonroutable Addresses
Nonroutable Address [RFC 1918]
 Internet Router ignore the following addresses.
• 10.0.0.0 – 10.255.255.255
• 172.16.0.0 – 172.31.255.255
• 192.168.0.0 – 192.168.255.255
 Millions of networks can exist with the same
nonroutable address.
 “Intranet” : Internal Internet
 Side benefit : “Security”
 NAT (Network Address Translation) router
Note on Classful vs. Classless
 Note that, in classful subnetting, we lose quite a
few blocks of addresses.
 RFC 1519 (Classless Inter-Domain Routing =
CIDR) was introduced in 1993 to deal with rapid
depletion of IP address space due to “Classful
Fragmentation”
 Problem:
 Given the entire internet was “classful” in 1993, how to
transition to classless methods?
 What exactly is the impact to internet protocols (in all the
millions of devices and hosts) of such a change?
Impact of CIDR
We needed new routing protocols (haven’t
introduced those yet)
We need new ways of handling masks
We will revisit classless addressing and
routing in a few weeks, but the bottom line is:
 There is a way to use all those un-used addresses
(all zeroes, all ones) that we discarded in classful
subnetting.
 Minasi p. 209~210 shows a classless subnetting of
a class C network.
HW (e.g., Ethernet) Addresses
 A Hardware (HW) address of all 1’s signifies the
broadcast address at the link layer of Ethernet
 Ethernet NICs can also be configured (through
software) with several Multicast addresses
 All Ethernet NICs will accept a packet with either
 Individual HW address of NIC
 The broadcast address
 Any of the configured multicast addresses
 Finally, Ethernet NICs can be put into
promiscuous mode – accept all packets
regardless of HW address
 Useful for monitoring, “sniffing”, debugging
Download