Because ICMP is on the network layer
Most protocols issue a special error messagethat is sent back to the source in this case.
A UDPheader contains four 16-bit fields. They are the source port, destination port, length, and checksum -- in that order.
source and destination port number or two applications communicating the data
An Ethernet frame has a 14 byte header, a data section, and a 4 byte trailer 14 byte header consist of destination address, source address and type The trailer is for CRC (Cyclic redundancy Check) An Ethernet frame can contain an IP and TCP PDU. IP header most important parts consists of (Version,IHL, Total length,Protocol, source and destination address) In details (Version,Header length,Differentiated services field, total Length, Identification, Flags, fragment offset, Time to live, protocol, header checksum, source and destination address). TCP header most important parts consists of (Source port, Destination port and header Length) In details (Source Port, Destination Port, Sequence number, Acknowledgment number, Header length,Flags,Window and check sum). The details of the IP and TCP header have been taken from a Network protocol Analyzer Wireshark on my own pc.
The source MAC address within a frame is used by the switch to associate a port with that MAC address. Frames are directed by the switch from one port to another based on the destination MAC address within the frame.
It's recorded at the top of the IP packet header. 16 bit source and destination port.
ICMP does not have a port like TCP and UDP.
a tcp header contains the information of the source and destination networks and well as what port to access with out it the packet would not know where to go
There really is no "port" for icmp but there is a icmp code. If you are looking for the icmp code for echo-reply it is 0 and the echo is 8 For an access list you could do the following: permit icmp any any echo-reply permit icmp any any echo Or the same using the icmp code permit icmp any any 0 permit icmp any any 8
That is the way the standard designed the header. They could be placed anywhere as long as everyone understood where in the packet header it was placed.
So the destination host knows what port to send it to. If the destination just takes a guess as to what port to send it to and sends an RDP packet to port 80 what do you think is going to happen?
Internet Control Message Protocol (ICMP), documented in RFC 792, is a required protocol tightly integrated with IP. ICMP messages, delivered in IP packets, are used for out-of-band messages related to network operation or mis-operation. Of course, since ICMP uses IP, ICMP packet delivery is unreliable, so hosts can't count on receiving ICMP packets for any network problem. Some of ICMP's functions are to: * Announce network errors, such as a host or entire portion of the network being unreachable, due to some type of failure. A TCP or UDP packet directed at a port number with no receiver attached is also reported via ICMP. * Announce network congestion. When a router begins buffering too many packets, due to an inability to transmit them as fast as they are being received, it will generate ICMP Source Quenchmessages. Directed at the sender, these messages should cause the rate of packet transmission to be slowed. Of course, generating too many Source Quench messages would cause even more network congestion, so they are used sparingly. * Assist Troubleshooting. ICMP supports an Echo function, which just sends a packet on a round--trip between two hosts. Ping, a common network management tool, is based on this feature. Ping will transmit a series of packets, measuring average round--trip times and computing loss percentages. * Announce Timeouts. If an IP packet's TTL field drops to zero, the router discarding the packet will often generate an ICMP packet announcing this fact. TraceRoute is a tool which maps network routes by sending packets with small TTL values and watching the ICMP timeout announcements.By far the most common use of icmp is ping.
There really is no "port" for icmp but there is a icmp code. If you are looking for the icmp code for echo-reply it is 0 and the echo is 8 For an access list you could do the following: permit icmp any any echo-reply permit icmp any any echo Or the same using the icmp code permit icmp any any 0 permit icmp any any 8
Most protocols issue a special error messagethat is sent back to the source in this case.
• checksum • destination port • source port
It is a TCP Header
The destination computer will likely send back an ICMP Destination Unreachable message to inform the source computer that there is no process listening on the specified port. The source computer can then take appropriate action based on this response, such as notifying the user or terminating the connection attempt.