• Tidak ada hasil yang ditemukan

Methods of Delivery - Unicast, Broadcast, Multicast and Anycast

Dalam dokumen TCP/IP Tutorial and Technical Overview (Halaman 57-60)

Comments Welcome

Chapter 2. Internetworking and Transport Layer Protocols

2.1 Internet Protocol (IP)

2.1.4 Methods of Delivery - Unicast, Broadcast, Multicast and Anycast

host sees only one IP network and its routing cannot differentiate between an IP datagram directed to a host on the local subnet and a datagram that should be sent via a router to a different subnet.

In case one or more hosts do not support subnetting, an alternative way to achieve the same goal exists in the form of proxy-ARP, which doesn't require any changes to the IP routing algorithm for single-homed hosts, but does require changes on routers between subnets in the network. This is explained in more detail in 2.4.4,

“Proxy-ARP or Transparent Subnetting” on page 71.

The entire IP routing algorithm is illustrated in the figure below, including support of subnets:

Bitwise AND dest_IP_addr with local_subnet_mask(s)

Is there a match?

Bitwise AND local interface(s) with local_subnet_mask(s)

Is there an indirect route entry?

Is a default route specified?

NO

Deliver directly using the corresponding local interface Deliver indirectly to the corresponding router's IP address Deliver indirectly to the default router's IP address

Send ICMP error message

"network unreachable"

NO

YES

YES

YES Take destination IP

address

NO

Figure 16. IP - Routing Algorithm (with Subnets) Notes:

1. This is an iterative process. It is applied by every host handling a datagram, except for the host to which the datagram is finally delivered.

2. Routing tables and the routing algorithm are local to any host in an IP network.

In order to be able to forward IP datagrams on behalf of other hosts, routers need to exchange their routing table information with other routers in the network. This is done using special routing protocols, some of which are discussed in Chapter 3, “Routing Protocols” on page 95.

Unicast

S D

Broadcast

S D

D D

Anycast

S D

D Multicast D

S D

D D

3376\3376F2S1 Figure 17. IP - Packet Delivery Modes

Any protocol that is connectionless can send broadcast, multicast or anycast messages as well as unicast messages. A protocol that is connection-oriented can only use unicast addresses because the connection exists between a specific pair of hosts.

2.1.4.1 Broadcasting

There are a number of addresses that are used for IP broadcasting. All use the convention that all-bits 1 indicates all. Broadcast addresses are never valid as source addresses, only as destination addresses. The different types of broadcast addresses are listed here:

Limited Broadcast Address

The address 255.255.255.255 (all bits 1 in all parts of the IP address) is used on networks that support broadcasting, such as LANs, and it refers to all hosts on the subnet. It does not require the host to know any IP configuration information at all. All hosts on the local network will recognize the address, but routers will never forward it.

There is one exception to this rule, called BOOTP forwarding. The BOOTP protocol uses the limited broadcast address to allow a diskless workstation to contact a boot server. BOOTP forwarding is a configuration option available on some routers, including the IBM 2210 Nways Multiprotocol Router and the IBM 2216 Nways Multiaccess Connector to make an exception for UDP datagrams for ports 67 (used by the BOOTP protocol). Without this facility, a separate BOOTP server would be required on each subnet. However, this is not simple forwarding because the router also plays a part in the BOOTP protocol. See 7.1, “Bootstrap Protocol (BOOTP)” on page 401 for more information about BOOTP forwarding and 2.7, “User Datagram Protocol (UDP)” on page 75 for an explanation of UDP ports.

Network-Directed Broadcast Address

If the network number is a valid network number, the network is not subnetted and the host number is all ones (for example, 128.2.255.255), then the address refers to all hosts on the specified network. Routers should forward these broadcast messages unless configured otherwise. This is used in ARP requests (see 2.4, “Address Resolution Protocol (ARP)” on page 68) on unsubnetted networks.

Subnet-Directed Broadcast Address

If the network number is a valid network number, the subnet number is a valid subnet number and the host number is all ones, then the address refers to all hosts on the specified subnet. Since the sender's subnet and the target subnet may have different subnet mask, the sender must somehow find out the subnet mask in use at the target. The actual broadcast is performed by the router that receives the datagram into the subnet.

All-Subnets-Directed Broadcast Address

If the network number is a valid network number, the network is subnetted and the local part is all ones (for example, 128.2.255.255), then the address refers to all hosts on all subnets in the specified network. In principle routers may propagate broadcasts for all subnets but are not required to do so. In practice, they do not; there are few circumstances where such a broadcast would be desirable, and it can lead to problems, particularly if a host has been incorrectly configured with no subnet mask. Consider the wasted resource involved if a host 9.180.214.114 in the subnetted Class A network 9 thought that it was not subnetted and used 9.255.255.255 as a local

broadcast address instead of 9.180.214.255 and all of the routers in the network respected the request to forward the request to all clients.

If routers do respect all-subnets-directed broadcast address, they use an algorithm called reverse path forwarding to prevent the broadcast messages from multiplying out of control. See RFC 922 for more details on this algorithm.

2.1.4.2 Multicasting

Broadcasting has a major disadvantage; its lack of selectivity. If an IP datagram is broadcast to a subnet, every host on the subnet will receive it, and have to process it to determine whether the target protocol is active. If it is not, the IP datagram is discarded. Multicasting avoids this overhead by using groups of IP addresses.

Each group is represented by a 28-bit number, which is included in a Class D address. So multicast group addresses are IP addresses in the range 224.0.0.0 to 239.255.255.255. For each multicast address there is a set of zero or more hosts that are listening to it. This set is called the host group. There is no requirement for any host to be a member of a group to send to that group. Packets that are sent to a multicast address, are forwared only to the members of the corresponding host group. So multicast makes it possible to establish a one to some connection.

See 9.1, “Multicasting” on page 467 for detailed information about IP multicasting.

2.1.4.3 Anycasting

Sometimes, the same IP services are provided by different hosts. For example, a user wants to download a file via FTP and the file is available on different FTP servers. But the user doesn't know which connection is the fastest. So it is possible that the connection to the server from which he or she downloads the file is slower than the other ones.

Hosts that provide the same IP service could serve an anycast address to other hosts that may require the service. The connection is made to the first host in the anycast address group that responds. This process guarantees that the service is provided by the host that has the best connection to the receiver.

The anycast service will be part of IPV6. Please see Anycast Address on page 371 for further details about anycasting.

Dalam dokumen TCP/IP Tutorial and Technical Overview (Halaman 57-60)