This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Software-UTM in Hyper-V2016 und NIC-Reihenfolge

Hallo Zusammen! Ich habe das Problem, dass hin und wieder in einer recht großen SW-UTM (9.51) nach einem Herunterfahren der VM alle NICs neu gewürfelt werden. Dann bin ich oft ganz raus - und das ist blöd;-)) Jetzt gibt es hier aber Artikel im Forum, wie man auf die Eigenarten des Hypervisors reagiert, und die NICs/Schnittstellen der UTM immer gleich vergibt. Aber: ich bin zu blöd und kriege es nicht hin. Ich bin auf die Artikel community.sophos.com/.../132109 community.sophos.com/.../132427 gestoßen. Ich habe auch mal die (nicht vorhandene) 70-persistent-net.rules mit dem folgende gefüllt und die Maschine rebootet: SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00155D60D512", NAME="eth0" SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00155D60D513", NAME="eth1" Aber sie liebt mich nicht. Hat jemand eine Anleitung für Dummies, damit meine UTM immer die gleiche Zuordnung MAC-Adresse/ethxx hat? Danke im Voraus Liebe Grüße Jochen


This thread was automatically locked due to age.
  • Ich kann nix dafür, aber hier vom Mac aus schluckt der Editor alle Zeilenschaltungen, etc... Bitte trotzdem lesen;-)) DANKEEE

  • Hallo Jochen,

    (Sorry, my German-speaking brain isn't creating thoughts at the moment. [:(])

    I agree - that article looks like a note I would have taken in a class and wanted to have something to tickle my memory on an exam - not a list of instructions for someone else.

    MfG - Bob (Bitte auf Deutsch weiterhin.)

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Do you have any idea, what I should do? At the moment I switched back to the backup-UTM and everything is ok. But I have created an small Test-UTM that shows the same behavior and that we can use for testing.... Kind regards Jochen

  • Hi!

    With the support of infinigate I have found a cool and easy solution for the problem.

    I'll check the reliability during the next days and post the solution on Sunday.

    In case of urgency just just send an PM and I'll reply soon.

    Jochen

  • OK, here is my step-by-step instruction to force a UTM to use the same interface order at each boot-process:

    1. If existing, create a backup...
    cp /etc/udev/rules.d/70-persistent-net.rules /root/backup_70-persistent-net.rules

    In my case, there was no 70-persistent-net.rules file on the UTM and I proceeded with step 3

    2. ...and delete the old version,
    rm /etc/udev/rules.d/70-persistent-net.rules

    After that, you have to do the following steps for every hardware-interface:
    3. export the Interface-data
    4. extract the MAC of the interface
    5. export it
    6. create a 70-persistent-net.rules-line by the "write_net_rules" command

    for eth0:
    export INTERFACE=eth0
    ias eth0 | grep ether
       link/ether 00:0c:29:dc:55:7e brd ff:ff:ff:ff:ff:ff
    export MATCHADDR=00:0c:29:dc:55:7e
    /lib/udev/write_net_rules

    für eth1:
    export INTERFACE=eth1
    ias eth1 | grep ether
       link/ether 00:0c:29:dc:55:88 brd ff:ff:ff:ff:ff:ff
    export MATCHADDR=00:0c:29:dc:55:88
    /lib/udev/write_net_rules

    After that you got your 70-persistent-net.rules.

    In my case I was too lazy to repeat it for every interface.
    I created the entry for the first Interface and copied it.
    It works fine.
    Here is my example-file:

    # This file was automatically generated by the /lib/udev/write_net_rules
    # program, run by the persistent-net-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and change only the value of the NAME= key.

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:12", KERNEL=="eth*", NAME="eth0"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:13", KERNEL=="eth*", NAME="eth1"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:14", KERNEL=="eth*", NAME="eth2"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:15", KERNEL=="eth*", NAME="eth3"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:16", KERNEL=="eth*", NAME="eth4"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:17", KERNEL=="eth*", NAME="eth5"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:18", KERNEL=="eth*", NAME="eth6"

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:60:D5:19", KERNEL=="eth*", NAME="eth7"