TCP/IP Tutorial and Technical Overview phần 4 pptx

100 379 0
TCP/IP Tutorial and Technical Overview phần 4 pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

276 TCP/IP Tutorial and Technical Overview 7.1 Mobile IP overview Mobile IP enables a device to maintain the same IP address (its home address) wherever it attaches to the network. (Obviously, a device with an IP address plugged into the wrong subnet will normally be unreachable.) However, the mobile device also has a care-of address, which connects to the subnet where it is currently located. The care-of address is managed by a home agent, which is a device on the home subnet of the mobile device. Any packet addressed to the IP address of the mobile device is intercepted by the home agent and then forwarded to the care-of address through a tunnel. After it arrives at the end of the tunnel, the datagram is delivered to the mobile device. The mobile node generally uses its home address as the source address of all datagrams that it sends. Mobile IP can help resolve address shortage problems and reduce administrative workload, because each device that needs to attach to the network at multiple locations only requires a single IP address. The following terminology is used in a mobile IP network configuration: Home address The static IP address allocated to a mobile node. It does not change, no matter where the node attaches to the network. Home network A subnet with a network prefix matching the home address of the mobile node. Datagrams intended for the home address of the mobile node will always be routed to this network. Tunnel The path followed by an encapsulated datagram. Visited network A network to which the mobile node is connected (other than the node's home network). Home agent A router on the home network of the mobile node that maintains current location information for the node and tunnels datagrams for delivery to the node when it is away from home. Foreign agent A router on a visited network that registers the presence of a mobile node and detunnels and forwards datagrams to the node that have been tunneled by the mobile node's home agent. Chapter 7. Mobile IP 277 7.1.1 Mobile IP operation Mobility agents (home agents and foreign agents) advertise their presence in the network by means of agent advertisement messages, which are ICMP router advertisement messages with extensions (see Figure 7-3 on page 280). A mobile node can also explicitly request one of these messages with an agent solicitation message. When a mobile node connects to the network and receives one of these messages, it is able to determine whether it is on its home network or a foreign network. If the mobile node detects that it is on its home network, it will operate normally, without the use of mobility services. In addition, if it has just returned to the home network, having previously been working elsewhere, it will deregister itself with the home agent. This is done through the exchange of a registration request and registration reply. If, however, the mobile node detects, from an agent advertisement, that it has moved to a foreign network, it obtains a care-of address for the foreign network. This address can be obtained from the foreign agent (a foreign agent care-of address, which is the address of the foreign agent itself), or it can be obtained by some other mechanism, such as DHCP (in which case, it is known as a co-located care-of address). The use of co-located care-of addresses has the advantage that the mobile node does not need a foreign agent to be present at every network that it visits, but it does require that a pool of IP addresses be made available for visiting mobile nodes by the DHCP server. Note that communication between a mobile node and a foreign agent takes place at the link layer level. It cannot use the normal IP routing mechanism, because the mobile node's IP address does not belong to the subnet in which it is currently located. After the mobile node has received its care-of address, it needs to register itself with its home agent. This can be done through the foreign agent, which forwards the request to the home agent, or directly with the home agent (see Figure 7-4 on page 281). After the home agent has registered the care-of address for the mobile node in its new position, any datagram intended for the home address of the mobile node is intercepted by the home agent and tunneled to the care-of address. The tunnel endpoint can be at a foreign agent (if the mobile node has a foreign agent care-of address), or at the mobile node itself (if it has a co-located care-of address). Here the original datagram is removed from the tunnel and delivered to the mobile node. The mobile node will generally respond to the received datagram using standard IP routing mechanisms. 278 TCP/IP Tutorial and Technical Overview Figure 7-1 shows a mobile IP operation. Figure 7-1 Mobile IP operation 7.1.2 Mobility agent advertisement extensions The mobility agent advertisement consists of an ICMP router Advertisement with one or more of the following extensions, as shown in Figure 7-2. Figure 7-2 Mobility agent advertisement extension 9.180.128 T u n n e l 9.170.50 (3) 9.160.5 (1) Host A sends datagram to B (9.180.128.5) routed to the 9.180.128 network. (1) (2) (4) Host A Home Agent Mobile Node B 9.180.128.5 (care-of 9.170.50.2) Foreign Agent 9.170.50.2 (3) Foreign agent detunnels datagram and forwards to mobile node. (2) Home agent intercepts datragram and tunnels to B's care-of address. (4) Mobile Node B replies to A using standard routing. Chapter 7. Mobile IP 279 Where: Type 16. Length (6+[4*N]), where N is the number of care-of addresses advertised. Sequence number The number of advertisements sent by this agent since it was initialized. Registration lifetime The longest lifetime, in seconds, that this agent will accept a Registration Request. A value of 0xffff indicates infinity. This field bears no relationship with the lifetime field in the router advertisement itself. R Registration required. Mobile node must register with this agent rather than use a co-located care-of address. B Busy. Foreign agent cannot accept additional registrations. H Home agent. This agent offers service as a home agent on this link. F Foreign agent. This agent offers service as a foreign agent on this link. M Minimal encapsulation. This agent receives tunneled datagrams that use minimal encapsulation. G GRE encapsulation. This agent receives tunneled datagrams that use GRE encapsulation. V Van Jacobson Header Compression. This agent supports use of Van Jacobson Header Compression over the link with any registered mobile node. Reserved This area is ignored. Care-of Address(es) The care-of address or addresses advertised by this agent. At least one must be included if the F bit is set. Note that a foreign agent might be too busy to service additional mobile nodes at certain times. However, it must continue to send agent advertisements (with the B bit set) so that mobile nodes that are already registered will know that the agent has not failed or that they are still in range of the foreign agent. 280 TCP/IP Tutorial and Technical Overview The prefix lengths extension can follow the mobility agent advertisement extension. It is used to indicate the number of bits that need to be applied to each router address (in the ICMP router advertisement portion of the message) when network prefixes are being used for move detection. See Figure 7-3 for more details. Figure 7-3 Prefix-lengths extensions Where: Type 19. Length The number of router address entries in the router advertisement portion of the agent advertisement. Prefix length(s) The number of leading bits that make up the network prefix for each of the router addresses in the router advertisement portion of the agent advertisement. Each prefix length is a separate byte, in the order that the router addresses are listed. 7.2 Mobile IP registration process RFC 3344 defines two different procedures for mobile IP registration: The mobile node can register through a foreign agent, which relays the registration to the mobile node's home agent, or it can register directly with its home agent. The following rules are used to determine which of these registration processes is used:  If the mobile node has obtained its care-of address from a foreign agent, it must register through that foreign agent.  If the mobile node is using a co-located care-of address, but has received an agent advertisement from a foreign agent on this subnet (which has the R bit (registration required) set in that advertisement), it registers through the agent. This mechanism allows for accounting to take place on foreign subnets, even if DHCP and co-located care-of address is the preferred method of address allocation. Chapter 7. Mobile IP 281  If the mobile node is using a co-located care-of address but has not received such an advertisement, it must register directly with its home agent.  If the mobile node returns to its home network, it must deregister directly with its home agent. The registration process involves the exchange of registration request and registration reply messages, which are UDP datagrams. The registration request is sent to port 434. The request consists of a UDP header, followed by the fields shown in Figure 7-4. Figure 7-4 Mobile IP: Registration request Where: Type 1. S Simultaneous bindings. If this bit is set, the home agent keeps any previous bindings for this node as well as adding the new binding. The home agent will then forward any datagrams for the node to multiple care-of addresses. This capability is particularly intended for wireless mobile nodes. B Broadcast datagrams. If this bit is set, the home agent tunnels any broadcast datagrams on the home network to the mobile node. 282 TCP/IP Tutorial and Technical Overview D Decapsulation by mobile node. The mobile node is using a co-located care-of address and will, itself, decapsulate the datagrams sent to it. M Minimal encapsulation should be used for datagrams tunneled to the mobile node. G GRE encapsulation should be used for datagrams tunneled to the mobile node. V Van Jacobson compression should be used over the link between agent and mobile node. rsv Reserved bits. Sent as zero. Lifetime The number of seconds remaining before the registration will be considered expired. A value of zero indicates a request for deregistration. 0xffff indicates infinity. Home address The home IP address of the mobile node. Home agent The IP address of the mobile node's home agent. Care-of address The IP address for the end of the tunnel. Identification A 64-bit identification number constructed by the mobile node and used for matching registration requests with replies. Extensions A number of extensions are defined, all relating to authentication of the registration process. See RFC 3344 for full details. Chapter 7. Mobile IP 283 The mobility agent responds to a registration request with a registration reply and with a destination port copied from the source port of the registration request. Figure 7-5 shows the registration reply format. Figure 7-5 Mobile IP: Registration reply Where: Type 3. Code Indicates the result of the registration request: 0 Registration accepted. 1 Registration accepted, but simultaneous bindings unsupported. 64-88 Registration denied by foreign agent. 128-136 Registration denied by home agent. Lifetime The number of seconds remaining before the registration is considered expired. (Code field must be 0 or 1.) Home address Home IP address of the mobile node. Home agent IP address of the mobile node's home agent. Identification A 64-bit identification number used for matching registration requests with replies. Extensions A number of extensions are defined, all relating to authentication of the registration process. For full details of these messages, refer to RFC 3344. 284 TCP/IP Tutorial and Technical Overview 7.2.1 Tunneling The home agent examines the destination IP address of all datagrams arriving on the home network. If the address matches any of the mobile nodes currently registered as being away from home, the home agent tunnels (using IP in IP encapsulation) the datagram to the care-of address for that mobile node. It is likely that the home agent will also be a router on the home network. In this case, it is likely that it will receive datagrams addressed for a mobile node that is not currently registered as being away from home. In this case, the home agent assumes that the mobile node is at home, and forwards the datagram to the home network. When a foreign agent receives a datagram sent to its advertised care-of address, it compares the inner destination address with its list of registered visitors. If it finds a match, the foreign agent forwards the decapsulated datagram to the appropriate mobile node. If there is no match, the datagram is discarded. (The foreign agent must not forward such a datagram to the original IP header; otherwise, a routing loop occurs.) If the mobile node is using a co-located care-of address, the end of the tunnel lies at the mobile node itself. The mobile node is responsible for decapsulating the datagrams received from the home agent. 7.2.2 Broadcast datagrams If the home agent receives a broadcast datagram, it must not forward it to mobile nodes unless the mobile node specifically requested forwarding of broadcasts in its registration request. In this case, it forwards the datagram in one of the following manners:  If the mobile node has a co-located care-of address, the home agent simply encapsulates the datagram and tunnels it directly to the care-of address.  If the mobile node has a foreign agent care-of address, the home agent first encapsulates the broadcast in a unicast datagram addressed to the home address of the node. It then encapsulates and tunnels this datagram to the care-of address. In this way, the foreign agent, when it decapsulates the datagram, knows to which of its registered mobile nodes it needs to forward the broadcast. 7.2.3 Move detection Mobile IP is designed not just for mobile users who regularly move from one site to another and attach their mobile computers to different subnets each time, but also for truly dynamic mobile users (for example, users of a wireless connection Chapter 7. Mobile IP 285 from an aircraft). Two mechanisms are defined that allow the mobile node to detect when it has moved from one subnet to another. When the mobile node detects that it has moved, it must re-register with a care-of address on the new foreign network. The two methods of move detection are as follows:  Foreign agents are consistently advertising their presence in the network by means of agent advertisements. When the mobile node receives an agent advertisement from its foreign agent, it starts a timer based on the lifetime field in the advertisement. If the mobile node has not received another advertisement from the same foreign agent by the time the lifetime has expired, the mobile node assumes that it has lost contact with that agent. If, in the meantime, it has received an advertisement from another foreign agent, it immediately attempts registration with the new agent. If it has not received any further agent advertisements, it uses agent solicitation to try and locate a new foreign agent with which to register.  The mobile node checks whether any newly received agent advertisements are on the same subnet as its current care-of address. If the network prefix is different, the mobile node assumes that it has moved. On expiration of its current care-of address, the mobile node registers with the foreign agent that sent the new agent advertisement. 7.2.4 Returning home When the mobile node receives an agent advertisement from its own home agent, it knows that it has returned to its home network. Before deregistering with the home agent, the mobile node must configure its routing table for operation on the home subnet. 7.2.5 ARP considerations Mobile IP requires two extensions to ARP to cope with the movement of mobile nodes. These are: Proxy ARP An ARP reply sent by one node on behalf of another that is either unable or unwilling to answer an ARP request on its own behalf Gratuitous ARP An ARP packet sent as a local broadcast packet by one node that causes all receiving nodes to update an entry in their ARP cache When a mobile node is registered as being on a foreign network, its home agent will use proxy ARP in response to any ARP request seeking the mobile node's MAC address. The home agent responds to the request giving its own MAC address. [...]... Different object types are used for IPv4 and IPv6 The object content depends on the object type and has a maximum length of 65528 bytes TCP/IP Tutorial and Technical Overview All RSVP messages are built of a variable number of objects The recommended object order for the most important RSVP messages, the path, and the Resv message, are shown in Figure 8-11, which gives an overview of the format of the RSVP... enhancements to the IP network model to support real-time transmissions and guaranteed bandwidth for specific flows In this case, we define a flow as a distinguishable stream of related datagrams from a unique sender to a unique receiver that results from a single user activity and requires the same QoS 288 TCP/IP Tutorial and Technical Overview For example, a flow might consist of one video stream between... means that the service guarantees only apply for packets that 2 94 TCP/IP Tutorial and Technical Overview respect the token bucket rule that over all time periods T, the amount of data sent cannot exceed rT+b Controlled Load Service is designed for applications that can tolerate a reasonable amount of packet loss and delay, such as audio and videoconferencing software 8.2.3 Guaranteed Service The Guaranteed... contains the total length of the RSVP message including the common header and all objects that follow The length is counted in bytes TCP/IP Tutorial and Technical Overview The RSVP objects that follow the common header consist of a 32-bit header and one or more 32-bit words Figure 8-10 shows the RSVP object header 0 Length (Bytes) 16 24 Class - Number 31 C-Type (Object Contents) Figure 8-10 RSVP object... total privacy is required 7.3 RFCs relevant to this chapter The following RFC provides detailed information about the connection protocols and architectures presented throughout this chapter: RFC 3 344 – IP Mobility Support (August 2002) 286 TCP/IP Tutorial and Technical Overview 8 Chapter 8 Quality of service With the increased use of the IP based networks, including the Internet, there has been a large... reverse direction toward the sender and 298 TCP/IP Tutorial and Technical Overview establish the resource reservation in every router Figure 8-5 shows the flow of the reservation messages trough the routers Router 2 Address of Router 1 RESV Receiver Router 1 Sender Address of Sender Address of Router 2 Router 5 Router 3 RESV Address of Router 3 RESV Address of Router 5 Router 4 Figure 8-5 RSVP Resv messages... which specifies the bandwidth for the flow reservation The Guaranteed Service model is defined in RFC 2212 8.2 .4 The Resource Reservation Protocol (RSVP) The Integrated Services model uses the Resource Reservation Protocol (RSVP) to set up and control QoS reservations RSVP is defined in RFC 2205 and has the status of a proposed standard Because RSVP is an Internet control protocol and not a routing protocol,... does not need to know the characteristics of all possible receivers to structure the reservations 296 TCP/IP Tutorial and Technical Overview To establish a reservation with RSVP, the receivers send reservation requests to the senders, depending on their system capabilities For example, a fast workstation and a slow PC want to receive a high-quality MPEG video stream with 30 frames per second, which has... a token bucket filter This principle defines a data-flow control mechanism that adds characters (tokens) in periodical time intervals into a buffer (bucket) and allows a data packet to leave the sender only if 292 TCP/IP Tutorial and Technical Overview there are at least as many tokens in the bucket as the packet length of the data packet This strategy allows precise control of the time interval between... reaches a point where an existing reservation is equal or greater than that being requested At this point, the arriving request is merged with the reservation in place and does not need to be forwarded further 300 TCP/IP Tutorial and Technical Overview Figure 8-7 shows the reservation merging for a multicast flow Reservation Merge Path R1 Path RESV S RESV RESV R2 RESV Host Reserved Resources Packet Flow . the registration process. For full details of these messages, refer to RFC 3 344 . 2 84 TCP/IP Tutorial and Technical Overview 7.2.1 Tunneling The home agent examines the destination IP address of. information depends on the type of service and the needs of the QoS requesting application. It can consist of 2 94 TCP/IP Tutorial and Technical Overview a specific bandwidth, a maximum packet delay,. the Internet, and presents the two main approaches to implementing QoS in TCP/IP networks:  Integrated Services  Differentiated Services 8 288 TCP/IP Tutorial and Technical Overview 8.1 Why

Ngày đăng: 14/08/2014, 14:20

Tài liệu cùng người dùng

Tài liệu liên quan