Results 1 to 8 of 8

Thread: making eth0 to primary nic

  1. #1
    Join Date
    Nov 2012
    Beans
    45

    making eth0 to primary nic

    hi there, ave installed ubuntu 12 server, with 2 NIC cards, choose eth0 to be primary during installation, for squid3 proxy. Nw internet only works with eth1 not eth0 which is the primary. due to this i cant configure the iptables and lan. running sudo nano /etc/network/interfaces
    shows

    #the primary network interface

    auto eth0 inet static
    address 81.25.128.x
    netmask 255.255.255.x
    gateway 81.25.128.x
    #dns -xoptions are implemented by the resolvconf package,
    dns-nameservers 91.x.x.x 91.x.x.x

    iface eth1 inet static
    address 81.25.128.x
    netmask 255.255.255.x
    brodcast 81.25.128.x


    any advice?
    thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Wisconsin
    Beans
    1,139

    Re: making eth0 to primary nic

    Check your persistent-net.rules file under /etc/udev/rules.d/

    Both NICs should be there - the rule tells which MAC address should be which eth#. Perhaps they've been switched? If so, fix them and reboot to see if that fixes the problem.

    If udev rules are correct but you still have the problem, next look at the boot log using dmesg | grep eth . Look for mesages about interfaces coming up, going down, or getting renamed. Post them here.

  3. #3
    Join Date
    Nov 2012
    Beans
    45

    Re: making eth0 to primary nic

    thanks for the reply, run /etc/udev/rules.d/ and this is the output

    #PCI device 0x14e4:/sys/devices/pci0000:00/0000:1c.2/0000:02:00.0(tg3)
    SUBSYSTEM=="net", ACTION=="add",DRIVERS=="?*", ATTR{address}=="d0:67:e5:23:88:0f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

    #PCI device 0x1106:/sys/devices/pci0000:00/0000:1e.0/0000:03:01.0(via-rhine)
    SUBSYSTEM=="net", ACTION=="add",DRIVERS=="?*", ATTR{address}=="14:d6:4d:54:4d:8c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

    i dont understand these, eth0 is inbuilt, whilst eth1 is pci

  4. #4
    Join Date
    Nov 2012
    Beans
    45

    changing eth0 to default

    hi there, ave installed ubuntu 12 server, with 2 NIC cards, choose eth0 to be primary during installation, for squid3 proxy. Nw internet only works with eth1 not eth0 which is the primary. due to this i cant configure the iptables and lan. running sudo nano /etc/network/interfaces
    shows

    #the primary network interface

    auto eth0 inet static
    address 81.25.128.x
    netmask 255.255.255.x
    gateway 81.25.128.x
    #dns -xoptions are implemented by the resolvconf package,
    dns-nameservers 91.x.x.x 91.x.x.x

    iface eth1 inet static
    address 81.25.128.x
    netmask 255.255.255.x
    brodcast 81.25.128.x

    and running /etc/udev/rules.d/

    #PCI device 0x14e4:/sys/devices/pci0000:00/0000:1c.2/0000:02:00.0(tg3)
    SUBSYSTEM=="net", ACTION=="add",DRIVERS=="?*", ATTR{address}=="d0:67:e5:23:88:0f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

    #PCI device 0x1106:/sys/devices/pci0000:00/0000:1e.0/0000:03:01.0(via-rhine)
    SUBSYSTEM=="net", ACTION=="add",DRIVERS=="?*", ATTR{address}=="14:d6:4d:54:4d:8c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

    anyone please help me....

  5. #5
    Join Date
    Jul 2005
    Beans
    2,047

    Re: changing eth0 to default

    You're close. Edit the file /etc/udev/rules.d/70-persistent-net.rules and swap eth0 and eth1 and reboot. That will swap eth0 and eth1. Change the interfaces file too, of course.

  6. #6
    Join Date
    Nov 2012
    Beans
    45

    Re: changing eth0 to default

    thank you, it works

  7. #7
    Join Date
    Nov 2012
    Beans
    45

    Re: making eth0 to primary nic

    thank you

  8. #8
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: making eth0 to primary nic

    Threads merged. Please do not create duplicate threads. This dilutes community effort.
    Ubuntu 20.04 Desktop Guide - Ubuntu 22.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •