Professional Documents
Culture Documents
Compressed Network3-Ip
Compressed Network3-Ip
Network layer
III
Network layer 1
Network Layer
Design issues
Routing
Different networks,
Congestion
protocols?
Internetworking Interconnection styles
Internet Protocols Internetwork routing
Multimedia or QoS Fragmentation
Firewalls
Network layer 2
Internetworking: differences
Different networks will always be around
o Installed base is large and growing
o Networks get cheaper, so #decision makers
o New technology new networks new protocols
Network layer 3
Internetworking: differences
Item Some differences
Service offered Connection-oriented <> connectionless
Protocols IP, IPX, CLNP, Apple talk, SNA,…
Addressing Flat (802) <> hierarchical (IP)
Multicasting Present <> absent
Packet size Maximum per network
Quality of service Many kinds
Error handling Reliable, ordered, …
Flow control Sliding window, rate control,…
Congestion control Leaky bucket, choke packets,…
Security Privacy rules, encryption,…
Parameters Timeouts, flow specifications,…
Accounting Connect time, available bandwidth,…
Network layer 4
Internetworking: differences
Interconnection boxes Layer Example
o Repeaters, hubs 1 Ethernet
o Bridges, switches 2 LANs
o Routers 3 IP, IPX, Apple talk
o Transport gateways 4 TCP <> OSI TP4
o Application gateways 5 Mail: SMTP <> X400
Network layer 5
Internetworking: styles
Half-[device]s + neutral protocol
o Management issue
o Cooperation reduced to agreement on protocol
Network layer 6
Internetworking: styles
Concatenated virtual circuits
o Set-up of a connection
• Recognition of remote destination (host, router) and selection
of multiprotocol router for first VC
• Multiprotocol router extends VC towards …
o Data transfer
• Same path for all packets
• Conversions (packet format, VC numbers,…) in multiprotocol
routers
o Essential features
• Sequence of VCs
• Networks should have same/similar properties
• Properties: I dentical to single VCs
Network layer 7
Internetworking: styles
Concatenated virtual circuits
o Set-up of a connection
• Recognition of remote destination (host, router) and selection
of multiprotocol router for first VC
• Multiprotocol router extends VC towards …
o Data transfer
• Same path for all packets
• Conversions (packet format, VC numbers,…) in multiprotocol
routers
o Essential features
• Sequence of VCs
• Networks should have same/similar properties
• Properties: identical to single VCs
Network layer 8
Internetworking: styles
Connectionless internetworking
o Datagram approach
• Multiple routes
• Higher bandwidth
• No guarantee for in order delivery
o Nearly identical protocols required
• Packet conversion
• Addressing ( assignment, mapping)
o Properties: same as for datagram networks
Network layer 9
Internetworking: styles
Connectionless internetworking
o Datagram approach
• Multiple routes
• Higher bandwidth
• No guarantee for in order delivery
o Nearly identical protocols required
• Packet conversion
• Addressing ( assignment, mapping)
o Properties: same as for datagram networks
Network layer 10
Internetworking: styles
Tunneling
o Interconnect 2 identical networks using a different one
o Behaviour: point-to-point line between multiprotocol routers
Network layer 11
Internetworking: routing
Same problem + some complications
2 levels of routing:
o Within a network o Between networks
• Intranetwork routing • Internetwork routing
• Interior gateway protocol • Exterior gateway protocol
Internetwork routing
o Graph construction
• Every router can directly access routers on the same network
o Packet forwarding + tunneling if necessary
Differences with intranetwork routing
o Cross international boundaries adopt national laws
o Agreements between operators (transit traffic)
Network layer 12
Internetworking: routing
Network layer 13
Internetworking: fragmentation
Problem: Large packet through network with smaller
maximum packet size
Solution:
o Break large packet into fragments
o Send each fragment as a separate packet
o Reassemble: transparent <> non transparent?
Transparent fragmentation
o Strategy
• Gateway breaks large packet into fragments
• Each fragment addressed to same exit gateway
• Exit gateway does reassembly
Network layer 14
Internetworking: fragmentation
Transparent fragmentation
o Strategy
• Gateway breaks large packet into fragments
• Each fragment addressed to same exit gateway
• Exit gateway does reassembly
Network layer 15
Internetworking: fragmentation
Nontransparent fragmentation
o Strategy
• Gateway breaks large packet into fragments
• Each fragment is forwarded to destination
o problems
• Every host must be able to reassembly
• More headers
o Example: IP fragmentation
Network layer 16
Internetworking: fragmentation
Fragment numbering
o Hierarchical numbering
• Packet 0 packets 0.0, 0.1, 0.2
• Problem: retransmission + different fragmentations
o Basic block numbering: in every packet
• Original packet number
• Sequence number of first block
Network layer 17
Internetworking: firewalls
Protection needed against
o Information leaking out
• Trade secrets, product development plans, …
o Information leaking in
• Viruses, worms, …
o Old medieval analogy
• Castle + deep moat around it
• Single draw bridge
o Example firewall
• 2 routers for packet filtering
• Application gateway
Network layer 18
Internetworking: firewalls
Packet filtering Application gateway
o Acceptable sources + destinations o Decisions made per
o Filters on application
• Address: IP • Header fields,
• Service port (TCP header) • Message size
• both • content
Network layer 19
Network Layer
Design issues
Routing
IP protocol
Congestion
Internet Control Protocols
Internetworking
Routing
Internet Protocols Internet multicasting
Multimedia or QoS Mobile IP
IPv6
Network layer 20
Internet: IP protocol
View on Internet:
o Collection of Autonomous Systems (AS)
o Glue: IP designed for internetworking
Network layer 21
Internet: IP protocol
IP protocol
o best effort service
o Datagrams: up to 64 Kbytes
IP header
o 20 byte fixed part + optional part
o Transmitted in big endian order ( l -> r)
Network layer 22
Internet: IP header
Version Version of IP protocol: now 4
IHL Length of header
Type of service 3 bit precedence field; priority: 0 (normal) to 7 (control)
3 flags: Delay, Throughput, Reliability
Total length Length of header + data
Identification Unique number for datagram (between source & destination)
DF Don’t fragment this packet
MF More fragments to come
Fragment offset Relative position of fragment in original packet ( 8 bytes mult.)
Time to live Hop counter
Protocol Protocol of higher layer
Header checksum 16 bit sum of half words using 1-complement
Source address IP address
Destination address IP address
Network layer 23
Internet: IP header
Options: maximum length = 40 bytes
Option Description
Security Specifies how secret the datagram is
Network layer 24
Internet: IP addresses
class #networks #hosts
IP address = 32 bits A 126 16.000.000
o Network number B 16.382 64.000
o Host number (on network) C 2.000.000 254
Network layer 25
Internet: IP addresses
Dotted notation: 134.58.47.25
Assignment:
o ICANN Internet Corporation for Assigned Names and Numbers
o Arin (American Registry for Internet Numbers) for N & S America
o RIPE (Réseaux IP Européennes) for Europe
o APNIC (Asia Pacific Network Information Centre)
Special addresses:
Network layer 26
Internet: IP subnets
Subnetting: different views on same network
o Internal: network split up in different parts
o External: a single net
Why?
o Avoid use of different C networks for a single organisation
o Allow structuring of class A & B networks
Network layer 27
Internet: IP subnets
Subnetting: different views on same network
o Internal: network split up in different parts
o External: a single net
Why?
o Avoid use of different C networks for a single organisation
o Allow structuring of class A & B networks
Network <> host?
o Subnet mask
Network layer 28
Internet: IP subnets
Routing: table entries
No subnets With subnets
(network, 0) : (network, 0) :
how to get distant network how to get to distant network
(this-network, host) : (this-network, subnet, 0) :
… to local host …to host on another subnet
(this-network, this-subnet, host) :
… to local host
Advantages:
o Smaller tables
o Management of networks easier (not easy!)
Network layer 29
Internet: CIDR
Exponential growth of Internet
o Running out of addresses
• B is too large <> C is too small
• Assign many Cs iso a single B
Routing table explosion
o Hierarchical routing
o No support in IP addressing scheme
o CIDR solution:
o Allocate blocks of class C addresses
o Introduce hierarchy for remaining addresses
o Classless routing
CIDR: classless InterDomain Routing
Network layer 30
Internet: CIDR
o CIDR solution:
o Allocate blocks of class C addresses
o Variable size described by
o IP address
o Mask indicating meaningful bits in address
o Allocation scheme: block of X addresses starts on X-byte boundary
o 2048 addresses (8 C classes): 194.24.0.0 to 194.24.7.255
o 4096 addresses (16 C classes): 194.24.16.0 to 194.24.31.255
o Introduce hierarchy for remaining addresses
From To Region
194.0.0.0 195.255.255.255 Europe
198.0.0.0 199.255.255.255 North America
200.0.0.0 201.255.255.255 Central + South America
o Classless routing 202.0.0.0 203.255.255.255 Asia + Pacific
Network layer 31
Internet: CIDR
3 blocks assigned: Gent 2048 194.24.0.0 194.24.7.255
Leuven 4096 194.24.16.0 194.24.31.255
Hasselt 1024 194.24.8.0 194.24.11.255
Network layer 33
Internet: NAT
Use TCP/UDP port number to differentiate between
different local computer systems
NAT translation table
(local IP address, source port)
(external IP address, unique port)
1 IP address can be used for up to ~ 64K hosts
Network layer 34
Internet: NAT
Objections to NAT
o Violates architectural model of IP
• IP address uniquely identifies a single computer
o Crash of NAT box all “connections” lost
• Connection oriented flavor
o Violates fundamental rule of protocol layers
o Only works for TCP & UDP
o Addresses inside body are not translated
o Ugly and temporary hack delays real solution: IPv6
Network layer 35
Network Layer
Design issues
Routing
IP protocol
Congestion
Internet Control Protocols
Internetworking o ICMP
Internet Protocols o ARP
o RARP
Multimedia or QoS
Routing
Internet multicasting
Mobile IP
IPv6
Network layer 36
Internet: ICMP
ICMP: Internet Control Message Protocol
o Used by routers to report unexpected events
o Definition: RFC 792
Message type Description
Destination unreachable Packet could not be delivered
Time exceeded Time to live field 0
Parameter problem Invalid header field
Source quench Choke packet
Redirect Teach a router about geography
Echo request Ask a machine if it is alive
Echo reply Yes, I am alive
Timestamp request Same as echo, but with timestamp
Timestamp reply Same as echo reply, but with timestamp
Network layer 37
Internet: ARP
ARP: address resolution protocol
o How do IP addresses get mapped onto data link layer
addresses?
o Problem:
192.31.65.5 E2
unsatisfactory
Network layer 38
Internet: ARP
Basic ARP protocol
o Broadcast: who owns IP address 192.31.65.5?
o Host with that IP address should reply with its data link address
Optimisations: cache mappings!
o Values in ARP request
(every system on net)
o Values in ARP reply
(sender of ARP request only)
o Gratuitous ARP: upon boot host can send
ARP request with its own mapping
answer: duplicate IP address in use!
Network layer 39
Internet: ARP
How to handle remote hosts?
o Proxy ARP: routers serving the net should reply
o Sending host forwards packet to router
Network layer 40
Internet: RARP
RARP: Reverse Address Resolution Protocol
o Problem:
• Given a data link address
• What is the corresponding IP address
o Why needed?
• Allows a newly booted workstations to get its IP address
o Solutions:
+ RARP protocol + RARP server!!
- IP address embedded in OS image (different image for every WS)
+ BOOTP protocol
o Limitation of RARP: server needed on each net as broadcast is not
forwarded
Network layer 41
Internet: BOOTP
Bootstrap protocol
o Uses UDP messages
• Broadcast to port 67
• Forwarded over routers
o Gives additional information
• IP address of file server holding the OS
• IP address of default router
• Subnet mask to use
Network layer 42
Internet: DHCP
DHCP: Dynamic Host Configuration Protocol
o Special server + relay agents
o Static + dynamic assignment of IP addresses (leasing)
o Newly booted machine: broadcasts a DHCP Discover packet
Network layer 43
Network Layer
Design issues
Routing
IP protocol
Congestion
Internet Control Protocols
Internetworking
Routing
Internet Protocols o OSPF
Multimedia or QoS o BGP
Internet multicasting
Mobile IP
IPv6
Network layer 44
Internet: routing
History:
o First protocol: RIP (distance vector)
o Since 1979: replaced by link state
o In 1990 new standard: OSPF
Protocols:
o Interior gateway protocol: OSPF – Open Shortest Path
First
o Exterior gateway protocol: BGP – Border gateway
protocol
Network layer 45
Internet routing: OSPF
Requirements for OSPF:
o Algorithm in open literature
o Support for various distance metrics
o Dynamic algorithm
o Support for routing based on type of service
o Do load balancing over multiple lines
o Support for hierarchical systems
o Security to prevent false updates
o Support for routers connected through tunnel
OSPF supports as connections and networks
o Point-to-point lines between routers
o Multi access networks with broadcasts
o (multi access) networks without broadcasts
Network layer 46
Internet routing: OSPF
Abstract view on network
o Directed graph
o Node for each router + network
o Arcs:
• 2 arcs for each point-to-point line
• 2 arcs for each network node to the routers
connected to the network
o Example
Network layer 47
Internet routing: OSPF
Abstract view on network
o Directed graph
o Node for each router + network
o Arcs:
• 2 arcs for each point-to-point line
• 2 arcs for each network node to the routers
connected to the network
Network layer 48
Internet routing: OSPF
Network divided into areas
o Areas do not overlap
Provisions for very
o Area = set of contiguous networks large networks
o Topology of area not visible outside area
Backbone area
o Interconnects areas
o Router connected to at least 2 areas is part of backbone
Classes of routers
o Internal routers (within an area)
o Area border routers (interconnect areas)
o Backbone routers
o AS boundary router
3 kinds of routes
o Intra-area: shortest path
o Interarea: from source to backbone to destination
o Inter AS
Network layer 49
Internet routing: OSPF
Provisions for very large networks
Network layer 50
Internet routing: OSPF
Provisions for very large networks
Network layer 51
Internet routing: OSPF
Exchanging information
o Between adjacent routers
o on LAN one router is elected as designated router
o Designated router is adjacent to all neighbouring routers
Flooding to all routers in an area
Within routers of any area
o Construct graph
o Compute shortest paths between routers in area
Extra for backbone area
o Accept info from area border routers
o Compute SP between backbone router and all routers in AS
o Propagate this info back to area border routers, which advertise it
within their areas
Network layer 52
Internet routing: OSPF
How handle different types of service
o Multiple graphs with as cost metric
• Delay
• Throughput
• reliability
o Triples computation
o Separate routes for optimising …
Network layer 53
Internet routing: BGP
Allow many kinds of routing policies:
o Examples:
• No transit traffic
• Only transit X if there is no alternative
• Traffic from or to Y should not transit Z
o Policies require manual configuration!
BGP view of the Internet
o BGP routers + interconnecting lines
o 3 kind of networks:
• stub networks : 1 connection in BGP graph
• multi connected networks
• transit networks (operated as backbones)
BGP algorithm
Network layer 54
Internet routing: BGP
BGP algorithm
o Distance vector protocol +
o Each router keeps track of exact path used
o Route violating a policy
distance =
Network layer 55
Network Layer
Design issues
Routing
IP protocol
Congestion
Internet Control Protocols
Internetworking
Routing
Internet Protocols Internet multicasting
Multimedia or QoS Mobile IP
IPv6
Network layer 56
Internet multicasting
Use of class D IP addresses
o Each group identified by class D address
o Best effort delivery to all members of group
o Permanent addresses
• 224.0.0.1: all systems on LAN
• 224.0.0.2: all routers on LAN
• 224.0.0.5: all OSPF routers on LAN
• 224.0.0.6: all designated OSPF routers on LAN
o Temporary addresses for temporary groups
• Create group
• Host can join/leave group
• IGMP: Internet Group Management Protocol
Network layer 57
Internet multicasting
Multicast router
o Keeps track of the groups to which hosts on its LAN belong
o Modified distance vector protocol
o Each router constructs spanning tree per group
o Heavy use of tunneling (why?)
Network layer 58
Internet: mobile IP
Unattractive solutions:
o Give new IP address to mobile host
o Use complete IP address for routing
IETF: desirable goals
o (home) IP address usable everywhere
o No software changes to fixed hosts
o No changes to router software and tables
o No detours for most packets to mobile hosts
o No overhead when mobile host is at home
Solution
Network layer 59
Internet: mobile IP
Solution (see general scheme for details)
o Home agent
• Gratuitous ARP to invalidate cached entries
o Foreign agent + registering
o ARP + home agent responding
o Tunnel to foreign agent + inform sender
Handling of other problems:
o Locating agents
• Broadcast
o Host leaving without deregistration
• Registration valid for fixed time interval
o Security
• Use authentication protocol
Network layer 60
Network Layer
Design issues
Routing
IP protocol
Congestion
Internet Control Protocols
Internetworking
Routing
Internet Protocols Internet multicasting
Multimedia or QoS Mobile IP
IPv6
Network layer 61
Internet: IPv6
Major goals for new IP Features of IPv6
o Support billion of hosts o Not compatible with IPv4
o Reduce size of routing o Compatible with other
tables
Internet protocols
o Simplify protocol
o Longer addresses
o Better security
(authentication + privacy) o Simplification of header
o More attention for type of o Better support for options
service o Big advance in security
o Aid multicasting o More attention to type of
o Better support for mobility service
o Allow protocol to evolve
o Permit coexistence of old
and new IP
Network layer 62
Internet: IPv6
Procedure
o Call for proposal by IETF
o 21 responses
o Dec 92: 7 serious proposals
o 3 better proposals published in IEEE network
o SIPP (Simple Internet Protocol Plus) or IPv6: combined version
Network layer 63
Internet: IPv6 header
Network layer 64
Internet: IPv6 header
Version: identifies protocol version
Priority
o 0 – 7: transmissions capable of slowing down
o 8 – 15: real-time traffic
o Higher values: more important traffic
Flow label: Identification of flow with specific requirements
o Pseudoconnection between source and destination
o To be used by routers for special treatment of all packets of a flow
Payload length: number of bytes in packet after header
Next header
o Which extension follows this one
o (last extension header) which transport protocol to select
Hop limit: decremented at each hop
Addresses of source & destination: 16 bytes or 128 bits
Network layer 65
Internet: IPv6 addresses
Size of address space:
o 128 bits 2128 1038 addresses
o 7 x 1023 addresses /m2 land + water on entire earth
o Most pessimistic scenario: 1000 addresses / m2 (land + water)
Notation
o 8 groups of 4 hexadecimal digits with colons as separators
• 8000:0000:0000:0000:0123:4567:89AB:CDEF
o Short cuts:
• Sequence of 0000 “::” : 8000::0123:4567:89AB:CDEF
• IPv4 : ::134:58:91:254
Assignment
o Provider-based + geographic-based addresses
o Overview …
Network layer 66
Prefix Usage Fraction
0000 0000 Reserved (including IPv4) 1/256
0000 0001 Unassigned 1/256
Network layer 68
Internet: IPv6
Extension headers
o Encoding:
• Fixed format or
• variable number of variable length fields
– Type, length value encoding
Network layer 69
Internet: IPv6
Jumbogram extension header
o Datagrams > 64 Kbyte
Network layer 70
Internet: IPv6
Routing extension header
o Bit map: strict source routing <> loose source routing
Network layer 71
Internet: IPv6
Fragmentation extension header:
o Fragmentation only by source host
simplification of routers,
o Identical fields:
• Datagram identifier
• Fragment number
• MF bit
Network layer 72
Internet: IPv6
Controversies:
o Address length
o Length of hop limit field:
• Number of hops should never exceed ~100 8 bits
o Maximum packet size
o Removal of checksum
o Security
• in network layer? Yes standard service
No never good enough
• Export restriction?
• How? replaceable algorithms
Network layer 73
Advanced Computer Networks
Network layer
III
Network layer 74