Здравствуйте,товарищи.Решил поставить на шлюх третью сетевуху в экспиремнатльных целях,после этого началось не понятно что.
СУть в том,что при настройк должным образом rc.inet1.conf(листинг ниже) при перезагрузке сетевая карта к примеру realtek с eth1 привязывается к eth3,а должна подниматься через dhcp от роутера по мак адресу(прописан в настройках рутера)
# Config information for eth0:
IPADDR[0]="172.27.77.1"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1: realtek
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]="yes"
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]="10.1.1.2"
NETMASK[3]="255.255.255.0"
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
Вообщем возникает какая-то путаница при каждой перезагрузке.Не пойму логику,согласно которой интерфейсы поднимаются.Может поможет кто разобраться в чем дело.
Решено: Три сетевых карты на шлюзе (После установки третьей сетевухи,началаст свистопляска)
Модераторы: SLEDopit, Модераторы разделов
-
oper777
- Сообщения: 411
- ОС: gentoo
-
frik
- Сообщения: 41
Re: Решено: Три сетевых карты на шлюзе
oper777 писал(а): ↑15.09.2010 14:45Пропишите еще MAC-адрес для каждой:
Код: Выделить всё
HWADDR[4]="00:01:23:45:67:89"
прописал не помогает.Картина следующая
прописал в rc.inet1,conf
IPADDR[0]="172.27.77.1"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
HWADDR[0]="00:e0:52:9f:d0:c0"
# Config information for eth1
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
HWADDR[1]=""
DHCP_HOSTNAME[1]=""
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]="yes"
HWADDR[2]="00:0c:6e:2c:c0:00"
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]="10.1.1.2"
NETMASK[3]="255.255.255.0"
USE_DHCP[3]=""
HWADDR[3]="00:a0:cc:3f:df:c7"
#DHCP_HOSTNAME[3]=""
перезарустил сеть /etc/rc.d/rc.inet1 restart
Работает нормально до перезагрузки.После перезагрузки ifconfig выгдядит так
Код: Выделить всё
frik# ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:e0:52:9f:d0:c0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:18 Base address:0xd000
eth2 Link encap:Ethernet HWaddr 00:0c:6e:2c:c0:00
inet addr:192.168.5.5 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:6eff:fe2c:c000/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:193 errors:0 dropped:0 overruns:0 frame:0
TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62508 (61.0 KiB) TX bytes:49076 (47.9 KiB)
Interrupt:23 Base address:0x4000
eth3 Link encap:Ethernet HWaddr 00:a0:cc:3f:df:c7
inet addr:10.1.1.2 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe3f:dfc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:761 errors:1 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46224 (45.1 KiB) TX bytes:3412 (3.3 KiB)
Interrupt:19 Base address:0x6000Вместо eth0 появился eth1
Кусок лога
Код: Выделить всё
/var/log/messages |grep eth
gateway logger: /etc/rc.d/rc.inet1: eth0 interface does not exist (yet)
Sep 15 21:11:42 gateway logger: /etc/rc.d/rc.inet1: eth1 interface is not configured in /etc/rc.d/rc.inet1.conf
Sep 15 21:11:42 gateway logger: /etc/rc.d/rc.inet1: /sbin/ifconfig eth2 hw ether 00:0c:6e:2c:c0:00
Sep 15 21:11:42 gateway logger: /etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 30 eth2
Sep 15 21:11:45 gateway logger: /etc/rc.d/rc.inet1: /sbin/ifconfig eth3 hw ether 00:a0:cc:3f:df:c7
Sep 15 21:11:45 gateway logger: /etc/rc.d/rc.inet1: /sbin/ifconfig eth3 10.1.1.2 broadcast 10.1.1.255 netmask 255.255.255.0
Sep 15 21:11:46 gateway logger: /etc/rc.d/rc.inet1: eth4 interface does not exist (yet)
Sep 15 21:11:48 gateway logger: /etc/rc.d/rc.inet1: eth5 interface does not exist (yet)
Sep 15 21:12:07 gateway kernel: eth0: RealTek RTL8139 at 0xd000, 00:e0:52:9f:d0:c0, IRQ 18
Sep 15 21:12:07 gateway kernel: eth1: VIA Rhine II at 0xec000000, 00:0c:6e:2c:c0:00, IRQ 23.
Sep 15 21:12:07 gateway kernel: eth1: MII PHY found at address 1, status 0x786d advertising 01e1 Link 45e1.
Sep 15 21:12:07 gateway kernel: eth2: Lite-On 82c168 PNIC rev 33 at MMIO 0xed800000, 00:a0:cc:3f:df:c7, IRQ 19.
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth0_rename to eth1
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth2 to eth3
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth1_rename to eth2
Sep 15 21:12:07 gateway kernel: eth2: link up, 100Mbps, full-duplex, lpa 0x45E1
Sep 15 21:12:07 gateway kernel: eth3: Setting full-duplex based on MII#1 link partner capability of 41e1.Видать трабл тут
Код: Выделить всё
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth0_rename to eth1
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth2 to eth3
Sep 15 21:12:07 gateway kernel: udev: renamed network interface eth1_rename to eth2как с этим бороться ктонить знает?
-
arkhnchul
- Сообщения: 2284
- Статус: Толчковый инженер
- ОС: Debian, Fedora
Re: Решено: Три сетевых карты на шлюзе
смотрет гденить в /etc/udev/rules.d/. Там должно лежать (дистрибутивозависимо) чегонит в стиле XX-persistent-net.rules. Выглядит внутре так:
дальше, думаю, понятно.
Код: Выделить всё
[root@darkstar maptaxi]# cat /etc/udev/rules.d/70-persistent-net.rules
# 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.
# PCI device 0x10de:0x0373 (forcedeth) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:61:49:41:cf", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10de:0x0373 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:61:49:41:ce", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"дальше, думаю, понятно.
Losing is fun!
-
frik
- Сообщения: 41