The main job of IP is to route data (packets) from the source host to the destination host.
Because a network might need to forward large numbers of packets, the IP routing process
is very simple. IP does not require any overhead agreements or messages before sending a
packet, making IP a connectionless protocol. IP tries to deliver each packet, but if a router
or host’s IP process cannot deliver the packet, it is discarded—with no error recovery. The goal with IP is to deliver packets with as little per-packet work as possible, which allows
for large packet volumes.
IP header
*A routing protocol learns routes and puts those routes in a routing table.
*A routed protocol defines the type of packet forwarded, or routed, through a network.
IP addresses consist of a 32-bit number, usually written in dotted-decimal notation. For
instance, 168.1.1.1 is an IP address written in dotted-decimal form; the actual binary version is
10101000 00000001 00000001 00000001.
Each decimal number in an IP address is called an octet. So, for an IP address of 168.1.1.1, the first octet is 168, the second octet is 1, and so on.
Classes of Networks
IP defines three different network classes for addresses used by individual hosts—addresses called unicast IP addresses. These three network classes are called A, B, and C. TCP/IP defines
Class D (multicast) addresses and Class E (experimental) addresses as well.
By definition, all addresses in the same Class A, B, or C network have the same numeric
value network portion of the addresses. The rest of the address is called the host portion of
the address.
Class A, B, and C networks each have a different length for the part that identifies the network:
■ Class A networks have a 1-byte-long network part. That leaves 3 bytes for the rest of
the address, called the host part.
■ Class B networks have a 2-byte-long network part, leaving 2 bytes for the host portion
of the address.
■ Class C networks have a 3-byte-long network part, leaving only 1 byte for the host part.
*The Valid Network Numbers column shows actual network numbers. Networks 0.0.0.0 (originally defined for use as a broadcast address) and 127.0.0.0 (still available for use as the loopback address) are reserved.
IP Subnetting
Three parts of an IP address (network, subnet, and host), are called classful addressing. The term classful addressing refers to how you can think about IP addresses—specifically, that they have three parts.
IP addresses called classless addressing. Instead of three parts, each address has two parts:
■ The part on which routing is based
■ The host part
Finally, IP addressing with subnetting uses a concept called a subnet mask. A subnet mask
helps define the structure of an IP address.
Host Routing
Hosts actually use some simple routing logic when choosing where to send a packet. This
two-step logic is as follows:
Step 1 If the destination IP address is in the same subnet as I am, send the packet directly
to that destination host.
Step 2 If the destination IP address is not in the same subnet as I am, send the
packet to my default gateway (a router’s Ethernet interface on the subnet).
Router Forwarding Decisions and the IP Routing Table
Step A PC1 sends the packet to its default gateway.
Step B R1 processes the incoming frame and forwards the packet to R2.
Step C R2 processes the incoming frame and forwards the packet to R3.
Step D R3 processes the incoming frame and forwards the packet to PC2.
IP Routing Protocols
The routing (forwarding) process depends heavily on having an accurate and up-to-date
IP routing table on each router. IP routing protocols fill the routers’ IP routing tables with
valid, loop-free routes.
■ To dynamically learn and fill the routing table with a route to all subnets in the network.
■ If more than one route to a subnet is available, to place the best route in the routing table.
■ To notice when routes in the table are no longer valid, and to remove them from the routing table.
■ If a route is removed from the routing table and another route through another
neighboring router is available, to add the route to the routing table. (Many people view
this goal and the preceding one as a single goal.)
■ To add new routes, or to replace lost routes, with the best currently available route as
quickly as possible. The time between losing the route and finding a working replacement route is called convergence time.
■ To prevent routing loops.
Network Layer Utilities
■ Address Resolution Protocol (ARP)
■ Domain Name System (DNS)
■ Dynamic Host Configuration Protocol (DHCP)
■ Ping
Ping (Packet Internet Groper) uses the Internet Control Message Protocol (ICMP), sending a message called an ICMP echo request to another IP address. The computer with that IP address should reply with an ICMP echo reply.
Exness交易商开户流程
1 year ago
No comments:
Post a Comment