From: "Trellert" Date: Fri, 6 May 2011 11:04:06 +0200 Message-ID: <559308773B1C4D498F35DACC1F113B6F@Luc> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006F_01CC0BDD.516010F0" Subject: [Bridge] using a bridge to change mac address List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bridge@lists.linux-foundation.org This is a multi-part message in MIME format. ------=_NextPart_000_006F_01CC0BDD.516010F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello I have the following situation: My ISP gives me an IP address with DHCP, but only to the mac address 00:11:22:33:44:55 (which is their preconfigurated device) As I want to use another device and not their preconfigurated device, i decided to put a linux computer (lets call it "bridgePC") acting as a bridge between those 2. bridgePC configuration: Eth0 - connected to ISP Eth1 - connected to my device brctl addbr br0 brctl addif br0 eth0 brctl addif br0 eth1 ifconfig eth0 0.0.0.0 up ifconfig eth1 0.0.0.0 up ifconfig br0 up For testing purposes connected another linux pc ("testPC") to the bridgePC (eth1). I start the dhcp client and it keeps searching.. i dont get an IP from my ISP which is expected since I have the wrong mac address. Now, on testPC i changed the mac address to the required 00:11:22:33:44:55 from my ISP. An bam, I receive an IP via DHCP from my ISP. So, my bridgePC is working and is acting 100% transparent. Now of course, the device I want to use is not a Linux PC and therefore I cant just simply change my mac address of my device. So I have to use bridgePC to change the outgoing packets as if they were coming from 00:11:22:33:44:55 I tried with the following: ebtables -t nat -A POSTROUTING -o eth0 -j snat --to-source bc:05:43:cb:ce:c1 But still not receiving an IP. Does anyone have an idea? Thanks, Steve M. ------=_NextPart_000_006F_01CC0BDD.516010F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello

 

I have the following = situation:

 

My ISP gives me an IP address with DHCP, but only to = the mac address 00:11:22:33:44:55 (which is their preconfigurated = device)

 

As I want to use another device and not their = preconfigurated device, i decided to put a linux computer (lets call it = "bridgePC") acting as a bridge between those 2.

 

bridgePC configuration:

 

Eth0 – connected to = ISP

Eth1 – connected to my = device

 

brctl addbr br0

brctl addif br0 eth0

brctl addif br0 eth1

ifconfig eth0 0.0.0.0 up

ifconfig eth1 0.0.0.0 up

ifconfig br0 up

 

For testing purposes connected another linux pc ("testPC") to the bridgePC = (eth1).

 

I start the dhcp client and it keeps searching.. i = dont get an IP from my ISP which is expected since I have the wrong mac = address.

 

Now, on testPC i changed the mac address to the = required 00:11:22:33:44:55 from my ISP.

 

An bam, I receive an IP via DHCP from my = ISP.

 

So, my bridgePC is working and is acting 100% = transparent.

 

Now of course, the device I want to use is not a = Linux PC and therefore I cant just simply change my mac address of my = device.

 

So I have to use bridgePC to change the outgoing = packets as if they were coming from 00:11:22:33:44:55

I tried with the = following:

 

ebtables -t nat -A POSTROUTING -o eth0 -j snat = --to-source bc:05:43:cb:ce:c1

 

But still not receiving an = IP.

Does anyone have an = idea?

 

Thanks,

 

Steve M.

------=_NextPart_000_006F_01CC0BDD.516010F0--