Security Basics mailing list archives

RE: 2NIC's on same network, possible?


From: "Burton M. Strauss III" <BStrauss () acm org>
Date: Wed, 30 Jul 2003 06:10:40 -0500

Let's see...

-----Original Message-----
The default route is a fallback which applies to every address/network
you do *not* have an explicit route for. I do not see how this would
qualify as "two routes towards the same network".

Regards
Ansgar Wiechers
--------------------------
Right!  It's not two routes with identical metric values, it's ONE route and
a DEFAULT.

Dig into tcp/ip and Ethernet (the 802.3 standards stuff - start at
http://grouper.ieee.org/groups/802/3/)

There's nothing that prohibits multiple routes with equal metrics.

The entire concept of 'one' route is fiction, imposed by the OS, because
people like deterministic systems.  In reality, it's entirely up to the
router to decide.  Factors invisible to the outside/end user are valid.  So
are random choice, load-balancing, sheer cussedness - anything you can thing
of is valid.  The only thing required is that a router forward the packet or
reject it.  Dropping packets without notice (ACK/NACK or flow control) is
bad, but the various protocols will even recover from that.


-----Burton


-----Original Message-----
a.b.c.d/e is a "new" notation ("CIDR") used to identify a netblock.  It
identifies a network beginning at a.b.c.d where e bytes are the network
portion.  There's an RFC that covers this in depth, but the old-style
A,B,C networks are /8, /16, /24 respectively.  A slight
overapproximation of the maximum number of hosts on a /e network is
2**(31-e).  An IP address is 32 bits, e of which identify the network.
So, 32-e of them identify the host.  There are 2**n possible ways to set
n bits (and the maximum value of n bits is 2**(n-1)).

Probably the other post was right and your friend has used a netmask
appropriate for a /e network.

Justin
--------------------------

The CIDR RFCs are:

    RFC 1517: Applicability Statement for the Implementation of CIDR
    RFC 1518: An Architecture for IP Address Allocation with CIDR
    RFC 1519: CIDR: An Address Assignment and Aggregation Strategy
    RFC 1520: Exchanging Routing Information Across Provider Boundaries in
the CIDR Environment


The actual number of hosts on a /e network is 2**(32-e) - 2

The -2 covers the all zeros and all ones host portions, used for broadcasts.
(Technically the all zero is probably a legal address but historically some
vendors (Sun) used it for broadcasts so it's best to stay away).

8<=e<=31 (Because the largest blocks assigned are /8s and the smallest
normally usable is /30 - a /31 has only the two broadcast addresses ---
still, this can be useful for unnumbered point-to-point links)

Some example values:

/e   Host bits  # usable hosts
---- ---------  --------------
/31      1           0
/30      2           4
/29      3           6
/28      4          14
/27      5          30
/26      6          62
/25      7         126
/24      8         254
/23      9         510
/16     16       65534
/8      24    16777214

See the "IP Subnetting HowTo" - see
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/IP-Sub
networking.html. For other formats, start your search here:
http://www.tldp.org/.



-----Burton



---------------------------------------------------------------------------
----------------------------------------------------------------------------


Current thread: