Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-26-2005, 05:03 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
Virtual Interfaces

I need to create virtual interfaces on linux, something like ethX:Y, but each with its own MAC address.
Old 01-26-2005, 09:15 AM   #2
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32

could you explain why you need such a config ?
if you just wan't attach 2 logical networks to a same interface, you should consider using vlan and vlan trunking (

Old 01-26-2005, 09:26 AM   #3
LQ Newbie
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
I dont want VLANS. What I want is to be able to create virtual interfaces with different MAC's over a physical one. This is just like connecting multiple NIC's in a switch.
Old 02-12-2005, 04:40 PM   #4
LQ Newbie
Registered: Jun 2004
Location: Germany
Distribution: SuSE 9.1 (as of 6/04)
Posts: 4

Rep: Reputation: 0
I found this page looking for the same answer. Then when I didn't find the answer here, I tried this on a hunch and it worked (SuSE 9.1).:

ifconfig eth0:1

Of course then set the IP, netmask, etc.

I also had no use for the vlan answer as all I wanted to do was connect to my new Linksys WRT54GS wireless AP (defaults to long enough to change it's IP to my local class C. ifconfig eth0:1 took all of about 5 seconds and got the job done.
Old 02-12-2005, 05:07 PM   #5
LQ Newbie
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Still need a different MAC address.
Old 02-13-2005, 07:22 AM   #6
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
I don't think that you can have two different MACs on a single interface like that.

Anyone know for sure?


Maybe this would work for you?

Last edited by fur; 02-13-2005 at 07:30 AM.
Old 02-13-2005, 12:25 PM   #7
LQ Newbie
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Wmware can do that, and assign different mac addresses to its virtual interfaces, wich can be used in virtual machines. I need something like that, but I want the interfaces to be accessible from the host machine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables and virtual interfaces redhat_help Linux - Security 2 03-19-2006 04:24 PM
Virtual Interfaces linuxboy69 Linux - Networking 1 12-31-2003 04:08 PM
Virtual Interfaces da_tibmeister Linux - Networking 2 10-15-2003 10:32 AM
MRTG on Virtual Interfaces Dr.Gajo Linux - Networking 3 04-17-2003 07:16 AM
Virtual Network Interfaces pickledbeans Linux - Networking 1 07-11-2002 10:08 AM

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration