spoofed mac address and conflicts
here is my scenario:
MachineA -> eth0 -> MAC1 MachineB -> eth0 -> MAC1 (spoofed to the same MAC as MachineA) MachineB -> eth1 -> MAC2 MachineB(eth0) connected to a remote network for PPP Over Ethernet (internet Link). MAchineA(eth0) and MachineB(eth1) connected thru a cross linked cat 5 cable. That is , eth0 in A and eth1 in B are on same network eth0 in B is on another network. My intention is to use both Machines A and B for internet link. but when i use MachineB for connecting to internet with eth0 with spoofed MAC address, my local network has problem . i am not able to ping to MachineB(eth1) from MachineA(eth0). Is this because of MAC address conflict ? I believe that same MAC address on two different network doesn't cause any conflicts . Please help me. |
Hi
I think you mean IP address (eg. 192.168.100.1)not MAC address. Now to your problem, if MachineA IP(eth0) is the same as the MachineB IP (eth0). This means that MachineB (eth1) and MachineA(eth0)are on different networks. Therefore they cannot communicate. To share the internet connection on MachineB(eth0),change MachineA(eth0)to be in the same network as MachineB (eth1). Then enable ip-forwarding and Masquerading on MachineB |
Quote:
|
Why on earth would you even want to configure two machines with the same MAC address? That doesn't seem to be any good reason to do that.
BTW machine B is going to have MAC1 in it's ARP cache when there's traffic on eth0, so of course that will cause problems. In order to not cause problems the MACs would need to be on physically separate devices that are also in separate collision domains (i.e. differnet switches). That's not the cause since you're connecting two machines together that have the same MACs, regardless of which interface it's on. |
Quote:
i wanted to use MachineA to connect to internet in case of non availability of MachineB. i spoofed MAC on MachineB coz , the MAC is mapped on the ISPs server. i spoofed MAC on one of the two NICs in Machine2 to same MAC as of MachineA. One card (eth0 with spoofed MAC) is connected to seperate physical network and other one (eth1) is in my local network . Both are having different network address too . Also its on entirely different switches. i think the depiction below will help to understand it. PHP Code:
|
Quote:
You cannot do this the way you have it architected. It sounds like it doesn't fail-over without you making changes by hand any way, so don't spoof the MAC of the other machine unless that machine is down. You can write a script to ifconfig it with a different hw addr when you need to switch the connection (and switch it back when the first machine comes up!). |
Quote:
i wanted to use internet from machineA thru B :( ie, both the machines should be up. This may sound stupid but i have no other options. so can you suggest me a better architecture for doing this . |
Hi zzyborg,
I guess you could spoof another MAC address on machine A to use the configuration as you posted. The kernel maintains an ARP table do decide where to send the message on an ethernet network. The machine B table must be confused as it thinks machine A has the same MAC address as its eth1. By the way, what command did you use to spoof it? Cheers, Osvaldo. |
Call me crazy, but isn't what they make routers for? It allows you to connect your internet into it and use that mac address for the ISP, then distributes the connection to multiple computers.
They aren't very expensive. I've had very little trouble with the Linksys BEFSR41 I maintain at work. You should really look into one. -Josh- |
All times are GMT -5. The time now is 09:31 PM. |