View previous topic :: View next topic |
Author |
Message |
Oniryczny Guru
Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Mon Sep 30, 2013 6:54 pm Post subject: [SOLVED] jak przypisać eth(0,1,2) do MACa? |
|
|
problem pewnie trywialny ale coś nie daję rady
mam 3 karty sieciowe (RTL8168/8111 zintegrowana na mobo, RTL8168/8111 PCI oraz RTL8139 PCI) [karta 10/100/1000 nie chce za nic gadać z RPi dlatego zakupiłem kartę 10/100]
z początku gdy była tylko integra to była eth0
ale po dołożeniu kart PCI zmieniła na eth1
chciałbym mieć na stałe to przypisane
próbowałem skorzystać z artykułów na temat konfiguracji udeva ale grzebanie w /etc/udev/rules.d/ nie pomogło...
arch x86_64
kernel 3.10.7 (przedostatni stabilny na dzień dzisiejszy) system aktualny _________________ cogito ergo sum
Last edited by Oniryczny on Tue Nov 19, 2013 5:58 am; edited 1 time in total |
|
Back to top |
|
|
SlashBeast Retired Dev
Joined: 23 May 2006 Posts: 2922
|
Posted: Mon Sep 30, 2013 7:02 pm Post subject: |
|
|
Udev z automatu Ci to zalatwi, wygeneruje odpowiednie regulki w /etc/udev/rules.d/*net*
W przypadku mdev(-like-a-boss) od tego jest /etc/mactab |
|
Back to top |
|
|
Oniryczny Guru
Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Tue Oct 01, 2013 5:43 am Post subject: |
|
|
nie mam nic takiego jak /etc/mactab
w /etc/udev/rules.d/ w jednym z nicj jest tylko wpis jednej karty:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e0:cb:4e:d5:cd:81", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
jak dla mnie to definiuje eth0 a ifconfig pokazuje to jako eth1 _________________ cogito ergo sum |
|
Back to top |
|
|
Jacekalex Guru
Joined: 17 Sep 2009 Posts: 554
|
Posted: Wed Oct 02, 2013 6:44 pm Post subject: |
|
|
U mnie:
Code: | egrep -v '#' /etc/udev/rules.d/80-net-name-slot.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:76:e9:48:c1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:1d:c4:82:87", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="net" |
Zainstalowane:
Code: | sys-fs/eudev-1.1 gudev hwdb introspection keymap kmod modutils openrc selinux
sys-fs/udev-init-scripts-26
virtual/udev-200 gudev hwdb introspection keymap kmod selinux
|
SOA#1
Pozdro
|
|
Back to top |
|
|
Oniryczny Guru
Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 04, 2013 6:12 am Post subject: |
|
|
Code: | # ls -l /etc/udev/rules.d/
razem 0
lrwxrwxrwx 1 root root 9 10-01 20:11 80-net-name-slot.rules -> /dev/null
|
usunąłem tam wszystkie pliki i mam tylko dowiązanie (sposób jaki znalazłem gdzieś na jakimś forum )
bo jak wcześniej próbowałem edytować ten plik wpisując określone adresy MAC i nazwy eth0/1/2 to nic nie pomagało... _________________ cogito ergo sum |
|
Back to top |
|
|
Oniryczny Guru
Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Mon Oct 07, 2013 5:30 pm Post subject: |
|
|
utworzyłem plik, wpisałem co należy Code: |
$ ifconfig
lan_100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.146.40 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::6670:2ff:fe07:ac prefixlen 64 scopeid 0x20<link>
ether 64:70:02:07:00:ac txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41 bytes 8828 (8.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lan_100:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.13 netmask 255.255.255.0 broadcast 192.168.2.255
ether 64:70:02:07:00:ac txqueuelen 1000 (Ethernet)
lan_1000: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.3.13 netmask 255.255.255.0 broadcast 192.168.3.255
ether f8:1a:67:02:23:ac txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lan_dhcp: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.103 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::e2cb:4eff:fed5:cd81 prefixlen 64 scopeid 0x20<link>
ether e0:cb:4e:d5:cd:81 txqueuelen 1000 (Ethernet)
RX packets 4231 bytes 5130737 (4.8 MiB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 2685 bytes 293633 (286.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.3.1.8 netmask 255.255.255.0 broadcast 10.3.1.255
inet6 fe80::80fc:73ff:fe4c:e894 prefixlen 64 scopeid 0x20<link>
ether 82:fc:73:4c:e8:94 txqueuelen 100 (Ethernet)
RX packets 20 bytes 3642 (3.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 5527 (5.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
dziwny zapis lan_100 ale ważne, że działa _________________ cogito ergo sum |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|