LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Virtual ethernet adapter (https://www.linuxquestions.org/questions/linux-networking-3/virtual-ethernet-adapter-801959/)

cold 04-14-2010 06:31 AM

Virtual ethernet adapter
 
Dear all,
I have simple problem. I need to assign several (three actually) IP addresses to one physical ethernet adapter. Following options are not possible:
* VLAN -- this is for network with IP convergence sublayer so no VLAN tags are possible for incoming packets.
* Tunneling (like TUN/TAP or GRE): this must be supported on both sides, this is not acceptable solution for me since I cannot change the way how my ISP works.
* Aliases: not useable because I need to assign IP dynamically, aliases have static IP assignment only, right?

So, what would help me is a virtual ethernet driver that creates several eth devices in the system so that I can route/bridge between virtual and physical interfaces. Do you know about some solution? Another idea how to solve my problem?
Many thanks in advance for any hint.

-jn.

catkin 04-14-2010 06:39 AM

Which distro are you using? Networking is one of the areas where there are significant differences between distros.

cold 04-14-2010 07:26 AM

Oh yes, I forgot to mention it. This is embedded device so three's no specific distro (like Fedora or Debian), the kernel is 2.4.31. The "distro" is custom one.

catkin 04-14-2010 07:56 AM

These commands worked on Slackware
Code:

ifconfig eth0 add 10.0.0.41
ifconfig eth0:0 broadcast 10.0.0.255 netmask 255.255.255.0

As you can see from the usage in the second command the first command created eth0:0 (in addition to the original eth0). IDK how far this technique can be used to satisfy all your requirements but it may be a good start.

An alternative approach may be to configure the physical NIC as a bridge and to tap into it with three virtual adapters, say eth0, 1 and 2. I did read "Tunneling (like TUN/TAP or GRE): this must be supported on both sides, this is not acceptable solution for me since I cannot change the way how my ISP works" but AIUI this technique is used when hosting virtual machines and, as far as the rest of the LAN is concerned, eth0, 1 and 2 don't function any differently from real NICs on the network.

TimothyEBaldwin 04-15-2010 02:17 AM

Quote:

Originally Posted by cold (Post 3935207)
Dear all,
* Aliases: not useable because I need to assign IP dynamically, aliases have static IP assignment only, right?

Wrong. If using DHCP you would need to specify different values for the client identifier option.


All times are GMT -5. The time now is 12:47 AM.