9 ipv6-routing

45
Week 9 IPv6 Routing in IP networks

Upload: olivier-bonaventure

Post on 05-Jul-2015

450 views

Category:

Engineering


1 download

DESCRIPTION

IP6, Routing protocols, Interdomain routing basics

TRANSCRIPT

Page 1: 9 ipv6-routing

Week 9IPv6

Routing in IP networks

Page 2: 9 ipv6-routing

Agenda

• IPv6

• Addressing architecture

• Packets

• ICMPv6

• Routing in IP networks

Page 3: 9 ipv6-routing

IPv6 unicast addresses

interface ID

128 bits

N bits M bits 128-N-M bits

Usually 64 bitsBased on MAC Address

Can be used to identify the ISP responsible for this address

A subnet in this ISP ora customer of this ISP

global routing prefix subnet ID

Page 4: 9 ipv6-routing

IPv6 link-local

addresses• Used by devices on same LAN to exchange

IPv6 packets when they don't have/need

globally routable address

• Each host/router must generate one link

local address for each of its interfaces

• Each IPv6 host uses several IPv6

addresses

interface ID

128 bits

10 bits 54 bits 64 bits

FE80 0000000000.....00000000000

Page 5: 9 ipv6-routing

IPv6 Multicast• An IPv6 multicast address identifies

a group a receivers

Group ID

128 bits

8 bits 4 bits 112 bits4 bits

Node local-scopeLink-local scopeSubnet local-scopeSite local-scopeOrganisation local-scopeGlobal scope

Permanent AddressTemporary Address

11111111 flags scope

• All hosts : FF02::1 • All routers : FF02::2

Page 6: 9 ipv6-routing

Agenda

• IPv6

• Addressing architecture

• Packets

• ICMPv6

• Routing in IP networks

Page 7: 9 ipv6-routing

IPv6 packet format

32 bits

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

Version=6

Traffic class

Size of packetcontent in bytes

Unclear utilisation

Same as TTL

Used to identify the typeof the next header found

in the packet payload

Page 8: 9 ipv6-routing

Sample IPv6 packets

• Identification of a transport (UDP/TCP) flow

• IPv6 source/destination, Source/Destination ports

32 bits

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

Source port Destination port

Length Checksum

UDP

32 bits

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

TCP

UDP

TCP

Page 9: 9 ipv6-routing

Packet forwarding• IPv6 uses longest match

• Example

Packets to 2001:6a8:3080::1234,

2001:1890:123a::1:1e,

2001:6a8:3880:40::2

Destination Gateway

::/0 fe80::dead:beef

::1 ::1

2a02:2788:2c4:16f::/64 eth0

2001:6a8:3080::/48 fe80::bad:cafe

2001:6a8:2d80::/48 fe80::bad:bad

2001:6a8::/32 fe80::aaaa:bbbb

Page 10: 9 ipv6-routing

Extension headers

• Hop-by-Hop Options

• Routing (Type 0 and Type 2)

• Fragment

• Destination Options

• Authentication

• Encapsulating Security Payload

• Each header must be encoded as n*64

bits

Page 11: 9 ipv6-routing

Packet fragmentation

• How to handle this network ?

R1 R2

MTU:1500MTU:1400

MTU:1300

Page 12: 9 ipv6-routing

Packet fragmentation• IPv4 used packet fragmentation on routers

• All hosts must handle 576+ bytes

packets

• experience showed fragmentation is

costly for routers and difficult to

implement in hardware

• PathMTU discovery

• widely implemented in TCP stacks

Page 13: 9 ipv6-routing

Packet fragmentation• IPv6 requires that every link in the

internet have an MTU of 1280 octets or

more

• Routers do not perform fragmentation

• Only end hosts perform

fragmentation and reassembly by

using the fragmentation header

• But PathMTU discovery should

avoid fragmentation most of the

time

Page 14: 9 ipv6-routing

A fragmented packet

32 bits

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

Source port Destination port

Length Checksum

UDP (first part)

44:fragment

Nxt Hdr Zero Frag. Offset 0 M

Fragment identification = 1234

UDP

32 bits

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

44:fragment

Nxt Hdr Zero Frag. Offset 0 M

Fragment identification = 1234

None

True

False

First fragment Second (and last) fragment

(end of UDP segment)

Page 15: 9 ipv6-routing

Agenda

• IPv6

• Addressing architecture

• Packets

• ICMPv6

• Routing in IP networks

Page 16: 9 ipv6-routing

ICMPv6• Types of ICMPv6 messages

• Destination (addr,net,port) unreachable

• Packet too big

• Used for PathMTU discovery

• Time expired (Hop limit exhausted)

• Echo request and echo reply

• Multicast group membership

• Router advertisments, Neighbor discovery

• Autoconfiguration

Page 17: 9 ipv6-routing

ICMPv6 packet

• Type• ICMPv6 error messages • 1 Destination Unreachable • 3 Time Exceeded • 2 Packet Too Big • 4 Parameter Problem

• ICMPv6 informational messages:• 128 Echo Request • 129 Echo Reply

Type Code Checksum

Message body

Ver Tclass Flow Label

NxtHdr Hop Limit

Source IPv6 address(128 bits)

Payload Length

Destination IPv6 address(128 bits)

58 for ICMPv6

Covers ICMPv6 message and part of IPv6 header

Page 18: 9 ipv6-routing

traceroute6 in details

• Source sends UDP segments with

increasing hop limit

• Intermediate routers reply with ICMP

Time Exceeded messages

Page 19: 9 ipv6-routing

traceroute6traceroute6 to star.c10r.facebook.com (2a03:2880:2130:cf05:face:b00c::1) from 2001:6a8:3080:2:451c:db2:a92f:3d50, 64 hops max, 12 byte packets

1 2001:6a8:3080:2::1 0.329 ms

2 2001:6a8:3000:8000::1 0.582 ms

3 2001:6a8:0:6009::1 1.505 ms

4 2001:7f8:1::a503:2934:1 8.167 ms

5 2620:0:1cff:dead:beef::34c 8.091 ms

6 2620:0:1cff:dead:beef::2d9 13.922 ms

7 2620:0:1cff:dead:beef::2dc 108.487 ms

8 2620:0:1cff:dead:beef::9a7 106.722 ms

9 2620:0:1cff:dead:beef::12a8 103.758 ms

10 2620:0:1cff:dead:beef::999 105.648 ms

Page 20: 9 ipv6-routing

traceroute

A’s routing table

destination interface/NH

::/0 2001:db8:7::B

2001:db8:7/48 2001:db8:4::C

2001:db8:1/48 West

2001:db8:4/48 East

2001:db8:7/48 North

B’s routing table

destination interface/NH

::/0 2001:db8:5::C

2001:db8:2/47 2001:db8:6::E

2001:db8:5/48 South

2001:db8:6/48 East

2001:db8:7/48 West

C’s routing table

destination interface/NH

2001:db8:1/48 2001:db8:5::B

2001:db8:2/47 2001:db8:3::E

2001:db8:2/48 2001:db8:5::B

2001:db8:3/48 East

2001:db8:4/48 West

2001:db8:5/48 North

2001:db8:6/47

2001:db8:5::B

E’s routing table

destination interface/NH

::/0 2001:db8:6::B

2001:db8:2/48 East

2001:db8:3/48 West

2001:db8:6/48 North

RA

RB

RC RE

2001:db8:1/48

2001:db8:7/482001:db8:6/48

2001:db8:5/48

2001:db8:4/48 2001:db8:3/482001:db8:2/48

Page 21: 9 ipv6-routing

Agenda

• IPv6

• Routing in IP networks

• IPv6 subnets

• Routing organization

• Interdomain routing

Page 22: 9 ipv6-routing

Datalink layer service

• Each device is identified by a 48 bits

MAC address in the datalink layer

• Ethernet, WiFi

• Unicast transmission

• Multicast transmission

Page 23: 9 ipv6-routing

IPv6 subnet

• A subnet gathers hosts and routers that

can directly exchange frames without

passing through an intermediate route

R

2001:db8:1234:5678::/64

2001:db8:1234:5678::AA

2001:db8:1234:5678::BB

2001:db8:1234:5678::CC

2001:db8:1234:5678::1

Page 24: 9 ipv6-routing

Issues

• How to easily assign IPv6 addresses to

hosts ?

• Manual configuration is not viable

• How to map IPv6 addresses onto the

corresponding MAC addresses ?

Page 25: 9 ipv6-routing

IPv6 over Ethernet

IPv6: 2001:0:0:0:8::AEth : A

2001:0:0:0:8::A wants to send a packet to 2001:0:0:0:8::C

Neighbor solicitation: Addr Eth 2001:0:0:0:8::C ? sent to IPv6 multicast address

1

2

3

IPv6: 2001:0:0:0:8::EEth : E

Ipv6: 2001:0:0:0:8::CEth : C

Ipv6: 2001:0:0:0:8::CEth : C

IPv6: 2001:0:0:0:8::EEth : E

IPv6: 2001:0:0:0:8::AEth : A

Neighbor advertisement: 2001:0:0:0:8::C is reachable via Ethernet Add : C

IPv6: 2001:0:0:0:8::CEth : C

IPv6: 2001:0:0:0:8::EEth : E

IPv6: 2001:0:0:0:8::AEth : A

Page 26: 9 ipv6-routing

Agenda

• IPv6

• Routing in IP networks

• IPv6 subnets

• Routing organization

• Interdomain routing

Page 27: 9 ipv6-routing

Internet organisation

• Internet is an internetwork with a large number of Autonomous Systems (AS)

• an AS is a set of routers that are managed by the same administrative entity

• Autonomous Systems are interconnected to allow the transmission of IP packets from any source to any destination

• On the Internet, most packets need to travel through several transit Autonomous Systems

Page 28: 9 ipv6-routing

Types of domains

• Transit domain

• A transit domain allows external domains to use its infrastructure to send packets to other domains

• Examples

• UUNet, OpenTransit, GEANT, Internet2, RENATER, EQUANT, BT, Telia, Level3,...

T1 T2

T3

S1

S2 S3

S4

Page 29: 9 ipv6-routing

Stub domainsA stub domain does not allow external domains to use its infrastructure to send packets to other domains

A stub is connected to at least one transit domain

Content-rich stub domain : Yahoo, Google, MSN, TF1, BBC,...

Access-rich stub domain : ISPs providing Internet access via CATV, ADSL, ...

T1 T2

T3

S1

S2 S3

S4

Page 30: 9 ipv6-routing

Belnet

Source : http://www.belnet.be

Page 31: 9 ipv6-routing

GEANT

Source : http://www.belnet.be

Page 32: 9 ipv6-routing

Level3

Source http://www.uu.net

Page 33: 9 ipv6-routing

Internet routing

• Exterior Gateway Protocol (EGP)

• Routing of IP packets between domains

• Each domain is considered as a blackbox

• Interior Gateway Protocol (IGP)• Routing of IP packets inside each domain• Only knows topology of its domain

Domain1

Domain2

Domain3

Domain4

Page 34: 9 ipv6-routing

Intradomain routing

• Static routing

• Only useful in very small domains

• Distance vector routing

• Routing Information Protocol (RIP)

• Link-state routing

• Open Shortest Path First (OSPF)

• Intermediate System- Intermediate-System (IS-IS)

Page 35: 9 ipv6-routing

Intradomain routing

• Goal

• Allow routers to transmit IP packets along the best path towards their destination

• best usually means the shortest path

• Shortest measured in seconds or hops

• sometimes best means the less loaded path

• Alternate routes in case of failures

• Behaviour

• All routers exchange routing information

Page 36: 9 ipv6-routing

Agenda

• IPv6

• Routing in IP networks

• IPv6 subnets

• Routing organization

• Interdomain routing

Page 37: 9 ipv6-routing

Interdomain routing• Goals

• Allow to transmit IP packets along the best path towards their destination through several transit domains while taking into account their routing policies of each domain without knowing their detailed topology

• From an interdomain viewpoint, best pathoften means cheapest path

• Each domain is free to specify inside its routing policy the domains for which it agrees to provide a transit service and the method it uses to select the best path to reach each destination

Page 38: 9 ipv6-routing

Interdomain links

• Private link

• Usually a leased line between two routers belonging to the two connected domains

R1 R2

DomainA DomainB

Page 39: 9 ipv6-routing

Interconnection

exchanges• How to efficiently connect several

domains together ?

R1

R2R3

R4

Physical link

Interdomain link

Page 40: 9 ipv6-routing

Routing policies

• In theory BGP allows each domain to define its own routing policy...

• In practice there are two common policies

• customer-provider peering

• Customer c buys Internet connectivity from provider P

• shared-cost peering

• Domains x and y agree to exchange packets without any payment

Page 41: 9 ipv6-routing

Customer Provider

Customer-provider peering

• Principle

• Customer sends to its provider internal routes and routes learned from its customers

• Provider will advertise those routes to the entire Internet to allow anyone to reach the Customer

• Provider sends to its customers all known routes

• Customer will reach anyone on the Internet

AS2AS1

AS3 AS4

AS7

$ $ $

$

$

Page 42: 9 ipv6-routing

Customer-provider peering : example

• AS7-AS4 peering link

• AS7 advertises its routes to AS4

• AS4 advertises to AS7 all its routes

• AS4-AS2 peering link

• AS4 advertises its own routes and those of its customers (AS7)

• AS2 advertises to AS2 all known routes

AS2AS1

AS3 AS4

AS7

$Customer-provider

$ $ $

$

Page 43: 9 ipv6-routing

Shared-cost peering

AS2AS1

AS3 AS4

AS7

$Customer-provider

$ $ $

$

Shared-cost

• Principle

• PeerX sends to PeerY its internal routes and the routes learned from its own customers

• PeerY sends to PeerX its internal routes and the routes learned from its own customers

Page 44: 9 ipv6-routing

Routing policies

• A domain specifies its routing policy by defining two sets of filters for each peer

• Import filter

• Specifies which routes can be accepted by the router among all the received routes from a given peer

• Export filter

• Specifies which routes can be advertised by the router to a given peer

Page 45: 9 ipv6-routing

Routing policies

AS2AS1

AS3 AS4

AS7

$Customer-provider

$ $ $

$

Shared-cost

Import policy for AS4Import: from AS3 accept AS3import: from AS7 accept AS7import: from AS1 accept ANYimport: from AS2 accept ANY

Export policy for AS4export: to AS3 announce AS4 AS7export: to AS7 announce ANYexport: to AS1 announce AS4 AS7export: to AS2 announce AS4 AS7

Import policy for AS7Import: from AS4 accept ANY

Export policy for AS4export: to AS4 announce AS7