You are not logged in.

#1 2013-09-11 22:18:05

Registered: 2013-09-11
Posts: 2

How to set up virtual interface with a unique mac address.

I am looking for help with creating virtual network interface on a powerPC running Linux. My setup is
described below. If this is not the correct forum my apologies, please direct me to an appropriate one.

Currently, the powerPC's TSEC interface is wired to a port on a network switch chip. Another port on
the switch is connected to a wider network(say LAN-A) and switch is configured to forward packets received
on this port(network-port) to the powerPC connected port(cpu-port). All other ports on the switch discard
packets. A single interface (eth0) is setup on the powerPC. This interface can be configured for either
static or DHCP, default is DHCP.

With new design, packets will now be received on a third port(new-port)on the switch. The packet sources
are devices on a separate network(say LAN-B).These packets are also forwarded to the cpu-port. Thus, the
powerPC will now receive packets from two separate sources via the same cpu-port and consequently the same
physical interface.

What I want to be able to do on the powerPC is:
- distinguish between the packets based on their port of ingress(network-port or new-port) & process them
- send unicast messages to devices on LAN-B via new-port and receive responses from them

Initial thought is to create a virtual interface (say eth01) on the power PC and send all data from new-port
to this virtual interface. Open two sockets - one on each interface(eth0, eth01) and process the packets in
their own separate threads.

Some options I investigated, given the limitations of the linux version I use:
1. create an alias. Was able to do this using static IP, the solution is not feasible because network initialization
fails when primary interface is configured for DHCP as both interfaces use the same MAC address.
2. Create MAC VLANs : my version of linux (based on arch Linux) does not support this. Upgrading to an entire new
version is not possible, but if a package is available I can include it if it serves my purpose.
3. Hack into the network layer and fake the mac address in the DHCP requests for the virtual interface: Last resort
solution as it will call for full cycle extensive testing, not feasible in the short time available.

If anyone has any suggestions on how I can achieve what I want to do, please help.

Thank you for your time.


#2 2013-09-11 22:23:37

Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,594

Re: How to set up virtual interface with a unique mac address.

Running Linux, or running Arch Linux?

Moving to Other Architectures...

Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438


#3 2013-09-11 23:17:54

Registered: 2013-09-11
Posts: 2

Re: How to set up virtual interface with a unique mac address.

ArchLinux , using initscripts.


Board footer

Powered by FluxBB