Sie sind auf Seite 1von 52

Computer Networks

1
A Brief History
• The filed of communications is not new:
– For thousands of years people communicated using little
more than words, stone tablets, and smoke signals.
– The primary forms of sending information were based on
the auditory and visual senses.
• Communications changed drastically in 1837,
when Samuel Morse invented the telegraph. This
invention made it possible to send information using
electrical impulses over a copper wire. Messages were
sent by translating each character into a sequence of
long or short electrical impulses (dots and dashes).
2
Applications
• Transferring data between computers. LAN
/ WAN communications.
• Telephones /Fax / Cellular phones.
• Televisions.
• Voice and video communications.
• Teleconferencing.
• Information Services.
3
Uses of Computer Networks
(for Companies)

• Resource sharing
• High reliability
• Saving money
• Scalability
• Communication medium
4
Uses of Computer Networks
(for People)

• Access to remote information


• Person-to-person communication
• Interactive entertainment

5
Network Hardware

Criterions for classifying networks:

• Transmission technology
• Scale

6
Network Topology
Manner in which network devices are
connected physically.

Devices:
Mainframes, Workstations, File servers,
Printers, Scanners

7
Network Topologies
• Bus topology
• Star topology
• Ring topology
• Hybrid topology
• Tree topology
• Complete topology
• Irregular topologies
8
IP addresses
• The Internet is a virtual structure, imagined by its
designers, and implemented entirely in software.
• Thus, the designers are free to choose
– packet formats and sizes,
– addresses,
– delivery techniques, and so on;
– nothing is dictated by hardware.
• For addresses, the designers of TCP/IP chose a
scheme analogous to physical network addressing
in which each host on the internet is assigned a
32-bit integer address called its internet address
or IP address.
3
IP addresses (Cont.)
• The integers are carefully chosen to make routing
efficient. Specifically, an IP address encodes the
identification of the network to which a host
attaches as well as the identification of a unique
host on that network.

Each host on a TCP/IP internet is assigned a


unique 32-bit internet address that is used in all
communication with that host.
4
IP addresses (Cont.)
Conceptually, each address is a pair (netid,
hostid), where netid identifies a network,
and hostid identifies a host on that network.
Ex:

192.248.24.250

netid hostid
5
IP addresses (Cont.)
• In the classful addressing scheme, each address is
said to be self-identifying because the boundary
between prefix and suffix can be computed from
the address alone, without reference to external
information.
• In particular, the class of an address can be
determined from the three high-order bits, with
two bits being sufficient to distinguish among the
three primary classes.
6
IP addresses (Cont.)

Class netid hostid


Class A 8 - bits 24 - bits

Class B 16 – bits 16 – bits

Class C 24 – bits 8 - bits

7
The original classful addressing scheme
8 16 24 31
0
Class A netid hostid

1 0
Class B netid hostid

Class C 1 1 0
netid hostid

Class D 1 1 1 0
Multicast address

1 1 1 1
Class E Reserved for future use

8
Netid

0 8
0 Class A

0 16
1 0 Class B

0 24
110
Class C 10
Netid – Class A

0 8
0 Class A

0 0000000 Min: 0

0 1111111 Max: 64+32+16+8+4+2+1 = 127

11
Range: 0 ~ 127 Network: 0.0.0.0 ~ 127.0.0.0
Netid – Class B

0 16

10

10 000000 Min: 128

1 0111111 Max: 191

Range: 128 ~ 191 Network: 128.0.0.0 ~ 191.255.0.0 12


Netid – Class C

0 8
0 Class A

0 16
1 0 Class B

0 24
110
Class C 13
IP addresses (Cont.)

Because IP addresses encode both a


network and a host on that network, they do
not specify an individual computer, but a
connection to a network.

14
Network and Directed Broadcast
Addresses

• Advantages:
– IP addresses makes efficient routing.
– IP address can refer to networks as well as
hosts.

15
Network address
Internet addresses can be used to refer to
networks as well as individual hosts. By
convention, an address that has all bits of
hostid equal to 0 is reserved to refer to the
network.
Example:
Class A network – 121.0.0.0
Class B network - 190.10.0.0
Class C network - 192.10.30.0
16
Network address (Cont.)
Example:
Class A Network: 121.0.0.0
27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 2 4 23 22 21 20
0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Class B Network: 190.10.0.0


27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 2 4 23 22 21 20
1 0 1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Class C Network: 192.10.30.0


27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 2 4 23 22 21 20
1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

17
Directed broadcast addresses
• IP addresses can be used to specify a directed
broadcast in which a packet is sent to all
computers on a network.
• Such addresses map to hardware broadcast, if
available.
• A directed broadcast address has a valid
netid and a hostid with all bits set to 1.

18
Directed broadcast addresses
(Cont.)
Example:
121.255.255.255
0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

190.10.255.255
1 0 1 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

192.30.10.255
1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1

19
Directed broadcast addresses
(Cont.)
• On many network technologies (e.g., Ethernet),
broadcasting is as efficient as unicast transmission.
• On others, broadcasting is supported by the network
software, but requires substantially more delay than
single transmission.
• Some network hardware does not support broadcast at
all.
• Thus, having an IP directed broadcast address does not
guarantee the availability or efficiency of broadcast
delivery.
20
Directed broadcast addresses
(Cont.)
• A directed broadcast address can be interpreted
unambiguously at any point in an internet because it
uniquely identifies the target network in addition to
specifying broadcast on that network.
• Directed broadcast addresses provide a powerful (and
somewhat dangerous) mechanism that allows a remote
system to send a single packet that will be broadcast
on the specified network.
• From an addressing point of view, the chief
disadvantage of directed broadcast is that it requires
knowledge of the network address.
21
Limited broadcast (Cont.)
• Another form of broadcast address, called a limited
broadcast address or local network broadcast
address, provides a broadcast address for the local
network independent of the assigned IP address.
• The local broadcast address consists of thirty-two 1s
(hence, it is sometimes called the “all 1s” broadcast
address).
• A host may use the limited broadcast address as part
of a startup procedure before it learns its IP address or
the IP address prefix for the local network.
• Once the host learns its IP address for the local
network, however, it should use directed broadcast.
22
Limited broadcast (Cont.)
Example:
Class A
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Class B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Class C
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

23
Interpreting zero to mean “this”

• We have now seen that a field consisting of 1s can


be interpreted to mean “all”, as in “all hosts” on a
network.
• In general, internet software interprets fields
consisting of 0s to mean “this”.
• Thus, an IP address with hostid 0 refers to “this”
host.
• And an internet address with netid 0 refers to
“this” network.

24
Interpreting zero to mean “this”
(Cont.)
• Of course, it is only meaningful to use such an address in a
context where it can be interpreted unambiguously.
• For example, if a machine receives a packet in which the
netid portion of the destination address is 0 and the hostid
portion of the destination address its address, the receiver
interprets the netid field to mean “this” network.
• Using netid 0 especially important in those cases where a
host wants to communicate over a network but dos not yet
know the network IP address.
• The host uses network ID 0 temporarily, and other hosts on
the network interpret the address as meaning “this”
network.
25
Subnet an Supernet Extensions
• The addressing scheme described so far requires a unique
network prefix for each physical network.
• Although it was the original plan, it did not last long. In the
1980s as LAN technologies became increasingly popular, it
became apparent that requiring a unique prefix for each physical
network would exhaust the address space quickly.
• Consequently, an addressing extension was developed to
conserve network prefix. Known as subnet addressing, the
scheme allows multiple physical network to share a prefix.
• In the 1990s, a second extension was devised that ignored the
classful hierarchy and allowed the division between prefix and
suffix at an arbitrary point. Called classless addressing or
supernetting, the scheme allows more complete utilization of the
address space.
26
Weaknesses in Internet Addressing
• If a host computer moves from one network to another, its IP
address must change.
• When any class C network grows to more than 255 hosts, it
must have its address changed to a class B address. While
this may seem like a minor problem, changing network
addresses can be incredibly time- consuming and difficult to
debug.
• Because routing uses the network portion of the IP address,
the path taken by packets traveling to a host with multiple IP
addresses depends on the address used.
• Another surprising consequence of the internet addressing
scheme is that merely knowing one IP address for a
destination may not be sufficient; it may be impossible to
reach the destination using that address.

27
Dotted Decimal Notation
• When communicating with humans, either in
technical documents or through application
programs, IP addresses are written as four decimal
integers separated by decimal points, where each
integer gives the value of one octet of the IP
address.
• For example, the 32-bit internet address 10000000
00001010 00000010 00011110 is written
128.10.2.30

28
Dotted Decimal Notation (Cont.)
Class Lowest Address Highest Address
A 1.0.0.0 126.0.0.0
B 128.1.0.0 191.255.0.0
C 192.0.1.0 223.255.255.0
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.254
29
Loopback Address
• The previous table shows that not all possible address have
been assigned to classes. In particular, the network prefix
127.0.0.0, a value from class A range, is reserved for
loopback.
• It is intended for use in testing TCP/IP and for inter-
process communication on the local computer.
• When any program uses the loopback address as a
destination, the protocol software in the computer
processes the data without sending traffic across any
network.
• A packet sent to a network 127 address should never
appear on any network.

30
Special Address Conventions
This host

All 0s Allowed only at system startup and is


never a valid destination address.

Host on this net

All 0s Host Allowed only at system startup and is


never a valid destination address.

Limited broadcast (local net)


All 1s Never a valid source address.

Directed broadcast for net


Net All 1s Never a valid source address.

Loopback
127 Anything (often 1) Should never appear on a network.

31
Internet Addressing Authority
• Each network address prefix used within a given TCP/IP internet must
be unique.
• An organization that uses TCP/IP technology to build a completely
private internet can assign address prefixes without considering the
assignments made by other organizations.
• However, an organization that connects to the global Internet must not
use address prefixes assigned to another organization.
• To ensure that the network portion of an address is unique, all the IP
addresses are assigned by a central authority: the Internet Corporation
For Assigned Names and Number (ICANN).
• ICANN sets policy and assigns values for names and other constants
used in protocols as well as addresses.
• Most organizations never interact with the ICANN, they usually
contracts with ISP (Internet Service Provider).
• Only the largest ISPs need to contact ICANN.

32
Multi-homed hosts
When conventional computers have two or more physical
network connections they are called multi-homed hosts.
Multi-homed hosts and routers require multiple IP
addresses. Each address corresponds to one of the
machine’s network connections.

“A host using TCP/IP that has connections to two or more


physical networks.”

Glossary of Internetworking Terms and Abbreviations,


Internetworking with TCP/IP (Vol. I),
Douglas E. Comer,
Page 699

33
Router
A special purpose, dedicated computer that attaches to two
or more networks and forwards packets from one to
other. In particular, an IP router forwards IP datagram
among the networks to which it connects. A router uses the
destination address on a datagram to choose a next-hop to
which it forwards the datagram. Researches originally used
the term gateway.

Glossary of Internetworking Terms and Abbreviations,


Internetworking with TCP/IP (Vol. I),
Douglas E. Comer,
Page 699

34
Multi-homed host Vs. Router

Multi-homed host Router

Connection to two or more networks


√ √
Packet forwarding
X √

35
Hub

An inexpensive electronic device to which multiple


computers attach, usually using twisted pair wiring, to send
and receive packets. A hub operates at layer 2 by
replicating signals. Ethernet hubs are especially popular.

Glossary of Internetworking Terms and Abbreviations,


Internetworking with TCP/IP (Vol. I),
Douglas E. Comer,
Page 691

36
Hub (Cont.)

The device that acts as the center of a star topology. Usually


a multiport repeater, although sometimes the term is used
even if the hub does store-and-forward.

Glossary
Interconnections: Bridges, Routers, Switches,
and Internetworking Protocols (Second Edition)
Radia Perlman,
Addison-Wesley
Page 526

37
192.248.24.0
A Typical Network 192.248.25.0
192.248.24.253
Hosts
Router
Router

192.248.24.1
Internet

192.248.24.2
Router

192.248.24.3

192.248.263.80
Physical Networks
192.248.24.0
A Typical Network 192.248.25.0
192.248.25.253
Hosts

Router 192.248.25.254
192.248.24.253
Router
192.248.24.1
192.248.26.253

192.248.24.2

192.248.24.3
192.248.26.0
39
192.248.24.0
Physical networks 192.248.24.0
192.248.24.253
Hosts
Router
Router

192.248.24.1
Internet

192.248.24.2
Router

192.248.24.3

192.248.264.00
Physical Networks
Seismic Monitoring Network in Sri Lanka

41
System configuration (Star)
192.168.100.0
Central Station (PRD)
Peradeniya Univ.

Public Telephone Line

Local station(RJR) Local station(EST)


Rajarata Univ. South-East Univ.
192.168.101.0 192.168.103.0
Local station(RHN)
Ruhuna Univ.
192.168.102.0 42
Central Station (Peradeniya)
A Multi-Homed Host

TCP/IP 10.40.72.200
Protocol UNIV.
Converter LAN Personal
Multiple Network
Short period Computer
Data
Connections
seismometer Logger
(6ch) ? Hub
Router U P S
192.168.100.1
with GPS
Forcebaranse Modem
servo
accelerometer Printer

Concrete Base Inside


Outside Telephone Line

43
Local Stations
(Rajarata, Ruhuna, South-eastern)
Single Network
TCP/IP Personal
Connection
Protocol
Converter Computer

Short period
RJR: 192.168.101.1
Data
seismometer Logger Hub
(6ch) U P S
RHU: 192.168.102.1
Router
with GPS
Forcebalance Modem
EST: 192.168.103.1
servo
accelerometer Printer

Concrete Base Inside


Outside Multiport
Repeater
Telephone Line

44
Central Station
RS-232
Protocol Converter
Protocol
Converter

Ethernet

45
Modem/Hub/Router

MODEM

HUB

Router

PC

46
47

Das könnte Ihnen auch gefallen