LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2015, 06:31 AM   #1
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Rep: Reputation: 14
how packets travel in a network!!


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
 
Old 11-05-2015, 06:49 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
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.
 
Old 11-05-2015, 08:11 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
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.
 
Old 11-05-2015, 08:45 AM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Sorry I overlooked your last question.

Quote:
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.

Hope that helps.
 
Old 11-06-2015, 03:33 AM   #5
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Original Poster
Rep: Reputation: 14
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!!
 
Old 11-06-2015, 03:59 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
what is your question now?
 
Old 11-06-2015, 04:24 AM   #7
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Original Poster
Rep: Reputation: 14
Am I correct about the whole understanding in post #5 ??
 
Old 11-06-2015, 04:29 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
no. see post #2, #3 and #4.
 
Old 11-06-2015, 08:56 AM   #9
uburundi
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 11-06-2015, 06:02 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by NM04 View Post
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.
 
Old 11-06-2015, 09:30 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,366
Blog Entries: 28

Rep: Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162
You might find some of the tutorials at this site helpful: http://www.enterprisenetworkingplanet.com/netsp
 
Old 11-19-2015, 03:58 AM   #12
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Original Poster
Rep: Reputation: 14
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?
 
Old 11-19-2015, 04:16 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,998

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding Xen vm migration traffic to travel over 1 network card (nic) bweaver Linux - Virtualization and Cloud 0 06-30-2011 09:49 AM
sniffing packets on a network? Cyberman Linux - Networking 3 01-20-2010 11:43 AM
how many packet types can travel on Ethernet network? linux_lover2005 Linux - Networking 1 01-23-2005 12:36 AM
monitor network packets jwijesundra Linux - General 4 01-19-2005 04:34 AM
Dropping Network Packets Micah Linux - Networking 4 03-14-2004 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration