====== Настройка сети ====== ===== Статический IP ===== ==== Debian ==== /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.250 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 8.8.8.8 ==== Red Hat ==== /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 HWADDR=00:C0:DD:15:00:24 ONBOOT=yes TYPE=Ethernet IPADDR=192.168.0.21 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=hostname GATEWAY=192.168.0.1 DNS1=192.168.0.1 ''ifdown eth2''\\ ''ifup eth2'' ===== Бондинг + бридж ===== ''apt-get install ifenslave-2.6'' ''echo bonding >> /etc/modules'' ''modprobe bonding'' # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback #p4p1 is manually configured, and slave to the "bond0" bonded NIC auto p4p1 iface p4p1 inet manual bond-master bond0 bond-primary p4p1 #eth0 ditto, thus creating a 2-link bond. auto eth0 iface eth0 inet manual bond-master bond0 # bond0 is the bonding NIC and can be used like any other normal NIC. auto bond0 iface bond0 inet manual bond-mode active-backup bond-miimon 100 bond-slaves none auto br0 iface br0 inet static address 192.168.0.250 netmask 255.255.255.0 gateway 192.168.0.1 bridge_ports bond0 bridge_hello 2 bridge_stp off bridge_fd 9 bridge_maxwait 12 dns-nameservers 192.168.0.250 dns-search n-t-i.ru n-t-i ===== Изменение имени интерфейсов ===== - Bring the network interfaces down, then - modify /etc/udev/rules.d/70-persistent-net.rules (or its equivalent) - re-load with udevadm control --reload-rules and finally - re-trigger with udevadm trigger --attr-match=subsystem=net - bring the network interfaces up. {{tag> Debian Linux networking bridge bonding }}