You are not logged in.
Good day. I've got a problem with network interfaces. I have 2 network cards. At a working LAN, to another internet.
eth0 - local
eth1 - internet
The problem is that the network card, change the names of interfaces. For example was eth1, and after restarting became eth0. Because it does not work online because it is bound by the script into eth1. I tried to do through udev. Created a file
/etc/udev/rules.d/70-persistent-net.rules and wrote there lines
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:5b:85:e7:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:91:55:18:e5", ATTR{type}=="1", KERNEL=="wlan*", NAME="eth1"Confused he does not. What to tell my? The modules of network cards I have now loaded as modules.
02:07.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
Subsystem: D-Link System Inc DFE-538TX 10/100 Ethernet Adapter
Kernel driver in use: 8139too
Kernel modules: 8139too
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM) Ethernet Controller (rev 82)
Subsystem: Fujitsu Technology Solutions Device 1001
Kernel driver in use: e100
Kernel modules: e100That's what I was greatly disturbed by all the rules if you delete a file / etc/udev/rules.d/70-persistent-net.rules then restart it should re-create a udev. But! I have such a file was originally!
Sorry for my english .. I take a translator from google
Offline
Try this
/etc/rc.conf
# Always load 8139too before e100
MODULES=(8139too e100)or
/etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net", ATTR{address}=="00:19:5b:85:e7:f2", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="00:21:91:55:18:e5", NAME="eth1"Last edited by karol (2010-07-22 18:19:15)
Offline
The second way I tried did not work. He will double-check but then. But the first method might work, the main load exactly the first module, which for the Internet.
Offline
Try the second way again.
/etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net", ATTR{address}=="00:19:5b:85:e7:f2", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="00:21:91:55:18:e5", NAME="eth1"Offline
All right. I'll try the second method again. Thanks!
Offline
Like working. Determined correctly, but I'm not supposed to rejoice ... joint test.
[xlin@saikov ~]$ dmesg | grep eth
8139too 0000:02:07.0: eth0: RealTek RTL8139 at 0xf0a72000, 00:05:5d:34:1d:78, IRQ 18
e100: eth1: e100_probe: addr 0xc2000000, irq 20, MAC addr 00:30:05:42:ac:f2I created a file /etc/udev/rules.d/70-persistent-net.rules, which is registered in the /lib/udev/write_net_rules variable
RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'That with such content
SUBSYSTEM=="net", ATTR{address}=="00:05:5D:34:1D:78", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="00:30:05:42:AC:F2", NAME="eth1"And the appointment of a static IP and gateway for the two network cards, took the file /etc/rc.conf, namely the network daemon.
eth0="eth0 10.28.135.127 netmask 255.255.255.0 broadcast 10.28.135.255"
eth1="eth1 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0 eth1)
gateway="default gw 10.28.135.254"
ROUTES=(gateway)
[xlin@saikov ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:05:5D:34:1D:78
inet addr:10.28.135.127 Bcast:10.28.135.255 Mask:255.255.255.0
inet6 addr: fe80::205:5dff:fe34:1d78/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1044 errors:0 dropped:0 overruns:0 frame:0
TX packets:1070 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:413070 (403.3 Kb) TX bytes:247737 (241.9 Kb)
Interrupt:18 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:30:05:42:AC:F2
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::230:5ff:fe42:acf2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:578 (578.0 b)Offline
You need to use lowercase letters: a - not A.
00:05:5d:34:1d:78
00:30:05:42:ac:f2
AC - no
ac - yes
Last edited by karol (2010-07-22 22:07:59)
Offline
AFAIK, mac addresses are case insensitive.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
AFAIK, mac addresses are case insensitive.
You're right, but:
http://wiki.archlinux.org/index.php/Ude … _Each_Boot
Make sure to use the lower-case hex values in your udev rules. It doesn't like upper-case.
I already troubleshooted at least one case when this was the case <God, what a horrible sentence>.
Last edited by karol (2010-07-22 23:27:12)
Offline
Thank you, like all works.
Last edited by xlin84 (2010-07-23 10:43:27)
Offline