36
IPv4 Overview Version 4 1 Spirent

Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 1

Spirent

Page 2: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 2

Spirent

Page 3: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 3

Spirent

Page 4: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 4

Spirent

When a host wants to send data to another host, it must determine two things:

• Is the destination address within my own network?

• If not, where do I send the data in order to get it there?

• When sending non-local, the host uses a default gateway. Once the default gateway receives this

packet, it must now forward (or route) the packet to the network on which the destination host

resides. In order to do this it uses what’s commonly referred to as a routing table.

• Let’s look at the example pictured. Host A wishes to connect to server B. Host A resides on

network 192.168.10.0 and server B resides on network 192.168.120.0. Host A send the packet to it’s

default gateway router X. Router X then sees to get to the destination network, he must forward the

packet to router Y. Router Y then delivers the packet to server B.

Page 5: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 5

Spirent

• In a switched environment, two hosts that are in the same network are in the same VLAN. In the previous slide let’s imagine host A and server B are in the same network off different ports of a switch. Traffic between them would be switched at layer 2 within the VLAN.

• Now we look at it the same as the routing example. They are on different VLANs because they are in different networks. So how does the packet get from A to B? it needs a default gateway. Unfortunately, a switch only forwards traffic based on MAC addresses so the two VLANs on the same switch which contains host A and server B would need to forward the packets to a router (or L3 device) to reach the destination network. This means connecting two switch ports to a router port. So in essence we are wasting money and time by sending traffic in one switch port, out another, in one router port out another, back in another witch port, and finally out another just to go one way from A to B.

• A layer 3 switch eliminates the need to go outside the switch to cross VLANs by routing within the box between the VLANs. So a L3 switch will switch between hosts within a VLAN, and route between hosts in different VLANs.

• Layer 3 Switching:

– Integrates switching and routing function into a single switch

– Forwarding performed by ASIC

– Wire-speed routing and switching

– Supports common routing protocols such as RIP and OSPF

– Provides routing between VLANs

– Deployment: collapsed backbone

Page 6: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 6

Spirent

Page 7: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 7

Spirent

• Direct Routing

– Direct Routing, often referred to as “direct delivery,” is the process of passing a packet directly from

the source to destination on the same Network. Above, Host A sends a packet to Host B. Since both

are on the same network, Host A can pass the packet “directly” to Host B.

– However, since this is a packet destined only for Host B, then Host A must “unicast” the packet to

Host B (unicast means that the destination MAC address of the packet is that of the intended recipient

only). In order for Host A to unicast the packet to Host B, Host A must first discover Host B’s MAC

address. It does this by ARPing Host B directly.

• Indirect Routing

– Indirect Routing, often referred to as “indirect delivery,” is the process of passing a packet indirectly

(through an intermediate device) from the source to destination on different Networks.

– Host A sends a packet to Host C. Since they are on different networks, Host A can’t pass the packet

“directly” to Host C. Rather, Host A must first pass the packet to an intermediate device called a

Router, which in turn passes the packet directly to Host C.

– In order for Host A to pass the packet to the Router, Host A must first discover the Router’s MAC

address. It does this by ARPing the Router directly. Once Host A discovers the Router MAC address,

Host A unicasts the packet to the Router. The Router then determines where Host C’s Network

resides. In this case, the Router determines that it is able to directly deliver the packet to Host C.

– Since this is a packet destined only for Host C, the Router must “unicast” the packet to Host C. In

order for the Router to unicast the packet to Host C, the Router must first discover Host C’s MAC

address. It does this by ARPing Host C directly.

Page 8: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 8

Spirent

In an IP/Ethernet LAN environment, an ARP exchange precedes the forwarding of the IP packet. Each device needs its ARP cache

updated with the appropriate IP to MAC mapping. The exchanges occur as follows:

1. Host 1’s IP stack has an IP packet to send to host 2.

2. By comparing its own IP address with host 2’s IP address (using the subnet mask), host 1 determines that host 2 is on a different IP

network.

3. So host 1 will use its default gateway (i.e., the router) to deliver the packet to host 2.

4. Before sending the IP packet, host 1 “ARPs” the router (using a broadcast on the local Ethernet) in an effort to populate its own ARP

cache with the router’s IP to MAC address mapping.

5. The router replies directly back to host 1 and host 1 updates its ARP cache.

6. Host 1 then sends the IP packet (destined for host 2) using the router’s MAC address as the destination MAC address of the IP packet.

NOTE: “If you want to get the packet through the router you have to send the packet to the router.”

7.Upon receiving the packet the router consults its local route table to see if it knows 2’s network:

– Is it a directly connected LAN interface? If so, the router can deliver the packet directly to host 2.

– Does it have a static route (configured manually) to host 2’s network pointing to a next hop router?

– Does it have dynamic route (discover by a routing protocol such as RIP or OSPF) to host 2’s network pointing to a next hop

router?

– Does it have a default route (where it sends packets with destination network unknown) also pointing to a next hop router?

8. Since host 2 is on a directly connected LAN interface, before sending the IP packet, the router “ARPs” host 2 to populate its ARP cache

with host 2’s IP to MAC address mapping.

9. Host 2 replies directly back to the router and the router updates its ARP cache.

10. The router sends the IP packet (destined for host 2) using the host 2’s MAC address as the destination MAC address of the IP packet.

Page 9: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 9

Spirent

The ARP/RARP header structure is as follows:

• Hardware Type specifies a hardware interface type for which the sender requires a response (Ethernet = 0x0001).

• Protocol Type - specifies the type of high-level protocol address the sender has supplied (IP = 0x0800).

• HLen is the hardware address length (Ethernet = 0x06).

• PLen is the protocol address length (IP = 0x04).

• Operation values are as follows:

– 1 ARP request

– 2 ARP response

– 3 RARP request.

– 4 RARP response

– 5 Dynamic RARP request

– 6 Dynamic RARP reply

– 7 Dynamic RARP error

– 8 InARP request

– 9 InARP reply

• Sender hardware address (i.e., Ethernet MAC address of the transmitting station)

• Sender protocol address (i.e., IP address of the transmitting station)

• Target hardware address (i.e., Ethernet MAC address of the intended recipient)

NOTE1: For the ARP request, the Target hardware address field is usually set to zero.

• Target protocol address (i.e., IP address of the intended recipient)

NOTE2: ARP is designated as 0x0806 in the Ethernet Version 2 “Type” field.

Page 10: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 10

Spirent

• IP enables forwarding of packets from a source to destination through routers.

• Each router reads the destination IP address and makes a decision to send the packet out the

appropriate interface towards the destination.

• To make the decision, each router maintains a table (called a routing table) with a list of known

destinations (how the routing table gets built is discussed later).

Page 11: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 11

Spirent

• Version field indicates the format of the Internet header. Today the Internet uses Version 4.

• Header Length is the length of the Internet header in 32-bit words. Points to the beginning of the data. The minimum value

for a correct header is 5.

• Type of Service indicates the quality of service desired. Today, this field is also defined as Diffserv. For Type of Service

(RFC 791) the bits are defined as follows: Bits 0-2 Precedence, Bit 3 Delay, Bit 4 Throughput, Bit 5 Reliability, Bits 6-7 not

used. For Diffserv (RFC 2474) the bits are defined as follows: Bits 0-5 QoS information, Bits 6-7 currently unused.

• Total Length is the length of the datagram measured in bytes, including the Internet header and data.

• Identification is the value assigned by the sender to aid in assembling the fragments of a datagram.

• Flags are 3 bits and are defined as follows: Bit 0 is reserved and must be zero, Bit 1 don’t fragment bit (0 may fragment or

1 don’t fragment), Bit 2 more fragments bit (0 last fragment or 1 more fragments).

• Fragment Offset is 13 bits. Indicates where this fragment belongs in the original datagram. The fragment offset is

measured in units of 8 bytes (64 bits). The first fragment has offset zero.

• Time to Live indicates the maximum time the datagram is allowed to remain in the Internet system. If this field contains the

value zero, the datagram must be destroyed. This field is modified in routers.

• Protocol indicates the next level protocol used in the data portion of the datagram (e.g., TCP/UDP).

• Header Checksum is a checksum on the header only. Since some header fields change (i.e., Time To Live) this is

recomputed and verified at each point that the Internet header is processed by routers.

• Source/Destination IP addresses are 32 bits each. A distinction is made between names, addresses, and routes. A name

indicates an object to be sought. An address indicates the location of the object. A route indicates how to arrive at the

object. IP deals primarily with addresses. Higher level protocols (such as DNS) map the names to addresses. Routers map

the IP addresses to routes.

• Options may or may not appear in datagrams. They must be implemented by all IP modules (host and gateways). What is

optional is their transmission in any particular datagram, not their implementation.

• Data is the user data and/or higher layer protocol header (e.g., TCP/UDP).

Page 12: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 12

Spirent

• The IPv4 Header contains the Source and Destination IP Addresses. Each address is 32 bits long.

Page 13: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 13

Spirent

• Due to the way address classes were created, it was not feasible to utilize all the host addresses

as they existed. For example, there is no way you are going to have 64 thousand hosts on a single

class B network segment, never mind a class A (16 million). The solution was simple. Take (or

borrow) bits reserved for the host portion and reassign them to the network portion. The reassigned

octet(s) or portions there of are called sub-networks. The way to distinguish this is the network

mask. Whatever bits you reassign you must also change the mask bits that correspond to them. So

now, a class A network number can have the possibility of sub-netting up to 22 bits or anywhere

from 2 to 4.194 million sub-networks.

Page 14: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 14

Spirent

Each 32-bit IP address can be filtered into two parts; a network portion, and a host portion. The network portion identifies which segment a host connects to. The host portion identifies the specific device on that segment. Much like a street address.

The address is divided into four octets separated by a decimal (dotted decimal). How to distinguish which part is a network and which part is a host portion is determined by the network mask. A mask is 32-bits long and is logically anded to the IP address to filter out the network number. What remains is the host ID portion. Addresses are broken into what is called classes. Each class represents a grouping of network numbers, along with a number of hosts available per address. The classes are broken down as follows:

• For class A networks, the first octet is reserved for network numbers with the remaining 3 octets for hosts (N.H.H.H). The first bit in the octet is reserved (0) and the remaining 7 bits leave a combination of 127 networks (1-127). The number of hosts per network are equal to the combinations of the remaining octets (256 x 256 x 256), or over 16 million.

• Class B networks reserve the first two bits (10) and use the remaining bits along with the second octet. The remaining octets are for hosts (N.N.H.H). This creates network number ranges from 128.0.H.H to 191.255.H.H, or over 16 thousand. Each class B network can have 64 thousand hosts.

• Class C uses the first three octets for networks and the last for hosts (N.N.N.H) and the first three bit are reserved (110). This gives addresses from 192.0.0.H to 223.255.255.H, or 2 million networks each having 254 hosts.

• Class D uses the same octet setup as C but the first 4 bits are reserved (1110). The address range is 224.0.0.H to 239.255.255.H. These addresses are reserved for special implementations and are called multi-cast addresses.

Page 15: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 15

Spirent

Every time you subnet you lose host and network numbers. If you needed a point-to-point link (only

two addresses), normally you’d have to use one sub-net, which depending on the location of the bit

used could mean a loss of 252 to > 30,000 hosts. VLSM allows you to subnet down to multiple

levels to more efficiently use addresses available.

Page 16: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 16

Spirent

As companies demanded more and IP addresses, the only ones left to give out were class C. If

company X needed 255 networks, they would be given a “bank” of sequential addresses (e.g.

198.16.0.0, 198.16.1.0, 198.16.2.0 … 198.16.254.0). When it came time to advertise these network

numbers out to other routers on the internet, instead of advertising all 254 networks, the router could

be configured to aggregate them into one advertisement (198.16.0.0). This gives the appearance of

a class B network even though it is a class C. By not using the network mask for the third octet,

we’ve done the opposite of sub-netting (super-netting).

Page 17: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 17

Spirent

• Super-netting is an Address Assignment and Aggregation Strategy as defined in RFCs 1518 and

1519.

• There are two basic components of this addressing and routing scheme:

– To distribute the allocation of Internet address space.

– To provide a mechanism for the aggregation of routing information.

• Aggregation results in the reduction of internet routing tables which makes more efficient routing in

the Internet.

Page 18: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 18

Spirent

Address allocation example:

• Consider the block of 2048 class-C network numbers beginning with 192.24.0.0 and ending with 192.31.255.0 allocated to

a single network provider. A "supernetted" route to this block of network numbers would be described as 192.24.0.0 with

mask of 255.248.0.0 or 192.24.0.0/13

• Assume this service provider connects five clients in the following order (notice that it demonstrates how temporary "holes"

may form in the service provider's address space):

– "C1" requiring fewer than 2048 addresses (8 class-C networks)

– "C2" requiring fewer than 4096 addresses (16 class-C networks)

– "C3" requiring fewer than 1024 addresses (4 class-C networks)

– "C4" requiring fewer than 1024 addresses (4 class-C networks)

– "C5" requiring fewer than 512 addresses (2 class-C networks)

• In all cases, the number of IP addresses "required" by each client is assumed to allow for significant growth. The service

provider allocates its address space as follows:

– C1: allocate 192.24.0 through 192.24.7. This block of networks is described by the "supernet" route 192.24.0.0

and mask 255.255.248.0.

– C2: allocate 192.24.16 through 192.24.31. This block is described by the route 192.24.16.0, mask

255.255.240.0.

– C3: allocate 192.24.8 through 192.24.11. This block is described by the route 192.24.8.0, mask 255.255.252.0.

– C4: allocate 192.24.12 through 192.24.15. This block is described by the route 192.24.12.0, mask

255.255.252.0.

– C5: allocate 192.24.32 and 192.24.33. This block is described by the route 192.24.32.0, mask 255.255.254.0.

• If the inter-domain routing protocol supports carrying network routes with associated masks, all of the major concerns

regarding IP addressing would be eliminated.

Page 19: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 19

Spirent

• The internal assignment of network IP addresses is usually based on RFC 1918 (Address

Allocation for Private Internets).

• Networks from RFC 1918 require a proxy gateway running NAT or PAT when connecting to

external networks such as the Internet.

• Security benefits are gained because no external network connections can be made directly to

these network addresses through the Internet.

• RFC 1918 also assists corporations in deploying TCP/IP networks when they cannot receive an

appropriate address space from the IANA registry.

• The three blocks of the IP address space reserved for private internets are:

– 10.0.0.0 - 10.255.255.255 (10/8 prefix)

– 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)

– 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

Page 20: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 20

Spirent

• Multicast addresses are used to group hosts together to save bandwidth on the network. Instead of

sending 200 packets to 200 hosts, 1 multi-cast packet is sent to a group address which the 200

hosts subscribe to.

• A multicast packet is delivered to the group members with the same best-effort reliability as a uni-

cast IP packet (it also uses UDP). Therefore, loss of packet and out of order delivery is possible.

Page 21: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 21

Spirent

• The intermediary device must be able to identify which hosts want to receive the multi-cast traffic,

and where it originates from. This is accomplished using various layer 2 and layer 3 protocols such

as IGMP and DVMRP or PIM.

Page 22: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 22

Spirent

• On Ethernet, there should be a destination “multicast” MAC-layer address to which the IP multicast

address maps.

• An IP host group address is mapped to an Ethernet multicast address by placing the low-order 23-

bits of the IP address into the low-order 23 bits of the Ethernet multicast address 01-00-5E-00-00-00

(hex).

• Because of this mapping procedure, there will be 32 different multicast IP addresses mapped to

the same IEEE-802 address.

Page 23: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 23

Spirent

• The 8-bit Type of Service (TOS) field guides the selection of the actual service parameters when

forwarding a Datagram through a network.

• The first three (Precedence) bits are intended to be used within a network only (used to manage

queues).

• The TOS (DTR) bits are used to specify the treatment of the Datagram during its transmission

through the internet system. These were designed to be used to manage how the packets were

routed based on minimizing Delay, Throughput, and most Reliability within a given transit network.

Page 24: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 24

Spirent

• RFC 1349 added “Cost” as a factor to the equation.

Page 25: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 25

Spirent

Diffserv - Differentiated Services, is a prioritization scheme and a set of building blocks from which

64 classes of services can be constructed. It reuses the eight bit IP “Type Of Service” field to define

six bits for priority encoding and two bits that are currently unused. This new priority field is called

the “DS” field. The field definitions are as follows:

• DSCP - Differentiated Service Code Point. The most significant six bits used to specify up to 64

classes of service (priority levels).

• CU - Currently Unused. The least significant two bits are currently unused and therefore set to

zero.

Page 26: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 26

Spirent

• Diffserv components are described in RFCs 2474, RFC 2475, RFC 2597, RFC 2598, re-defines

the IP header field, now called the DS (for differentiated services) field. In IPv4, it defines the layout

of the Type of Service octet; in IPv6, the Traffic Class octet. In addition, a base set of packet

forwarding treatments, or per-hop behaviors, is defined. For a more complete understanding of

differentiated services, see also the differentiated services architecture RFC 2475.

• The differentiated services architecture contains two main components. One is the fairly well-

understood behavior in the forwarding path and the other is the more complex and still emerging

background policy and allocation component that configures parameters used in the forwarding

path.

• The forwarding path behaviors include the differential treatment an individual packet receives, as

implemented by queue service disciplines and/or queue management disciplines. These per-hop

behaviors are useful and required in network nodes to deliver differentiated treatment of packets no

matter how we construct end-to-end or intra-domain services.

• RFC 2474 concentrates on the forwarding path component. In the packet forwarding path,

differentiated services are realized by mapping the codepoint contained in a field in the IP packet

header to a particular forwarding treatment, or per-hop behavior (PHB), at each network node along

its path. The codepoints may be chosen from a set of mandatory values defined later in this

document, from a set of recommended values to be defined in future documents, or may have

purely local meaning. PHBs are expected to be implemented by employing a range of queue service

and/or queue management disciplines on a network node's OUTPUT interface queue.

Page 27: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 27

Spirent

• Differentiated Services Code Points are used with both IPv4 and IPv6. In IPv4 they are called DiffServ and IPv6 called Traffic

Class fields. Both these fields are 8 bits.

• Six bits of the DS field are used as a codepoint (DSCP) to select the PHB a packet experiences at each node. A two-bit currently

unused (CU) field is reserved. In a DSCP value notation 'xxxxxx' (where 'x' may equal '0' or '1'), the left-most bit signifies bit 0 of the

DS field, and the right-most bit signifies bit 5.

• The desire is to maintain some form of backward compatibility with present uses of the IP Precedence Field: bits 0-2 of the IPv4

Type of Service octet. No attempt is made to maintain backwards compatibility with the "DTR" or TOS bits of the IPv4 Type of

Service octet, as defined in RFC 791. The vendor or the network administrator MAY configure the network node to map codepoints

to PHBs irrespective of bits 3-5 of the DSCP field to yield a network that is compatible with historical IP Precedence use.

• Therefore, Diffserv designated a Class Selector Codepoint: any of the eight codepoints in the range 'xxx000' (where 'x' may equal

'0' or '1'). Bits 3 and 4 could add a wider range of features than would be available in a set of PHBs that did no more than meet the

minimum Class Selector PHB requirements (one implementation is to have them specify a drop precedence).

• The DSCP field within the DS field is capable of conveying 64 distinct codepoints. The codepoint space is divided into three pools

for the purpose of codepoint assignment and management: a pool of 32 RECOMMENDED codepoints (Pool 1) to be assigned by

Standards Action as defined in RFC 2434, a pool of 16 codepoints (Pool 2) to be reserved for experimental or Local Use (EXP/LU)

as defined in RFC 2434, and a pool of 16 codepoints (Pool 3) which are initially available for experimental or local use, but which

should be preferentially utilized for standardized assignments if Pool 1 is ever exhausted. The pools are defined in the following

table (where 'x' refers to either '0' or '1'):

Pool Codepoint space Assignment Policy

1 xxxxx0 Standards Action

2 xxxx11 EXP/LU

3 xxxx01 EXP/LU (*)

(*) may be utilized for future Standards Action allocations as necessary

• These codepoints MUST be mapped, not to specific PHBs, but to PHBs that meet "at least" the requirements set forth in Sec.

4.2.2.2 of RFC 2474 to provide a minimal level of backwards compatibility with IP Precedence as defined in RFC 791 and as

deployed in some current equipment.

Page 28: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 28

Spirent

• The IP options field is seldom used today. It is most often used for testing and debugging

networks.

• The options field is 32-bits and can be used for things such as:

– Security and handling restrictions (for military applications)

– Record route (have each router record its IP address).

– Timestamp (have each router record its IP address and time).

– Loose source routing (specifying a list of IP addresses that must be traversed by the

Datagram).

– Strict source routing (similar to loose source routing but here only the addresses in the list

can be traversed).

• The options field always ends on a 32-bit boundary and must be padded with zeros if the 32-bit

boundary is not met with the options used.

Page 29: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 29

Spirent

• RFC 2113 defines a new IP Option type that alerts transit routers to more closely examine the

contents of a packet. His is beneficial for protocols that are addressed to a destination but require

relatively complex processing in routers along the path (such as RSVP and IGMPv2).

• It allows deployment of new routing functionality without having to reinvent all of the basic routing

protocol functions.

• The Router Alert option has the semantic “routers should examine this packet more closely.”

• By including the Router Alert option in the IP header of its protocol message, RSVP and/or

IGMPv2 can cause the message to be intercepted while causing little or no performance penalty on

the forwarding of normal data packets.

Page 30: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 30

Spirent

RFC 792 contains the official specification of ICMP. ICMP is an integral part of IP and therefore

must be supported by all devices (modules) running the IP protocol. Following is the format of an

ICMP message:

• The first 4 bytes have the same format for all messages, but the remainder differs from one

message to the next.

• Type field has 15 different values which identify the particular ICMP message.

• Code field is used by some types of ICMP messages to further specify the condition.

• Checksum field covers the entire ICMP message. The algorithm used is the same as for the IP

header checksum. The ICMP checksum is required.

Page 31: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 31

Spirent

• A few of the types of ICMP messages are: address mask request and reply, timestamp request

and reply, and port unreachable. Echo request and reply messages are referred to as Pings. ICMP

messages also deal with IP routing issues.

Page 32: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 32

Spirent

• IGMP is used on LAN segments to join multi-cast groups. A host wishing to join a multi-cast group

sends a request to join (report) to a multi-cast router. Upon seeing this report, the router will either

request the upstream multi-cast router forward the stream to him, or if it already is transmitting, then

relay the stream to the multi-cast host.

• The multicast routers send queries out to verify hosts are there to receive the multi-cast stream.

The Querier assumes the responsibility of keeping track of the membership state of the multicast

groups.

Page 33: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 33

Spirent

• In case there is more than one multicast router on a given sub-network, one of the routers is

elected as the Querier. This prevents multiple multi-cast streams from propagating through the

network.

• In version 1, when a host leaves the group, the router will continue to send until it times out from

receiving reports. With version 2, when a host or router is going to shutdown or leave the group it

sends a leave group message. This causes other hosts who wish to remain in the group to send

their own report, as well as inform the backup Querier that he will need to assume the primary role.

Page 34: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 34

Spirent

RFC 793 defines the Transmission Control Protocol (TCP). TCP provides a reliable stream delivery and virtual connection

service to applications through the use of sequenced acknowledgment with retransmission of packets when necessary. The

TCP header structure is as follows:

• Source port number is a number identifying the sender’s application process.

• Destination port number is a number identifying the recipient’s application process.

• Sequence number - The sequence number of the first data octet in this segment. However, if SYN is present, the

sequence number is the ISN (initial sequence number) and the first data octet is ISN+1.

• Acknowledgment number - If the ACK control bit is set, this field contains the value of the next sequence number which

the sender of the segment is expecting to receive.

• Header length - The number of 32-bit words in the TCP header which indicates where the data begins.

• Reserved - Reserved for future use. Must be zero.

• Control bits - The control bits may be set (i.e., equal to 1) and their definitions are:

– URG - Urgent pointer field

– ACK - Acknowledgment field

– PSH - Push function

– RST - Reset the connection

– SYN - Synchronize sequence numbers

– FIN - No more data from sender

• Window - The number of data octets which the sender of this segment is willing to accept, beginning with the octet

indicated in the acknowledgment field.

• Checksum - Provides a mechanism for determining the validity of the entire TCP segment.

• Urgent Pointer - Points to the sequence number of the octet following the urgent data.

• Options - Options may be transmitted at the end of the TCP header.

• Data - TCP data (called a segment) or higher layer protocol.

Page 35: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 35

Spirent

The User Datagram Protocol (UDP), defined by RFC 768, provides a simple, but unreliable

message service for transaction-oriented services. Each UDP header carries both a source port

identifier and destination port identifier, allowing high-level protocols to target specific applications

and services among hosts. The UDP header structure is as follows:

• Source Port is an optional field. When used, it indicates the port of the sending process and may

be assumed to be the port to which a reply should be addressed in the absence of any other

information. If not used, a value of zero is inserted.

• Destination Port specifies the application for which the message is to be delivered.

• Length is the length in octets of this user datagram, including this header and the data. The

minimum value of the length is eight (i.e., no data).

• Checksum is the 16-bit ones complement of the ones complement sum of a pseudo header of

information from the IP header, the UDP header and the data, padded with zero octets at the end (if

necessary) to make a multiple of two octets.

• Data is the UDP data field (i.e., user data).

NOTE: UDP is identified by a value of 17 in the IP protocol field.

Page 36: Education Services Template · 2013-08-14 · IPv4 Overview Version 4 4 Spirent When a host wants to send data to another host, it must determine two things: • Is the destination

IPv4 Overview

Version 4 36

Spirent