1.1How does IP router deliver IP packets to an IP host?First we need to realize that IP router is a computer (host), which has multiple network adapters, each associated with a different IP address. These network adapters enable the router to be a physical member of multiple subnets (e.g. LANs), thus enabling it to forward IP packets from one subnet to another. You can think of a router as an electronic version of an octopus, each one of its legs is connected ("belongs") to a different subnet... Upon receipt of an IP packet, the IP router takes a look at the IP portion (header) of the packet (datagram). In particular it examines the destination IP address field in the IP header. It looks up its routing table (using the destination IP address as a key) and finds the closets matching entry. This entry tells the router what is the next hop to go to, and via which network adapter (AKA interface) to do so. The next hop could be as simple as a host on the neighbor subnet, which its IP address is the one indicated in the IP packet (and thus is the final destination of the packet), or it could be another router that needs to take the packet further down the road. In order to forward the packet to the next hop, the router needs to discover the MAC (Media Access Control) address of it by using ARP (see below). Then it lets its MAC software and hardware (e.g. Ethernet module and Ethernet network adapter) take care of the physical encapsulation and delivery of the packet to the MAC hardware/software of the destination (e.g. the Ethernet network adapter of the next hop). Note that neighbor routers ALWAYS share at least one subnet (so they can physically/directly forward packets to each other).
IP stands for Internet Protocol. It is the basic protocol (set of rules; language) that ALL computers on the Internet (must) use in order to speak to each other. For instance, some computers on the Internet might be capable of sending and receiving emails; Some others might only be capable of downloading web pages. Still all of them MUST be capable of speaking IP. Recall that email messages and web pages are always encapsulated in IP packets, just like letters are 'encapsulated' in postal envelops. Same for SIP messages...
ARP stands for Address Resolution Protocol. It is the protocol/process used to map IP addresses to MAC (Media Access Control) addresses. When hosts want to communicate with each other on the same segment of network cable (subnet) they need to know the physical addresses (MAC addresses) of each other. To do so they either broadcast ARP queries on the network segment or use ARP cache. The input of the ARP query/cache is the IP address of the destination host. The output is the MAC addresses of it.
1.4What’s the relation between IP and Ethernet? How are IP datagrams and Ethernet frames different from each other?IP packets (datagrams) are encapsulated in Ethernet frames. Computers (hosts) that share network segment (IP subnet) can talk to each other through their network interfaces (adapters). Every network adapter in the world has its own unique Ethernet (MAC) address. The logic built into it enables it to accept only frames whose destination MAC address match its own MAC address (except for broadcast frames which are always accepted). Perhaps now is the right time to realize that when a web client sends a request to a web server for a web page, the (HTTP) request is encapsulated in an IP packet. This IP packet may travel many routers until it finally reaches its destination (the web server). Every leap on its journey is consisted of ARP operation, MAC (e.g. Ethernet) encapsulation and MAC delivery between two neighbor network adapters (e.g. the adapters of two routers along the routing path, or the adapters of the web client and the next hop router). When a network adapter receives and accepts an Ethernet frame it throws away the bits that constitute the Ethernet (MAC) header and hands the remaining bits (IP header and its payload) up the stack to the IP module. This is called decapsulation and stack propagation.
1.5Is TCP reliable? Is UDP reliable?Yes, TCP is a reliable transport protocol. Its reliability is achieved by means of acknowledgements and segments retransmission. UDP is not reliable, but is very simple and is a good fit for packets that contain real time media information, such as voice or video. Loosing a single voice frame might not be that critical, but having to delay the transmission of the next voice frame due to lack of acknowledgement for its predecessor frame, might be critical and thus makes TCP a bad choice for real time communication.
UDP stands for User Datagram Protocol. It is the simple standardize way to encapsulate a message and identify its application layer destination (by using port #). UDP header contains the source and target ports, message length and optional checksum.
TLS stands for Transport Layer Security. It is a mechanism that provides hop to hop transport-layer security over connection-oriented protocols (e.g. TCP); It provides data integrity (no one has tampered with it), data confidentiality (no one has seen it or was able to understand it) and authentication (i.e., the sender is who he claims he is). TLS starts with a handshake phase that negotiates an encryption algorithm (e.g., AES, IDEA) and keys, and authenticates the server to the client (and vice versa) using certificates and trusted known CAs (Certification Authorities). Once the handshake is complete and data transmission begins, the data is encrypted using the keys and algorithm negotiated during the handshake phase (Symmetric cryptography).
Port number is a logical identifier for a sender or receiver application. It has nothing to do with the physical port devices/connectors at the back of the computer... It enables multiplexing of IP packets between different applications sharing the same platform. In other words: A computer can run several applications at the same time. Each one of these may send/receive IP packets to/from different or identical sources. Each one of the incoming IP packets will find its way (up in the IP stack) to the correct waiting application based on the port number associated with it. The port number is added to a message by the application layer and is part of the transport header (e.g. UDP, TCP).
IP Switch is a new marketing buzz word. Normally it is used to describe an IP telephony server. Another word which is used interchangeably with the word 'IP switch' is Soft Switch. The IP switch (or Soft Switch) is different from the legacy telephony switch by the strict separation it keeps between the application logic (controller) unit and the media switching unit. This is in contrast to the centric way switching is done by circuit telephony switches.
DNS Stands for Domain Name System. It enables us to use names which are easy to remember (e.g. www.nba.com) rather than long and meaningless IP addresses (e.g. 10.32.111.2). Internet domain may contain many different IP subnets. Domain is a logical term, and its geographical meaning might be loose in many cases. For instance the domain 'intel.com' describes a virtual network that is consisted of many subnets in different geographical locations.