Introduction tcp ip pdf




















Before a packet is passed to the routing software, it is examined. If it is corrupted, it is discarded. If it is not corrupted, a routing table is consulted to determine where to send it next. A router can be configured to pass certain types of broadcasts. Generally, a firewall is a first-line defense against attacks from the outside world. A firewall can be hardware-based or software-based.

A hardware-based firewall is a special router with additional filter and management capabilities. A software-based firewall runs on top of the operating system and turns a PC into a firewall.

Conceptually, firewalls can be categorized as Network layer aka Data Link layer or Application layer. Network layer firewalls tend to be very fast. They control traffic based on the source and destination addresses and port numbers, using this information to decide whether to pass the data on or discard it. Application layer firewalls do not allow traffic to flow directly between networks. They are typically hosts running proxy servers.

Proxy servers can implement protocol specific security because they understand the application protocol being used. For instance, an application layer firewall can be configured to allow only e-mail into and out of the local network it protects. The term default gateway is used to identify the router that con- nects a LAN to an internet. A gateway can do more than a router; it also performs protocol conversions from one network to another. In peer-to-peer net- works each workstation has the same capabilities and responsibilities.

A server application waits for a client application to initiate contact. Table Summary of Differences between Client and Server Software Client Software Server Software An arbitrary application program that becomes A special-purpose, privileged program a client when a remote service is desired.

It also dedicated to providing one service. It can performs other local computations. Actively initiates contact. Passively waits for contact. Invoked when the system boots and executes Invoked by a user and executes for one session. Capable of accessing multiple services as Accepts contact from an arbitrary number of needed, but actively contacts only one remote clients, but offers a single service or a fixed set server at a time.

Can require powerful hardware and a Does not require special hardware or a sophisticated operating system, depending on sophisticated operating system. Servers select a port to wait for a connection. Most services have well-known port numbers. For example, HTTP uses port When a web browser the client requests a web page it specifies port 80 when contacting the server.

Clients usually have ephemeral port numbers since they exist only as long as the session lasts. Some of the common well-known TCP port numbers are listed in the table below. The complexity of network- ing protocol software calls for the problem to be divided into smaller pieces. A layering model aids this division and provides the conceptual basis for understanding how software protocols together with hard- ware devices provide a powerful communication system.

Layer 6 Presentation Specifies how to represent data. Specifies how to establish communication with a remote Layer 5 Session system. Layer 4 Transport Specifies how to reliably handle data transfer. Specifies addressing assignments and how packets are Layer 3 Network forwarded.

Specifies the organization of data into frames and how to Layer 2 Data Link send frames over a network. Layer 1 Physical Specifies the basic network hardware. Layer 4 Transport Specifies how to ensure reliable transport of data. Layer 3 Internet Specifies packet format and routing. Layer 2 Network Specifies frame organization and transmittal. It has become the de facto standard. Protocols are sometimes referred to as protocol stacks or protocol suites.

A protocol stack is an appropriate term because it indicates the layered approach used to design the networking software Figure 4. The details of the underlying physical connec- tions are hidden by the software. The sending software at each layer communicates with the corresponding layer at the receiving side through information stored in headers.

Each layer adds its header to the front of the message from the next higher layer. The header is removed by the corresponding layer on the receiving side. Figure 5. It is a connectionless, unreliable packet delivery service. Connectionless means that there is no handshaking, each packet is independent of any other packet. It is unreliable because there is no guarantee that a packet gets delivered; higher-level protocols must deal with that.

IP specifies a unique bit number for each host on a network. These terms are interchangeable. Each packet sent across the internet contains the IP address of the source of the packet and the IP address of its destination.

For routing efficiency, the IP address is considered in two parts: the prefix which identifies the physical network, and the suffix which identifies a computer on the network. A unique prefix is needed for each network in an internet. The first three classes, A, B and C, are the primary network classes. When interacting with mere humans, software uses dotted decimal notation; each 8 bits is treated as an unsigned binary integer separated by periods.

IP reserves host address 0 to denote a network. For class A networks the net- mask is always While the IP address classes are the convention, IP addresses are typically subnetted to smaller address sets that do not match the class system.

The suffix bits are divided into a subnet ID and a host ID. This makes sense for class A and B networks, since no one attaches as many hosts to these networks as is allowed. Whether to subnet and how many bits to use for the subnet ID is determined by the local network administrator of each network.

If subnetting is used, then the netmask will have to reflect this fact. On a class B network with subnetting, the netmask would not be The bits of the Host ID that were used for the subnet would need to be set in the netmask. The network ID and the subnet ID must be valid network and subnet values.

A router will not forward this type of broadcast to other sub net- works. All hosts and routers on an internet contain IP protocol software and use a routing table to determine where to send a packet next.

The destination IP address in the IP header contains the ultimate destination of the IP datagram, but it might go through several other IP addresses routers before reaching that destination. The entries can be updated manually by a net- work administrator or automatically by employing a routing protocol such as Routing Information Proto- col RIP. Routing table entries provide needed information to each local host regarding how to communicate with remote networks and hosts.

If a matching route is not found, IP discards the datagram. This permits a large packet to travel across a network which only accepts smaller packets. IP fragments and reassembles packets transparent to the higher layers.

If TTL reaches zero, the packet is discarded. The network hard- ware does not understand the software-maintained IP addresses. There are three general addressing strategies: 1. Table lookup 1. Translation performed by a mathematical function 2. ARP employs the third strategy, message exchange. ARP defines a request and a response. A request message is placed in a hardware frame e. Only the computer whose IP address matches the request sends a response.

They provide end-to-end communication services for applications. UDP is often used by applications that need multicast or broadcast delivery, services not offered by TCP. TCP enables two hosts to establish a connection and exchange streams of data, which are treated in bytes. The delivery of data in the proper order is guaranteed. TCP can detect errors or lost data and can trigger retransmission until the data is received, complete and without errors.

The following is a sim- plified explanation of this process. The connection is then established and is uniquely identified by a 4-tuple called a socket or socket pair: destination IP address, destination port number source IP address, source port number During the connection setup phase, these values are entered in a table and saved for the duration of the connection.

The header comprises all necessary information for reliable, complete delivery of data. Among other things, such as IP addresses, the header contains the following fields: Sequence Number - This bit number contains either the sequence number of the first byte of data in this particular segment or the Initial Sequence Number ISN that identifies the first byte of data that will be sent for this particular connection.

An ISN is chosen by both client and server. It is the sequence number of the next expected byte of data. This field is only valid when the ACK control bit is set. Since sending an ACK costs nothing, because it and the Acknowledgement Number field are part of the header the ACK control bit is always set after a connection has been established. Window Size - This bit number states how much data the receiving end of the TCP connection will allow. The sending end of the TCP connection must stop and wait for an acknowledgement after it has sent the amount of data allowed.

A checksum can only detect some errors, not all, and cannot correct any. Some ICMP messages are returned to application protocols.

It sends an ICMP echo request and waits for a reply. Ping can be used to transmit a series of packets to measure average round-trip times and packet loss per- centages.

Domain names are sig- nificant because they guide users to where they want to go on the Internet. A domain name is simply an alphanumeric character string separated into segments by periods. Name servers contain information on some segment of the DNS and make that information available to clients who are called resolvers.

If resolve is passed a domain name, a series of queries take place between the computer that called resolve and computers running name server software. For example, to resolve the domain name www. C can be used. Chances are that your local name server does not have the requested information, so it queries the root server.

The root server will not know the IP address either, but it will know where to find the name server that contains authorita- 22 rabbit. This information is returned to your local name server, which then sends a query to the name server for the. Again, this name server does not know the requested IP address, but does know the local name server that handles rabbitsemiconductor.

This information is sent back to your local name server, who sends a final query to the local name server of rabbitsemiconduc- tor. This local name server returns the requested IP address of www.

IP version 4 is supported, not version 6. The implementation details that are discussed here pertain to versions of Dynamic C prior to 7.

Run the utility program discussed in Section 2. The IP address of the host e. This is only necessary if DNS backups are needed. DHCP servers are usually centrally located on a local network and operated by the network administrator.

In Dynamic C versions 6. The MSS is bytes. It can be reduced to as little as bytes. This happens with web servers when web pages have several graphic images, each requiring a separate socket. It takes two strings. The first string is the setting to be changed and the second string is the value to change it to.

The first couple of defines set up the default IP configuration information. C file. Run the program and try to run ping This call initializes internal data structures and enables the Ethernet chip, which will take a couple of sec- onds with the RealTek chip. LIB is ready to handle incoming packets. LIB to process it. Rough numbers are less than a millisecond if there is nothing to do, 10s of milliseconds for typical packet pro- cessing, and s of milliseconds under exceptional circumstances.

These structures are, by default, around bytes each. This can be compared with how humans speak. A French person cannot communicate with a Vietnamese person without help from a translator since they speak different languages. If you want your computer and computer like devices laptops, tablets, mobiles etc. It is an industry standard and not limited to any specific vendor. Every network adapter has a globally unique and permanent physical address, which is known as MAC address physical address or hardware address.

The physical address is burnt into the card while manufacturing. Low-lying hardware-conscious protocols on a LAN deliver data packets using the adapter's physical address. The network adapter of each computer listens to every transmission on the local network to determine whether a message is addressed to its own physical address. For a small LAN , this will work well. But when your computer is connected to a big network like internet , it may need to listen to millions of transmissions per second.

This may cause your network connection to stop functioning. To avoid this, network administrators often segment divide big networks into smaller networks using devices such as routers to reduce network traffic, so that the unwanted data traffic from one network may not create problem in another network. A network can be again subdivided into smaller subnets so that a message can travel efficiently from its source to the destination. A logical address is an address configured through the network software.

A router is a network infrastructure device which can read logical addressing information and direct data across the network to its destination. IP addresses are designed for the computers and it is difficult for humans to remember many IP addresses. TCP Transmission Control Protocol defines many of these error-checking, flow-control, and acknowledgement functions. Multiplexing means accepting data from different applications and directing that data to different applications listening on different receiving computers.



0コメント

  • 1000 / 1000