Download - Lecture3.ppt
1
Lecture 3: Networking and Internetworking
Haibin Zhu, PhD.
Assistant Professor
Department of Computer Science
Nipissing University
© 2002
2
Contents
3.1 Introduction3.2 Types of network3.3 Network principle
IP routing
3.4 Internet protocols TCP IP
3.5 Case study: Ether Net ATM
3
Basic terminology:
Communication subsystem A collection of hardware and software components that provide
the communication facilities for a distributed system.
Host - devices that use a network for communication Node - any computer or switching device on a network Subnet - (CDK’s definition) set of interconnected nodes
that employ same technology to communicate among themselves. (Not a standard definition of subnet - which usually denotes an
organization of IP addresses and a physical location for routing.)
4
What are the network issues?
PerformanceScalabilityReliabilitySecurityMobilityQuality of serviceMulticasting
5
Performance:
Message transmission time: =latency (the delay that occurs after a send op is
executed before data starts to arrive at the dest) + length/data transfer rate (the speed data can be
transfered) (assuming no message fragmentation)
Total system bandwidth: Total volume of traffic that can be transferred across
the network in a given time
6
Figure 3.1 Network types and comparison
Range Bandwidth (Mbps) Latency (ms)
LAN 1-2 kms 10-1000 1-10WAN worldwide 0.010-600 100-500MAN 2-50 kms 1-150 10Wireless LAN 0.15-1.5 km 2-11 5-20Wireless WAN worldwide 0.010-2 100-500Internet worldwide 0.010-2 100-500
7
3.3 Network Principles
Packet transmission Let a computer have an enough buffer Avoid undue delay
Switching schemesProtocolsRouting
8
Switching schemes:
Broadcast Direct addressing
Circuit switching Dialing 705-495-1431
Packet switching Store-and-forward
Frame relay Fast packet switching based on a method of
routing.
9
Protocols:
CDK: … a well-known set of rules and formats to be used
for communication between processes including two parts of specification:The sequence of messages that must be exchangedThe format of the data in the messages
What is the difference between a protocol layer and a protocol suite? Each layer presents an interface to the layers above
it that extends the properties of the underlying communication system.
A suit is a complete set of protocol layers.
10
Figure 3.2Conceptual layering of protocol software
Layer n
Layer 2
Layer 1
Message sent Message received
Communicationmedium
Sender Recipient
11
Figure 3.3 Encapsulation as it is applied in layered protocols
Presentation header
Application-layer message
Session header
Transport header
Network header
12
Figure 3.4 Protocol layers in the ISO Open Systems Interconnection (OSI) model
Application
Presentation
Session
Transport
Network
Data link
Physical
Message sent Message received
Sender Recipient
Layers
Communicationmedium
13
Figure 3.5OSI protocol summary
Layer Description ExamplesApplication Protocols that are designed to meet the communication requirements of
specific applications, often defining the interface to a service. HTTP, FTP, SMTP,CORBA IIOP
Presentation Protocols at this level transmit data in a network representation that isindependent of the representations used in individual computers, which mayDiffer. Encryption is also performed in this layer, if required.
Secure Sockets(SSL),CORBA DataRep.
Session At this level reliability and adaptation are performed, such as detection offailures and automatic recovery.
Transport This is the lowest level at which messages (rather than packets) are handled.Messages are addressed to communication ports attached to processes,Protocols in this layer may be connection-oriented or connectionless.
TCP, UDP
Network Transfers data packets between computers in a specific network. In a WANor an internetwork this involves the generation of a route passing throughrouters. In a single LAN no routing is required.
IP, ATM virtualcircuits
Data link Responsible for transmission of packets between nodes that are directlyconnected by a physical link In a WAN transmission is between pairs ofrouters or between routers and hosts. In a LAN it is between any pair of hosts.
Ethernet MAC,ATM cell transfer,PPP
Physical The circuits and hardware that drive the network. It transmits sequences ofbinary data by analogue signalling, using amplitude or frequency modulationof electrical signals (on cable circuits), light signals (on fibre optic circuits)or other electromagnetic signals (on radio and microwave circuits).
Ethernet base- bandsignalling, ISDN
14
Figure 3.6Internetwork layers
Underlying network
Application
Network interface
Transport
Internetwork
Internetwork packets
Network-specific packets
MessageLayers
Internetworkprotocols
Underlyingnetworkprotocols
15
Packet assembly and delivery:
assembly Transport layer usually handles assembly and
reassembly Packets consist of a header and a data. If the data > MTU (maximum transfer unit), it must be
divided into multiple packets. A transport address is the network address of host +
port number.Delivery
Two approaches to delivery in the network layerDatagram deliveryVirtual circuit packet delivery
16
Routing
Hosts Linksor local networks
A
D E
B
C
1
2
5
43
6
Routers
decide the route for each packet
update knowledge of the network
Routing in a wide area network
17
Figure 3.8Routing tables for the network in Figure 3.7
Routings from D Routings from E
To Link Cost To Link CostABCDE
336
local6
12201
ABCDE
4456
local
21110
Routings from A Routings from B Routings from C
To Link Cost To Link Cost To Link CostABCDE
local1131
01212
ABCDE
1local
214
10121
ABCDE
22
local55
21021
Hosts Linksor local networks
A
D E
B
C
12
5
43
6Routers
18
Link-state algorithm:
keep a distance vector for destinations in routing table
send a summary of routing table to neighbors using RIP (router information protocol)
read tables from neighbors and update as needed
19
Figure 3.9 Pseudo-code for RIP routing algorithm
Send: Each t seconds or when Tl changes, send Tl on each non-faulty outgoing link.Receive: Whenever a routing table Tr is received on link n:
for all rows Rr in Tr {if (Rr.link <> n) {//Rr.link ==n means that the local will not use it a route(it is a go and return route)//the neighbour’s link might be used as a possible route for the local
Rr.cost = Rr.cost + 1; //if the local use this linkRr.link = n; //if the local use this linkif (Rr.destination is not in Tl) add Rr to Tl; // add new destination to Tlelse for all rows Rl in Tl {
if (Rr.destination = Rl.destination and (Rr.cost < Rl.cost or Rl.link = n)) Rl
= Rr;// Rr.cost < Rl.cost : remote node has better route// Rl.link = n : remote node is more authoritative
}}
}
20
Details:
t is typically 30 secondswhen a faulty link is detected, cost is set tocosts can be based on bandwidth rather than
hopsslow convergence and loops are a problem
21
3.4 Internet Protocols
TCP(Transport Control Protocol) abstractionTCP
Ports and sockets TCP protocol
IP Addressing IP protocol IP routing IPv6Firewall
22
Figure 3.12TCP/IP layers
Messages (UDP) or Streams (TCP)
Application
Transport
Internet
UDP(User Datagram Protocol) or TCP packets
IP datagrams
Network-specific frames
MessageLayers
Underlying network
Network interface
23
Figure 3.13 Encapsulation in a message transmitted via TCP over an Ethernet
Application message
TCP header
IP header
Ethernet header
Ethernet frame
port
TCP
IP
24
TCP abstractions:
abstraction of a stream of bytes a connection is established before messages
are sentassumes one process is the client and one is
the server in establishing a connectionmessages are sent using handles rather than
source-destination addresses
25
TCP
Transport services Use ports
Additional mechanisms Sequencing (segment number) Flow control (segment number + ack + win-size) Retransmission (no ack, retransmit) Buffering (discard + retransmit ) Checksum (if checksum not the same, drop)
26
Ports:
A message destination specified by a small integer (16 bits) any process can send a message to it
Internet protocols use the combination (IP address, local port)
IANA (Internet Assigned Numbers Authority) ports: well-known ports: 1 - 1023 registered ports: 1024 - 49151 dynamic or private ports: 49152 - 65535
27
UDP
A transport-level replica of IPEncapsulated with an IP packetSource + dest. port numbersNo guarantee of deliveryOnly checksum added as optionalUp to 64KB packetFast
28
Figure 3.14 The programmer's conceptual view of a TCP/IP Internet
IP
Application Application
TCP UDP
IP-Internet Protocol
29
IP Addressing:
UniversalEfficient
Rate of growth Address space allocation
Lend itself to the development of a flexible and efficient routing scheme
30
Internet address structure, showing field sizes in bits
7 24
Class A: 0 Network ID Host ID
14 16
Class B: 1 0 Network ID Host ID
21 8
Class C: 1 1 0 Network ID Host ID
28
Class D (multicast): 1 1 1 0 Multicast address
27
Class E (reserved): 1 1 1 1 unused0
Reserved
>255
All others
31
Figure 3.16 Decimal representation of Internet addresses
octet 1 octet 2 octet 3
Class A: 1 to 127
0 to 255 0 to 255 1 to 254
Class B: 128 to 191
Class C: 192 to 223
224 to 239 Class D (multicast):
Network ID
Network ID
Network ID
Host ID
Host ID
Host ID
Multicast address
0 to 255 0 to 255 1 to 254
0 to 255 0 to 255 0 to 255
0 to 255 0 to 255 0 to 255
Multicast address
0 to 255 0 to 255 1 to 254240 to 255 Class E (reserved):
1.0.0.0 to 127.255.255.255
128.0.0.0 to 191.255.255.255
192.0.0.0 to 223.255.255.255
224.0.0.0 to 239.255.255.255
240.0.0.0 to 255.255.255.255
Range of addresses
32
Figure 3.17 IP packet layout
dataIP address of destinationIP address of source
header
up to 64 kilobytes
33
Figure 3.18 IPv6 header layout
Source address(128 bits)
Destination address(128 bits)
Version (4 bits) Priority (4 bits) Flow label (24 bits)
Payload length (16 bits) Hop limit (8 bits)Next header (8 bits)
34
Firewalls
A system designed to prevent unauthorized access to or from a private network. Service control Behavior control User control IP address filtering TCP gateway Application-level gateway
35
Figure 3.20 Firewall configurations
Internet
Router/Protected intraneta) Filtering router
Internet
b) Filtering router and bastion
filter
Internet
R/filterc) Screened subnet for bastion R/filter Bastion
R/filter Bastion
web/ftpserver
web/ftpserver
web/ftpserver
36
Figure 3.21 IEEE 802 network standards
IEEE No. Title Reference
802.3 CSMA/CD Networks (Ethernet) [IEEE 1985a]
802.4 Token Bus Networks [IEEE 1985b]
802.5 Token Ring Networks [IEEE 1985c]
802.6 Metropolitan Area Networks [IEEE 1994]
802.11 Wireless Local Area Networks [IEEE 1999]
37
3.5 Network Case study
Ethernet CSMA/CD (Carrier Sensing Multiple Access/ Collision Detection
) http://www.erg.abdn.ac.uk/users/gorry/course/lan-pages/csma-cd.html
Package broadcasting Package layout
Preamble(7)+S(1)+Dest. Addr(6) + Source Addr.(6) + Length(2)+ data(46-1500)+checksum(4)
http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/csmacd/csmacd.html
http://www2.rad.com/networks/2001/ethernet/csma.htm
38
Figure 3.22 Wireless LAN configuration
LAN
Server
WirelessLAN
Laptops
Base station/access point
Palmtop
radio obstruction
A B C
DE
Hidden stations, Fading, Collision maskingCSMA/CA (Collision Avoidance)http://www.pcworld.com/howto/article/0,aid,15531,00.asp
39
ATM (Asynchronous Transfer Mode)
Cell relay: http://www.webopedia.com/TERM/c/cell_relay.html http://www.kevinboone.com/compdict/
compdict_ATM_cell_relay.html
Virtual channel: A logical unidirectional association between two
endpoints of a link in the physical path from source to destination.
Virtual path: A bundle of virtual channels that are associated with a
physical path between two switching nodes.
40
Figure 3.23 ATM protocol layers
Physical
Application
ATM layer
Higher-layer protocols
ATM cells
ATM virtual channels
MessageLayers
ATM adaption layer
41
Figure 3.24 ATM cell layout
VPI in VPI out
23
45
VPI = 3
VPI = 5
VPI = 4
Virtual path Virtual channels
VPI = 2
VPI : virtual path identifier
VP switch VP/VCswitch
VP switch
Host
Host
Figure 3.25 Switching virtual paths in an ATM network
Flags DataVirtual channel idVirtual path id
53 bytes
Header: 5 bytes
42
Summary
Network Principle Packet transmission Switching Protocols Routing
Network Protocols TCP IP Addressing IP Protocol IP routing Firewall
Case Study Ethernet ATM