Linux Proxy NIC interfacing woes

Sheldon Dubrowin dubrowin at bbn.com
Fri Dec 24 23:43:01 EST 1999


Actually in linux some card will let you set the MAC address.  This can be
useful if your "router" machine is doing IP Masquerading/IP Chains.
Otherwise, you would need to move the cards, or find a way to reset the MAC
on the Win 95 machine (not advisable).  But if you do put 2 cards in the
linux machine with the hub on the other side from the cable modem, then it is
OK to use the same MAC again, the cable company would never need to get the
MAC from your other machine, and that machine will never try to talk to
something out on the cable network directly (it would go through your
router).  I'm using this on my cable modem (RCN) and have used it on my old
cable modem (Mediaone/Road Runer).

I use this in my rc.local:

/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
/sbin/ifconfig eth0 up

This gets executed before the dhclient software runs, so the cable modem
learns about the MAC I want.

	Shel

On Fri, Dec 24, 1999 at 11:19:52PM -0500, Derek Martin wrote:
> On Fri, 24 Dec 1999, Wass wrote:
> 
> > 
> > Hello Linux gurus,
> > 
> > 	I'm running into a problem trying to set up my linux-based
> > proxy.  Basically, my NIC cannot see the cable modem, or vice versa.
> > Read on for more details.
> > 
> > 	I've got a cable-modem, which I've successfully used with linux
> > for several months now, with a Acer card (compatible with Via-Rhine).
> > After getting a new computer, some NIC's, and an 8-port hub, I decided
> > to try my hand at setting up a LAN.  
> 
> I'm not sure exactly what you mean by "proxy" because it can have a couple
> of different (but similar) meanings, but I think you mean you want one
> machine to act as a gateway for your network.  If not, the next couple of
> paragraphs will be of limited use to you, but should still be at least
> somewhat helpful.
> 
> If the Acer card is the one that you originally set up your cable modem
> for, then that's the only one that will get an IP address from the cable
> modem.  The cable company takes the MAC address of the card you set it up
> with and only provides DHCP to THAT CARD.  Therefore if you want to make a
> different machine a proxy server, you need to put the Acer card in it, and
> connect it to the cable modem. Or call the cable company and tell them you
> got a new ethernet card, and give them the MAC address for that card.  
> Then you need to put a second NIC in it, and assign it a static IP address
> on a private address block, such as 192.168.1.1 and stick it in your hub.
> 
> Now configure your second machine's card with another static IP address on
> that same network, and stick it in the hub.  Configure the default route
> on the second machine to point to the first machine, and set up IP
> masquerading using ipchains.  See the ipchains howto.
> 
> > 
> > 	I've gone through the dhcpcd mini-HOWTO to get things started.
> > This thing is very out of date!  Are there any plans to add entries for
> > Mandrake 6.x to it?  I'd help out with his task, if I can get my box running.
> 
> I doubt it -- these documents tend to be as distribution independent as
> possible.  But if you feel some info is out of date, I suggest you contact
> the author/maintainer who should be mentioned in that document somewhere.
> 
> But also, I don't think DHCP is your problem.  I'm still not quite sure
> what effect you're trying to achieve, since you never specifically
> mentioned how you want to use this "proxy" server.  But it sounds to me
> like you don't quite have a handle on what your design needs to look like.
> 
> Again, the only card that will get an IP address via DHCP is the one that
> is directly connected to your CM, whose MAC address was supplied to your
> cable company (either by you or by the technician that did the install).
> Any other ethernet card anywhere else in your network will need to be
> configured statically, unless you set up your own DHCP server to serve IP
> addresses to them.  But where you have so few machines, this is hardly
> worth the effort to set up, unless you just want to learn how to do it.
> 
> If you do set one up, you want to make sure you're not serving DHCP out to
> the network your CM is on... your cable company will probably not like
> that too much. Your best bet is to make sure you DON'T install the server
> on the machine that's connected to the CM.
> 
> 
> > 	It alludes to this possibility in the dhcpcd mini-howto, but
> > says that if the card is set to 100baseT, just change that setting.  there
> > is no detail/info about how to go about this.
> 
> You probably will not need to worry about that.  Unless you have an older
> card, or a really crappy one, the card connected to the CM should
> auto-sense to 10Mb. I don't have any experience with those Acer cards, so
> I can't say how well the auto-negotiate.
> 
> > 	I've also played around with various module commands.  Trying
> > "insmod 3c90x" I get an error: "3c90x.o: init_module: Device or resource busy"
> > Why could this be?  ANd I've seen vague implications that I may also
> > need to include the 3c59x module, is this true too?
> 
> It probably means that either you have support for that card compiled into
> your kernel already, or possibly that you don't have such a card.  As for
> loading the extra module, you only need one of them... whichever is the
> right one for your card.
> 
> > 	Also, ifconfig shows only the 'lo' interface, not eth0.
> 
> If the card hasn't been configured (via DHCP or an ifconfig command), it
> will only show up if you do
>   
>   ifconfig -a
> 
> Also, if you don't have the right module loaded, it won't show up at all,
> even with the -a option.  Another way to know if the driver is loaded is
> to check for messages about your card(s) in the output of the dmesg
> command right after boot time, or to watch closely for such messages as
> the system boots.
> 
> Note that I've heard SOME cable companies will let you put the CM on a
> hub, and configure several machines via DHCP, but you'll still need to
> supply them with the MAC address of ALL the ethernet cards, and this
> option usually costs extra $$.  I think a friend told me MediaOne does
> this now.  Maybe Niall K. can comment on that.  Niall?
> 
> 
> -- 
> Derek D. Martin
> Senior UNIX Systems/Network Administrator
> Arris Interactive
> derek.martin at ne.arris-i.com
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).

-- 
+----------------------------------------+-----------------------+
| Sheldon M. Dubrowin                    | GTE Internetworking   |
|  Network Engineer                      | 3 Van de Graaf Drive  | 
|    GTE Internetworking,                | Burlington, Ma 01803  |
|     Powered by BBN                     | (781) 262-5430        |
|       QoS and VPN Engineering          | dubrowin at bbn.com      |
+----------------------------------------+-----------------------+
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list