You are not logged in.
I have a network bridge with interfaces br0 and eth0. I use mac address filtering on my router to hand out IP addresses via dhcp. My problem is that every time the network comes up on my machine the br0 address is given a different mac address, which means that the machine gets a different IP address. Is there a way I can force the br0 interface to use eth0's mac address? Or at least use the same mac address every time?
Offline
Offline
Gcool, thanks but the spoof on boot did not work. So I created the /etc/rc.d/functions.d/macspoof file as shown there but on rebooting or restarting the network a random mac address is given to br0. Maybe the problem is that I need to change the mac address of br0 as opposed to eth0.
Offline
That would be the main idea, yes. Leave eth0 as it is, and assign a random mac address to br0 (which is different from eth0's mac address); which you then apply during boot time as indicated on the wiki page.
Burninate!
Offline
still trying to figure this out! The macspoof file is not working on boot. So am at a loss. any ideas anybody?
Offline
i do it using netcfg's PRE_UP functionality.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I'm doing this for a desktop machine thats always 'wired'. So I assumed netcfg was not necessary. But I'll take anything. How do you do it with netcfg. THe problem seems to be the macspoof file is not run on boot. If I run it manually at the command line I get:
/etc/rc.d/functions.d/macspoof: line 5: add_hook: command not found
So I've resorted to putting the ip command in my rc.local followed by a 'dhclient br0'
Offline
You don't necessarily need netcfg to get networking. But I used it before for my wireless on my laptop, so I just used the same on my desktop too. Also if you want to do things like this its easier rather than have to go digging around with macspoof and what not. your netcfg eth0 file could be something like
PRE_UP='ip link set eth0 address XX:XX:XX:XX:XX:XX'
CONNECTION='ethernet'
DESCRIPTION='A basic dhcp ethernet connection using iproute'
INTERFACE='eth0'
IP='dhcp'
If you use a different interface then obviously, you need to change it accordingly
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline