Professional Documents
Culture Documents
Networking
M.Eng. Dang Ngoc Hanh
hanhdn@hcmut.edu.vn
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Content
Chapter 5: Telecom Networks
802.x standard
Ethernet, Token Pass, Token Ring
IP Addressing: Classless and VLSM
Network devices
Switching and Routing
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Physical Topology
Bus
Ring
Star
Telecomm. Dept.
Faculty of EEE
Extended Star
Hierarchical
Mesh
DCN-2013
HCMUT
Project 802
IEEE 802 refers to a family of IEEE standards dealing with local
area networks and metropolitan area networks
The services and protocols specified in IEEE 802 map to the
lower two layers (Data Link and Physical) of the seven-layer
OSI networking reference model. In fact, IEEE 802 splits the
OSI Data Link Layer into two sub-layers named Logical Link
Control (LLC) and Media Access Control (MAC), so that the
layers can be listed like this:
Physical layer
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Project 802
Modules in Project 802
LLC: based on HDLC protocol
Multiplexing protocols
transmitted over the MAC
layer (when transmitting) and
decoding them (when
receiving).
Providing node-to-node flow
and error control
MAC: provides addressing and
channel access control
mechanisms that make it possible
for several terminals or network
nodes to communicate within a
multiple access network that
incorporates a shared medium
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Control field:
HDLC format
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
Ethernet
Topology: bus, star, ring
Media Access Control: Deterministic, Non-deterministic
Addressing:
Every computer has a unique way of identifying itself :
MAC address or physical address.
The physical address is located on the Network Interface
Card (NIC).
MAC addresses have no structure, and are considered flat
address spaces. MAC addresses are sometimes referred to
as burned-in addresses (BIAs) because they are burned
into read-only memory (ROM) and are copied into
random-access memory (RAM) when the NIC initializes.
0000.0c12.3456 or 00-00-0c-12-34-56
If MAC is all bits 1: broadcast address
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
The Data field is the actual information being sent by the upper layer
protocols. Therefore, it will be all upper layer data.
CRC: 4 bytes, error checking
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
10
Ethernet: 802.3
10Base-2:
10Base-5:
10Base-T:
10Base-F:
100Base-TX:
100Base-T4:
100Base-FX:
1000Base-T:
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
11
Ethernet: 10BASE-5
NIC: Network Interface Card
MAU: Medium Attachment Unit
Thick Ethernet (thicknet)
50 Thick cable, 500m
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
12
Ethernet: 10BASE-2
Thin Ethernet
50 Thin cable, 185m.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
13
Ethernet: 10BASE-T
Twisted-pair cable
100 UTP cable, 100m.
Data rate: 10 Mbps
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
14
Ethernet Operation
Specified by the technology
being used.
Determine who can transmit
and when.
Two types:
Deterministic: Lets take
turns.
Token-Ring, FDDI.
DCN-2013
HCMUT
15
DCN-2013
HCMUT
16
Ethernet MAC
Ethernet is a shared-media broadcast
technology. The access method CSMA/CD
used in Ethernet performs three functions:
Transmitting and receiving data packets
Decoding data packets and checking them for
valid addresses before passing them to the upper
layers of the OSI model
Detecting errors within data packets or on the
network
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
17
CSMA/CD Process
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
18
Fast Ethernet
Speed: 100 Mbps
Distance: <250m
Backward compatible with Ethernet
10 Mbps
Uses Twisted-pair or Fiber
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
19
Gigabit Ethernet
>1 Gbps
Using Fiber optic
Deployed as backbone
network, connecting Fast
Ethernet networks
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
20
Token Ring
Token ring LAN technology was a
protocol which resided at the data link
layer (DLL) of the OSI model. It used a
special three-byte frame called a token
that travels around the ring. Tokenpossession grants the possessor
permission to transmit on the medium.
Token ring frames travel completely
around the loop.
Initially used only in IBM computers, it
was eventually standardized with
protocol IEEE 802.5.
Physical ring topology
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
21
Token Ring
The data transmission process goes as follows:
Empty information frames are continuously circulated
on the ring.
When a computer has a message to send, it seizes the
token. The computer will then be able to send the
frame.
The frame is then examined by each successive
workstation. The workstation that identifies itself to
be the destination for the message copies it from the
frame and changes the token back to 0.
When the frame gets back to the originator, it sees
that the token has been changed to 0 and that the
message has been copied and received. It removes
the message from the frame.
The frame continues to circulate as an "empty"
frame, ready to be taken by a workstation when it has
a message to send.
Issues:
Who generates token?
If the node keeping token is dead, what happens?
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
22
Token Bus
Also use token as Token Ring
Physical Bus topology
Token bus was standardized by IEEE standard 802.4. It is
mainly used for industrial applications
Due to difficulties handling device failures and adding new
stations to a network, token bus gained a reputation for being
unreliable and difficult to upgrade
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
23
IP Addressing: IPv4
An IPv4 address is 32 bits
long.
The IPv4 addresses are
unique and universal.
Network address + Host
address: Hierarchical
Addressing Schemes.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
24
Classful IP addressing
In classful addressing, the address space is divided into five
classes: A, B, C, D, and E.
In classful addressing, a large part of the available addresses
were wasted.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
25
Classful IP addressing
Network Bits:
Provided by Internet
Network Information
Center
Define the network
the remote device
wants to connect to
All bits are 0: no use
Defined by subnetmask
Host Bits:
Managed by Network
Administrator
Define the device
address in the
network that the
remote device wants
to connect to
All bits are 1:
broadcast address
Telecomm. Dept.
Faculty of EEE
11000000.
N
101010000.
N
00001010.
N
01100100
H
AND operation
Default
subnet
Mask
Network
addr
11111111.
11000000.
11111111.
11111111.
00000000
101010000.
00001010.
00000000
DCN-2013
HCMUT
26
Classful IP addressing
In classful addressing, a large part of the available addresses
were wasted.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
27
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
28
Subnetting
Network administrators sometimes need to divide
networks, especially large ones, into smaller
networks:
Reduce the size of a broadcast domain.
Improve network security.
Implement the hierarchical managements.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
29
Subnetting
Non-subnetted
network
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
30
Subnetting
To create a subnet address, a network administrator borrows bits from
the original host portion and designates them as the subnet field.
Borrows bits is always the leftmost host bit, the one closest to the last
network octet.
Subnet addresses include the Class A, Class B, or Class C network portion,
plus a subnet field and a host field.
Subnet addresses are assigned locally, usually by a network administrator.
How many bits can we borrow?
All of subnet bits are:
0 : reserved for network address.
1 : reserved for broadcast address.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
31
Subnetting Example
Given network 172.16.0.0: We need 6 usable subnets and up
to 8100 hosts on each subnet.
Define class: class B, 255.255.0.0
6 usable subnets: borrow 3 bits
Determine the subnets from 3 borrowed bits from the host
portion (last 2 bytes):
0 subnet:
1st subnet:
2nd subnet:
3rd subnet:
4th subnet:
5th subnet:
6th subnet:
subnet:
Telecomm. Dept.
Faculty of EEE
.00000000.00000000
.00100000.00000000(32=25)
.01000000.00000000
.0110000.00000000
.10000000.00000000
.10100000.00000000
.11000000.00000000(6x25)
.11100000.00000000
DCN-2013
HCMUT
32
Subnetting Example
No
Sub-network
address
Broadcast
address
Use
?
172.16.0.0
.0.1 .31.254
.31.255
172.16.32.0
.32.1 .63.254
.63.255
172.16.64.0
.64.1 .95.254
.95.255
172.16.96.0
.96.1 .127.254
.127.255
172.16.128.0
.128.1 .159.254
.159.255
172.16.160.0
.160.1 .191.254
.191.255
172.16.192.0
.192.1 .223.254
.223.255
172.16.224.0
.224.1 .255.254
.255.255
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
33
Subnetting
Addresses are loose by subnetting.
Network administrator must strike a balance
between the number of subnets required, the hosts
per subnet that is acceptable, and the resulting
waste of addresses.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
34
IP Address Problems
In the 1990, two problems became apparent
IP addresses were being exhausted
IP routing tables were growing very large
IP Address Exhaustion
Short-term solution:
Classless Interdomain Routing (CIDR), RFC 1518
New allocation policy (RFC 2050)
Private IP Addresses set aside for intranets
DCN-2013
HCMUT
35
Supernetting
Summarize a contiguous group of class C addresses
using variable-length mask
Example: 150.158.16.0/20
IP Address (150.158.16.0) & mask length (20)
IP add = 10010110 10011110 00010000 00000000
Mask = 11111111 11111111 11110000 00000000
Contains 16 Class C blocks:
From 10010110 10011110 00010000 00000000
i.e. 150.158.16.0
Up to 10010110 10011110 00011111 00000000
i.e. 150.158.31.0
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
36
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
37
Subnetting Example 1
For example, consider a relatively small company with a Class C
network, 201.45.222.0/24. They have six subnetworks in their
network. The first four subnets (S1, S2, S3 and S4) are relatively
small, containing only 10 hosts each. However, one of them (S5) is
for their production floor and has 50 hosts, and the last (S6) is their
development and engineering group, which has 100 hosts.
The total number of hosts needed is thus 196. Without subnetting,
we have enough hosts in our Class C network to handle them all.
However, when we try to subnet, we have a big problem. In order
to have six subnets we need to use 3 bits for the subnet ID. This
leaves only 5 bits for the host ID, which means every subnet has the
identical capacity of 30 hosts. This is enough for the smaller subnets
but not enough for the larger ones. The only solution with
conventional subnetting, other than shuffling the physical subnets,
is to get another Class C block for the two big subnets and use the
original for the four small ones. But this is expensive, and means
wasting hundreds of IP addresses!
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
38
Subnetting Example 2
For example, consider the subnet address
172.16.32.0/20 and a network needing ten host
addresses.
With this subnet address, there are over 4000 (212
2 = 4094) host addresses, most of which will be
wasted.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
39
VLSM Example
Given the Class C network of 204.15.5.0/24,
subnet the network in order to create the
network in the figure below, with the host
requirements shown:
NetA: 14 hosts
NetB: 28 hosts
NetC: 2 hosts
NetD: 7 hosts
NetE: 28 hosts
Solution?
Classfull subneting?
VLSM?
What do we benefit when using VLSM?
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
40
VLSM Example
Solution: Classful subnetting
netA: 204.15.5.32/27
netB: 204.15.5.64/27
netC: 204.15.5.96/27
netD: 204.15.5.128/27
netE: 204.15.5.160/27
Solution: VSLM
netA: requires a /28 (255.255.255.240) mask to support 14 hosts
netB: requires a /27 (255.255.255.224) mask to support 28 hosts
netC: requires a /30 (255.255.255.252) mask to support 2 hosts
netD*: requires a /28 (255.255.255.240) mask to support 7 hosts
netE: requires a /27 (255.255.255.224) mask to support 28 hosts
* a /29 (255.255.255.248) would only allow 6 usable host addresses
therefore netD requires a /28 mask
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
41
VLSM Example
Solution: VSLM assign the largest first
netB: 204.15.5.0/27 host address range 1 to 30
netE: 204.15.5.32/27 host address range 33 to 62
netA: 204.15.5.64/28 host address range 65 to 78
netD: 204.15.5.80/28 host address range 81 to 94
netC: 204.15.5.96/30 host address range 97 to 98
DCN-2013
HCMUT
42
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
43
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
44
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
45
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
46
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
47
Network Devices
Hub/Repeater
Switch/Bridge
Router/3-layer switch
Gateway
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
48
Network Devices
Hub/Repeater
Propagate signals from
one port to others
Layer 1 devices: connects
segments of a LAN.
Extending a network with
a repeater or a hub,
results in a larger
collision domain.
Collision Domains are the
area where collisions occur.
All of layer 1
interconnections are part of
the collision domain.
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
49
Network Devices
Switch
A multi port bridge
Support full duplex
Hardware switching
Dynamically builds and
maintains a ContentAddressable Memory
(CAM) table
Segmenting Collision
Domain
Can not prevent layer 2
broadcast domain
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
50
Network Devices
Router:
Layer 3 device
Routing packets to
destination based on
destination IP address
Running routing
protocol
Split layer 2 broadcast
domain
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
51
Network Devices
Gateway:
Operate at Application layer in OSI model
Convert data between networks with different protocols
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
52
Switching
link-layer device: smarter
than hubs, take active role
transparent
plug-and-play, selflearning
DCN-2013
HCMUT
53
Switching
allows multiple simultaneous
transmissions
hosts have dedicated, direct
connection to switch
switches buffer packets
Ethernet protocol used on each
incoming link, but no collisions;
full duplex
each link is its own collision
domain
A
C
1
5
C
B
DCN-2013
HCMUT
54
Switching
Q: how does switch know that
A reachable via interface 4, B
reachable via interface 5?
A: each switch has a switch
table, each entry:
A
C
Telecomm. Dept.
Faculty of EEE
1
5
C
B
DCN-2013
HCMUT
55
Switch: self-learning
switch learns which hosts
can be reached through
which interfaces
A A A
C
Telecomm. Dept.
Faculty of EEE
1
5
B
MAC addr interface TTL
Source: A
Dest: A
60
Switch table
(initially empty)
DCN-2013
HCMUT
56
A A A
B
A6A
A A
MAC addr interface TTL
A
A
Telecomm. Dept.
Faculty of EEE
1
4
60
60
Source: A
Dest: A
Switch table
(initially empty)
DCN-2013
HCMUT
57
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
58
Routing
Router receives packets and
forwards them to the
destination (based on
destination IP)
How does router work?
Check the header of IP
packet
Look up the routing table
Determine the output port
Forward the packet to the
output port
Control Plane
Forwarding
Table
Routing
Packets
Output
Packets
Packet
Classification
Queuing and
Schedule rules
Output
Queue
Input
Packets
Header
payload
User Plane
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
59
Routing
Each router needs running a routing protocol to
update the its routing table
Delay of packets
Queuing delay
Processing delay
Propagation delay
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
60
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
61
Notation:
c(x,y): link cost from node x
to y; = if not direct
neighbors
DCN-2013
HCMUT
62
N'
u
u,x
u,x,y
u,x,y,v
u,x,y,v,w
u,x,y,v,w,z
D(v),p(v) D(w),p(w)
2,u
5,u
2,u
4,x
2,u
3,y
3,y
D(x),p(x)
1,u
D(y),p(y)
2,x
D(z),p(z)
4,y
4,y
4,y
5
2
1
Telecomm. Dept.
Faculty of EEE
w
3
DCN-2013
HCMUT
63
z
x
link
v
x
(u,v)
(u,x)
(u,x)
(u,x)
(u,x)
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
64
Oscillations possible:
e.g., link cost = amount of carried traffic
1
D
0
1
A
0 0
1+e
B
e
2+e
D
0
initially
Telecomm. Dept.
Faculty of EEE
A
1+e 1
B
0
recompute
routing
D
1
A
0 0
2+e
B
1+e
recompute
2+e
D
0
A
1+e 1
B
e
recompute
DCN-2013
HCMUT
65
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
66
Bellman-Ford example
Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
5
2
v
2
w
3
DCN-2013
HCMUT
67
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
68
Telecomm. Dept.
Faculty of EEE
DCN-2013
HCMUT
69
Each node:
wait for (change in local link
cost or msg from neighbor)
Distributed:
each node notifies neighbors
Telecomm. Dept.
Faculty of EEE
recompute estimates
if DV to any dest has changed,
notify neighbors
DCN-2013
HCMUT
70
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
node x table
from
x 0 2 7
y
z
node y table
cost to
x y z
cost to
x y z
from
cost to
x y z
x 0 2 3
y 2 0 1
z 7 1 0
x
y 2 0 1
z
node z table
cost to
x y z
from
from
x
y
z 7 1 0
Telecomm. Dept.
Faculty of EEE
Network Layer
time
DCN-2013
HCMUT
71
x
y
z 7 1 0
Telecomm. Dept.
Faculty of EEE
cost to
x y z
x 0 2 3
y 2 0 1
z 7 1 0
x 0 2 3
y 2 0 1
z 3 1 0
from
cost to
x y z
cost to
x y z
cost to
x y z
x 0 2 7
y 2 0 1
z 7 1 0
x 0 2 3
y 2 0 1
z 3 1 0
from
from
from
x
y 2 0 1
z
node z table
cost to
x y z
cost to
x y z
from
from
x 0 2 7
y
z
node y table
cost to
x y z
from
cost to
x y z
x 0 2 7
y 2 0 1
z 3 1 0
cost to
x y z
from
node x table
from
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
x 0 2 3
y 2 0 1
z 3 1 0
time
DCN-2013
HCMUT
72
distance vector
if DV changes, notify neighbors
good
news
travels
fast
Telecomm. Dept.
Faculty of EEE
1
4
50
73