How to assign unique MAC addresses to sub-interfaces Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Not able to connect to local networkUbuntu server can access internet but cannot ping systems in the LANConflict between two network interfaces eth0 and eth114.04 no internet connection when I up the bridge interface (for LXC container)Ubuntu 14.04 Ethernet Connectivity Issue on startupMasquerade over USB Ethernet ProblemConnected to ethernet but no internet or outgoing connectionsNo internet access via ethernet, while wifi works (82579lm, ubuntu 14.04)Dual NIC not workingNo pings no package locations on server

What do you call a plan that's an alternative plan in case your initial plan fails?

What did Darwin mean by 'squib' here?

Writing Thesis: Copying from published papers

Was credit for the black hole image misattributed?

How to say 'striped' in Latin

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Passing functions in C++

Need a suitable toxic chemical for a murder plot in my novel

Blender game recording at the wrong time

Why is "Captain Marvel" translated as male in Portugal?

Determine whether f is a function, an injection, a surjection

Can I throw a longsword at someone?

Windows 10: How to Lock (not sleep) laptop on lid close?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

Cold is to Refrigerator as warm is to?

What is the largest species of polychaete?

What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?

Is there a service that would inform me whenever a new direct route is scheduled from a given airport?

Using "nakedly" instead of "with nothing on"

What can I do if my MacBook isn’t charging but already ran out?

Active filter with series inductor and resistor - do these exist?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

What's the point in a preamp?

How do you clear the ApexPages.getMessages() collection in a test?



How to assign unique MAC addresses to sub-interfaces



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Not able to connect to local networkUbuntu server can access internet but cannot ping systems in the LANConflict between two network interfaces eth0 and eth114.04 no internet connection when I up the bridge interface (for LXC container)Ubuntu 14.04 Ethernet Connectivity Issue on startupMasquerade over USB Ethernet ProblemConnected to ethernet but no internet or outgoing connectionsNo internet access via ethernet, while wifi works (82579lm, ubuntu 14.04)Dual NIC not workingNo pings no package locations on server



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm in a corporate environment with a DHCP server with static assignments for my server. I have one physical nic with several sub-interfaces. I statically assign different MAC addresses for each sub-interface to get another IP address from the DHCP server. For some reason, my server is not taking the static MAC addresses. You'll notice that ifconfig shows each interface with the same MAC.



How do I assign unique MAC addresses to my sub-interfaces?



$ cat interfaces



auto lo 
iface lo inet loopback

auto eth0:1
iface eth0:1 inet dhcp
hwaddress ether 00:0c:29:31:24:fa
hostname gwrt-test
client gwrt-test

auto eth0:2
iface eth0:2 inet dhcp
hwaddress ether 00:0c:29:31:25:fa
hostname gwrt-test2
client gwrt-test2

$ ifconfig

eth0 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329737 errors:0 dropped:0 overruns:0 frame:0
TX packets:121645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69228791 (69.2 MB) TX bytes:63531749 (63.5 MB)
Interrupt:16

eth0:1 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa <- should be 24:fa
inet addr:10.203.102.29 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16

eth0:2 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
inet addr:10.203.102.32 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16









share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

    – roadmr
    Nov 4 '13 at 18:29











  • Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

    – Jason Tooke
    Nov 4 '13 at 19:35

















0















I'm in a corporate environment with a DHCP server with static assignments for my server. I have one physical nic with several sub-interfaces. I statically assign different MAC addresses for each sub-interface to get another IP address from the DHCP server. For some reason, my server is not taking the static MAC addresses. You'll notice that ifconfig shows each interface with the same MAC.



How do I assign unique MAC addresses to my sub-interfaces?



$ cat interfaces



auto lo 
iface lo inet loopback

auto eth0:1
iface eth0:1 inet dhcp
hwaddress ether 00:0c:29:31:24:fa
hostname gwrt-test
client gwrt-test

auto eth0:2
iface eth0:2 inet dhcp
hwaddress ether 00:0c:29:31:25:fa
hostname gwrt-test2
client gwrt-test2

$ ifconfig

eth0 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329737 errors:0 dropped:0 overruns:0 frame:0
TX packets:121645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69228791 (69.2 MB) TX bytes:63531749 (63.5 MB)
Interrupt:16

eth0:1 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa <- should be 24:fa
inet addr:10.203.102.29 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16

eth0:2 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
inet addr:10.203.102.32 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16









share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

    – roadmr
    Nov 4 '13 at 18:29











  • Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

    – Jason Tooke
    Nov 4 '13 at 19:35













0












0








0








I'm in a corporate environment with a DHCP server with static assignments for my server. I have one physical nic with several sub-interfaces. I statically assign different MAC addresses for each sub-interface to get another IP address from the DHCP server. For some reason, my server is not taking the static MAC addresses. You'll notice that ifconfig shows each interface with the same MAC.



How do I assign unique MAC addresses to my sub-interfaces?



$ cat interfaces



auto lo 
iface lo inet loopback

auto eth0:1
iface eth0:1 inet dhcp
hwaddress ether 00:0c:29:31:24:fa
hostname gwrt-test
client gwrt-test

auto eth0:2
iface eth0:2 inet dhcp
hwaddress ether 00:0c:29:31:25:fa
hostname gwrt-test2
client gwrt-test2

$ ifconfig

eth0 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329737 errors:0 dropped:0 overruns:0 frame:0
TX packets:121645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69228791 (69.2 MB) TX bytes:63531749 (63.5 MB)
Interrupt:16

eth0:1 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa <- should be 24:fa
inet addr:10.203.102.29 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16

eth0:2 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
inet addr:10.203.102.32 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16









share|improve this question
















I'm in a corporate environment with a DHCP server with static assignments for my server. I have one physical nic with several sub-interfaces. I statically assign different MAC addresses for each sub-interface to get another IP address from the DHCP server. For some reason, my server is not taking the static MAC addresses. You'll notice that ifconfig shows each interface with the same MAC.



How do I assign unique MAC addresses to my sub-interfaces?



$ cat interfaces



auto lo 
iface lo inet loopback

auto eth0:1
iface eth0:1 inet dhcp
hwaddress ether 00:0c:29:31:24:fa
hostname gwrt-test
client gwrt-test

auto eth0:2
iface eth0:2 inet dhcp
hwaddress ether 00:0c:29:31:25:fa
hostname gwrt-test2
client gwrt-test2

$ ifconfig

eth0 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329737 errors:0 dropped:0 overruns:0 frame:0
TX packets:121645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69228791 (69.2 MB) TX bytes:63531749 (63.5 MB)
Interrupt:16

eth0:1 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa <- should be 24:fa
inet addr:10.203.102.29 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16

eth0:2 Link encap:Ethernet HWaddr 00:0c:29:31:25:fa
inet addr:10.203.102.32 Bcast:10.203.102.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16






networking server ethernet dhcp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 4 '13 at 18:20









Web-E

17.9k114489




17.9k114489










asked Nov 4 '13 at 18:17









Jason TookeJason Tooke

112




112





bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

    – roadmr
    Nov 4 '13 at 18:29











  • Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

    – Jason Tooke
    Nov 4 '13 at 19:35

















  • If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

    – roadmr
    Nov 4 '13 at 18:29











  • Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

    – Jason Tooke
    Nov 4 '13 at 19:35
















If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

– roadmr
Nov 4 '13 at 18:29





If you're thinking of going to the trouble of setting the MAC address explicitly for each interface, and as you say the addresses handed out by the dhcp server are static and reserved for use by your server, why not just configure them statically instead of using dhcp?

– roadmr
Nov 4 '13 at 18:29













Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

– Jason Tooke
Nov 4 '13 at 19:35





Company politics. The server is for development and sitting on my desk... but yes, static would be ideal.

– Jason Tooke
Nov 4 '13 at 19:35










3 Answers
3






active

oldest

votes


















0














You can install macchanger Install macchanger



Then execute like following,



sudo macchanger --mac 00:11:22:33:44:55 <interface_name>



More details






share|improve this answer






























    0














    Multimac can do this. (http://www.primianotucci.com/os/multimac)
    Alternatively you can use "ip link" to add veth interfaces.



    In both methods you must then bridge veth0 to eth0 using brctl (bridge-utils).



    Each interface (tapX for multimac or vethX for veth) can then have custom mac addresses
    (ifconfig hw ether xx:xx:xx:xx:xx:xx, interface should be down.)






    share|improve this answer






























      0














      You can use following commands on linux machines.



       ifconfig eth1.2 down 
      ifconfig eth1.2 hw ether 00:00:00:02:03:04
      ifconfig eth1.2 up





      share|improve this answer























        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "89"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f371085%2fhow-to-assign-unique-mac-addresses-to-sub-interfaces%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        You can install macchanger Install macchanger



        Then execute like following,



        sudo macchanger --mac 00:11:22:33:44:55 <interface_name>



        More details






        share|improve this answer



























          0














          You can install macchanger Install macchanger



          Then execute like following,



          sudo macchanger --mac 00:11:22:33:44:55 <interface_name>



          More details






          share|improve this answer

























            0












            0








            0







            You can install macchanger Install macchanger



            Then execute like following,



            sudo macchanger --mac 00:11:22:33:44:55 <interface_name>



            More details






            share|improve this answer













            You can install macchanger Install macchanger



            Then execute like following,



            sudo macchanger --mac 00:11:22:33:44:55 <interface_name>



            More details







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 4 '13 at 18:23









            Web-EWeb-E

            17.9k114489




            17.9k114489























                0














                Multimac can do this. (http://www.primianotucci.com/os/multimac)
                Alternatively you can use "ip link" to add veth interfaces.



                In both methods you must then bridge veth0 to eth0 using brctl (bridge-utils).



                Each interface (tapX for multimac or vethX for veth) can then have custom mac addresses
                (ifconfig hw ether xx:xx:xx:xx:xx:xx, interface should be down.)






                share|improve this answer



























                  0














                  Multimac can do this. (http://www.primianotucci.com/os/multimac)
                  Alternatively you can use "ip link" to add veth interfaces.



                  In both methods you must then bridge veth0 to eth0 using brctl (bridge-utils).



                  Each interface (tapX for multimac or vethX for veth) can then have custom mac addresses
                  (ifconfig hw ether xx:xx:xx:xx:xx:xx, interface should be down.)






                  share|improve this answer

























                    0












                    0








                    0







                    Multimac can do this. (http://www.primianotucci.com/os/multimac)
                    Alternatively you can use "ip link" to add veth interfaces.



                    In both methods you must then bridge veth0 to eth0 using brctl (bridge-utils).



                    Each interface (tapX for multimac or vethX for veth) can then have custom mac addresses
                    (ifconfig hw ether xx:xx:xx:xx:xx:xx, interface should be down.)






                    share|improve this answer













                    Multimac can do this. (http://www.primianotucci.com/os/multimac)
                    Alternatively you can use "ip link" to add veth interfaces.



                    In both methods you must then bridge veth0 to eth0 using brctl (bridge-utils).



                    Each interface (tapX for multimac or vethX for veth) can then have custom mac addresses
                    (ifconfig hw ether xx:xx:xx:xx:xx:xx, interface should be down.)







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 6 '14 at 16:24









                    olivervbkolivervbk

                    1112




                    1112





















                        0














                        You can use following commands on linux machines.



                         ifconfig eth1.2 down 
                        ifconfig eth1.2 hw ether 00:00:00:02:03:04
                        ifconfig eth1.2 up





                        share|improve this answer



























                          0














                          You can use following commands on linux machines.



                           ifconfig eth1.2 down 
                          ifconfig eth1.2 hw ether 00:00:00:02:03:04
                          ifconfig eth1.2 up





                          share|improve this answer

























                            0












                            0








                            0







                            You can use following commands on linux machines.



                             ifconfig eth1.2 down 
                            ifconfig eth1.2 hw ether 00:00:00:02:03:04
                            ifconfig eth1.2 up





                            share|improve this answer













                            You can use following commands on linux machines.



                             ifconfig eth1.2 down 
                            ifconfig eth1.2 hw ether 00:00:00:02:03:04
                            ifconfig eth1.2 up






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 1 '18 at 7:54









                            Nagesh HSNagesh HS

                            63




                            63



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f371085%2fhow-to-assign-unique-mac-addresses-to-sub-interfaces%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                                Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                                Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»