程序代写 FF01:0:0:0:0:0:0:43 = FF01::43 0:0:0:0:0:0:0:1 = ::1

The Network Layer
three important funcons:
pathdeterminaon:route taken by packets from source to dest. Roung algorithms
forwarding:movepackets from routers input to appropriate router output

Copyright By PowCoder代写 加微信 powcoder

callsetup:somenetwork architectures require router call setup along path before data flows

Computer Networking and Applications

Network layer: data plane, control plane

Computer Networking and Applications
routing algorithm
routing algorithm determines end-end-path through network
forwarding table determines local forwarding at this router
local forwarding table
header output value link
0100 0101 0111 1001
value in arriving packet’s header

Service Models…
Q: What service model for the channel transporng packets from sender to receiver?
• guaranteed bandwidth?
• preservaon of inter-packet ming
(no jier)?
• loss-free delivery?
• in-order delivery?
• congeson feedback to sender?
The most important abstracon provided
by network layer:
virtual circuit or datagram?

Virtual circuits: signaling protocols
used to setup, maintain teardown VC used in ATM, frame-relay, X.25
not used in todays Internet
applicaon
5. Data flow begins
4. Call connected 1. Iniate call
6. Receive data
3. Accept call 2. incoming call
applicaon

Datagram networks: the Internet model
nocallsetupatnetworklayer
routers:nostateaboutend-to-endconnecons
no network-level concept of connecon
packetstypicallyroutedusingdesnaonhostID
packets between same source-dest pair may take different paths
applicaon
applicaon
1. Send data
2. Receive data

Datagram or VC network: why?
Internet (DataGram)
• dataexchangeamongcomputers – elasc service, no strict
ming req.
• smartendsystems(computers)
– can adapt, perform control, error recovery
– simple inside network, complexity at edge
• manylinktypes
– different characteriscs – uniform service difficult
ATM (Virtual Circuit)
• evolvedfromtelephony • humanconversaon:
– strict ming, reliability requirements
– need for guaranteed service
• dumbendsystems – telephones
– complexity inside network

host, router network layer funcons:

IP Addressing: introducon
IP address: 32-bit idenfier for
host, router interface
interface: connecon between
host, router and physical link
routers typically have mulple interfaces
host may have mulple interfaces
IP addresses associated with interface, not host, router

IP Addressing
IP address:
network part (high order bits) host part (low order bits)
What s a network ? (from IP address perspecve)
device interfaces with same network part of IP address
can physically reach each other without intervening router
network consisng of 3 IP networks (for IP addresses starng with 223, first 24 bits are network address)

IP Addressing
Detach each interface from router, host
create islands of isolated networks
each isolated network is also known as a subnet
How to find the networks?
Interconnected system consisng of six networks

IP Addresses
given noon of network, lets re-examine IP
addresses:
“class-full” addressing:

IP addressing: CIDR classful addressing:
inefficientuseofaddressspace,addressspaceexhauson
e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network
TherearemanyclassCnetworknumbers—some2million
Allocatethem(insteadofclassBnumbers)invariablesizeblocks
eg. 2000 addresses could be allocated by 8 conguous class C networks) instead of a class B network.
CIDR: Classless InterDomain Roung
networkporonofaddressofarbitrarylength
addressformat:a.b.c.d/x,wherexis#bitsinnetworkporonofaddress

Broadcast and Mulcast
Most of the IP addresses that are used have a network secon and a host secon.
The larger the network secon, the more networks that you can have.
The larger the host secon, the more hosts you can have.
There are some special IP addresses and ranges that are used for specific
purposes in a network.
The broadcast address:
The broadcast address for any network sends the packet to EVERY node in the network.
Before CIDR, you could just set the host bits to all 1s.
The broadcast address in 10.x.x.x is 10.255.255.255
The broadcast address in 192.168.1.x is 192.168.1.255
This works neatly if you are using classes – but what about CIDR?

Broadcast in CIDR
ACIDRaddresssuchas200.23.16.0/23doesnotbreakneatlyover
a byte boundary:
Inthiscase,wesllsetthehostparttoall1s,butthismeansthat the broadcast address for network 200.23.16.0 is actually 200.23.17.255!
Networkidenfiershaveahostpartofall0s,broadcastaddresses have host part of all 1s. This means that you cant use the first or last host address in any range.
In the case above, by moving the boundary, we have more addresses than we would have in a class C, but far fewer than in a class B. We should have 512 but we lose the first (network) and the last (broadcast) – 510.

Unicast, Broadcast and Mulcast
Unicast addresses send datagrams to a single desnaon.
Broadcast addresses are used to send a datagram to every other host in a given network.
Mulcast addresses are used to send datagrams to a group of interested pares.
How do you show interest?
The hosts and routers use Internet Group Management Protocol (IGMP) to communicate their desire to join the mulcast network.
The router uses the source address to determine data stream direcon
The source is considered to be upstream
The router finds all the registered downstream interfaces and sends the packets out through the interfaces, roung AWAY from the source.
This is also called reverse path forwarding.

IP Address Allocaon
Allocaonisbasedongeographicalzone(tosimplifyroung): 194.0.0.0 to 195.255.255.255 – Europe
198.0.0.0 to 199.255.255.255 – North America
200.0.0.0 to 201.255.255.255 – Central and South America 202.0.0.0 to 203.255.255.255 – Asia and Pacific
Each region has ~32 million addresses
Numbers 204.0.0.0 to 223.255.255.255 (some 320 million numbers) are sll in reserve.

IP addresses: how to get one?
Hosts(hostporon):
hard-codedbysystemadmininafile
DHCP:DynamicHostConfiguraonProtocol:dynamicallyget address: plug-and-play
host broadcasts DHCP discover msg
DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg

IP addresses: how to get one? Network(networkporon):
getallocatedporonofISPsaddressspace:

Hierarchical addressing: route aggregaon
Hierarchical addressing allows efficient adversement of roung informaon:
Organizaon 0 200.23.16.0/23
Organizaon 1 200.23.18.0/23
Organizaon 2 200.23.20.0/23
. Fly-By-Night-ISP
Send me anything with addresses beginning 200.23.16.0/20
Send me anything with addresses beginning 199.31.0.0/16
. . Organizaon 7 .
200.23.30.0/23

Hierarchical addressing: more specific routes
ISPs-R-Us has a more specific route to Organizaon 1
Organizaon 0 200.23.16.0/23
Organizaon 2 200.23.20.0/23
. Fly-By-Night-ISP
Send me anything with addresses beginning 200.23.16.0/20
Send me anything
with addresses beginning 199.31.0.0/16 or 200.23.18.0/23
. . Organizaon 7 .
200.23.30.0/23
Organizaon 1 200.23.18.0/23

Geng a datagram from source to dest.
roung table in A
Dest. Net.
223.1.1 223.1.2
223.1.1.2 223.1.1.4
IP datagram:
next router Nhops
1 223.1.1.4 2
223.1.1.4 2
misc fields
source IP addr
dest IP addr
• datagram remains unchanged, as it travels source to desnaon
• addr fields of interest here
223.1.2.1 223.1.2.9
223.1.1.3 223.1.3.1
223.1.3.27 223.1.2.2 E 223.1.3.2

misc fields
Geng a datagram from source to dest.
Dest. Net.
223.1.1 223.1.2
223.1.1.2 223.1.1.4
Starng at A, given IP datagram addressed to B:
next router Nhops
1 223.1.1.4 2
223.1.1.4 2
• look up net. address of B
• findBisonsamenet.asA
• link layer will send datagram directly to B inside link-layer frame
– BandAaredirectlyconnected
223.1.2.1 223.1.2.9
223.1.1.3 223.1.3.27 223.1.2.2 E

misc fields
Geng a datagram from source to dest.
Starng at A, dest. E:
• lookupnetworkaddressofE
• Eondifferentnetwork
– A,Enotdirectlyaached
• roungtable:nexthoproutertoEis
• linklayersendsdatagramtorouter
next router Nhops
1 223.1.1.4 2
223.1.1.4 2
Dest. Net.
223.1.1 223.1.2
223.1.1.2 223.1.1.4
223.1.2.1 223.1.2.9
223.1.1.4 inside link-layer frame B
• datagram arrives at 223.1.1.4
• connued…..
223.1.1.3 223.1.3.1
223.1.3.27
223.1.2.2 E 223.1.3.2

misc fields
Geng a datagram from source to dest.
Dest. next
network router Nhops interface
Arriving at 223.1.4, desned for 223.1.2.2
• look up network address of E
• E on same network as router’s interface
– router,Edirectlyaached
• link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9
• datagram arrives at 223.1.2.2!!! (hooray!)
223.1.1 – 223.1.2 –
1 223.1.1.4 1 223.1.2.9
1 223.1.3.27
223.1.1.3 223.1.3.27 223.1.2.2 E
223.1.2.1 223.1.1.4 223.1.2.9

IP Fragmentaon & Reassembly
network links have MTU (max.transfer size) – largest possible link-level frame.
different link types, different MTUs
large IP datagram divided (fragmented) within net
one datagram becomes several datagrams
reassembled only at final desnaon
IP header bits used to idenfy, order related fragments
fragmentaon:
in: one large datagram out: 3 smaller datagrams
reassembly

IP was designed in the 1970’s to support researchers and the military. The global use today wasn’t predicted.
Early design decisions led to predicons in the early 1990’s of the “death of the Internet” due to
Shortage of Internet protocol (IP) addresses Roung table explosion
Shortage of network numbers
New capabilies needed:
Improved security (or even some security!) Support for QoS (real-me services)
Beer mulcasng support
Mobile compung
• Early proposals
– CLNP (Conneconless Network
– SIP (Simple IP)
– Pip(Paul’s Internet protocol)
– SIPP (SIP plus Pip) became IPv6 or IPng
Two paths could be taken
Retrofit larger addresses and funconality onto IPv4 Develop a new version of IP

Expanding the address space
By 1996, all of the class A networks, 62% of class B and 37% of class C networks were allocated. Predicted to run out of addresses in 2008.
The temporary soluon is Classless InterDomain Roung (CIDR)
With the push towards IP enabled devices this is likely to be only a temporary
patch. IPv6 aims for a more permanent soluon.
How big is “big enough” for the address space?
Current 32 bit space allows billions of addresses.
Inefficiencies of allocaon are almost inevitable.
May want to idenfy experimental networks in a different address spaces. Can we predict future use? Are we seng ourselves up to need IPv7?
Should the address be variable length?

IPv6 addressing
128 bits was a compromise
Fixed addresses are easier to manage and program.
There is nearly 1 IP address for every molecule on the earth’s surface.
Even with inefficient allocaon there should be at least 1000 addresses per square
128 bit addresses are wrien in hex:x:x:x:x:x:x:x:x
Each x is 16-bits = 4 hex digits
Leading zeros are not required
Sequence of zero fields given by “::”
1080:0:0:0:8:800:200C:417A = 1080::8:800:200C:417A FF01:0:0:0:0:0:0:43 = FF01::43 0:0:0:0:0:0:0:1 = ::1

IPv6 Roung
Each interface has an address (but possibly more than one):
Unicast – idenfy single interface
Anycast (or “cluster”)– idenfy one out of number of interfaces ie. any one will do (eg. nearest host)
Mulcast – idenfy set of interfaces, all of which are to receive message
Intenon in IPv6 addresses is to support hierarchical roung
→ prefixes will idenfy registries, providers etc.
Example: hierarchical organisaon: s n m
subscriber prefix area id subnet id
This will help roung tables
Other possibilies:
global provider-based unicast address geographic-based unicast address
128-s-n-m interface id

IPv6 Header
IPv6 8 fields in base header vs 13 fields in IPv4 Faster processing
Simpler management
More flexibility
type of service
16-bit idenfier
fragment offset
me to live
upper layer
32 bit source IP address
32 bit desnaon IP address
Opons (if any)
Internet checksum

Extension Headers
This base header is followed by a number of oponal extension headers
Sll allows flexibility
Each header specifies code of
next header/data component
Extension headers commonly specify:
type of header and length
response if the router can’t process the header — ignore the header, skip the packet, skip the packet and report an error
Extension Header
Descripon
Hop-by-hop Opons
Misc. informaon for routers
Full, or paral, route to follow
Fragmentaon
Management of datagram fragments
Authorisaon
Verificaon of Senders Identy
Encrypted Security Payload
Informaon about encrypted Contents
Desnaon Opons
Addional Info for desnaon

Fragmentaon
Fragmentaoninformaonisnolongerineveryheader,butonlyin special extension headers
Fragmentaonisnolongerperformedatintermediaterouters
The source host should choose datagram size so fragmentaon
is not necessary
Source host needs to run “path MTU discovery”
e.g. send sequence of datagram sizes to target unl they don’t arrive

Transion From IPv4 To IPv6
Notallrouterscanbeupgradedsimultaneously no flag days
How will the network operate with mixed IPv4 and IPv6 routers? Twoproposedapproaches:
Dual Stack: some routers with dual stack (v6, v4) can translate between formats
Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers
Changesinnetworkingtechnologiesalwaysproceedbyevoluon, rather than revoluon

Dual Stack Approach

IPv6 inside IPv4 where needed

Tunneling is a generically useful technique in networking…
Note that IPv6 payloads could be anything! We could tunnel arbitrary protocols
This is how experimentaon is done –
New protocols are tunneled across exisng
infrastructure
Can spread new protocols across the network this way
Can link in new devices or old devices this way
Can implement secure networks this way (see later…)

IPv6 Summary What has changed
Simpler, fixed length header No fragmentaon in routers
Opons in extension headers No checksum
128 bit (IPv4 32 bit) addresses, with hierarchy Addional support for
Mulcast and anycast roung
Mobile hosts and autoconfiguraon Real Time applicaons

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com