CN Ii
CN Ii
CN Ii
1
Networks: L9
–receivers determine which higher level protocol the PDU is intended for
from the protocol type in their header
»ethernet sends PDU up to IP, ARP, RARP etc.
»IP sends to TCP, UDP
»TCP to application, based on port number etc.
2
Networks: L9
Machine A Machine B
Application Application
Transport Router/Gateway Transport
Network 1 Network 2
Source IP Address
Destination IP Address
IP IP
Network Network
–the destination IP is the only entity that reassembles fragments into the
original packet
6
Networks: L9
–performance:
»fragment loss means retransmission of all packet fragments again
be done more efficiently with selective retransmission
could
7
Networks: L9
•IP Addressing :
–each host assigned a unique 32-bit IP address :
»Network ID + Host ID
»or multiple IP addresses for hosts with multiple interfaces
–Network IDs allocated by RIPE (Réseaux IP Européens) NCC (Network
Coordination Centre) in Amsterdam for Europe, Middle East & North Africa
»one of three Regional Internet Registries
(Americas), APNIC (Asia Pacific)
ARIN
»allocation of blocks of IP addresses to Local Internet Registries e.g. ISPs
further allocate them to their users
who
–Host ID allocated by local network administrator
»or dynamically by DHCP
–routers only need to route packets on basis of the Network ID part
»reduces size of routing tables
–Five address classes : A to E
»class D used for multicast services to a group of hosts simultaneously
»class E reserved for experiments
8
Networks: L9
Bit position: 0 1 2 3 8 16 31
Class A 0 Net ID Host ID
•Subnet addressing
–class B network addresses have 65534 host Ids
»too many to administer easily
–instead add another hierarchical level – subnets of the network
–the local network administrator can choose the size of the subnet
Subnetted 1 0
address Net ID Subnet ID Host ID
H1 H2
150.100.12.154 150.100.12.176
150.100.12.128
150.100.12.129
150.100.0.1
R1
To the rest of H3 H4
the Internet 150.100.12.4
150.100.12.24 150.100.12.55
150.100.12.0
150.100.12.1
R2 H5
150.100.15.54 150.100.15.11
150.100.15.0
11
Networks: L9
12
Networks: L9
13
Networks: L9
14
Networks: L9
15
Networks: L9
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 a0 c9 a4 9d 18 ...... Intel(R) PRO PCI Adapter
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 129.215.58.108 129.215.58.7 1
0.0.0.0 0.0.0.0 129.215.58.109 129.215.58.7 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
129.215.58.0 255.255.255.0 129.215.58.7 129.215.58.7 1
129.215.58.7 255.255.255.255 127.0.0.1 127.0.0.1 1
129.215.255.255 255.255.255.255 129.215.58.7 129.215.58.7 1
224.0.0.0 224.0.0.0 129.215.58.7 129.215.58.7 1
255.255.255.255 255.255.255.255 129.215.58.7 129.215.58.7 1
Default Gateway: 129.215.58.109
===========================================================================
Persistent Routes:
None
16
Networks: L9
H1 H2 H3 H4
150.100.76.20 150.100.76.21 150.100.76.22 150.100.76.23
H1 H2 H3 H4
»when H1 receives the ARP reply message from H3, it updates its cache
can send IP packets to H3 via ethernet
and
18
Networks: L9
19
Networks: L9
20
Networks: L9
–other problems:
»possible corruption of dynamically allocated leased IP addresses (DHCP)
»limited flow control – need to control different types of flow independently
»security and encryption lacking – to facilitate use of Virtual Private Networks
21
Networks: L9
–Static NAT:
»mapping an unregistered IP address to a registered IP address one-to-one
23
Networks: L9
–example:
»a local network host attempts to connect to an external host
»router receives the packet from the local host
»router replaces sending host’s IP address with first available IP address from
its set of registered IP addresses
»router saves the host’s local IP address and its replaced external IP address
in an address translation table
»when a packet comes back from the destination host, router checks the
destination IP address on the packet
»looks in its address translation table for a match
match, the packet is discarded
if no
»replaces the external IP address with the local IP address
»forwards the packet on the local network to the local host
»local host receives the packet
»process repeats as long as the local host is communicating with the external
host
the external IP address reclaimed for use by another local host
then
a suitable time-out limit of non-use
after
24
Networks: L9
–Overloading:
»maps unregistered IP addresses to a single registered IP address by using
different ports (also known as Port Address Translation (PAT))
–example:
»a local network host attempts to connect to an external host
»router receives the packet from the local host
»router replaces sending host’s IP address with the router’s external IP address
»and also replaces the sending host’s source port with a port number that can be
used to index into its address translation table
»router saves the host’s local IP address and its internal port number in its address
translation table
in the external port number position of the table
together with the external IP address of the router
the destination host’s IP address
and
25
Networks: L9
71.94.0.0/15
28
Networks: L9
29
Networks: L9
•IP version 6
–to address shortcomings of IPv4 and emerging applications
»designed to interoperate with IPv4 during transition period
1994 so far!
since
–Longer addresses – 128 bits
–Simpler header format e.g. no header length or fragmentation fields
–Options provided by more flexible extension headers
–Flow label capability to identify a packet flow that needs certain QoS
–Security : supports authentication and confidentiality
–Large packets : jumbo packets longer than 64Kb
–Fragmentation at source only : intermediate routers not allowed to fragment
–No checksum field
»physical layers perform checksum
»higher layers also checksum
»so not needed
30
Networks: L9
Source Address
Destination Address
32
Networks: L9
33
Networks: L9
–Extension Headers
»an arbitrary number of daisy-chained headers to provide extra options
the basic header has a type field potentially for an interposed extra header
subsequent header likewise:
each
Basic header Routing header Fragment header Authentication header
Next header = Next header = Next header = Next header = TCP segment
routing fragment authentication TCP
fragmentation header:
0 8 16 29 31
Next Header Reserved Fragment Offset Res M
Identification
34
Networks: L9
source routing i.e. the sequence of routers to be visited by each packet
0 8 16 24 31
Next Header Header Length Routing Type = 0 Segment Left
Reserved Strict/Loose Bit Mask
Address 1
Address 2
...
Address 24
35