[ILUG] Creating a multihomed host.
Chris Higgins
chris.higgins at horizon.ie
Sun Aug 12 11:08:48 IST 2001
>
> A NIC can have (not be - apologies if you feel this is a semantic
> distinction) 0 or more IP addresses associated with it, and it can also have
> a broadcast address (which is also an IP address, albeit a special one). If
> it has a broadcast address, it will accept broadcast packets sent to that
> address (and possibly to a narrower broadcast address - can someone confirm
> ?) and it will accept packets addressed to any of its IP addresses.
Niall - you are getting picky :) But you need to get more picky :)
NIC cards operate at layer 2 (data link layer) of the network, and
as such have layer 2 addressing only - ie: MAC address.
If you are connected to a HUB, each card sees *every* packet on the LAN.
The NIC card compares the destination address in the layer 2 frame to
it's own MAC address ( which is normally fixed, but some cards are
programmable )
If it get's a match, then it sends a processor interrupt to the processor
and hands the entire packet up to the kernel (Operating System), which removes
the layer two frame and is left with a protocol specific packet.
( IP / IPX / DECnet / Appletalk etc).
The destination MAC address identify more than a single destination host, a
destination address can be one of three types.
- The MAC address of one network interface ( unicast address )
- Broadcast address for network ( broadcast address )
- Multicast address
Some NIC cards can only handle their own MAC addresses and the broadcast
address ( if you look at the linux network docs for Multicasting , you'll
see that some cards have to do multicast in software by enabling promiscuous
mode on the cards )
So what this means is that Niall's statement that a NIC card can have
0 or more IP addresses associated with it - is correct.. but the NIC card
couldn't care less about the protocol that is in the packets.
The IP address is associated with the operating system and operates at
layer 3... So it's a function of the OS to be able to support more than
one IP address per NIC adapter.
>
> > the reason I ask is that I noticed when I run ifconfig it looks like eth0
> > represents both a regular inet address (134.226.36.241) and also a broadcast
> > address (134.226.255.255). This was set by default by the RHAT install.
>
> Normally, eth? will have an IP address and a broadcast address (man ifconfig
> says that ifconfig eth0 [-]broadcast will set (or clear) the IFF_BROADCAST
> flag for the interface but not matter what I try, ifconfig eth0 still shows
> BROADCAST in the flags - any ideas, not that I actually want to turn off
The medium you are connected to is a broadcast medium - Ethernet cannot
function without broadcasts. So you really don't want to consider trying
to operate without broadcasts.
You could connect to a which does not support broadcasts,
- what cisco calls NBMA (Non Broadcast Multiaccess) networks.
" nonbroadcast multiaccess. Term describing a multiaccess network that either
does not support broadcasting (such as X.25) or in which broadcasting is not
feasible (for example, an SMDS broadcast group ) "
So in the ifconfig given
> eth1 Link encap:Ethernet HWaddr 00:10:B5:AD:2F:E2
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> Interrupt:11 Base address:0x5400
this card will be seeing all the broadcasts, passing them to the OS
which will then chuck them - as there are no protocols to deliver them
to...
There is lots more on all of this in any good book on TCP/IP [1]
> Niall
>
> --
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie
Chris
[1] If you want a *good*[2] book - try
- Internetworking with TCP/IP - Douglas Comer
- TCP/IP Illustrated Vol 1. - W. Richard Stevens.
[2] IEP 50+
--
** Chris Higgins e: chris.higgins at horizon.ie **
** Technical Business Development tel: +353-1-6204916 **
** Horizon Technology Group fax: +353-1-6204949 **
More information about the ILUG
mailing list