Tuesday, 27 August 2013

TCP/IP Networking For Developers


 


TCP/IP architectural model



The TCP/IP protocol suite is so named for two of its most important protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP). A less used name for it is the Internet Protocol Suite, which is the phrase used in official Internet standards documents. In this book, we use the more common, shorter term, TCP/IP, to refer to the entire protocol suite.


The main design goal of TCP/IP was to build an interconnection of networks, referred to as an  internetwork, or internet, that provided universal communication services over heterogeneous physical networks. The clear benefit of such an internetwork is the enabling of communication between hosts on different networks, perhaps separated by a large geographical area.

The words internetwork and internet are simply a contraction of the phrase interconnected network. However, when written with a capital “I”, the Internet refers to the worldwide set of interconnected networks. Therefore, the Internet is an internet, but the reverse does not apply. The Internet is sometimes called the connected Internet.











TCP/IP protocol layers And Applications



TCP/IP is modeled in layers. This layered representation leads to the term protocol stack, which refers to the stack of layers in the protocol suite. It can be used for positioning (but not for functionally comparing) the TCP/IP protocol suite against others, such as Systems Network Architecture (SNA) and the Open System Interconnection (OSI) model.


















Application layer



The application layer is provided by the program that uses TCP/IP for communication. An application is a user process cooperating with another process usually on a different host (there is also a benefit to application communication within a single host). Examples of applications include Telnet and the File Transfer Protocol (FTP). The interface between the application and transport layers is defined by port numbers and sockets



Applications:

The highest-level protocols within the TCP/IP protocol stack are application
protocols. They communicate with applications on other internet hosts and are
the user-visible interface to the TCP/IP protocol suite.



  • Telnet for interactive terminal access to remote internet hosts
  • File Transfer Protocol (FTP) for high-speed disk-to-disk file transfers
  • Simple Mail Transfer Protocol (SMTP) as an internet mailing system




Transport layer


The transport layer provides the end-to-end data transfer by delivering data from an application to its remote peer. Multiple applications can be supported simultaneously. The most-used transport layer protocol is the Transmission Control Protocol (TCP), which provides connection-oriented reliable data delivery, duplicate data suppression, congestion control, and flow control


Another transport layer protocol is the User Datagram Protocol (see 4.2, “User Datagram Protocol (UDP)” on page 146). It provides connectionless, unreliable
best-effort service. As a result, applications using UDP as the transport protocol have to provide their own end-to-end integrity, flow control, and congestion
control, if desired. Usually, UDP is used by applications that need a fast transport mechanism and can tolerate the loss of some data.



Applications:

They use either UDP or TCP as a transport mechanism. Remember that UDP
is unreliable and offers no flow-control, so in this case, the application has to provide its own error recovery, flow control, and congestion controlfunctionality. It is often easier to build applications on top of TCP because it is a reliable stream, connection-oriented, congestion-friendly, flow control-enabled protocol. As a result, most application protocols will use TCP, but there are applications built on UDP to achieve better performance through increased protocol efficiencies.




Internetwork layer


The internetwork layer, also called the internet layer or the network layer, provides the “virtual network” image of an internet (this layer shields the higher
levels from the physical network architecture below it). Internet Protocol (IP) is the most important protocol in this layer. It is a connectionless protocol that does not assume reliability from lower layers. IP does not provide reliability, flow control, or error recovery. These functions must be provided at a
higher level.


IP provides a routing function that attempts to deliver transmitted messages to their destination. A message unit in an IP network is called an IP datagram. This is the basic unit of information transmitted across TCP/IP networks. Other internetwork-layer protocols are IP, ICMP, IGMP, ARP, and RARP.




Network interface layer


The network interface layer, also called the link layer or the data-link layer, is the interface to the actual network hardware. This interface may or may not
provide reliable delivery, and may be packet or stream oriented. In fact, TCP/IP does not specify any protocol here, but can use almost any network interface
available, which illustrates the flexibility of the IP layer. Examples are IEEE 802.2, X.25 (which is reliable in itself), ATM, FDDI, and even SNA




Networking Basics








































































































Name Resolution
























































































This command will show all the DNS caching information











Windows HOST file configuration




The short answer is that the Hosts file is like an address book. When you type an address like www.yahoo.com into your browser, the Hosts file is consulted to see if you have the IP address, or "telephone number," for that site. If you do, then your computer will "call it" and the site will open. If not, your computer will ask your ISP's (internet service provider) computer for the phone number before it can "call" that site. Most of the time, you do not have addresses in your "address book," because you have not put any there. Therefore, most of the time your computer asks for the IP address from your ISP to find sites.

If you put ad server names into your Hosts file with your own computer's IP address, your computer will never be able to contact the ad server. It will try to, but it will be simply calling itself and get a "busy signal" of sorts. Your computer will then give up calling the ad server and no ads will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.



































DNS Record Type


To Get Name Server info.






To get the Email Server Details









To get the IPv6 server Address info.







Wildcard DNS Record Type











Review of DNS Trace via WireShark














IP Routing











































































































































































Port Connectivity


























Test the PORT Connectivity of TCP






























To get which process is listening at which PORT of current  working host




















To change the Firewall settings of working host




































Network Capture





Free Application to trace network traffic at Network Interface of working host









Free Application to trace HTTP traffic on your host
























No comments:

Post a Comment