[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Rewrite MAC-adr on outgoing packages?



Hi

On Tue, Jan 23, 2001 at 10:01:55PM +0100, Lars Hallberg wrote:
> What I want to do is simple:
> 
> All packeges leaving my eth0 interface shuld have the MAC-
> adress of my eth0-card. Regardles if they is orginating att
> another machine and only routed trhu this machine (who is a
> gateway).

Unless I misunderstand how you have your network set up, all
packets getting to your radiomodem get there via your eth0, in
which case they _will_ have the same MAC address!

> However 'easy' it is, I don't know a way to do it. Not in
> 'postrouting' filter roules, not in device configuration,
> nowere else :-(

You can't do this, because the packets will already have the
right MAC address  :)

> The feature shuld be usefull for completly hide NAT-ed subnet
> on a local net e t c. Me myself need it as my upstream network
> device (A radiomodem/link) only can remember one MAC-address
> so the upstream net must beleve my complete net have one and
> the same MAC-address.
> 
> I have solved it by Pryxy-ARP cacheentrys. That fixes the
> packages that matters. Howewer, evrytime the upstrem device
> (radiomodem) hangs, my ISP blames my outgoing pakages with
> 'wrong' mac-addresses.

You have something like this, right?

[box1]---+
         |   1     0
[box2]---+---[linux]---[radiomodem]---[Internet]
         |
[box3]---+

Since MAC addresses are only a way for machines on _local_
networks to talk to each other, all packets going from or
through your linux box to the radiomodem will have the MAC
address of your linux box' eth0.

By the way, you shouldn't need proxyarp, unless box1, box2,
box3, linux and radiomodem are all on the same subnet.  If that
is the case, then the whole point of proxyarp is to hand out one
MAC address for all machines in that subnet when it gets ARP
requests for them.  So, if something weird _was_ happening,
proxyarp should fix it.

If you have everything on the same subnet, you could try
subnetting further or using private IPs on the internal network
and use NAT (IP Masqerading).

> I'l be happy to remove that excuse ;-)
[snip]

:)  Well, it sounds to me like your ISP doesn't know what the
problem is and latched onto the fact that you have more than one
machine on your network as the excuse until you can prove to
them that this isn't the problem.

I don't suppose it's possible to have just the linux box
connected up for a while to see if the link still hangs?

Hope this helps.

-- 
Michael Wood        | Tel: +27 21 762 0276 | http://www.kingsley.co.za/
wood@kingsley.co.za | Fax: +27 21 761 9930 | Kingsley Technologies



Reply to: