LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-24-2007, 11:11 PM   #1
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Rep: Reputation: 41
Subnetting math-how it gets from external ip to another


Hey everyone,
I was recently asked this question and since its not my fortay, I thought I'd see if you guys could work this one out or give me some direction on howto work it out.

Using the IP subnet 142.25.97.0 and the subnet mask 255.255.255.0, show in detail how a packet from an external source destined for the IP address 142.25.97.100 successfully reaches its destination.

Any ideas?


thanks,
Ronnie
 
Old 10-25-2007, 05:54 AM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
In my opinion you really have to know something about the structure you're traversing before you can answer that question. Unless you want an over generalisation?

Centinul
 
Old 10-25-2007, 11:38 AM   #3
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Original Poster
Rep: Reputation: 41
I understand howto convert and make a subnet into binary and find the number of valid ranges etc. So I guess a generalization would do.

Thanks
 
Old 10-25-2007, 11:50 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Still seems like there's something missing and the question is incomplete. (looks like a bad homework question imho) ..

is it going through one router ?
multiple routers ?
coming from another private network ?
coming from the Internet ?
is it going through a NAT device ?

is the external source in the same network, and you are supposed to break down the packet process itself using the OSI or Internet model showing the encapsulation steps through the hardware transport, delivery, and de-encaspsulation of the datagram ?

or is this purely a Layer 3 exercise ?


Would be easier with a network diagram, and a source address.. without that my Firewall is just going to drop the packet anyway, and it will never be delivered.
 
Old 10-25-2007, 12:00 PM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
1. Is this homework??

2. ipcalc
 
Old 10-25-2007, 03:13 PM   #6
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Original Poster
Rep: Reputation: 41
Honestly if I knew I'd tell you, ya some lame theoretical crap. I think whats being asked is just basic packet flow.. I basically quoted the question word for word. It leaves much to be desired in terms of what is expected.. Nating, Mac address translation etc.. It is coming from the internet and going to that address of 142.25.97.100. Maybe that helps, I am dumbfounded with this question.
 
Old 10-25-2007, 04:33 PM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Here's a good answer that probably won't pass:

"The consensus of the experts on LQ is that this is a bad Q too vague to be answerable."

Best I can do w/o more context.

Glad I'm not taking this class from this instructor, I'd fail for being in his/her face over bad texts or bad teaching or both.
 
Old 10-26-2007, 11:42 AM   #8
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
Looks like a Microsoft test question

Quote:
Originally Posted by Lantzvillian View Post
Hey everyone,
I was recently asked this question and since its not my fortay, I thought I'd see if you guys could work this one out or give me some direction on howto work it out.

Using the IP subnet 142.25.97.0 and the subnet mask 255.255.255.0, show in detail how a packet from an external source destined for the IP address 142.25.97.100 successfully reaches its destination.

Any ideas?


thanks,
Ronnie
It looks to me like a question you would find on a Microsoft certification test. The information they provide you with has very little to do with the answer they are looking for.

How a packet sent from one host to another using TCP/IP reaches it's final destination is basically same regarless of the destination IP address.

Assuming Ethernet, the steps would be something like this:

The source host uses it's subnet mask to determine if the destination IP address is on it's own subnet. It it is, it checks it's ARP cache for the MAC address of the destination. If found, it uses it. If it doesn't find it in ARP cache, it arps for the host's MAC address. Once it has the MAC address, it sends the packet with it's IP address as the source IP, the destination hosts IP as the destination IP and the destination hosts MAC address as the destination MAC address.

If the destination IP address is not on the same network, it then searches through it's route table for a route to that network. If it doesn't find one, it will fall through to the default route which will be it's default gateway. In that case, it checks it's ARP cache for the MAC address of it's default gateway. It uses it if it's there or arps for it if it's not.
Once it has the MAC address of it's default gateway, it sends out the packet using the same destination and source IP addresses as I mentioned above but this time, the destination MAC address is that of the default gateway.

When the default gateway receives it, it sees that the destination MAC address is it's own but the destination IP address is not. That's how it knows it needs to route the packet. It then looks through it's route table for a route and forwards the packet on. The packet will travel through the internet in the same way from router to router until it reaches the default gateway of the destination IP address. When that router receives the packet, it will discover that the destination IP address is on the network of one of it's ports. It gets the MAC address of the destination host via it's ARP cache or by arping. It then sends the packet using the same destination and source IP addresses as above but this time the destination MAC address is that of the destination host. Packet delivered.

It's the same process no matter what the source or destination IP address.
 
  


Reply



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
math program that I can enter math functions ... Four General 5 04-19-2006 08:02 PM
subnetting juanb Linux - Networking 1 06-30-2004 10:23 AM
Problem of Subnetting NIT Linux - Networking 3 11-04-2003 03:46 AM
subnetting Fabian030 General 4 09-11-2003 03:11 AM
subnetting juanb Linux - Networking 3 08-26-2003 10:56 AM

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

All times are GMT -5. The time now is 04:59 PM.

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