Lecture 5 internet-protocol_assignments


Published on

Internet Technology

Published in: Education, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Lecture 5 internet-protocol_assignments

  1. 1. Chapter 5: Internet Protocols BITS 2513: Internet Technology
  2. 2. To support the Internet and all its services, many protocols are necessary. <ul><li>Some protocols that we will look at: </li></ul><ul><li>IP </li></ul><ul><li>IPv6 </li></ul><ul><li>ARP: Address Resolution Protocol </li></ul><ul><li>ICMP: Internet Control Message Protocol </li></ul><ul><li>TCP (Transmission Control Protocol) </li></ul><ul><li>UDP (User Datagram Protocol) </li></ul><ul><li>SMTP (Simple Mail Transfer Protocol) </li></ul><ul><li>SNMP (Simple Network Management Protocol) </li></ul>
  3. 3. Protocol <ul><li>A protocol is set of rules and conventions used to impose a standardized, structured language for the communication between multiple parties. </li></ul><ul><li>For example, a protocol might define the order in which information is exchanged between two parties. </li></ul><ul><li>In fact, a data exchange can only take place between two computers using the same protocol. </li></ul>
  4. 4. IP : Internet Protocol <ul><li>IP is the standard that defines the manner in which the network layers of two hosts interact. These hosts may be on the same network or reside on physically distinct heterogeneous networks. </li></ul><ul><li>IP provides a connectionless , unreliable , best-effort packet delivery service. </li></ul><ul><li>A best-effort delivery service means that packets might be discarded during transmission, but not without a good reason. </li></ul><ul><li>It has two primary responsibilities: </li></ul><ul><ul><li>providing connectionless, </li></ul></ul><ul><ul><li>best-effort delivery of datagrams through a network and providing fragmentation and reassembly of datagrams to support data links with different maximum-transmission unit (MTU) sizes. The IP addressing scheme is integral to the process of routing IP datagrams through an internetwork. Each IP address has specific components and follows a basic format. These IP addresses can be subdivided and used to create addresses for subnetworks. </li></ul></ul>
  5. 5. The Internet Protocol (IP) <ul><li>IP prepares a packet for transmission across the Internet. </li></ul><ul><li>The IP header is encapsulated onto a transport data packet. </li></ul><ul><li>The IP packet is then passed to the next layer where further network information is encapsulated onto it. </li></ul>
  6. 6. IP Packet
  7. 7. IPv6 <ul><li>IPv6 is also called next generation IP or IPng. </li></ul><ul><li>The increasing in Web-based business has created immense demand for Internet addresses. </li></ul><ul><li>Currently, most Web sites use IPv4 networking, but this protocol is running out of address space. </li></ul><ul><li>The IPv6 networking foundation, which is compatible and interoperable with IPv4, was created to solve these problems: </li></ul><ul><ul><li>Exhaustion of the IPv4 address space </li></ul></ul><ul><ul><li>Exhaustion of the capacity for global routing tables </li></ul></ul><ul><ul><li>Complexities in configurations </li></ul></ul><ul><ul><li>Poor security at the IP level </li></ul></ul><ul><ul><li>Poor delivery of real-time data </li></ul></ul>
  8. 8. ASSIGNMENT 2 (Part 1) <ul><li>IPv6 is now gaining popularity compared to IPv4 addressing. </li></ul><ul><ul><li>What do you understand about IPv6? </li></ul></ul><ul><ul><li>List down and describe the differences between IPv4 and IPv6 addressing </li></ul></ul><ul><ul><li>List down and describe the similarities between IPv4 and IPv6 </li></ul></ul><ul><ul><li>What are the advantages of using IPv6 addressing? </li></ul></ul><ul><li>Please submit latest by 24 th October 2011 </li></ul>
  9. 9. ARP (address resolution protocol) <ul><li>Address resolution provides a mapping between two different forms of addresses </li></ul><ul><ul><li>32-bit IP addresses and whatever the data link uses </li></ul></ul><ul><li>ARP is a protocol used to do address resolution in the TCP/IP protocol suite (RFC826) </li></ul><ul><li>ARP provides a dynamic mapping from an IP address to the corresponding hardware address </li></ul>
  10. 10. Why it is needed? ARP <ul><li>The address resolution protocol is needed </li></ul><ul><li>because IP addresses only make sense to </li></ul><ul><li>the TCP/IP protocol suite. </li></ul><ul><li>A data link, such as Ethernet, has its own </li></ul><ul><li>addressing scheme to which any network </li></ul><ul><li>layer using the data link must conform. </li></ul>
  11. 11. Basic Idea <ul><li>ARP is required on multi-access channels and relies on the ability to broadcast </li></ul><ul><li>The protocol is simple: </li></ul><ul><ul><li>broadcast a packet containing the IP address of the destination machine </li></ul></ul><ul><ul><li>the machine with that address, or possibly a server, sends a reply containing the hardware address </li></ul></ul><ul><ul><li>upon receipt the hardware address is used to send the original packet </li></ul></ul>
  12. 12. ARP Cache <ul><li>Essential to the efficient operation of ARP is the maintenance of a cache on each host </li></ul><ul><li>The cache maintains the recent IP to physical address mappings </li></ul><ul><li>Each entry is aged (usually the lifetime is 20 minutes) forcing periodic updates of the cache </li></ul><ul><li>ARP replies are often broadcast so that all hosts can update their caches </li></ul>
  13. 13. Step when ARP request packet generated <ul><ul><li>The IP module sends a packet, destined for another host in the network, to the ARP module. </li></ul></ul><ul><ul><li>The ARP module looks up the ARP table (cache) to resolve the IP address. </li></ul></ul><ul><ul><li>If the supplied IP address is present in the ARP cache, it is resolved into its Ethernet address. </li></ul></ul><ul><ul><li>If the ARP module is not able to find an entry for this IP address in the ARP cache, then it sends an ARP request packet to the Ethernet driver, to resolve the IP address to the Ethernet address. </li></ul></ul><ul><ul><li>After the IP address is resolved by the ARP module, the packet is sent to the Ethernet driver for transmission. </li></ul></ul>
  14. 14. Step for ARP request packet is received by a host <ul><ul><li>If the IP address to be resolved is for this host, then the ARP module sends an ARP reply packet with its Ethernet MAC address. </li></ul></ul><ul><ul><li>If the IP address to be resolved is for this host, then the ARP module updates its ARP cache with the source Ethernet MAC address to source IP address mapping present in the ARP request packet. If the entry is already present in the cache, it is overwritten. If it is not present, it is added. </li></ul></ul><ul><ul><li>If the IP address to be resolved is not for this host, then the ARP module discards the ARP request packet. </li></ul></ul>
  15. 15. arp Commnd <ul><li>The arp command on a Unix system can be used to see the contents of the ARP cache </li></ul>kiev> arp -a Net to Media Table Device IP Address Mask Flags Phys Addr ------ -------------------- --------------- ----- --------------- hme0 redshirt 00:60:08:8b:e9:aa hme0 tiger 08:00:20:85:f6:8d hme0 thunderbolt 08:00:20:9a:af:60 hme0 starfury 08:00:20:9a:af:79 hme0 cs3-router 00:10:11:09:f0:28 hme0 epsilon3-38 08:00:20:86:71:c0 hme0 mordor-38 08:00:20:96:01:ad hme0 itlabman 00:00:c0:65:d7:b9 hme0 joanne 00:05:02:59:51:52 hme0 laurie 00:05:02:79:c4:20 hme0 kiev SP 08:00:20:9e:f2:99
  16. 16. ARP Packet Format 16 8 Sender’s Protocol Address Target Hardware Address 31 Hardware Type Hardware Size Protocol Size Operation Protocol Type Sender’s Hardware Address (for Ethernet 6 bytes) Target Hardware Address Target Protocol Address Sender’s Hardware Address Sender’s Protocol Address
  17. 17. Proxy ARP <ul><li>Proxy ARP lets a router answer ARP requests on one of its networks for a host on another of its networks </li></ul><ul><li>This fools the sender of the ARP request into thinking that the router is the destination </li></ul><ul><li>The router is acting as a proxy agent for the destination, relaying packets to it from other hosts </li></ul>
  18. 18. Proxy ARP <ul><li>Proxy ARP is also known as promiscuous ARP or the ARP hack </li></ul><ul><li>The names come from the other use of proxy ARP: to hide two physical networks from each other, with a router between the two </li></ul><ul><li>This has been used to separate hosts running two different versions of TCP/IP </li></ul>
  19. 19. Gratuitous ARP <ul><li>Gratuitous (Unnecessary ) ARP occurs when a host sends an ARP request looking for its own IP address </li></ul><ul><li>This can happen at bootstrap time </li></ul><ul><li>Gratuitous ARP provides two features </li></ul><ul><ul><li>it lets a host determine if another host is already configured with the same IP address </li></ul></ul><ul><ul><li>if the host sending the gratuitous ARP has just changed its hardware address, the packet causes other hosts on the net to update their ARP cache entries </li></ul></ul>
  20. 20. Issues <ul><li>ARP will be a dangerous protocol </li></ul><ul><ul><li>a bogus host can issue a gratuitous ARP and change cache entries </li></ul></ul><ul><ul><li>a bogus host can send replies giving its own hardware address (instead of the target) </li></ul></ul><ul><li>Broadcasting can be expensive </li></ul><ul><ul><li>excessive use of bandwidth </li></ul></ul><ul><ul><li>CPU costs </li></ul></ul>
  21. 21. ICMP <ul><li>Internet Control Message Protocol </li></ul><ul><li>is used by routers and nodes, performs the error reporting for the Internet Protocol. </li></ul><ul><li>is a helper protocol that supports IP with facility for </li></ul><ul><ul><li>Error reporting ( invalid IP address, invalid port address and the packet has hopped too many times ) </li></ul></ul><ul><ul><li>Simple queries </li></ul></ul>
  22. 22. ICMP (Cont) <ul><li>ICMP messages are encapsulated as IP datagrams: </li></ul>
  23. 23. ICMP message format <ul><li>4 byte header: </li></ul><ul><li>Type (1 byte): type of ICMP message </li></ul><ul><li>Code (1 byte): subtype of ICMP message </li></ul><ul><li>Checksum (2 bytes): similar to IP header checksum. Checksum is calculated over entire ICMP message </li></ul><ul><li>If there is no additional data, there are 4 bytes set to zero.  each ICMP messages is at least 8 bytes long </li></ul>
  24. 24. ICMP Query message <ul><li>ICMP query: </li></ul><ul><li>Request sent by host to a router or host </li></ul><ul><li>Reply sent back to querying host </li></ul>
  25. 25. ICMP Error message <ul><li>ICMP error messages report error conditions </li></ul><ul><li>Typically sent when a datagram is discarded </li></ul><ul><li>Error message is often passed from ICMP to the application program </li></ul>
  26. 26. ASSIGNMENT 2 (Part 2) <ul><li>TCP and UDP are the most used transport protocol in the network. </li></ul><ul><ul><li>What are the advantages of using TCP over UDP? List down and describe. </li></ul></ul><ul><ul><li>TCP is a reliable method because it creates connection first before sending data through the 3-way handshake. Describe. </li></ul></ul><ul><ul><li>UDP is not a reliable method to transport data because it does not have Acknowledgement (ACK) packet. However, it is still used in the Internet as one of the most popular transport method. Describe why. </li></ul></ul><ul><li>Please submit latest by 24 th October 2011 </li></ul>
  27. 27. SMTP <ul><li>Simple Mail Transfer Protocol </li></ul><ul><li>is the protocol which the majority of all mails are transferred around the Internet. </li></ul><ul><li>For Ability Mail Server to be able to receive mails it uses a built in SMTP server which handles and processes all incoming mail. </li></ul><ul><li>SMTP is an essential part of Ability Mail Server and in most circumstances should always be enabled. </li></ul><ul><li>The SMTP service can generally be used in 2 different ways. </li></ul><ul><ul><li>To accept mail from the Internet, usually from other mail servers, and then deliver it to local accounts (incoming mail traffic). </li></ul></ul><ul><ul><li>To allow local users to use the SMTP for their outbound mail, which the mail server should deliver to the correct local or external account </li></ul></ul>
  28. 28. Network Management
  29. 29. SNMP -History
  30. 30. Simple Network Management Protocol <ul><li>SNMP is the prevailing standard for management of TCP/IP networks. SNMP is layered on top of UDP, the User Datagram Protocol. </li></ul><ul><li>An SNMP management station monitors and controls a managed node by issuing requests directed to the agent residing in the managed node. The agent interprets the request and performs the function accordingly. </li></ul><ul><li>All SNMP transactions take place using PDUs (Protocol Data Units). </li></ul>
  31. 31. <ul><li>IETF RFCs 1155, 1156, and 1157 define the Simple Network Management Protocol (SNMP) </li></ul><ul><li>The Internet community developed SNMP to allow diverse network objects to participate in a global network management architecture. </li></ul><ul><li>Network managing systems can poll network entities implementing SNMP for information relevant to a particular network management implementation. </li></ul><ul><li>Network management systems learn of problems by receiving traps or change notices from network devices implementing SNMP. </li></ul>
  32. 32. Security in SNMP <ul><li>SNMP v1 – very limited security </li></ul><ul><li>Security in SNMP is commonly referred to as trivial authentication. </li></ul><ul><li>You must know the device’s IP address in order to talk to it. </li></ul><ul><li>Your must also know the community string , a “password” that is sent in clear text as part of the SNMP message. </li></ul>
  33. 33. Security improvements – SNMP V3 <ul><li>SNMPv3 provides encryption and authentication as part of the core protocol. Specifically, SNMPv3 with USM (User based security model) recognizes three levels of security: </li></ul><ul><li>1. Without authentication and without privacy ( noAuthNoPriv ) </li></ul><ul><li>2. With authentication but without privacy ( authNoPriv ) </li></ul><ul><li>3. With authentication and privacy ( authPriv ) </li></ul>