DrShahedurRahman - · PDF fileaddressing information for user traffic to ... manually...
Transcript of DrShahedurRahman - · PDF fileaddressing information for user traffic to ... manually...
CCM 4300 Lecture 6Computer Networks, Wireless and Mobile Communications
Dr Shahedur [email protected]
Room: T115
1
Recap of Last Session
�Access Control
�ALOHA
�FDMA, TDMA, CDMA
�OSI Model
2
�OSI Model
�Internetworking
�Interconnecting Devices
�Repeater, Hub
�Switches, Bridges
�Router
Session Content� Introduction to Protocols
� TCP/IP, IPX/SPX, NetBeui, AppleTalk� Routing Protocols
� IGP/EGP, Static, Dynamic, RIP, OSPFDistance Vector and Link State protocols
3
� Distance Vector and Link State protocols� Dijkstra’s algorithm� Ethernet and the frame structure� CSMA/CD� Token Ring
Lesson objectives
� At the completion of this lesson you should be able
to :
- describe different types of routing protocols
- describe the operation of Distance Vector and Link
4
- describe the operation of Distance Vector and Link
State routing protocols
- describe the operation of Dijkstra’s algorithm- understand the concept of Hierarchical routing- understand the Ethernet and its frame structure- describe operation of CSMA/CD and Token Ring in
details
Routable and routing protocols
� A routable (routed) protocol is a protocol that contains enough network layer addressing information for user traffic to be directed from one network to another one.
5
one.
� Routable protocols define the format and use of fields within a packet. Packets are delivered between networks.
Transmission Control Protocol/Internet Protocol (TCP/IP)
Routed Network Environment
Segment 1 Segment 2
TCP/IP TCP/IP
Windows Client Windows Client
6
RouterRouter
Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX)
Routed Network EnvironmentSegment 1 Segment 2
IPX/SPX IPX/SPX
NetWare ClientWindows 2000
Server
7
RouterRouter
NetBIOS Enhanced User Interface (NetBEUI)
Routed Network Environment
Segment 1 Segment 2
NetBEUI
Windows Client Windows Client
NetBEUI is a small, fast, and
8
NetBEUI
RouterRouter
NetBEUI
NetBEUI is a small, fast, and
efficient protocol that is limited to
running on one segment.
AppleTalk
Routed Network Environment
Segment 1 Segment 2
AppleTalk AppleTalk
Macintosh ClientWindows 2000
Server
9
RouterRouter
Routing protocols
� A routing protocol supports routed protocols to carry
messages between networks.
� Routing protocols are used exchange information
between routers, but they do not carry any user traffic.
� The exchange of information between routers is used to
update routing tables maintained by routers and
10
update routing tables maintained by routers and
calculate the best path for packet transmission.
� Interior gateway protocols (IGPs): Routing protocols that run inside an enterprise.
� Examples: RIP, IGRP, EIGRP, and OSPF.
� Exterior gateway protocols (EGPs): Protocols that run outside an enterprise, or between autonomous systems (AS). (BGP4)
Routing
� Static Routes � manually defined by the system administrator as the next hop to a destination.
� useful for security and traffic reduction. � May contain alternative routes.
11
� May contain alternative routes.
� Default Routes� Manually defined by the system administrator as the path to take when no route to the destination is known.
� Dynamic Routing
Interior routing protocols
Distance-vector routing protocol
� Requires that a router informs its neighbours of topology changes periodically.
� The routing table is passed to neighbour nodes
� Calculates the direction and distance to any link in a network.
The cost of reaching a destination is calculated using various route metrics.
12
metrics. Link-state routing protocol
� Performed by every switching node in the network
� Every node constructs a map of the connectivity of the network, in the form of a graph.
� The graph shows which nodes are connected to which other nodes
� The cost of reaching a destination is calculated using various route metrics.
� The collection of best next hops forms the node's routing table .
� Only connectivity related information is passed. (not the whole routing table)
Interior routing protocols� RIP (Classful, V2 Classless):
� A distance-vector routing protocol (also known as Bellman-Ford algorithms). originally specified in RFC 1058.
� Key characteristics:
� Hop count is used as the metric for path selection. The maximum allowable hop count is 15. Routing updates are broadcast every 30 seconds by default.
13
seconds by default.
� Most widely used protocol on the Internet. Classful, v2 Classless� OSPF:
� A link-state routing protocol. � Support variable-length subnet masking (VLSM) and Classless Inter-
Domain Routing (CIDR) addressing models � The link-state (also called shortest path first) approach recreates the
exact topology of the entire internetwork (or at least of the partition in which the router is situated).
� Changes in the topology are detected very quickly.� It computes the shortest path tree for each route using a method based
on Dijkstra's algorithm, a shortest path first algorithm.
Dijkstra’s Algorithm1. Assign to every node a distance value. Set it to
zero for our initial node and to infinity for all other nodes.
2. Mark all nodes as unvisited. Set initial node as current.
3. For current node, consider all its unvisited neighbours and calculate their distance (from the initial node). For example, if current node
14
the initial node). For example, if current node (A) has distance of 6, and an edge connecting it with another node (B) is 2, the distance to B through A will be 6+2=8. If this distance is less than the previously recorded distance (infinity in the beginning, zero for the initial node), overwrite the distance.
4. When we are done considering all neighbours of the current node, mark it as visited. A visited node will not be checked ever again; its distance recorded now is final and minimal.
5. Set the unvisited node with the smallest distance (from the initial node) as the next "current node" and continue from step 3
Ethernet
||| Developed jointly – Digital Equipment Corp., Intel & Xerox
||| Ethernet was a standard 1980s Ethernet Blue Book and 1982
Ethernet Version 2.0
||| IEEE formed subcommittee 802.3 – very similar to Ethernet (V2.0)
||| Due to IEEE influences with U.S. and international standardisation
authorities, IEEE 802.3 eventually became ISO standard IS88023
15
authorities, IEEE 802.3 eventually became ISO standard IS88023
||| The two Ethernet specification are similar – technical difference are
related to differences in cable size, transceiver function, frame format
& topology.
So what is the bottom line!
||| In casual usage, IEEE 802.3 is commonly referred to as
Ethernet. What you should realise, though is that technically it is
not Ethernet – only V2.0 is considered Ethernet
CSMA: Carrier Sense Multiple Access
CSMA: listen before transmit: Recap…
||| If channel sensed idle: transmit entire pkt
||| If channel sensed busy, defer transmission
- Persistent CSMA: retry immediately with
probability p when channel becomes idle –
16
probability p when channel becomes idle –
continuously monitors the channel (may cause
instability)
- Non-persistent CSMA: retry after random interval
– does not continuously monitor the channel
||| human analogy: don’t interrupt others!
CSMA/CD (Collision Detection)
CSMA/CD: carrier sensing, deferral as in CSMA- collisions detected within short time- colliding transmissions aborted, reducing channel wastage - persistent or non-persistent retransmission
||| collision detection:
17
||| collision detection:- easy in wired LANs: measure signal strengths, compare transmitted, received signals-difficult in wireless LANs: WHY?
-receiver shut off while transmitting (more details later)
||| human analogy: the polite conversationalist
CSMA/CD
CarrierSense
MultipleAccess
MultipleAccess
S 1 S 2 S 3 S 1 S 2 S 3
1. 3.
(Carrier Sense Multiple Access with Collision Detection)
18
Access CarrierSense
Collision DetectionRandom Access method, where every workstation on the Ethernet, can send messages (anytime!).
This has been standardised in IEEE 802.3.
S 1 S 2 S 3S 1 S 2 S 3
2. 4.
CSMA/CD: Collisions
Station A
Station B
19
Frame from A
Framefrom B
Station A
||| Jam Signal: make sure all other transmitters are
aware of collision; 48 bits;
||| Exponential Back-off:
Goal: adapt retransmission attempts to estimated
current load
CSMA/CD collision detection
20
current load
- heavy load: random wait will be longer
||| first collision: choose K from {0,1}; delay is K x
512 bit transmission times
||| after second collision: choose K from {0,1,2,3}…
||| after ten or more collisions, choose K from
{0,1,2,3,4,…,1023}
CSMA/CD : Random-Access-Algorithm
listen to
channel
Channel busy
new attempt
Station is
ready to send
wait according to
Backoff-Strategy
21
channel
channel free
collission
detected
ready
send
Jam-Signal
Send data
and monitor
channel
Ethernet Frame StructureExample: Sending IP datagram on Ethernet LAN
- Sending adapter encapsulates IP datagram (or other network layer protocol packet) in
Ethernet frame
22
Preamble:
||| 7 bytes (“wake up”) with pattern 10101010 followed
by one byte (“important stuff”) with pattern 10101011
||| used to synchronise receiver, sender clock rates
This consists of 62 alternating 1's and 0's followed by the pattern 11.
Strictly speaking the last byte which finished with the '11' is known as
the "Start of Frame Delimiter".
Ethernet Frame Structure - cont||| Addresses: 6 bytes, frame is received by all
adapters on a LAN and dropped if address does not match
||| Length / Type: 2 bytes, indicates length (value
<=1500) or the higher layer protocol (mostly
IP but others such as Novell IPX and
23
IP but others such as Novell IPX and
AppleTalk may be supported)
||| CRC: 4 bytes, checked at receiver, if error is
detected, the frame is simply dropped
Advantages / Disadvantages
||| Advantages:
- Fast Channel Access (for low utilisation)
- Stable, high redundancy (no need for Segment Server or Monitor)
||| Disadvantages:
24
||| Disadvantages:
- No fixed runtimes, no guaranteed service classes/capacity availabe
- Higher utilisation -> more collisions
- "Unfair", stations can be blocked from sending
Taking-turns MAC: Token Ring
||| Initially, chosen LAN architecture from IBM
||| IEEE 802.5 Token Ring LANs operate at 4 Mbit/s
and 16Mbit/s
||| Attached resources vary from PCs to large
computers
25
computers
||| Flow is unidirectional
||| Physical topology is usually a star network,
connecting each node back to a hub (‘wire closet’)
Token Passing
||| control token passed
from one node to next
sequentially
||| token message – 3 octet
This technology is nearly extinct!
26
||| token message – 3 octet
||| concerns:- token overhead
- single point of failure (token)
- a node might accidentally
neglects to release token
Advantages / Disadvantages
||| Advantages: - No Collisions- Every station can send data within a fixed
timeframe- Flexible topology
27
- Flexible topology- Effective / performant for large segments
||| Disadvantages:
- Complicated protocol / difficult error detection- Market acceptance
Summary� Internetworking – repeater, hub, switches,
bridges, router� Routing protocols� Routing algorithms� Medium Access Control
28
� Medium Access Control � CSMA� CSMA/CD � Token ring
� Ethernet, Ethernet Frame