qspiders - good to know network concepts

83
Computer Networks - Network Layer 1 The Network Layer

Upload: qspiders-software-testing-training-institute

Post on 23-Jan-2017

47 views

Category:

Education


1 download

TRANSCRIPT

Page 1: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 1

The Network Layer

Page 2: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

22

Network Layer issues -Network Layer issues -

Concerned with getting packets from source to destination.

The network layer must know the topology of the subnet and choose appropriate paths through it.

When source and destination are in different networks, the network layer (IP) must deal with these differences.

* Key issue: what service does the network layer provide to the transport layer (connection-oriented or connectionless).

Page 3: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

33

Network Layer Design GoalsNetwork Layer Design Goals

1. The services provided by the network layer should be independent of the subnet topology.

2. The Transport Layer should be shielded from the number, type and topology of the subnets present.

3. The network addresses available to the Transport Layer should use a uniform numbering plan (even across LANs and WANs).

Page 4: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

44

Figure 7.2

Physicallayer

Data linklayer

Physicallayer

Data linklayer

End system

Networklayer

Physicallayer

Data linklayer

Physicallayer

Data linklayer

Transportlayer

Transportlayer

Messages Messages

Segments

End system

Networkservice

Networkservice

Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks

Networklayer

Networklayer

Networklayer

Page 5: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

55

Application

Transport

InternetNetwork Interface

Application

Transport

InternetInternet

Network 1 Network 2

Machine A Machine B

Router/Gateway

Network Interface

Network Interface

Figure 8.3

Page 6: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

66

RR

RRS

SS

s

s s

s

ss

s

ss

s

R

s

R

Backbone

To internet or wide area network

Organization Servers

Gateway

Departmental Server

Figure 7.6

Copyright ©2000 The McGraw Hill Companies

Leon-Garcia & Widjaja: Communication Networks

Metropolitan AreaNetwork (MAN)

Page 7: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

77

Interdomain level

Intradomain level

LAN level

Autonomous systemor domain

Border routers

Border routers

Figure 7.7

Internet service provider

Copyright ©2000 The McGraw Hill Companies

Leon-Garcia & Widjaja: Communication Networks

Wide Area Network (WAN)

Page 8: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

88

RA

RB

RC

Route server

NAP

National service provider A

National service provider B

National service provider C

LAN

NAPNAP

(a)

(b)

Figure 7.8

Copyright ©2000 The McGraw Hill Companies

Leon-Garcia & Widjaja: Communication Networks

National ISPs

Network AccessPoint

Page 9: QSpiders - Good to Know Network Concepts

Computer Networks: Computer Networks: RoutingRouting

99

Packet 2

Packet 1

Packet 1

Packet 2

Packet 2

Figure 7.15Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks

Page 10: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 10

Goals of the Network Layer

The network layer is concerned with getting packets from the source all the way to the destination

the network layer must know the topology of the communication subnet choose route to avoid overloading some of the

communication lines and routers while leaving others idle

deal with problems when the source and destination are in different networks

Page 11: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 11

Services Provided to the Transport Layer

Connectionless (unreliable) services each packet must carry the full destination address no packet ordering and flow control should be

done Connection-oriented (reliable) services

a network layer process on the sending site must set up a connection to its peer on the receiving side

when a connection is set up, two processes can enter a negotiation about service parameters

packets are delivered in sequence flow control is provided automatically

Page 12: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 12

International Organization of the Network Layer

virtual circuit a route from the source to the destination is cho

sen as part of the connection setup primarily for connection-oriented service

datagrams each packet sent is routed independently of its

predecessors for connection-oriented and connectionless ser

vices

Page 13: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 13

Datagram Vs. Virtual Circuit

Issue Datagram Virtual Circuit (VC) Circuit Setup Not needed Required Addressing Each packet contains the full

source and destination address Each packet contains a short VC number

State information

Subnet does not hold state information

Each VC requires subnet table space

Routing Each packet is routed independently

Route chosen when a VC is set up; all packets follow this route

Effect of router failures

None, except for packets lost during the crash

All VCs that passed through the failed router are terminated

Congestion control

Difficult Easy if enough buffers can be allocated in advance for each VC

Page 14: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 14

Routing

Packets are often routed from the source to the destination hop by hop.

Two networks are connected by at least a router. The network is defined from the point of view of the network layer.

Page 15: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 15

Types of Routing

Static Routing (Nonadaptive Routing) Routes to destinations are predetermined and are

not dependent on the current state (traffic, topology etc.) of the network.

Dynamic Routing (Adaptive Routing) Routes being learned via exchange of routing infor

mation to reflect changes in the topology and traffic.

Default Routing: Traffic to destinations that are unknown to the route

r is sent to a default “outlet”.

Page 16: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 16

The Optimality Principle If router J is on the optimal path from router I

to router K, then the optimal path from J to K also falls along the same route. the set of optimal routes from all sources to a dest

ination form a tree, called a sink tree, rooted at the destination.

The goal of all routing algorithms is to discover and use the sink trees for all routers.

I J Kr1

r2

Page 17: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 17

Sink Tree

Page 18: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 18

Routing Algorithms

Static Routing Algorithms Shortest Path Routing Flooding Flow-Based Routing

Dynamic Routing Algorithms Distance Vector Routing Link State Routing

Hierarchical Routing Routing for Mobile Hosts Broadcast Routing Multicast Routing

Page 19: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 19

Shortest Path Routing

Find the shortest path between a given pair of routers.

Cost of a link may be a function of the distance, bandwidth, average traffic, communication cost, mean queue length, delay, etc.

The Dijkstra’s algorithm is used.

Page 20: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 20

Flooding

Every incoming packet is sent out on every outgoing line except the one it arrived on.

Vast numbers of duplicate packets are generated.

Application: Concurrent updates of all distributed databases

Always choose the shortest path

I J

K L

M

Page 21: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 21

Flow-Based Routing

For a given line, if the capacity and average flow are known in advance, it is possible to compute the mean packet delay on that line from queuing theory.

The routing problem then reduces to finding a routing algorithm that produces the minimum average delay for the subnet.

Page 22: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 22

Distance Vector Routing

RIP, the distributed Bellman-Ford routing algorithm, the Ford-Fulkerson algorithm

Each router maintains a routing table giving the best known distance to each destination and which line to use to get there.

These tables are updated by exchanging information with the neighbors.

Page 23: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 23

Page 24: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 24

Distance Vector Each node maintains a set of triples

(Destination, Cost, NextHop) Exchange updates directly connected neighbors

periodically (on the order of several seconds) whenever table changes (called triggered update)

Each update is a list of pairs: (Destination, Cost)

Update local table if receive a “better” route smaller cost came from next-hop

Refresh existing routes; delete if they time out

Page 25: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 25

Distance Vector Routing

Metric used to measure the “distance” number of hops time delay queue length

Drawback Count-to-infinity problem it reacts rapidly to good news, but leisurely to

bad news.

Page 26: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 26

Traffic may oscillate between the two links

Page 27: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 27

Hierarchical Routing

When hierarchical routing is used, the routers are divided into regions each router knows all the details about how to

route packets to destinations within its own region

each router knows nothing about the internal structure of other regions.

Page 28: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 28

Broadcast Routing

To simply send a distinct packet to each destination

Flooding Multidestination Routing Spanning Tree Routing Reverse Path Forwarding

Page 29: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 29

Multidestination Routing

Each packet contains a list of desired destinations.

When a packet arrives, the router checks all the destinations to determine the set of output lines for forwarding the packet. An output line is selected if it is the best route to at least one of the destinations.

The router generates a new copy of the packet for selected output line, with a set of destinations that are to use the line.

Page 30: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 30

Spanning Tree Routing

Assume each router has knowledge of a spanning tree (e.q. a sink tree) in the network.

Each router copies an incoming broadcast packet onto all the spanning tree lines except the one it arrives on.

Use minimum number of packets.

Page 31: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 31

Reverse Path Forwarding

Without knowing any spanning treeif a packet arrives at the line that is normally

used for sending packets to the source of the broadcastthe router forwards copies of it onto all lines

except the one it arrived on.

otherwisethe packet is discarded

Page 32: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 32

Multicasting

Send a message to all the other members of the group

group management create and destroy groups for processes to join and leave groups

routers knows which of their hosts belong to which group

routers tell their neighbors, so the information propagates through the subnet

Page 33: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 33

Multicast Routing

Each router computes a spanning tree covering all other routers in the subnet.

When a multicast packet for a group arrives, the first router examines its spanning tree and prunes it, removing all lines that do not lead to hosts in the group.

Multicast packets are forwarded only along the pruned tree.

mn trees is needed with n groups, each with an average of m members.

Page 34: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 34

Core-based Tree for Multicast Routing

A single spanning tree,called core-based tree, for a group is computed, with the root (core) near the middle of the group.

A host first sends a multicasting message to the core, which then does the multicasting along the spanning tree.

The tree is not optimal. However only n trees need to be stored.

Page 35: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 35

Congestion

When too many packets are present in (a part of) a subnet, performance degrades. This situation is called congestion.

Packet delivered

Packet sent

Maximun carryingcapacity of subnet

PerfectDesirable

Congested

Page 36: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 36

Congestion Control

goal make sure the subnet is able to carry the offere

d traffic Congestion causes

bursty data insufficient memory slow processor low-bandwidth line

Page 37: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 37

Flow Control vs. Congestion Control

Congestion control Make sure the subnet is able to carry the

offered traffic It is a global issue, involving the behavior of all

the hosts, all the routers, and etc. Flow Control

Relate to the point-to-point traffic between a given sender and a given receiver.

Page 38: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 38

Flow Control vs. Congestion Control

1 Gbps

1000 GbpsPC

SuperComputer

100 Kbps

1 Mbps 1000

1000

FlowControl

CongestionControl

Page 39: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 39

General Principles Open Loop

make sure congestion does not occur in the first place Deciding when to accept new traffic, deciding when to

discard packets and which ones, … Make decision without regard to the current state of the network

Closed Loop monitor the system to detect congestion (where and

when) pass this information to places where action can be

taken adjust system operation to correct the problem

Page 40: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 40

Congestion Control Algorithm Taxonomy (closed loop)

explicit feedback Packets are sent back from the point of

congestion to warn the source. implicit feedback

The source deduces the existence of congestion by making local observations, such as the acknowledgement time.

Page 41: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 41

Load Shedding

when routers are being inundated by packets that they can not handle, they just throw them away.

Packet discarding policy Wine: Old is better than new. Milk: New is better than old. Priority Control

Page 42: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 42

Jitter Control

The jitter is the amount of variation in the end-to-end packet transit time.

The jitter can be bounded by computing the expected transit time for each hop along the path. When a packet arrives at a router, the router checks to

see how much the packet is behind or ahead of its schedule. This information is stored in the packet and updated at each hop. If the packet is ahead of schedule, it may be held just enough to get it back on schedule. If it is behind schedule, the router tries to get it out the door quickly.

Page 43: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 43

Congestion Control for Multicasting

Multicast flows from multiple sources to multiple destinations (cable television)

if it is the sender that reserves bandwidth each sender should track membership changes regenerate the spanning tree at each change

RSVP (Resource reSerVation Protocol) it is the receiver that reserves bandwidth

Page 44: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 44

Bandwidth ReservationSenders

Receivers

1 2

3 4 5

Senders

Receivers

1 2

3 4 5

Senders1 2

3 4 5

Bandwidthreservedfor source 1

Bandwidthreservedfor source 1

Bandwidthreservedfor source 2

Page 45: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 45

X.25

Internetworking

B

802.4 LAN802.3 LAN

802.5 LAN

R

DECnet

R

SNA

R

R

Page 46: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 46

Internetworking

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

7

6

5

4

3

2

1

Layer

APDU

PPDU

SPDU

TPDU

Packet

Frame

Bit

Application Protocol

Presentation Protocol

Session Protocol

Transport Protocol

Host A Host B

Network

Data Link

Physical

Network

Data Link

Physical

Router Router

Internal Subnet Protocol

Page 47: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 47

How Networks Differ

Service offered Connection-oriented versus Connectionless

Protocol IP, IPX, CLNP, AppleTalk, DECnet, etc.

Addressing Flat (802) versus hierarchical (IP, PDN, PSTN, IS

DN, etc.) Multicasting/Broadcasting

Present or absent

Page 48: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 48

How Networks Differ (Cont.)

Packet size Every network has its own maximum

Quality of service Present or absent

Error handling Reliable, ordered, and unordered delivery

Flow control Sliding window, rate control, others, or none

Page 49: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 49

How Networks Differ (Cont.)

Congestion control Leaky bucket, choke packets, etc.

Security Privacy rules, encryption, etc.

Parameters Different timeouts, flow specifications, etc.

Accounting By connection time, by packet, by byte, or not at

all

Page 50: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 50

Tunneling

EthernetEthernet

RR

WAN

IP

Ethernet header

Ethernet frame

IP

WAN packet header

WAN packet

IP

Ethernet header

Ethernet frame

Using encapsulation of IP packetsThe same type of network

Page 51: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 51

Firewalls

Packet filter router is a router equipped with some extra functionality that allows every incoming or outgoing packet to be inspected.

Application gateway (e.g.a mail gateway) may examine headers and/or contents of messages.

ApplicationGateway

PacketFilteringRouter

PacketFilteringRouter

Inside Outsid

e

Page 52: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 52

Internet Network Layer Protocol

The IP (Internal Protocol) Protocol IP Addressing Subnets Internet Control Protocols

The Internet Control Message Protocol (ICMP) The Address Resolution Protocol (ARP) The Reverse Address Resolution Protocol

(RARP)

Page 53: QSpiders - Good to Know Network Concepts

Computer Networks - Network Layer 53

Internet Network Layer Protocol

The Interior Gateway Routing Protocol: Open Shortest Path First (OSPF)

The Exterior Gateway Routing Protocol: Border Gateway Protocol (BGP)

Internet Multicasting Mobile IP Classless InterDomain Routing (CIDR) IPv4 IPv6

Page 54: QSpiders - Good to Know Network Concepts

54

IPv4 Header Format

• Version – The IP version number, 4. • Header length – The length of the datagram header in 32-

bit words. • Type of service – Contains five subfields that specify the

precedence, delay, throughput, reliability, and cost desired for a packet. (The Internet does not guarantee this request.) This field is not widely used on the Internet.

• Total length – The length of the datagram in bytes including the header, options, and the appended transport protocol segment or packet. The maximum length is 65535 bytes.

• Identification – An integer that identifies the datagram. • DF – Don’t fragment

Page 55: QSpiders - Good to Know Network Concepts

55

IPv4 header format

• MF – More Fragments. All fragments except the last one have this bit set.

• Fragment offset – The relative position of this fragment measured from the beginning of the original datagram in units of 8 bytes.

• Time to live – How many routers a datagram can pass through. Each router decrements this value by 1 until it reaches 0 when the datagram is discarded. This keeps misrouted datagrams from remaining on the Internet forever.

• Protocol – The high-level protocol type.

Page 56: QSpiders - Good to Know Network Concepts

56

IPv4 header format

• Header checksum – A number that is computed to ensure the integrity of the header values.

• Source address – The 32-bit IPv4 address of the sending host.

• Destination address – The 32-bit IPv4 address of the receiving host.

• Options – A list of optional specifications for security restrictions, route recording, and source routing. Not every datagram specifies an options field.

• Padding – Null bytes which are added to make the header length an integral multiple of 32 bytes as required by the header length field.

Page 57: QSpiders - Good to Know Network Concepts

57

The IP Protocol

The IPv4 (Internet Protocol) header.

Page 58: QSpiders - Good to Know Network Concepts

58

The IP Protocol

Some of the IP options.

5-54

• http://www.iana.org/assignments/ip-parameters

Page 59: QSpiders - Good to Know Network Concepts

59

IP Addresses

• An IP address really refers to a network interface, so if a hosts are on two network, it must have two IP addresses.

• Traditionally, IP addresses were divided into the five categories: A, B, C, D, E.

• Network numbers are managed by a nonprofit corporation called ICANN (Internet Corporation for Assigned Names and Numbers) to avoid conflicts.

• Network address, which are 32-bit numbers, are usually written in dotted decimal notation. In this format, each of the 4 bytes is written in decimal, from 0 to 255, usually beginning with the network address and ending in the host address.– For example, the 32-bit hexadecimal address C0290614 is written as

192.41.6.20.

Page 60: QSpiders - Good to Know Network Concepts

60

IP Addresses

IP address formats.

Page 61: QSpiders - Good to Know Network Concepts

61

IP Addresses

• The value 0 means this network or this host. The value of -1 (all 1s) is used as a broadcast address to mean all hosts on the indicated network.

• 0.0.0.0 is used by hosts when booted. • IP addresses with 0 as network number refer to

the current network. 156.26.10.0.• 255.255.255.255 broadcast on local network • The addresses with a network number and all 1s

in the host field allow machines to broadcast to remote LANs.

• 127.0.0.1, loopback

Page 62: QSpiders - Good to Know Network Concepts

62

IP Addresses

Special IP addresses.

Page 63: QSpiders - Good to Know Network Concepts

63

IP Addresses• dig - DNS lookup utility

cs742@kirk:~$ dig www

; <<>> DiG 9.2.1 <<>> www;; global options: printcmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 28011;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:;www. IN A

;; AUTHORITY SECTION:. 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-

GRS.COM. 2003110201 1800 900 604800 86400

;; Query time: 139 msec;; SERVER: 156.26.10.130#53(156.26.10.130);; WHEN: Sun Nov 2 21:32:40 2003;; MSG SIZE rcvd: 96

Page 64: QSpiders - Good to Know Network Concepts

64

IP Addresses• nslookup – query Internet name servers

interactivelycs742@kirk:~$ nslookup www.wichita.eduNote: nslookup is deprecated and may be removed from future releases.Consider using the `dig' or `host' programs instead. Run nslookup withthe `-sil[ent]' option to prevent this message from appearing.Server: 156.26.10.130Address: 156.26.10.130#53

www.wichita.edu canonical name = BLANCA.wichita.edu.Name: BLANCA.wichita.eduAddress: 156.26.1.160

• Find out the address in Windows: ipconfig/all

Page 65: QSpiders - Good to Know Network Concepts

65

What is IPv6?• IPv6 stands for "Internet Protocol Version 6“ and

is also referred to as IPng (IP next generation). • IPv6 is the protocol designed by the IETF (The

Internet Engineering Task Force) to replace the current version Internet Protocol, IP Version 4 (IPv4).

• The core set of IPv6 protocols were made an IETF Draft Standard on August 10, 1998.

• For more information about IPv6, refer to http://www.ipv6.org/.

Page 66: QSpiders - Good to Know Network Concepts

66

Why is IPv6? More Addresses!• IP address allocation history:

1981 ~ IPv4 protocol published1985 ~ 1/16 total space1990 ~ 1/8 total space1995 ~ 1/4 total space2000 ~ 1/2 total space

• More addresses are needed despite increasingly intense conservation efforts– CIDR (classless inter-domain routing)– PPP address sharing– NAT (network address translation)

• Theoretical limit of 32-bit space: ~4 billion devicesPractical limit of 32-bit space: ~250 million devices

Page 67: QSpiders - Good to Know Network Concepts

67

IPv6• IPv6 major goals were:

– Support billions of hosts, even with inefficient address space allocation.

– Reduce the size of the routing tables.– Simplify the protocol, to allow routers to process packets

faster.– Provide better security (authentication and privacy) than

current IP.– Pay more attention to type of service, particularly for

real-time data. – Aid multicasting by allowing scopes to be specified.– Make it possible for a host to roam without changing its

address.– Allow the protocol to evolve in the future.– Permit the old and new protocols to coexist for years.

Page 68: QSpiders - Good to Know Network Concepts

68

IPv6• SIPP (Simple Internet Protocol Plus) was

selected and given the designation IPv6.• The main features of IPv6:

– IPv6 has longer addresses than IPv4.– Improved header processing with better support for

options and enhanced routing functionality– Auto-configuration– Better security support– Better support for Quality of Service (QoS)

Page 69: QSpiders - Good to Know Network Concepts

69

What’s new in IPv6• Bigger Address Space

– 128 bits: solving the address shortage issue: 232 (4.2 billion) to 2128 (340 undecillion or 3.4 x 1038)

– There are enough IPv6 address to assign • 1 million networks per human• A separate IPv6 address on every square inch of every

planet in the solar system• Improved Header Processing and Enhanced

routing functionality– Redefinition of IP options in header (7 versus 13 in IPv4)

• Format is improved for quicker processing• Some fields are classified such that they may be ignored

by intermediate nodes– Inclusion of flow label– Elimination of checksum (let higher layer to compute

their own checksum) – Enhanced routing functionality such as roaming a host

Page 70: QSpiders - Good to Know Network Concepts

70

What’s new in IPv6• Auto-configuration

– Reduced Administrative Overhead• Much of the administrative load for IPv4 nodes involves

allocating and managing their IPv4 addresses• IPv6 nodes are able to configure their addresses

automatically (Plug and play)– Support renumbering

• Experience has shown that Internet nodes don’t keep the same IP address for their life time

• A network (e.g., an enterprise intranet) will need renumber based on topology change (wholesale reconnection to another ISP)

• An IPv6 node discovers the need for configuring a new IPv6 address for itself.

Page 71: QSpiders - Good to Know Network Concepts

71

What’s new in IPv6• Better security support

– Reduced Administrative Overhead• Much of the administrative load for IPv4 nodes involves

allocating and managing their IPv4 addresses• IPv6 nodes are able to configure their addresses

automatically (Plug and play)• Support renumbering

– Experience has shown that Internet nodes don’t keep the same IP address for their life time

– A network (e.g., an enterprise intranet) will need renumber based on topology change (wholesale reconnection to another ISP)

– An IPv6 node discovers the need for configuring a new IPv6 address for itself.

Page 72: QSpiders - Good to Know Network Concepts

72

Why isn't IPv6 here now?

• Why isn't IPv6 here now? – The situation of lack of address spaces are different

in different countries.– Some transition solutions such as NAT (Network

Address Translation) are there.– There are still not so many applications available for

IPv6. – But mobile phones have pushed fast deployment of

IPv6.

Page 73: QSpiders - Good to Know Network Concepts

73

The Main IPv6 Header

The IPv6 fixed header (required).

Page 74: QSpiders - Good to Know Network Concepts

74

The Main IPv6 Header• Version. 4 bits. - IPv6 version number.• Traffic Class. 8 bits. - Internet traffic priority

delivery value.• Flow Label. 20 bits. - Used for specifying special

router handling from source to destination(s) for a sequence of packets.

• Payload Length. 16 bits, unsigned. - Specifies the length of the data in the packet. When set to zero, the option is a hop-by-hop Jumbo payload.

• Next Header. 8 bits. - Specifies the next encapsulated protocol. The values are compatible with those specified for the IPv4 protocol field.

Page 75: QSpiders - Good to Know Network Concepts

75

The Main IPv6 Header

• Hop Limit. 8 bits, unsigned. -For each router that forwards the packet, the hop limit is decremented by 1. When the hop limit field reaches zero, the packet is discarded. This replaces the TTL field in the IPv4 header that was originally intended to be used as a time based hop limit.

• Source address. 16 bytes. - The IPv6 address of the sending node.

• Destination address. 16 bytes. -The IPv6 address of the destination node.

Page 76: QSpiders - Good to Know Network Concepts

76

How Was IPv6 Address Size Chosen?• Some wanted fixed-length, 64-bit addresses

– easily good for 1012 sites, 1015 nodes, at .0001 allocation efficiency

– minimizes growth of per-packet header overhead– efficient for software processing

• Some wanted variable-length, up to 160 bits– compatible with OSI NSAP addressing plans– big enough for auto-configuration using IEEE 802

addresses– could start with addresses shorter than 64 bits & grow

later• Settled on fixed-length, 128-bit addresses

(340,282,366,920,938,463,463,374,607,431,768,211,456 in all!)

Page 77: QSpiders - Good to Know Network Concepts

77

IPv6 Addresses• Classless addressing/routing (similar to CIDR)• Notation: x:x:x:x:x:x:x:x (x = 16-bit hex number)

– Contiguous 0s are compressed: 47CD::A456:0124 = 47CD:0000:0000:0000:0000:0000:A456:0124

– IPv6 compatible IPv4 address: ::128.42.1.87• Address assignment

– provider-based (can’t change provider easily)– Geographic

• IPv6 has many different kinds of addresses– unicast, anycast, multicast, loopback, IPv4-embedded,

care-of, manually-assigned, DHCP-assigned, self-assigned, solicited-node, and more.

– One simplification: no broadcast addresses in IPv6! – uses multicast to achieve same effects

Page 78: QSpiders - Good to Know Network Concepts

78

Prefix0000 00000000 00010000 0010000 0100000 0110000 1000100101001110010111011101111 01111 101111 1101111 1110 01111 1110 101111 1110 111111 1111

UseReservedUnassignedReserved for NSAP AllocationReserved for IPX AllocationUnassignedUnassignedUnassignedUnassignedProvider-Based Unicast Address IPV4-likeUnassignedReserved for Geographic-Based Unicast Addresses UnassignedUnassignedUnassignedUnassignedUnassignedUnassignedUnassignedLink Local Use Addresses no global uniquenessSite Local Use Addresses no global uniquenessMulticast Addresses

Page 79: QSpiders - Good to Know Network Concepts

79

IPv6 – Multicast and Anycast

• IPv6 describes rules for three types of addressing: unicast (one host to one other host), anycast (one host to at least one of multiple hosts), and multicast (one host to multiple hosts).

• The introduction of an "anycast" address provides the possibility of sending a message to the nearest of several possible gateway hosts with the idea that any one of them can manage the forwarding of the packet to others.

• Anycast messages can be used to update routing tables along the line.

Page 80: QSpiders - Good to Know Network Concepts

80

IP version 6 – Future Evolution

• The next header field provides for future evolution.

• If non-zero, it specifies an extension header type in the packet.

• The extension header types include the services for router information, route definition, fragment handling, authentication, encryption information, and destination information.

• Each extension header type has a specific size and format and is transmitted after the basic header and before the payload.

Page 81: QSpiders - Good to Know Network Concepts

81

Extension Headers

IPv6 extension headers.

5-69

Page 82: QSpiders - Good to Know Network Concepts

82

Extension Headers

The hop-by-hop extension header for large datagrams (jumbograms).

The extension header for routing.

Page 83: QSpiders - Good to Know Network Concepts

83

IPv6 Security and Evolution• The advantage of implementing security at the IP level

is that it can be applied without the need for security-aware implementations of application programs.

• Security in IPv6 is implemented through the authentication and encrypted security payload extension header types , for ensuring data integrity, and for ensuring privacy.

• Instead, isolated “island” of IPv6 will converted, initially communicating via tunnels. As the IPv6 islands grow, they will merge into bigger islands. Eventually, all the islands will merge, and the Internet will be fully converted.