What protocols does gateway convert? - networking

I've read that:
Gateways are basically protocol converters, facilitating compatibility
between two protocols and operating on any layer of the open systems
interconnection (OSI) model.
I don't understand what protocols gateway converts. Why is it important to convert protocols? Isn't TCP/IP protocol stack common for all devices that take part in network transmission of data?

"Gateway" is a broad term which is used in different ways in different contexts. "Protocol" is a similar broad term with context specific meanings.
What you cite would for example apply to gateways translating between IPv4 and IPv6 (different IP protocols), between SIP, POTS or H.323 (different telephony protocols), between HTTP/2 and HTTP/1 (different versions of HTTP protocol), WebSockets and plain TCP sockets (different protocols for bidirectional communication) etc.
Note that other common uses of the term Gateway in the context of network don't involve converting protocols. For example Secure Web Gateway or Secure Mail Gateway keep the application protocol but inspect the protocol payload. For even more meanings see Wikipedia: Gateway.

Related

What happens after host receives physical data from router

I know that when two machine communicate they may use the TCP/IP protocol.. But after the IP packet is routed to my router and it is converted to physical signal , how does my computer again decapsulate it and send it to proper application....I know that transport layer header is used for identifying port numbers to send it to proper process,but which device will do all these inside a host..am new to network and apologize if something was wrong or silly here
A packet comprises of information in the form of [header[body]] which will be looked up and processed across all the layers in the TCP/IP stack.
The information related to the all layers are encapsulated into a single packet.
Packet being a general term here, can be of many types based on the protocol with which two nodes are communicating (TCP Packet, UDP Packet, IP Packet etc). The information from a TCP/IP packet for example, are processed by different devices or services working at specific layers.
Switches or Bridges operate at the Ethernet layer. These devices switch packets inside LAN by looking up the MAC address information.
Routers operate at the Internet Layer and utilizes the IP protocol (i.e., IP address) to route traffic between networks.
Stateful firewalls, Proxies, Load Balancers etc. are at the transport layer. They work based on the TCP or UDP information to allow/deny/direct traffic.
Application layer facilities effective communication between application programs in a network. The application layer is not the application itself that is doing the communication. It has protocols such as DNS, FTP, SMTP, SNMP to help and serve the purpose.
References:
https://docstore.mik.ua/orelly/networking/firewall/ch06_03.htm
https://technet.microsoft.com/en-in/library/cc786128(v=ws.10).aspx

Where does Server stores source IP address extracted from incoming Packets during UDP transmission?

A packet reached the server of UDP type at Transport layer. When the source IP address is extracted from the received packet by the server (at Transport Layer), where does the server stores this address, as it will be required in future, since the connection between server and client is connection-less? Or what mechanism does server use to identify source (during a connection-less environment) in order to reply?
Why do you think the address is required in the future? It may not be.
Also, there is no such thing as client/server for the first four network layers of the OSI model. The client/server model is an application concept, not a network concept. Layer-2 (e.g. ethernet), layer-3 (e.g. IP), and layer-4 (e.g. TCP) are peer-to-peer protocols, not client/server protocols.
If an application on one host needs a reply from a host to which it sends data using UDP, it can include its host address as part of the UDP data in the application-layer protocol, and the receiving application can store the source IP and UDP addresses wherever it wants.
As you wrote, UDP is connectionless (and unreliable), and an application using UDP must assume that the UDP datagram will not arrive. The application either adds reliability as part of the application-layer protocol used, or it just doesn't care that some data will be lost. For instance:
Real-time applications use UDP, and some, like video applications are unidirectional. Others like VoIP use a signalling protocol to set up bidirectional traffic. Almost all real-time protocols don't want missing data to be resent because that would cause more problems. Having missing video or voice data resent, arriving out of order, would be chaos.

ipsec - (encrypt the network traffic) on SDN

OpenFlow protocol (1.0 and 1.1) does not define any mechanism about encrypt network traffic (traffic between switches)..
Is it possible to encrypt network traffic on SDN networks.. (like, run IpSEC on top of SDN switches )
Openflow protocol is defined between switches and the controller(Floodlight, Ryu, ODL etc). Openflow uses TLS encryption and it does not specify anything regarding the communication between the switches. The communication between the switches still has to be handled by the switches themselves. Hence what ever encryption the switches support they can be configured on those ports where encryption is required. Openflow protocol is not related to this
It is not done yet, however a research is being carried out in order to standardize it with NETCONF protocol. Here is the IETF draft:
IPSec & SDN Standard

Can gateway handle different protocols?

Can gateway(network device) handle different protocols. I know that it is used to connect dissimilar networks. What type of dissimilarity does it include?
The term Gateway is a very broad term. In Networking a Gateway is typically a device that sits between two network domains or at the entrance to a domain and may handle protocol translations, perform address translations, filter traffic, terminate sessions and much more.
An IP Router for example in some cases is named as a Gateway as it connects the local subnet to the rest of the network - hence the term 'default gateway' you can see on every PC IP settings.
To answer your first Q - a gateway in many cases would handle different protocols.

Can tcp and http connection listeners can interact with each other or not?

Is there a way in which the http connection and tcp connection listeners can interact with each other?
I have two separate application modules one is working through http and other requires tcp .
I need to do an interaction between these two modules so is there way i can make my http based module interact with tcp based module.
First of all, you need to read up a little on networking concepts. HTTP is what's known as an application level protocol, whereas TCP is what's known as a transport layer protocol. Take a look at the OSI Network Model.
As an example, you can imagine that TCP is the telephone network. It gives you the basic means to connect to another person and speak with them. However, in order to actually communicate you need to speak the same language, such as English or French. That is the application level protocol, HTTP in your case.
So to answer your question, in order for your two applications to to communicate and exchange data they need to make a connection / call using TCP and both be speaking the same language / application level protocol namely HTTP.
Two distinct processes won't be able to use the same IP port on a same IP address. Thus, two processes won't be able to use the same incoming stream of data coming out of the TCP connection. If they use different ports, there's no problem.
If the two processes use the same IP port, as HTTP is a protocol that sits on top of TCP, it means that your TCP process can be used as a pipe by the HTTP process. The TCP process will connect to the IP port, do its stuff, and forward the data to the HTTP process that will handle it.

Resources