One quick questions:

What's the best way to setup a home network? Why should I care about BGP?

One quick questions:

Post by iistapp on Thu Apr 14, 2011 2:15 am
([msg=56325]see One quick questions:[/msg])

How do a local network talk with THE Internet?
User avatar
iistapp
Poster
Poster
 
Posts: 135
Joined: Tue Apr 21, 2009 9:44 am
Location: Norway
Blog: View Blog (0)


Re: One quick questions:

Post by pretentious on Thu Apr 14, 2011 3:06 am
([msg=56326]see Re: One quick questions:[/msg])

Through the default gateway?
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
pretentious wrote:Welcome to bat country
User avatar
pretentious
Contributor
Contributor
 
Posts: 690
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: One quick questions:

Post by iistapp on Thu Apr 14, 2011 3:12 am
([msg=56327]see Re: One quick questions:[/msg])

Yes :)

Can't seem to figure it out exactly how it works, so just want someone to clear it out for me if possible ;p
User avatar
iistapp
Poster
Poster
 
Posts: 135
Joined: Tue Apr 21, 2009 9:44 am
Location: Norway
Blog: View Blog (0)


Re: One quick questions:

Post by Reason7194 on Thu Apr 14, 2011 4:49 pm
([msg=56341]see Re: One quick questions:[/msg])

Are you asking how the internet works?
I study Gotafu.
Reason7194
Poster
Poster
 
Posts: 215
Joined: Fri Jan 07, 2011 5:01 pm
Blog: View Blog (0)


Re: One quick questions:

Post by pretentious on Thu Apr 14, 2011 6:21 pm
([msg=56344]see Re: One quick questions:[/msg])

iistapp wrote:Can't seem to figure it out exactly how it works, so just want someone to clear it out for me if possible ;p

One quick question indeed.
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
pretentious wrote:Welcome to bat country
User avatar
pretentious
Contributor
Contributor
 
Posts: 690
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: One quick questions:

Post by Gatito on Thu Apr 14, 2011 7:55 pm
([msg=56347]see Re: One quick questions:[/msg])

Here's a not so quick answer! Let me illustrate the process with an example ( not 100% correct mind you ).

Let's say you have a network made of a bunch of PCs with their IP ranging from 210.10.25.2 to 210.10.25. and a subnet mask of 255.255.255.0 and a router with the IP 210.10.25.1 ( Default Gateway ). This is your local network and you could say any device that has an IP like 210.10.25.X where X could be anything from 1 to 254 is considered to be part of your local network.

Now let's say you want to go to HTS so you open your browser and type http://www.hackthissite.org at the address bar. What happens now is that URL needs to be converted into a valid IP address that points to the server containing the site. This is resolved by the Domain Name System which you could think it as a very big table containing which domain names correspond to which IP ( the real thing is slighty more complex than this ).

Now that you got the IP ( say 64.32.24.200 ) your PC compares that with his own IP and finds out that the server isn't in his local network so he sends the http request to the router pointing out of the network. Now when this router receives the request it compares the IP with its table which holds all the IPs of the devices that are connected with him and he probably won't find the server directly, but this router knows that there is another router connected with him which has a bigger scope and knowledge than him so he sends the request to the other router. Now this router knows every router in the neighbourhood so he compares the IP with his own table and if he doesn't know where the router that connects to the network which the server resides is, you guessed it, it sends the request to an other router let's say to your ISP.

Now those guys have some badass routers which links with other ISPs or major organizations, I dunno, and look up the IP into their table and they say "I know a router which has a network in the 64.X.X.X range so he sends the request at him". Now this guy says "I know the other guy which is in the 64.32.X.X network" and so on after 10-30 routers you find the router which is the one that connects to the network where the server resides. The router gets the request, he compares the IP, finds out that it's in his network, sends the request to the server, the server processes the request, and finally sends the website to your PC by sending it to your IP and the whole process starts over.

So you could think of the internet as a network of networks and routers being the nodes that connects them.
Hope that gave you a basic idea of how devices talk with each other over the internet.
User avatar
Gatito
Poster
Poster
 
Posts: 113
Joined: Tue Mar 08, 2011 12:55 pm
Blog: View Blog (0)


Re: One quick questions:

Post by iistapp on Fri Apr 15, 2011 1:16 am
([msg=56357]see Re: One quick questions:[/msg])

Thanks Gatito for the answer, so the local network talks with the Internet throught a bunch of different routers around the world? And the DNS converts a url into the right IP for the site or am I wrong?

If that's how it works then I thank you for your answer :)
User avatar
iistapp
Poster
Poster
 
Posts: 135
Joined: Tue Apr 21, 2009 9:44 am
Location: Norway
Blog: View Blog (0)


Re: One quick questions:

Post by Phantom Wolf on Fri Apr 15, 2011 2:19 am
([msg=56358]see Re: One quick questions:[/msg])

Gatito wrote:Now that you got the IP ( say 64.32.24.200 ) your PC compares that with his own IP and finds out that the server isn't in his local network so he sends the http request to the router pointing out of the network.

No, it doesn't. Your computer keeps a routing table that tells it where to send packets so that they get to the proper host/network. Basically, when your computer needs to send out a packet, it checks its routing table for an entry that matches the packet's destination address. That entry will contain all the information that your computer needs to send the packet.

Usually, there will only be three entries in your routing table; one for the loopback addresses (like 127.0.0.1), one for your local network that tells the computer it doesn't need a gateway for local IPs, and a sort of catch-all (called the 'default' route) that tells the computer to send anything that doesn't match the other entries through your router. But, it can be configured in an almost infinite number of ways
Gatito wrote:Now when this router receives the request it compares the IP with its table which holds all the IPs of the devices that are connected with him and he probably won't find the server directly, but this router knows that there is another router connected with him which has a bigger scope and knowledge than him so he sends the request to the other router.

Most routers also use routing tables similar to what I described above. Also, they wouldn't check a list of attached devices, if the destination IP is a local address, it would send out an ARP packet.

iistapp wrote:Thanks Gatito for the answer, so the local network talks with the Internet throught a bunch of different routers around the world? And the DNS converts a url into the right IP for the site or am I wrong?

If that's how it works then I thank you for your answer :)

DNS converts domain names to IPs, not the whole URL. For example, in the URL http://www.hackthissite.org/index.php the "www.hackthissite.org" would be converted to an IP, the rest is left alone (it actually has nothing to do with finding the server). It looks like you get the idea, though.
"Well it isn't my fault. I shouldn't have been allowed to do something to crash it." "No, you shouldn't have been allowed to buy a computer in the first place"
Phantom Wolf
Poster
Poster
 
Posts: 271
Joined: Wed Mar 03, 2010 8:45 pm
Blog: View Blog (0)


Re: One quick questions:

Post by iistapp on Fri Apr 15, 2011 3:53 am
([msg=56364]see Re: One quick questions:[/msg])

Thanks a lot :)

Yea, I believe I get the whole idea, if I didn't before, I sure do now :)

Thanks!
User avatar
iistapp
Poster
Poster
 
Posts: 135
Joined: Tue Apr 21, 2009 9:44 am
Location: Norway
Blog: View Blog (0)


Re: One quick questions:

Post by Gatito on Fri Apr 15, 2011 9:18 am
([msg=56367]see Re: One quick questions:[/msg])

Phantom Wolf wrote:No, it doesn't. Your computer keeps a routing table that tells it where to send packets so that they get to the proper host/network. Basically, when your computer needs to send out a packet, it checks its routing table for an entry that matches the packet's destination address. That entry will contain all the information that your computer needs to send the packet.

Of course I was referring to the default settings but yeah it can be configured to act differently depending on the destination or other things.

Phantom Wolf wrote:Most routers also use routing tables similar to what I described above. Also, they wouldn't check a list of attached devices, if the destination IP is a local address, it would send out an ARP packet.

In my defense, I did mention the tables. Yes, I agree I could have done a way better explanation for this part but when I though about explaining about what happens if it points to a local source I couldn't help myself saying that I should explain subnet masking which honestly I felt way too lazy to do so I skipped it altogether.

Phantom Wolf wrote:DNS converts domain names to IPs, not the whole URL

Definitely domain names, not URLs.
User avatar
Gatito
Poster
Poster
 
Posts: 113
Joined: Tue Mar 08, 2011 12:55 pm
Blog: View Blog (0)


Next

Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests