Networking Forums

Networking Forums > Computer Networking > Linux Networking > How can I say that two IPs belong to the same router?

Reply
Thread Tools Display Modes

How can I say that two IPs belong to the same router?

 
 
Legend
Guest
Posts: n/a

 
      11-12-2007, 07:02 PM
If I have a list of IP addresses, then how can I say that a group of
them belongs to a particular router and the rest to another? Or is it
just possible to get the general representation schema for that set of
IPs? For example, if I have something like:

192.168.0.2
192.168.0.3
192.168.0.4
192.168.0.5

I want to say that this belongs to 192.168.0.x. But I was in a doubt
if this would actually work. Any suggestions please?

 
Reply With Quote
 
 
 
 
Jeroen Geilman
Guest
Posts: n/a

 
      11-12-2007, 07:22 PM
Legend wrote:
> If I have a list of IP addresses, then how can I say that a group of
> them belongs to a particular router and the rest to another? Or is it
> just possible to get the general representation schema for that set of
> IPs? For example, if I have something like:
>
> 192.168.0.2
> 192.168.0.3
> 192.168.0.4
> 192.168.0.5
>
> I want to say that this belongs to 192.168.0.x. But I was in a doubt
> if this would actually work. Any suggestions please?


Well, yes, one: can you rephrase your question so it can be answered
within the limits of networking terminology ?

I have no clue what you think "saying that an IP belongs to a router" means.

A router routes packets; you need to start from there.


J.
 
Reply With Quote
 
Legend
Guest
Posts: n/a

 
      11-12-2007, 08:47 PM
Oh... Well I'm not sure how to put this in an accurate way. Ok I'll
try explaining more clearly. If there's a router X, then there has to
be a range in {x.x.x.x, x.x.x.y} in which it handles packets and this
router X certainly has a limit on the number of IP's it can handle (or
route). For instance we can say that it cannot route IP packets which
belong to the range {a.b.c.d, a.b.g.e}... Hope I was able to write
something meaningful.

On Nov 12, 2:22 pm, Jeroen Geilman <n...@home.no> wrote:
> Legend wrote:
> > If I have a list of IP addresses, then how can I say that a group of
> > them belongs to a particular router and the rest to another? Or is it
> > just possible to get the general representation schema for that set of
> > IPs? For example, if I have something like:

>
> > 192.168.0.2
> > 192.168.0.3
> > 192.168.0.4
> > 192.168.0.5

>
> > I want to say that this belongs to 192.168.0.x. But I was in a doubt
> > if this would actually work. Any suggestions please?

>
> Well, yes, one: can you rephrase your question so it can be answered
> within the limits of networking terminology ?
>
> I have no clue what you think "saying that an IP belongs to a router" means.
>
> A router routes packets; you need to start from there.
>
> J.



 
Reply With Quote
 
Legend
Guest
Posts: n/a

 
      11-12-2007, 08:49 PM

Or maybe I am looking for Internal IP addresses.. The internal IP
address is an address that belongs to the router as a whole, and not
any particular interface. But I'm not quite sure as to what I want. My
problem is that I have a set of IP addresses and I want to group them
based on some rule. I thought routers would suffice but if you have
something better, please advice...

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      11-12-2007, 10:09 PM
On Mon, 12 Nov 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed) .com>, Legend wrote:

NOTE: Posting from groups.google.com (or some web-forums) dramatically
reduces the chance of your post being seen. Find a real news server.
You are posting from comcast.net, and they have a very good server.

>If I have a list of IP addresses, then how can I say that a group of
>them belongs to a particular router and the rest to another?


By knowing what the router interface address and netmask are for each
interface and each router.

>Or is it just possible to get the general representation schema for
>that set of IPs? For example, if I have something like:
>
>192.168.0.2
>192.168.0.3
>192.168.0.4
>192.168.0.5
>
>I want to say that this belongs to 192.168.0.x. But I was in a doubt
>if this would actually work. Any suggestions please?


First off, you are assuming that the router might be using a network
mask of 255.255.255.0. Maybe it is, or maybe it's using one of twenty
odd others. Start by finding a copy of RFC1878 on the web - you are
using a search engine after all.

1878 Variable Length Subnet Table For IPv4. T. Pummill, B. Manning.
December 1995. (Format: TXT=19414 bytes) (Obsoletes RFC1860)
(Status: HISTORIC)

A router (or indeed most network interfaces) may be using a mask of
255.255.255.252 on up to perhaps 192.0.0.0. If you look at those
masks in binary, you'll find

255.255.255.252 1111 1111 1111 1111 1111 1111 1111 1100
192.0.0.0 1100 0000 0000 0000 0000 0000 0000 0000

Now that means that where there is a '1' in the mask, the address bits
have to match. Using the first mask as an example, you had IP addresses
192.168.0.2 through 192.168.0.5 listed. Here's the mask again, and
those four addresses

255.255.255.252 1111 1111 1111 1111 1111 1111 1111 1100
192.168.0.2 1100 0000 1010 1000 0000 0000 0000 0010
192.168.0.3 1100 0000 1010 1000 0000 0000 0000 0011
192.168.0.4 1100 0000 1010 1000 0000 0000 0000 0100
192.168.0.5 1100 0000 1010 1000 0000 0000 0000 0101
Must match XXXX XXXX XXXX XXXX XXXX XXXX XXXX XX--

And you can see here that 192.168.0.2 and 192.168.0.3 have all the
needed matching bits, but 192.168.0.4 and 192.168.0.5 don't match the
third bit from the right.

Now, the real question becomes, what are you trying to ask?

You are posting to a Linux newsgroup - you may find it useful to
be reading the overview sections of the "Linux Network Administrator's"
guide, which you can find at the Linux Documentation Project. Go to
http://tldp.org/guides.html and page down about 430 lines.

* The Linux Network Administrator's Guide, Second Edition

version: 1.1
authors: Olaf Kirch and Terry Dawson
last update: March 2000
ISBN: 1-56592-400-2
available formats:
1. HTML (read online)
2. HTML (tarred and gzipped package, 690k)
3. PDF (1.5MB)

you want item 2.

Old guy
 
Reply With Quote
 
david
Guest
Posts: n/a

 
      11-12-2007, 11:34 PM
On Mon, 12 Nov 2007 21:49:41 +0000, Legend rearranged some electrons to
say:

> Or maybe I am looking for Internal IP addresses.. The internal IP
> address is an address that belongs to the router as a whole, and not any
> particular interface. But I'm not quite sure as to what I want. My
> problem is that I have a set of IP addresses and I want to group them
> based on some rule. I thought routers would suffice but if you have
> something better, please advice...


Perhaps you can describe what you're trying to do in more detail.
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      11-12-2007, 11:38 PM
On 2007-11-12, Legend <(E-Mail Removed)> wrote:
> If I have a list of IP addresses, then how can I say that a group of
> them belongs to a particular router and the rest to another? Or is it
> just possible to get the general representation schema for that set of
> IPs? For example, if I have something like:
>
> 192.168.0.2
> 192.168.0.3
> 192.168.0.4
> 192.168.0.5
>
> I want to say that this belongs to 192.168.0.x. But I was in a doubt
> if this would actually work. Any suggestions please?
>

Perhaps the term you are looking for is 'netmask'?
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      11-12-2007, 11:43 PM
On Nov 12, 3:09 pm, ibupro...@painkiller.example.tld (Moe Trin) wrote:

> NOTE: Posting from groups.google.com (or some web-forums) dramatically
> reduces the chance of your post being seen.


What?!

> Find a real news server.


Believe it or not, groups.google.com is a real, honest-to-goodness
news server.

> You are posting from comcast.net, and they have a very good server.


And I bet it probably has a web interface just like groups.google.com.

DS

 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      11-13-2007, 12:15 AM
On Nov 12, 1:49 pm, Legend <rahul...@gmail.com> wrote:

> Or maybe I am looking for Internal IP addresses.. The internal IP
> address is an address that belongs to the router as a whole, and not
> any particular interface. But I'm not quite sure as to what I want. My
> problem is that I have a set of IP addresses and I want to group them
> based on some rule. I thought routers would suffice but if you have
> something better, please advice...


It's still almost impossible to understand your question. I understand
that you have a set of IP addresses. I understand that you want to
group them. But it seems like you don't care how you group them.
Obviously, though, you must care or there would be no reason to ask
the question.

What are you going to do with your grouping? How will you handle two
IPs that you decide are part of the same group as opposed to how you
will handle them if they aren't?

We can't help you group them if we don't understand what you think the
members of a group should have in common. I can think of at least
three very different things you could mean. For example, you could
mean they're part of the same physical subnet. You could mean they're
routed as a unit by the service provider. You could mean they're
routed as a unit by other networks. You could mean they're assigned to
the same end user.

DS

 
Reply With Quote
 
Joe Pfeiffer
Guest
Posts: n/a

 
      11-13-2007, 03:32 AM
David Schwartz <(E-Mail Removed)> writes:
>
>> You are posting from comcast.net, and they have a very good server.

>
> And I bet it probably has a web interface just like groups.google.com.


Possibly, but they also supply a good ol' nntp port, so I can read it
from gnus under emacs and not worry about web interfaces.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit users to logon only to computer that belong to user's domain Stefano Del Furia Windows Networking 0 03-09-2006 06:38 PM
[UK-Bug] Req: All your downloads belong to US! Andy M Jenkins Broadband 4 10-04-2004 12:32 PM



1 2 3 4 5 6 7 8 9 10 11