Download Understanding Packet Switching: Routing, Delays, and Congestion Control in Networks and more Study notes Computer Science in PDF only on Docsity!
10-09-
Packet Switching
Presentation G
CSE 3461: Introduction to Computer Networking and Internet Technologies
Study: 10.5, 10.6, 12.1, 12.2, 13.1, 13.2, 18.3, 18.4 Gojko Babić
2
The Network Core
- mesh of interconnected routers
- the fundamental question: how is data transferred through net? —circuit switching: dedicated circuit per call: telephone net —packet-switching: data sent thru net in discrete “chunks”
d. xuan
3
Network Layer Functions
- transport packet from sending to receiving hosts
- network layer protocols in every host, router
three important functions:
- path determination: route taken by packets from source to dest.Routing algorithms
- switching: move packets from router’s input to appropriate router output
- call setup: some network architectures require router call setup along path before data flows
data link^ network physical
data linknetwork physical
networkdata link physical
networkdata link physical
data linknetwork physical
data linknetwork physical
networkdata link physical
networkdata link physical
applicationtransport networkdata link physical
applicationtransport data linknetwork physical
d. xuan
4
Network Core: Packet Switching
each end-end data stream
divided intopackets
- user A, B packetsshare network resources
- each packet uses full link bandwidth
- resources usedas needed,
resource contention:
aggregate resource
demand can exceed
amount available
congestion: packets
queue, wait for link
use
store and forward:
packets move one hop
at a time
transmit over link
wait turn at next
link
Bandwidth division into “pieces” Dedicated allocation Resource reservation
d. xuan
7
Network Core: Packet Switching
A
B
10 MbsEthernet C
1.5 Mbs 45 Mbs
D E
statistical multiplexing
queue of packets waiting for output link
d. xuan
8
Delays in Packet-Switched Networks
packets experience delay on end-to-end path
- four sources of delay at each hop - nodal processing: — check bit errors — determine output link - queueing — time waiting at output link for transmission — depends on congestion level of router A
B
propagation
transmission
nodal processing queueing d. xuan
9
Delays in Packet-Switched Networks
Transmission delay:
- C=link bandwidth (bps)
- m=packet length (bits)
- time to send bits into link = m/C
Propagation delay:
- d = length of physical link
- s = propagation speed in medium (~2x10^8 m/sec)
- propagation delay = d/s
A
B
propagation
transmission
nodal processing queueing
Note: s and C arevery
different quantities!
d. xuan
Presentation G 10
- Line efficiency — Single node to node link can be shared by many packets over time — Packets queued and transmitted as fast as possible
- Data rate conversion — Each station connects to the local node at its own speed — Nodes buffer data if required to equalize rates
- Packets are accepted even when network is busy — Delivery may slow down — Priorities can be used
- Packets handled in two ways:
Packet Switching: Advantages
g. babic
13
Virtual Circuits: Signaling Protocols
- used to setup, maintain & teardown VC
- used in ATM, frame-relay, X.
- not used in today’s Internet
application transport network data link physical
application transport network data link physical
1. Initiate call 2. incoming call
4. Call connected 3. Accept call
5. Data flow begins 6. Receive data
d. xuan
14
Packet Switching: Virtual-Circuit Approach
Figure 10. g. babic
15
Datagram Networks: Internet Model
- no call setup at network layer
- routers: no state about end-to-end connections — no network-level concept of “connection”
- packets typically routed using destination host ID — packets between same source-dest pair may take different paths
application transport network data link physical
application transport network data link physical
1. Send data 2. Receive data
d. xuan
16
Packet Switching: Datagram Approach
Figure 10. g. babic
(^13)
19
Circuit Switching vs. Packet Switching Figure 10.
20
Packet Switching vs. Circuit Switching
- 1 Mbit link
- each user: — 100Kbps when “active” — active 10% of time
- circuit-switching: — 10 users
- packet switching: — with 35 users, probability > 10 active less than .
Packet switching allows more users to use network!
N users 1 Mbps link
d. xuan
Presentation G 21
- Almost universal on virtual-circuit packet switched networks and packet switching in ISDN
- Defines three layers: — Physical — Link: Link Access Protocol Balance – LAPB (Subset of HDLC) — Packet: Virtual Circuit Service
- Virtual Circuit Service: Logical connection between two stations
- Specific route established through network for each connection — Internal virtual circuit
- Typically one to one relationship between external and internal virtual circuits
- Considerable overhead
- Not appropriate for modern digital systems with high reliability
X.25 Protocol
g. babic
Presentation G 22
- Call control packets: — Call Request packet includes: packet type indicator, destination and source address, and virtual circuit number — Call Accept packet includes: packet type indicator, and virtual circuit number
- Multiplexing of virtual circuits (data packets) at layer 3
- Layer 3 data packets include flow and error control — Data packet have send sequence numbers and receive sequence numbers similar as in data link layer, plus virtual circuit number, instead of destination address
X.25 Packets
g. babic
Presentation G 25
- Routing is based on the destination address: — End systems and routers maintain routing tables that indicate next router to which datagram should be sent - Static routing - Dynamic routing: Flexible response to congestion and errors - Source routing: Source specifies (inOptions field) route as sequential list of routers to be followed - Route recording and time-stamping (inOptions field) by routes
- Datagram lifetime
- Fragmentation and re-assembly
- Error control
- Flow control
IP Network: Design Issues
g. babic
26
IP Addressing: Introduction
- IP address: 32-bit identifier for host,
routerinterface
- interface: connection between host, router and physical link — router’s typically have multiple interfaces — host may have multiple interfaces — IP addresses associated with interface, not host, router
- Dotted decimal notation
223.1.1.
223.1.1.
223.1.1.
223.1.1.4 223.1.2. 223.1.2.
223.1.2.
223.1.3.1 223.1.3.
223.1.3.
223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 d. xuan
Presentation G 27
IP Addressing: Class-full Addressing
All allocated
All allocated
Nearly all allocated
1111111 reserved for loopback
g. babic
Figure 18.
28
IP addressing: CIDR
- classful addressing: — inefficient use of address space, address space exhaustion — e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network
- CIDR: Classless InterDomain Routing — network portion of address of arbitrary length — address format: a.b.c.d/x, where x is # bits in network portion of address
network part
host part
d. xuan
31
223.1.1. 223.1.1.
223.1.1.
223.1.1.4 223.1.2. 223.1.2.
223.1.2.
223.1.3.1 223.1.3.
223.1.3.
A
B E
Starting at A, given IP datagram addressed to B:
- look up net. address of B
- find B is on same network as A
- link layer will send datagram directly to B inside link-layer frame, since B and A are directly connected
Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2
misc fields 223.1.1.1 223.1.1.3 data
d. xuan
Getting Datagram from Source to Destination 2
32
223.1.1. 223.1.1.
223.1.1.
223.1.1.4 223.1.2. 223.1.2.
223.1.2.
223.1.3.1 223.1.3.
223.1.3.
A
B E
Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 Starting at A, dest. E:- look up network address of E 223.1.3 223.1.1.4 2
- E ondifferent network, i.e. A, E not directly attached
- routing table: next hop router to E is 223.1.1.
- link layer sends datagram to router 223.1.1.4 inside link- layer frame
- datagram arrives at 223.1.1. continued…..
misc fields 223.1.1.1 223.1.2.3^ data
d. xuan
Getting Datagram from Source to Destination 3
33
223.1.1. 223.1.1.
223.1.1.
223.1.1.4 223.1.2. 223.1.2.
223.1.2.
223.1.3.1 223.1.3.
223.1.3.
A
B E
Arriving at 223.1.4, destined for 223.1.2.
- look up network address of E
- E onsame network as router’s interface 223.1.2.9 , i.e. router, E directly attached
- link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.
- datagram arrives at 223.1.2.2!!! (hooray!)
misc fields 223.1.1.1 223.1.2.3^ data^ 223.1.1network router Nhops interface- 1 223.1.1. 223.1.2 - 1 223.1.2. 223.1.3 - 1 223.1.3.
Dest. next
d. xuan
Getting Datagram from Source to Destination 4
Presentation G (^34)
- Datagrams could loop indefinitely: — Consumes resources
- Datagram marked with lifetime:
—Time to Live field in IP
— Hop count
- Decrement time to live on passing through each router — Time count — Once lifetime expires, datagram discarded (not forwarded)
- Type of Service filed: — Specify treatment of data unit during transmission through networks
Datagram Lifetime & Type of Service
g. babic
Presentation G 37
Fragmentation Example
— Data Length is the length of User Data Filed g. babic
Presentation G 38
- Error Control: — Not guaranteed delivery — Router should attempt (ICMP protocol used) to inform source if packet discarded, for time to live expiring — Datagram identification needed — Source may modify transmission strategy — May inform high layer protocol
- Flow Control: — Allows routers and/or stations to limit rate of incoming data — Limited in connectionless systems — Send flow control packets (ICMP used) — Requesting reduced flow; again ICMP used — No flow control currently provided for in Internet
Error Control and Flow Control
g. babic
Presentation G 39
- IP protocol filed identifies ICMP
- Often considered as a part of IP layer
- Provides feedback from the network: —destination (network, host, or protocol) unreachable or unknown — time to live expiring — parameter problem
— fragmentation needed butDon’t Fragment bit set
— source quench
- Can be used by the host to obtain certain information: — echo request and echo replay (ping program) — timestamp request and timestamp replay
ICMP – Internet Control Message Protocol
g. babic
Presentation G 40
IPv6 Header Format
g. babic