Riot Act 4812 W. 15th St. Cicero, IL 60804-1525 USA Phone/Fax 708-222-9842 www.riot-act.com ---------- From: DevWebPro <1.2121.1f-QJr8OOLw5nIq.1@ientrymail.com> Date: Mon, 28 Jan 2002 12:25:56 -0500 (EST) To: cmiller@riot-act.com Subject: TCP/IP Protocols: ARP and IP Editor's Note - 01.28.02 Measure email results immediately in REAL TIME with our reporting tool, right from your browser! Click here Hi DevWebPro Readers, Protocols are extremely important to a webmaster's understanding of how information travels on the Internet. Protocols, as most of you already know, are a set of agreed upon rules which allow computers and devices to communicate with each other. Although there are over a hundred protocols, there are only a few which are truly necessary. Among these are Hyper-Text Transfer Protocol (HTTP), Transfer Control Protocol/Internet Protocol (TCP/IP) and Simple Mail Transfer Protocol (SMTP). The best black hat hackers know these protocols, and you should too. Therefore, the next few issues of DevWebPro will be dedicated to a few of these protocols. TCP/IP is actually a suite of protocols and contains other minor protocols. Today we introduce you to the Address Resolution Protocol and the Internet Protocol. I hope that you find this issue informative and it does not put you to sleep. PLEASE NOTE: We have added three new features which some of you may find useful. The first one has to do with a forum where you can exchange ideas about the articles or issues which cause you problems. Secondly, we have a new service in which you can add headlines to your site. These headlines are updated regularly so your headlines will always be up to date. Lastly, you can also add free software downloads to your site. Like the headlines, these freewares are also updated frequently. Here are the links to these three new features: DevWebPro Forum , Add Headlines To Your Site , Add Free Software To Your Site . Sincerely, Peter Thiruselvam The DevWebPro Team TCP/IP Protocols: ARP and IP ADDRESS RESOLUTION PROTOCOL(ARP) Local Ip Address When 2 computers try to communicate, an ARP request is initiated. If the IP address is on the local network, the source host checks its ARP cache to see if it already has the hardware address(MAC address) of the receiving host. If not, a broadcast is sent to all local hosts. If the receiving host finds that the IP address of the source host matches its own then it sends a reply to the source host with its hardware address. When received by the source host, its ARP cache is updated to include this info. If no hosts respond to the broadcast then the request is discarded. Remote Ip Address This is a little different. When the destination address is found to be a remote host, the source host checks the local routing table for a path to the receiving host. If one is not found then a broadcast is sent to the router(gateway). The router replies with its hardware address and then the packet is sent to the router. Essentially the router follows the same pattern. It checks its cache for a path to the receiving host. If one is found then it forwards the packet. If not, it sends a broadcast and waits for a reply from the host. It may again determine that it is a remote host and then the process repeats with a broadcast to the next router and so on and so forth. Once the receiving host gets the request, it sends an ICMP echo request. Would You Like To Know More? ARP entries can be static or dynamic. If a dynamic entry is not used within 2 minutes then it is deleted. If it is used then it will remain for 10 minutes. A static entry will hang around until the computer is rebooted, it is deleted with arp -d, or a new hardware address is received via broadcast in which case the entry becomes dynamic. A tornado or earthquake could also remove your static entries. ARP COMMANDS 1) arp -a or arp -g Both of these commands do the same thing. They display the contents of your current arp cache. 2) arp -s ip_address hardware_address This commands a static entry to the arp cache. 3) arp -d ip_address Removes and entry from the arp cache. INTERNET PROTOCOL(IP) Background IP is a connectionless protocol, which means that a session is not created before sending data. IP is responsible for addressing and routing of packets between computers. It does not guarantee delivery and does not give acknowledgement of packets that are lost or sent out of order as this is the responsibility of higher layer protocols such as TCP. IP HEADER STRUCTURE ***VERSION: This field uses 4 bits to denote the version of IP. ***HEADER LENGTH: 4 bits denote the number of 32-bit words in the header. Them minimum length is 20 bytes. ***TYPE OF SERVICE: 8 bits that indicate the quality of service that the packet should receive. Includes precedence, delay, throughput and reliability. ***TOTAL LENGTH: 16 bits denote the total length of the packet. ***IDENTIFICATION: 16 bits are used as a unique identifier so the packet can be reassembled in the event that it is fragmented. ***FRAGMENTATION FLAGS: 3 bits used in the fragmentation process. ***FRAGMENT OFFSET: 13 bits used to determine the location of the fragment in regards to the original IP packet. ***TIME TO LIVE(ttl): 8 bits that indicate the maximum number of hops that a packet can travel before being thrown away. Asleep yet? ***PROTOCOL: 8 bits are used to identify the original upper-layer protocol used. ***HEADER CHECKSUM: 16 bits used to check for errors in the header only. ***SOURCE ADDRESS: 32 bits that indicate the IP address of the sending host. ***DESTINATION ADDRESS: 32 bits that indicate the IP address of the receiving host. ***OPTIONS AND PADDING: stores IP options. ABOUT THE AUTHOR: MC MCSE is a popular computer certification website devoted to providing free learning materials to candidates pursuing Microsoft, CompTIA and Cisco certifications. To access these resources visit http://www.mcmcse.com Hands-Free Reading! Listen to a great book now! Click. Hear. Get Free Email Newsletters Freeware WebmasterFree LinuxWMF MacWMF FLADownloads FreewareToday Web Developers / Programmers DesignNewz DevNewz DevWebPro WebProNewsAU WebProNewsCA WebProNewsUK FlashNewz JavaProNews MacProNews TheDevWeb ThePerlJournal UnixProNews WebProASP XMLProNews IT Managers/ Decision Makers WebProNews DevWebProCA DevWebProAU DevWebProUK HiTechEdge LinuxProNews NetworkNewz SysAdminNews WinXPDigest Small Business Owners ActivePro ClicksToday InsideOffice NetDummy PromoteNewz SearchNewz SohoDay WebProWire Enter Email Enter Postal Code News Headlines