93
資 資 Lee <Lesson 6-1> Lesson 6 IPv4: ARP, RARP IPv6: Neighbor Discovery

資 管 Lee Lesson 6 IPv4: ARP, RARP IPv6: Neighbor Discovery

Embed Size (px)

Citation preview

Lesson 6

Lesson 6IPv4: ARP, RARPIPv6: Neighbor Discovery Lee

ARP and RARP in IPv4

Lee

ARPARP (Address Resolution Protocol): associates an IP address with its physical address

I am looking for the physical address of a node whose IP address is: 141.23.56.23Requesta. ARP request is broadcast

Replya. ARP request is broadcastb. ARP reply is unicast Lee

ARP Packet FormatHardware TypeProtocol TypeHardware lengthProtocol lengthOperationRequest 1, Reply 2Sender hardware address(For example, 6bytes for Ethernet)Sender Protocol address(For example, 4 bytes for IP)Target hardware address(For example, 6bytes for Ethernet, not filled in a request)Target protocol address(For example, 4 bytes for IP)HTYPE: 16 bit field defining the type of the network on which ARP is running, Ethernet is given type 1.Protocol type: 16 bits defines the protocol. The value of this field for the IPv4 is 080016.Hardware length: for Ethernet , value is six.Protocol length. For IPv4 , value is four. Lee

Embedded into Ethernet FramePreamble and SFDDestination addressSource addressData(ARP request)Type16 bitsCRC32 bitsARP request or reply packet Lee

ARP Operation Steps Involved[ARP request]Sender knows the IP address of the target.IP asks ARP to create a request ARP message, filling in the sender physical address, the sender IP address, and the target IP address. The target physical address field is filled with 0s.The message is passed to the data link layer where it is encapsulated in a frame using the physical address of the sender as the source address and the physical broadcast address as the destination address.[Middle]Every host or router receives the frame. Because the frame contains a broadcast destination address, all stations remove the message and pass it to ARP. All nodes except the one targeted drop the packet. The target node recognizes the IP address.[ARP reply]The target machine replies with an ARP message that contains its physical address.The sender receives the reply message.The IP datagram, which carries data for the target node, is now encapsulated in a frame and is unicast to the destination. Lee

ARP ExampleAssume: Router R1 for destination 192.16.7.14, fill the ARP packet format. Interface m0: MAC address: 003D33AB44F0, Interface m1: MAC address: 003D33AB44F1, Interface m2: MAC address: 003D33AB44F2.Hardware TypeProtocol TypeHardware lengthProtocol lengthOperationRequest 1, Reply 2Sender hardware address(For example, 6bytes for Ethernet)Sender Protocol address(For example, 4 bytes for IP)Target hardware address(For example, 6bytes for Ethernet, not filled in a request)Target protocol address(For example, 4 bytes for IP) Lee

MaskDest.addressNext-hopaddressFlagsRCUseInterface255.0.0.0111.0.0.0-U00m0255.255.255.224193.14.5.160-U00m2255.255.255.224193.14.5.192-U00m1255.255.255.255194.17.21.16111.20.18.14UGH00m0255.255.255.0192.16.7.0111.15.17.32UG00m0255.255.255.0194.17.21.0111.20.18.14UG00m00.0.0.00.0.0.0111.30.31.18UG00m0Routing table for router R1 Example: Router R1 receives 500 packets for destination 192.16.7.14; the algorithm applies:1. Direct delivery a. 192.16.7.14& 255.0.0.0 192.0.0.0 no match b. 192.16.7.14& 255.255.255.224 192.16.7.0 no match c. 192.16.7.14& 255.255.255.224 192.16.7.0 no match2. Host-specific a.192.16.7.14& 255.255.255.255 192.16.7.14no match3. Network-specific a. 192.16.7.14& 255.255.255.0 192.16.7.0 match { the router sends the packet through interface m0 along with the next-hop IP address (111,15.17.32) to the fragmentation module for further processing. It increments the use field by 500 and RC by 1. } Lee

ARP Operation Cases that services of ARP can be used: [host]The sender is a host and wants to send a packet to another host on the same network. (logical address maps into physical address)The sender is a host and wants to send a packet to another host on another network. In this case, the host looks its routing table and finds the IP address of the next hop for this destination. [router]The sender is a router that has received a datagram destined for a host on another network. It checks its routing table and finds the IP address of the next router.The sender is a router that has received a datagram destined for a host in the same network. Lee

RARP (Reverse Address Resolution Protocol): associates its physical address with an IP address

My physical address is: A46EA4578236 I am looking for the IP address Requesta. RARP request is broadcast

Replya. ARP request is broadcastb. RARP reply is unicastRARP serverRARP serverYour IP address is: 141.14.56.21 Lee

RARP Packet FormatHardware TypeProtocol TypeHardware lengthProtocol lengthOperationRequest 3, Reply 4Sender hardware address(For example, 6bytes for Ethernet)Sender Protocol address(For example, 4 bytes for IP)Target hardware address(For example, 6bytes for Ethernet, not filled in a request)Target protocol address(For example, 4 bytes for IP)HTYPE: 16 bit field defining the type of the network on which ARP is running, Ethernet is given type 1. Lee

RARP Embedded into Ethernet FramePreamble and SFDDestination addressSource addressData(RARP request)Type16 bitsCRC32 bits Lee

ARP and RARP in IPv4IGMPICMPIP (version 4)ARPRARPIGMPICMPIP (Version 6)Replace ARP and RARP with ICMP in IPv6 Lee

Lesson ObjectivesNeighbor Discovery functions, options, mssagesNeighbor Discovery functions :Address resolutionneighbor unreachability detectionduplicate address detectionrouter discoveryredirect processesHost sending algorithmHosts data structure and ND protocol Lee

Neighbor Discovery OverviewSet of messages and processes that determine relationships between neighboring nodesReplaces ARP, ICMPv4 Router Discovery, and ICMPv4 RedirectND is used by nodes:Resolve link-layer address Determine link-layer address changesDetermine whether neighbor reachableND is used by hosts:Discover neighboring routersAutoconfigure addresses, address prefixes, and other configuration parametersND is used by routers:Advertise their presence, host configuration parameters, and on-link prefixesInform hosts of a better next-hop address to forward packets for a specific destination Lee

Neighbor Discovery ProcessesTypical processes:Address resolutionRouter discoveryPrefix discoveryParameter discoveryAddress autoconfigurationNext-hop determinationNeighbor unreachability detectionDuplicate address detectionRedirect function Lee

Neighbor Discovery Message FormatICMPv6 message structure (types 133 ~137)Router Solicitation (type 133), Router Advertisement (type 134), Neighbor Solicitation (type 135), Neighbor Advertisement. (type 136), Redirect (type 137)To ensure local link traffic all ND messages are sent with a hop limit of 255.When an ND message is received, the hop limit field is check to see if the value is 255.IPv6 HeaderNext Header = 58 (ICMPv6)Neighbor Discovery Message OptionsNeighbor Discovery MessageHeader (ICMPv6)

Neighbor Discovery Message Lee

Structure of ICMPv6 MessagesIPv6 HeaderNext Header =58 (ICMPv6)ICMPv6 structureTypeCodeChecksumMessage-specific dataZero or more OptionsType: Indicates the type of ICMPv6 messageCode: Differentiates among multiple messages within a given typeChecksum: stores a checksum of the ICMPv6 messageMessage body: contains ICMPv6 message-specific data and zero or more options Lee

Neighbor Discovery Option FormatND options are formatted in Type-Length-Value (TLV) formatTypeLengthValue. . .Type: indicates the type of ND options. (type 1 to 9, defined in RFC 2461, type 1 SourceLink-layer address, type 2 Target link-layer address, type 3 prefix information, type 4 redirect header, type 5 MTU, type 7 Adver. Interval, type 8 Home agent Information, Type 9 route information.Length: indicates the length of the entire option in 8-byte blocks (64 bits as a unit)Value: contains the data for the option. Lee

Neighbor Discovery OptionsType 1: Source Link-Layer AddressType 2: Target Link-Layer AddressType 3: Prefix InformationType 4: Redirected HeaderType 5: MTUType 7: Advertisement IntervalType 8: Home Agent InformationType 9: Route Information Lee

Structure of the Source and Target Link-Layer Address OptionsType 1: Source Link-Layer Address optionType 2: Target Link-Layer Address option

The Target Link-Layer Address options for Ethernet

TypeLengthLink-Layer Address. . .TypeLengthEthernet MAC Address= 1= 2= 1 Lee

Type 1: Source Link-Layer Address optionIndicates the link-layer address (MAC address) of the ND message senderIncluded in Neighbor Solicitation, Router Solicitation, Router Advertisement.Type 2: Target Link-Layer Addr. optionIndicates the link-layer address (MAC address) of the neighboring node to which IPv6 packets should be directed.Included in Router Advertisement Redirect messages.

Lee

Network Monitor Capture+ Frame: Bas frame properties+ETHERNET: EType=IPv6+IPv6: proto=ICMP6: Len=32 ICMP6:Neighbor Solicitation; Target: fe80::260:97ff:fe02:6ea5 ICMP6:Type= 135ICMP6: Code=0ICMP6:Checksum=0x0F35ICMP6:ReservedICMP6:Target Address= fe80::260:97ff:fe02:6ea5ICMP6: Source Link-Layer Address =00 10 5A AA 20 A2ICMP6:Type= 1ICMP6: Length=1ICMP6:Source Link-Layer Address=00 10 5A AA 20 A2

Source Link-Layer Address option used in a Neighbor Solicitation message Lee

Ref. Neighbor Solicitation messageTypeCodeChecksumReservedTarget Address

Options= 135= 0. . . Lee

Structure of the Neighbor Advertisement MessageTypeCodeChecksumRouter flagSolicited flagOverride flagReservedTarget Address

Options= 136= 0. . .R. F.: 1 means routerS.F.: 1 means response to SolicitationO.F.: 1 means overrides the data cache with the data in this packet Lee

Prefix List

Default Router ListDestination CacheDestinationNext-Hop AddressPMTUNeighbor CacheLink Layer AddressNext-Hop AddressStateRFC 2461 Conceptual Host Data Structures Lee

Example 1:Address Resolution ProcessObject: (ARP in IPv4)An exchange of Neighbor Solicitation and Neighbor Advertisement messages to resolve the link-layer address of the next-hop address for a given destination.Procedure:Step 1: The sending host sends a multicast Neighbor Solicitation message on the appropriate interface. Step 2: When the target host receives, it updates its own neighbor cache based on the source address of the Neighbor Solicitation message and the link-layer address. Next, it send Unicast Neighbor Advertisement message to the Neighbor Solicitation sender.Step 3: The sender updates the neighbor cache based on the Target Link-Layer Address optionAfter the above actions: Unicast traffic can now be sent Lee

Multicast Neighbor Solicitation

Host A Send multicast Neighbor SolicitationNeighbor SolicitationEthernet HeaderDestination MAC is 33-33-FF-02-6E-A5IPv6 HeaderSource Address is FE80::210:5AFF:FEAA:20A2Destination Address is FF02::1:FF02:6EA5Hop limit is 255Neighbor Solicitation HeaderTarget Address is FE80::260:97FF:FE02:6EA5Neighbor Discovery OptionSource Link-Layer Address is 00-10-5A-AA-20-A2MAC: 00-10-5A-AA-20-A2IP: FE80::210:5AFF:FEAA:20A2MAC: 00-60-97-02-6E-A5IP: FE80::260:97FF:FE02:6EA5

Assumed:Host A: Ethernet MAC address is: 00-10-5A-AA-20-A2 link-local address: FE80::210:5AFF:FEAA:20A2 Host B: Ethernet MAC address is: 00-60-97-02-6E-A5 link-local address: FE80::260:97FF:FE02:6EA5 [Host A need to resolve Host Bs Ethernet MAC address. Based on Bs IP address: FE80::260:97FF:FE02:6EA5 ] Host A sends a multicast Neighbor Solicitation message to the solicited address of FF02::1:FF02:6EA5]Host B Lee

Neighbor Solicitation Message Example+ Frame: Base frame properties ETHERNET: ETYPE = IPv6 + ETHERNET: Destination address : 3333FF026EA5 + ETHERNET: Source address : 00105AAA20A2 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::210:5aff:feaa:20a2 IP6: Destination Address = ff02::1:ff02:6ea5 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Solicitation; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Type = 135 (Neighbor Solicitation) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x0F35 ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 ICMP6: Type = 1 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 Lee

Unicast Neighbor Advertisement

Host BHost A Send unicast Neighbor AdvertisementNeighbor AdvertisementEthernet HeaderDestination MAC is 00-10-5A-AA-20-A2IPv6 HeaderSource Address is FE80::260:97FF:FE02:6EA5Destination Address is FE80::210:5AFF:FEAA:20A2Hop limit is 255Neighbor Advertisement HeaderTarget Address is FE80::260:97FF:FE02:6EA5Neighbor Discovery OptionTarget Link-Layer Address is 00-60-97-02-6E-A5

MAC: 00-10-5A-AA-20-A2IP: FE80::210:5AFF:FEAA:20A2MAC: 00-60-97-02-6E-A5IP: FE80::260:97FF:FE02:6EA5 Lee

Neighbor Advertisement Message Example+ Frame: Base frame properties ETHERNET: ETYPE = IPv6 + ETHERNET: Destination address : 00105AAA20A2 + ETHERNET: Source address : 006097026EA5 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::260:97ff:fe02:6ea5 IP6: Destination Address = fe80::210:5aff:feaa:20a2 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Advertisement; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Type = 136 (Neighbor Advertisement) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x89AC ICMP6: Router flag=0 (Not router) ICMP6: Solicited flag=1 (Solicited) ICMP6: Override flag=1 (Override) ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 Lee

Neighbor Advertisement Message Example ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Target Link-level Address = 00 60 97 02 6E A5 ICMP6: Type = 2 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 60 97 02 6E A5 Lee

Router Solicitation (type 133), Router Advertisement (type 134), Neighbor Solicitation (type 135), Neighbor Advertisement. (type 136), Redirect (type 137) Lee

Structure of the Router Advertisement MessageTypeCodeChecksumCurrent Hop LimitManaged Address Configuration flagOther Stateful Configuration flagHome Agent flagDefault Router PreferenceReservedRouter LifetimeReachable TimeRetrans TimerOptions= 134= 0. . . Lee

Current Hop Limit: default value of the hop limit field in the IPv6 header for packets sent by hosts. Value 0 indicates that default value of the hop limit field is not specified.Managed address config. flag : means the hosts must use a stateful address protocol(DHCPv6) to obtain addresses in addition to the addresses that might be derived from stateless address.Other stateful config. Flag: MUST use stateful addressHome Agent flag:Default Router Preference: 2 bits, 01 (hign), 00 (Medium), 11 (Low)Router Lifetime: max. 65535 seconds. ,value 0 means the router can not be considered a default router.Reachable Time: (in milliseconds) that a node can consider a neighboring node reachable.Retransmission Timer: indicates the amount of time (in milliseconds) between retransmissions of Neighbor Solicitation messages.Options:Source Link-Layer address optionMTU optionsPrefix Information optionsAdvertisement Interval optionHome Agent Information optionRoute Information options Lee

Structure of the Prefix Information OptionTypeLengthPrefix LengthOn-Link flagAutonomous flagRouter Address flagSite prefix flagReserved1Valid LifetimePreferred LifetimeReserved2Site Prefix LengthPrefix= 3= 4 (entire option is 32 bytes in length)Used in Router Advertisement messages to indicates both address prefixes and information about address Autoconfiguration options. Multiple prefix InformationCan be included in a option.= 32 (if e.g., 2002::Fe23/32, or 64)O.F.: 1, prefix are availableA.F.:1, included prefix is used to create an stateless address.R.A.F.:1, the prefix an address assigned t the sending router.S.P.F.:1, site prefix and site prefix length field be used to update the site prefix table. Lee

Network Monitor Capture+ Frame: Bas frame properties+ETHERNET: EType=IPv6+IPv6: proto=ICMP6: Len=96 ICMP6:Router Advertisement ICMP6:Type= 134ICMP6: Code=0ICMP6:Checksum=0xBAA5ICMP6:Current Hop Limit =0ICMP6: 0.=Not managed address configICMP6: .0=Not other stateful configICMP6: ..0...=Not a Mobile IP Home AgentICMP6: Route Preference =Medium (0)ICMP6: Router Lifetime=0ICMP6:Reachable Time=0ICMP6:Retransmission Timer =0ICMP6:Retransmission Timer =0+ICMP6:Source Link-Layer Address= 00 B0 D0 23 47 33+ICMP6:MTU=1500(0x5DC)ICMP6: Prefix = fec0:0:0:2::ICMP6:Type =3ICMP6:Length=4Prefix Information option used in a Router Advertisement message Lee

ICMP6: Prefix = fec0:0:0:2::ICMP6:Type =3ICMP6:Length=4ICMP6:Prefix Length=64ICMP6: 0. =No on-link specificationICMP6: .0 =No autonomous address configICMP6: ..0... =No router addressICMP6: 0. =Not a site prefixICMP6: ReservedICMP6: Valid Lifetime=4294967295 (0xFFFFFFFF)ICMP6: Preferred Lifetime=4294967295 (0xFFFFFFFF)ICMP6: ReservedICMP6: Site Prefix Length=0ICMP6: Prefix=fec0:0:0:2::+ICMP6: Prefix = fec0:0:0:1:: Lee

Router DiscoveryNodes discover the set of routers on the local linkIPv6 router discovery also provides:Default value of Hop Limit fieldUse of stateful address protocolReachability and retransmission timersNetwork prefixes for the linkMTU of the local linkIPv6 mobility informationRoutes Lee

Multicast Router Solicitation Message

RouterHost A Send multicast Router SolicitationRouter SolicitationEthernet HeaderDestination MAC is 33-33-00-00-00-02IPv6 HeaderSource Address is :: Destination Address is FF02::2Hop limit is 255Router Solicitation HeaderMAC: 00-B0-D0-E9-41-43 IP: noneMAC: 00-10-FF-D6-58-C0 IP: FE80::210:FFFF:FED6:58C0

Assumed:Host A with MAC address 00-B0-D0-E9-41-43 sends a multicast Router Solicitation message to the address FF02::2. Lee

Router Solicitation Message Example+ Frame: Base frame properties ETHERNET: ETYPE = IPv6 + ETHERNET: Destination address : 333300000002 + ETHERNET: Source address : 00B0D0E94143 ETHERNET: Frame Length : 62 ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 48 IP6: Proto = ICMP6; Len = 8 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 8 (0x8) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = :: IP6: Destination Address = ff02::2 IP6: Payload: Number of data bytes remaining = 8 (0x0008) ICMP6: Router Solicitation ICMP6: Type = 133 (Router Solicitation) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x7BB8 ICMP6: Reserved Lee

Multicast Router Advertisement Message

Host AEthernet HeaderDestination MAC is 33-33-00-00-00-01IPv6 HeaderSource Address is FE80::210:FFFF:FED6:58C0Destination Address is FF02::1Hop limit is 255Router Advertisement HeaderCurrent Hop Limit, Flags, Router Lifetime, Reachable and Retransmission TimersNeighbor Discovery OptionsSource Link-Layer Address is 00-10-FF-D6-58-C0MTU is 1500Prefix Information is for FEC0:0:0:F282::/64 MAC: 00-10-FF-D6-58-C0 IP: FE80::210:FFFF:FED6:58C0 Router

Send multicast Router AdvertisementRouter AdvertisementMAC: 00-B0-D0-E9-41-43 IP: none Lee

Router Advertisement message+ Frame: Bas frame properties+ETHERNET: EType=IPv6 ETHERNET: Destination address : 333300000001 ETHERNET: Source address : 0010FFD658C0 ETHERNET: Frame Length : 142 ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 128

IPv6: proto=ICMP6: Len=88 IP6: Version = 6 (0x6) IP6: Traffic Class = 7 (0x7) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 88 IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::210:ffff:fed6:58c0 IP6: Destination Address = ff02::1 IP6: Payload: Number of data bytes remaining = 88 (0x0058) Lee

ICMP6: Router Advertisement ICMP6: Type = 134 (Router Advertisement) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x4DDB ICMP6:Current Hop Limit =64 ICMP6: 0.=Not managed address config (Not DHCPv6) ICMP6: .0=Not other stateful config ICMP6: ..0...=Not a Mobile IP Home Agent ICMP6: Route Preference =Medium (0) ICMP6: Router Lifetime=1800 ICMP6:Reachable Time=0 ICMP6:Retransmission Timer =0 ICMP6:Source Link-Layer Address= 00 B0 D0 23 47 33ICMP6:Type =1ICMP6: Length =1ICMP6: Source Link-Layer Address = 00 B0 D0 23 47 33 +ICMP: MTU=1500(0x5DC) Lee

ICMP6: Prefix = 3ffe:2900:d005:f282::ICMP6:Type =3ICMP6:Length=4ICMP6:Prefix Length=64ICMP6: 0. =No on-link specificationICMP6: .0 =No autonomous address configICMP6: ..0... =No router addresssICMP6: 0. =Not a site prefixICMP6: .1 =router prefix providedICMP6: Valid Lifetime=4294967295 (0xFFFFFFFF)ICMP6: Preferred Lifetime=4294967295 (0xFFFFFFFF)ICMP6: ReservedICMP6: Site Prefix Length=0ICMP6: Prefix=fec0:0:0:2::+ICMP6: Prefix = fec0:0:0:1::

Lee

Others options Lee

Structure of the Redirected Header OptionTypeLengthReservedPortion of redirected packet. . .= 4In Redirect messages to specify the IPv6 packet that caused the router to send a Redirect message.Reserved: 48-bitPortion of redirected packet: the IPv6 packet or portion of it caused the Redirected packet Lee

Network Monitor Capture+ Frame: Bas frame properties+ETHERNET: EType=IPv6+IPv6: proto=ICMP6: Len=128 ICMP6: Redirect ICMP6:Type= 137ICMP6: Code=0ICMP6:Checksum=0x76D4ICMP6:ReservedICMP6: Target Address=fe80::2b0:d0ff:fe23:4735ICMP6: Destination Address= 3000::1ICMP6: Redirect PacketICMP6:Type =4ICMP6:Length=11ICMP6: ReservedICMP6: Redirected Packet: No. of data bytes remaining=80Redirected Header option used in a Redirect message Lee

Mixed Media Configuration

Host BFDDIEthernetBackbone

Host AFDDIEthernet SwitchEthernet SwitchIn bridged or Layer-2 switched environments, it is possible to have different link-layer technologies with different link-layer MTUs on the same link.With the MTU option, the router for the network segment reports an IPv6 MTUOf 1500 in the Router Advertisement messages for all hosts on the link. Lee

Structure of the MTU OptionTypeLengthReservedMTU= 5= 1 Lee

Network Monitor Capture+ Frame: Bas frame properties+ETHERNET: EType=IPv6+IPv6: proto=ICMP6: Len=96 ICMP6:Router Advertisement ICMP6:Type= 134ICMP6: Code=0ICMP6:Checksum=0xBAA5ICMP6:Current Hop Limit =0ICMP6: 0.=Not managed address configICMP6: .0=Not other stateful configICMP6: ..0...=Not a Mobile IP Home AgentICMP6: Route Preference =Medium (0)ICMP6: Router Lifetime=0ICMP6:Reachable Time=0ICMP6:Retransmission Timer =0ICMP6:Retransmission Timer =0+ICMP6:Source Link-Layer Address= 00 B0 D0 23 47 33ICMP6:MTU=1500(0x5DC)ICMP6:Type =5ICMP6:Length=1ICMP6: ReservedICMP6:MTU=1500(0x5DC)+ICMP: Prefix=fec0:0:0:2::MTU option used in a Router Advertisement message Lee

TypeLengthReservedAdvertisement Interval= 7= 1Structure of the Advertisement Interval OptionLength: fixed to 1Reserved:16 bitsAdv. Interval: 32-bit specifies the max. time in milliseconds between consecutive unsolicited multicast Router Adv. Messages to be sent by the home agent. Lee

TypeLengthReservedHome Agent PreferenceHome Agent Lifetime= 8= 1Structure of the Home Agent Information OptionLength: fixed to 1Reserved:16 bitsHome Agent Preference: 16-bit specifies the preference for the sending home agent. The preference is used in ordering addresses returned to a mobile node by the home agent.Home Agent Lifetime: indicates the lifetime of the home agent in seconds. Lee

Structure of the Route Information OptionTypeLengthPrefix LengthReserved 1PreferenceReserved 2Route LifetimePrefix= 9In Router Adv. Messages, specify individual routes for receiving hosts to add to their local routing table. Lee

Type 133 to 137 message body Lee

Example Configuration for Route Information Option

Router 2

Router 1

Subnet 1Subnet 2Rest of IPv6 network

Lee

Neighbor Discovery MessagesRouter SolicitationRouter AdvertisementNeighbor SolicitationNeighbor AdvertisementRedirect Lee

Structure of the Router Solicitation MessageTypeCodeChecksumReservedOptions= 133= 0. . . Lee

Structure of the Router Advertisement MessageTypeCodeChecksumCurrent Hop LimitManaged Address Configuration flagOther Stateful Configuration flagHome Agent flagDefault Router PreferenceReservedRouter LifetimeReachable TimeRetrans TimerOptions= 134= 0. . . Lee

Structure of the Neighbor Solicitation MessageTypeCodeChecksumReservedTarget Address

Options= 135= 0. . . Lee

Neighbor Solicitation Message Example+ Frame: Base frame properties ETHERNET: ETYPE = 0x86DD : Protocol = Unknown + ETHERNET: Destination address : 3333FF026EA5 + ETHERNET: Source address : 00105AAA20A2 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::210:5aff:feaa:20a2 IP6: Destination Address = ff02::1:ff02:6ea5 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Solicitation; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Checksum = 0x0F35 ICMP6: Type = 135 (Neighbor Solicitation) ICMP6: Code = 0 (0x0) ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 ICMP6: Type = 1 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 10 5A AA 20 A2+ Frame: Base frame properties ETHERNET: ETYPE = 0x86DD : Protocol = Unknown + ETHERNET: Destination address : 3333FF026EA5 + ETHERNET: Source address : 00105AAA20A2 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::210:5aff:feaa:20a2 IP6: Destination Address = ff02::1:ff02:6ea5 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Solicitation; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Checksum = 0x0F35 ICMP6: Type = 135 (Neighbor Solicitation) ICMP6: Code = 0 (0x0) ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 ICMP6: Type = 1 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 Lee

Structure of the Neighbor Advertisement MessageTypeCodeChecksumRouter flagSolicited flagOverride flagReservedTarget Address

Options= 136= 0. . . Lee

Structure of the Redirect MessageTypeCodeChecksumReservedTarget Address

Destination Address

Options= 137= 0. . . Lee

Summary of ND Messages and OptionsND MessageND Option(s)Router SolicitationSource Link-Layer AddressRouter AdvertisementSource Link-Layer AddressPrefix InformationMTUAdvertisement IntervalHome Agent InformationRoute InformationNeighbor SolicitationSource Link-Layer AddressNeighbor AdvertisementTarget Link-Layer AddressRedirectRedirected HeaderTarget Link-Layer Address Lee

Neighbor Discovery Process Lee

Neighbor Discovery ProcessesND provides message exchanges for the following processes:Address resolution (including duplicate address detection)Router discovery (including prefix and parameter discovery)Neighbor unreachability detectionDuplicate Address DetectionRedirect function Lee

Conceptual Host Data StructuresNeighbor cacheStores the on-link IPv6 address of a neighbor, its corresponding link-layer address, and an indication of the neighbors reachability stateEquivalent to the ARP cache in IPv4Destination cacheStores information on the next-hop IPv6 addresses for destinations to which traffic has recently been sentPrefix listLists on-link prefixesDefault router listLists addresses corresponding to on-link routers that advertise themselves as default routers Lee

Prefix List

Default Router ListDestination CacheDestinationNext-Hop AddressPMTUNeighbor CacheLink Layer AddressNext-Hop AddressStateRFC 2461 Conceptual Host Data Structures Lee

Address Resolution ProcessObject: An exchange of Neighbor Solicitation and Neighbor Advertisement messages to resolve the link-layer address of the next-hop address for a given destination.Step 1: The sending host sends a multicast Neighbor Solicitation message on the appropriate interface. Step 2: When the target host receives, it updates its own neighbor cache based on the source address of the Neighbor Solicitation message and the link-layer address. Next, it send Unicast Neighbor Advertisement message to the Neighbor Solicitation sender.Step 3: The sender updates the neighbor cache based on the Target Link-Layer Address optionAfter the oboving actions: Unicast traffic can now be sent Lee

Multicast Neighbor Solicitation

Host BHost A Send multicast Neighbor SolicitationNeighbor SolicitationEthernet HeaderDestination MAC is 33-33-FF-02-6E-A5IPv6 HeaderSource Address is FE80::210:5AFF:FEAA:20A2Destination Address is FF02::1:FF02:6EA5Hop limit is 255Neighbor Solicitation HeaderTarget Address is FE80::260:97FF:FE02:6EA5Neighbor Discovery OptionSource Link-Layer Address is 00-10-5A-AA-20-A2MAC: 00-10-5A-AA-20-A2IP: FE80::210:5AFF:FEAA:20A2MAC: 00-60-97-02-6E-A5IP: FE80::260:97FF:FE02:6EA5

Lee

Neighbor Solicitation Message Example+ Frame: Base frame properties ETHERNET: ETYPE = IPv6 + ETHERNET: Destination address : 3333FF026EA5 + ETHERNET: Source address : 00105AAA20A2 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::210:5aff:feaa:20a2 IP6: Destination Address = ff02::1:ff02:6ea5 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Solicitation; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Type = 135 (Neighbor Solicitation) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x0F35 ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 ICMP6: Type = 1 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 10 5A AA 20 A2 Lee

Unicast Neighbor Advertisement

Host BHost A Send unicast Neighbor AdvertisementNeighbor AdvertisementEthernet HeaderDestination MAC is 00-10-5A-AA-20-A2IPv6 HeaderSource Address is FE80::260:97FF:FE02:6EA5Destination Address is FE80::210:5AFF:FEAA:20A2Hop limit is 255Neighbor Advertisement HeaderTarget Address is FE80::260:97FF:FE02:6EA5Neighbor Discovery OptionTarget Link-Layer Address is 00-60-97-02-6E-A5

MAC: 00-10-5A-AA-20-A2IP: FE80::210:5AFF:FEAA:20A2MAC: 00-60-97-02-6E-A5IP: FE80::260:97FF:FE02:6EA5 Lee

Neighbor Advertisement Message Example+ Frame: Base frame properties ETHERNET: ETYPE = IPv6 + ETHERNET: Destination address : 00105AAA20A2 + ETHERNET: Source address : 006097026EA5 ETHERNET: Frame Length : 86 (0x0056) ETHERNET: Ethernet Type : 0x86DD ETHERNET: Ethernet Data: Number of data bytes remaining = 72 (0x0048) IP6: Proto = ICMP6; Len = 32 IP6: Version = 6 (0x6) IP6: Traffic Class = 0 (0x0) IP6: Flow Label = 0 (0x0) IP6: Payload Length = 32 (0x20) IP6: Next Header = 58 (ICMP6) IP6: Hop Limit = 255 (0xFF) IP6: Source Address = fe80::260:97ff:fe02:6ea5 IP6: Destination Address = fe80::210:5aff:feaa:20a2 IP6: Payload: Number of data bytes remaining = 32 (0x0020) ICMP6: Neighbor Advertisement; Target = fe80::260:97ff:fe02:6ea5 ICMP6: Type = 136 (Neighbor Advertisement) ICMP6: Code = 0 (0x0) ICMP6: Checksum = 0x89AC ICMP6: Router flag=0 (Not router) ICMP6: Solicited flag=1 (Solicited) ICMP6: Override flag=1 (Override) ICMP6: Reserved ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 Lee

Neighbor Advertisement Message Example ICMP6: Target Address = fe80::260:97ff:fe02:6ea5 ICMP6: Target Link-level Address = 00 60 97 02 6E A5 ICMP6: Type = 2 (0x1) ICMP6: Length = 1 (0x1) ICMP6: Source Link-level Address = 00 60 97 02 6E A5 Lee

Neighbor Unreachability DetectionProcess:Define the reachablility status about its the neighboring nodes :Reachability is determined by:Receipt of a Neighbor Advertisement message in response to a unicast Neighbor Solicitation message [Pairs of Neighbor Solicitation vs Neighbor Advertisement. i.e., A B, B A]Upper layer protocol indicators Lee

Unicast Neighbor Solicitation retries exceededDelay time exceededPROBEReachable Time exceededor unsolicited Neighbor Advertisement receivedSTALENeighbor Unreachability StatesMulticast Neighbor Solicitation retries exceededReachability confirmedby sending unicast Neighbor Solicitation and receiving solicited Neighbor AdvertisementReceive solicited Neighbor AdvertisementREACHABLESend packetDELAYSend multicast Neighbor SolicitationINCOMPLETENO ENTRY EXISTSReachabilityconfirmed byupper layer protocol Lee

INCOMPLETE : IPv6 address resolution is in progress. This state is entered when a new neighbor cache entry is created but does not yet have the nodes corresponding link-layer address. The number of multicast neighbor solicitations sent before abandoning rec. 3.REACHABLE: reachability has been confirmed by receipt of a solicited unicast Neighbor Advertisement message. The neighbor cache entry stays in the reachability state until the number of milliseconds indicated in the reachable Time Field in Neighbor Advertisement message. TCP indicate the reachability state .STALE: reachability time has DELAY: To allow time for TCP to provide reachability before sending Neighbor Solicitation messages. If no reachability is received by the delay time, then the entry enters the PROBE state.PROBE: Unicast Neighbor Solicitation messages are sent at intervals corresponding to the Retransmission Timer field. Lee

Duplicate Address DetectionProcess:Use neighbor solicitation to detect a duplicate unicast addressTarget Address field in the Neighbor Solicitation message is set to the IPv6 address for which duplication is being detectedThe Source Address is set to the unspecified address (::)The defending node replies with a multicast Neighbor AdvertisementThe Destination Address is set to the link-local scope all-nodes multicast address (FF02::1) Lee

Multicast Neighbor Solicitation for Duplicate Address Detection

Host BHost A Send multicast Neighbor SolicitationNeighbor SolicitationTentative IP: FEC0::2:260:8FF:FE52:F9D8MAC: 00-60-08-52-F9-D8IP: FEC0::2:260:8FF:FE52:F9D8Ethernet HeaderDest MAC is 33-33-FF-52-F9-D8IPv6 HeaderSource Address is ::Destination Address is FF02::1:FF52:F9D8Hop limit is 255Neighbor Solicitation HeaderTarget Address is FEC0::2:260:8FF:FE52:F9D8 Lee

Multicast Neighbor Advertisement for a Duplicate Address

Host BHost AEthernet HeaderDestination MAC is 33-33-00-00-00-01IPv6 HeaderSource Address is FEC0::2:260:8FF:FE52:F9D8Destination Address is FF02::1Hop limit is 255Neighbor Advertisement HeaderTarget Address is FEC0::2:260:8FF:FE52:F9D8Neighbor Discovery OptionTarget Link-Layer Address is 00-60-08-52-F9-D8Tentative IP: FEC0::2:260:8FF:FE52:F9D8 Send multicast Neighbor AdvertisementNeighbor AdvertisementMAC: 00-60-08-52-F9-D8IP: FEC0::2:260:8FF:FE52:F9D8 Lee

Router DiscoveryProcess:Nodes discover the set of routers on the local linkProvides:Default value of Hop Limit fieldUse of stateful address protocolReachability and retransmission timersNetwork prefixes for the linkMTU of the local linkIPv6 mobility informationRoutes Lee

Multicast Router Solicitation Message

RouterHost A Send multicast Router SolicitationRouter SolicitationEthernet HeaderDestination MAC is 33-33-00-00-00-02IPv6 HeaderSource Address is :: Destination Address is FF02::2Hop limit is 255Router Solicitation HeaderMAC: 00-B0-D0-E9-41-43 IP: noneMAC: 00-10-FF-D6-58-C0 IP: FE80::210:FFFF:FED6:58C0

Lee

Multicast Router Advertisement Message

Host AEthernet HeaderDestination MAC is 33-33-00-00-00-01IPv6 HeaderSource Address is FE80::210:FFFF:FED6:58C0Destination Address is FF02::1Hop limit is 255Router Advertisement HeaderCurrent Hop Limit, Flags, Router Lifetime, Reachable and Retransmission TimersNeighbor Discovery OptionsSource Link-Layer Address is 00-10-FF-D6-58-C0MTU is 1500Prefix Information is for FEC0:0:0:F282::/64 MAC: 00-10-FF-D6-58-C0 IP: FE80::210:FFFF:FED6:58C0 Router

Send multicast Router AdvertisementRouter AdvertisementMAC: 00-B0-D0-E9-41-43 IP: none Lee

Redirect FunctionInform originating hosts of a better first-hop neighbor to which traffic should be forwarded for a specific destinationTwo instances:1. A router informs an originating host of the IP address of a router available on the local link that is closer to the destination2. A router informs an originating host that the destination is a neighbor (it is on the same link as the originating host)Redirect message contains best first-hop address informationRedirect messages are only sent by the first router in the path between the originating host and the destination Lee

Unicast Packet to the Router

Host AEthernet HeaderDestination MAC is 00-AA-00-22-22-22IPv6 HeaderSource Address is FEC0::1:2AA:FF:FE11:1111Destination Address is FEC0::2:2AA:FF:FE99:9999MAC: 00-AA-00-22-22-22IP: FEC0::1:2AA:FF:FE22:2222FE80::2AA:FF:FE22:2222Router 2

Router 3

Unicast Packet Send unicast packetMAC: 00-AA-00-33-33-33IP: FEC0::1:2AA:FF:FE33:3333 FE80::2AA:FF:FE33:3333MAC: 00-AA-00-11-11-11IP: FEC0::1:2AA:FF:FE11:1111FE80::2AA:FF:FE11:1111 Lee

1/2 Redirect Message Sent by the Router 2

Host A Send unicast RedirectRedirectEthernet HeaderDestination MAC is 00-AA-00-11-11-11IPv6 HeaderSource Address is FE80::2AA:FF:FE22:2222Destination Address is FEC0::1:2AA:FF:FE11:1111Hop limit is 255Redirect HeaderTarget Address is FE80::2AA:FF:FE33:3333Destination Address is FEC0::2:2AA:FF:FE99:9999Neighbor Discovery OptionsTarget Link-Layer Address is 00-AA-00-33-33-33Redirected HeaderRouter 2

Router 3

MAC: 00-AA-00-33-33-33IP: FEC0::1:2AA:FF:FE33:3333 FE80::2AA:FF:FE33:3333MAC: 00-AA-00-11-11-11IP: FEC0::1:2AA:FF:FE11:1111FE80::2AA:FF:FE11:1111MAC: 00-AA-00-22-22-22IP: FEC0::1:2AA:FF:FE22:2222FE80::2AA:FF:FE22:2222 Lee

2/2 unicast packet to router 3 from Router 2

Host AEthernet HeaderDestination MAC is 00-AA-00-33-33-33IPv6 HeaderSource Address is FEC0::1:2AA:FF:FE11:1111Destination Address is FEC0::2:2AA:FF:FE99:9999MAC: 00-AA-00-11-11-11IP: FEC0::1:2AA:FF:FE11:1111FE80::2AA:FF:FE11:1111MAC: 00-AA-00-22-22-22IP: FEC0::1:2AA:FF:FE22:2222FE80::2AA:FF:FE22:2222Router 2

Router 3

MAC: 00-AA-00-33-33-33IP: FEC0::1:2AA:FF:FE33:3333 FE80::2AA:FF:FE33:3333Unicast Packet Forward unicast packet Lee

Host Sending Algorithm1. Determine the next-hop address for the destinationCheck the destination cacheIf the destination address matches a prefix in the prefix list, next-hop address is destination addressIf the destination address does not match a prefix in the prefix list, next-hop address is the default router address2. Determine the link-layer address for the next-hop addressCheck the neighbor cacheUse address resolution to obtain the link-layer address for the next-hop address3. Send the packet using the link-layer address of the next-hop address Lee

Host Sending AlgorithmCheck destination cache for an entry matching the destination address.Entry found in destination cache?YesNoIs next-hop address entry in neighbor cache?YesNoUse address resolution process to determine the link-layer address of the next-hop address.Was address resolution successful?YesNoIndicate an error.Does the destination address match a prefix in the prefix list?YesNoCheck prefix list for a prefix thatmatches the destination address.Update neighbor cache.Send packet using link-layer address of neighbor cache entry.Set the next-hop address to the default router address.Set the next-hop address to the destination address.Obtain next-hop address from destination cache or care-of destination cache entry.Is there a default router?NoYesUpdate destination cache.Check neighbor cache for an entry matching the next-hop address. Lee

IPv4 Neighbor Functions and IPv6 EquivalentsIPv4 Neighbor FunctionIPv6 Neighbor FunctionARP Request messageNeighbor Solicitation messageARP Reply messageNeighbor Advertisement messageARP cacheNeighbor cacheGratuitous ARPDuplicate address detectionRouter Solicitation message (optional)Router Solicitation (required)Router Advertisement message (optional)Router Advertisement (required)Redirect messageRedirect message Lee

ReviewNeighbor Discovery functionsNeighbor Discovery optionsNeighbor Discovery messagesAddress resolution, neighbor unreachability detection, duplicate address detection, router discovery, and Redirect processesHost sending algorithm Lee

Appendix Lee

Mapping IPv6 Multicast Addresses to Ethernet AddressesIPv6 Multicast Address8162432FF...:33-33- Ethernet Multicast AddressFor example: an host with MAC address of 00-AA-00-3F-2A-1C (i.e., link-local IPv6 address is FE80::2AA:FF:FE3F:2A1C) adds the followingMulticast MAC addresses to the table of interesting destination MAC addressesOn the Ethernet adaptor: The address of 33-33-00-00-00-01, which corresponding to FF02::1 the address of 33-33-FF-3F-2A-1C, which corresponds to the solicited-node address of FF02::1:FF3F:2A1C. (Remember that the solicited address is the Prefix FF02::1:FF00:0/104 and the last 24 bits of the unicast IPv6 address.

Lee