Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Polskie forum (Polish) Instalacja i sprzęt
  • Search

[SOLVED] jak przypisać eth(0,1,2) do MACa?

Pytania i problemy związane z instalacją Gentoo oraz sprzętem

Moderator: SlashBeast

Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
Author
Message
Oniryczny
Guru
Guru
User avatar
Posts: 429
Joined: Thu Dec 01, 2011 11:31 am
Location: Poland

[SOLVED] jak przypisać eth(0,1,2) do MACa?

  • Quote

Post by Oniryczny » Mon Sep 30, 2013 6:54 pm

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
Last edited by Oniryczny on Tue Nov 19, 2013 5:58 am, edited 1 time in total.
cogito ergo sum
Top
SlashBeast
Retired Dev
Retired Dev
User avatar
Posts: 2922
Joined: Tue May 23, 2006 11:50 am
Contact:
Contact SlashBeast
Website

  • Quote

Post by SlashBeast » Mon Sep 30, 2013 7:02 pm

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
Top
Oniryczny
Guru
Guru
User avatar
Posts: 429
Joined: Thu Dec 01, 2011 11:31 am
Location: Poland

  • Quote

Post by Oniryczny » Tue Oct 01, 2013 5:43 am

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
Top
Jacekalex
Guru
Guru
User avatar
Posts: 554
Joined: Thu Sep 17, 2009 5:18 am

  • Quote

Post by Jacekalex » Wed Oct 02, 2013 6:44 pm

U mnie:

Code: Select all

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: Select all

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
8)
Top
Oniryczny
Guru
Guru
User avatar
Posts: 429
Joined: Thu Dec 01, 2011 11:31 am
Location: Poland

  • Quote

Post by Oniryczny » Fri Oct 04, 2013 6:12 am

Code: Select all

# 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 :P )
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
Top
Oniryczny
Guru
Guru
User avatar
Posts: 429
Joined: Thu Dec 01, 2011 11:31 am
Location: Poland

  • Quote

Post by Oniryczny » Mon Oct 07, 2013 5:30 pm

utworzyłem plik, wpisałem co należy

Code: Select all

$ 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 8)
cogito ergo sum
Top
Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Instalacja i sprzęt”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic