Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dear All,
I would like to know about how the packets/requests travel in the network, i.e,if in my network I have a proxy, DNS, Gateway etc. So what I want to know is where does the request goes first in a proxied network, which option is correct::
1)proxy>>DNS>>Gateway>>internet
2)DNS>>proxy>>Gateway>>internet
3)gateway>>DNS>>proxy>>internet
Also do tell me what happens in a non proxy network??
noone of them is correct.
First there will be a DNS request (translate hostname to ip address), next the original request will be sent to the internet, across your proxy and/or gateway. There can be several DNS servers inside and outside (that means in your local net or in the internet), also there can be several proxies and routers.
I would like to know about how the packets/requests travel in the network,
They travel by way of "carrier" signals, where nodes are tossing each other UDP or TCPIP packets.
Quote:
i.e,if in my network I have a proxy, DNS, Gateway etc. So what I want to know is where does the request goes first in a proxied network, which option is correct::
Your request of course should come-out through your gate(way). You have your own neighborhood gate where all your requests are routed to and passed through; and your proxy also has outer gates, as do the rest of subnets all over the world wide web. It is always through your gate that you leave and return home.
Your own IP through your neighborhood gateway throws a UDP packet request to your provider's DNS and returns you a resolved host=IP reply: all these bilateral dialogue happens through your gateway. Now that your own system knows the whereabouts of your proxy --which is usually (though not all times) located outside your subnet (like if you are using toor or you are operating in a remote connection) then only your IP sends a TCP/IP packet to the proxy and the latter re-routes the packet within and without back to the internet with a masked or modified header. So, that means you talk to your gateway first, then to your DNS then to your proxy and finally to the internet; in such direction vice-versa all the payloaded packets travel between you and the internet sources.
Understanding routing cannot be easy. But a good background on the TCIP/IP or the OSI Model can make routing less difficult to tackle in the classroom or at work. You may want these materials here, or get a rough refresh from a general source.
Hope that helps and good luck.
Last edited by malekmustaq; 11-05-2015 at 08:54 AM.
Also do tell me what happens in a non proxy network??
Just the same, but minus the proxy "hop". Going out to the internet you leave through your own gate(way) sending a packet to your DNS who returns you a name=IP resolution, then all your queries and requests to certain internet URL/host is resolved into IP address inside your TCP/IP packet for transmission; you may now talk directly to the internet without passing through the proxy. Your transmitted TCP packet probably does not contain the name "google.com" but it certainly arrives there with a "120.28.26.103" on its header. Your carrier provider's routing table knows the shortest distance to the google.com server but it does not know what is google.com, only your DNS knows and keeps that record. Thus all your queries about URLs are always routed by your gateway to the DNS server first using a smaller packet to resolve a URL in "text" to a mathematical value of IP address, but subsequent conversations thereafter between you and the internet source may be routed between your mutual WAN gateways independently from DNS.
If there be error pardon my weak memory. But at least an old man here is doing his best to help you.
Thank you all for such knowledgeable replies, but by proxy I mean a "forward caching proxy", previously what I thought that whenever a request is made through a browser in a forward caching proxy environment it goes like == DNS>>Proxy>>gateway>>Internet. I really appreciate you replies!! thank you!!
Packet is received at network card, physical layer, which generates an interrupt to CPU and CPU reads packet in,
at data link layer, destination MAC address is checked to see if packet is destined to this machine, If yes, packet is sent up to network layer.At IP layer, packet validation like checksum verification etc is done and then passed on to relevant transport layer.
Transport later then passes it on to the appropriate port so that it reaches correct application.
Thank you.
From uburundi
Nduwimana Gabriel.
Dear All,
I would like to know about how the packets/requests travel in the network, i.e,if in my network I have a proxy, DNS, Gateway etc. So what I want to know is where does the request goes first in a proxied network, which option is correct::
1)proxy>>DNS>>Gateway>>internet
2)DNS>>proxy>>Gateway>>internet
3)gateway>>DNS>>proxy>>internet
Also do tell me what happens in a non proxy network??
Best,
nm
The terms Request, Proxy and Gateway are not very specific - Http request, web proxy and mail gateway, perhaps?
How are the configured?
In short, the information you provide is much too vague to say anything.
Bernbaudsch,
I will clarify as much as I can. Let say, in my network I have a forward caching proxy, my own DNS, Gateway, My browser is configured to use proxy and authenticate before being directed to Internet. Now, whenever I access internet via browser where does this HTTP request hit first ? the proxy?, the DNS? OR the gateway?
those are two different levels of network traffic. A http request is a "high" level request, the communication between/among hosts are the low level traffic. So actually you cannot really compare them.
high level means you do not really care about the low level happenings, you just want to send a request to a host (given by a name).
low level means you do not really care about browsers or media players and other applications, just simple messages will sent on the network.
So http request will be first analysed and probably the system will first try to find out the name of the remote host (and translate it to an ip). During this activity the system will send request to the configured DNS. The package will not be sent directly to the DNS server, but a proxy/gateway/router/whatever, which is also configured. But probably you have a local DNS server and no need to go out to the internet. You may also have a DNS server on the router or inside your local network. You can have router/switch or gateway or proxy in between too, and there is no common setup for that.
So I can only suggest you to understand what is a gateway, router, proxy, switch, what is in /etc/nsswitch.conf, check what does IP/TCP/HTTP protocols mean.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.