Настройка сетевых интерфейсов в Ubuntu 12.04

Настройка сетевых интерфейсов в Ubuntu 12.04

/////////////////////////////// 70-persistent-net.rules ////////////////////////////////

user@testprod:~$ more /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 0x1022:0x2000 pcnet32

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*“, ATTR{address}“08:00:27:93:52:d3”, ATTR{dev_id}“0x0”, ATTR{type}“1”, KERNEL“eth*“, NAME=”eth0”

vi /etc/network/interfaces

iface eth0 inet static

address   5.9.24.112

netmask   255.255.255.224

gateway   5.9.24.97

# default route to access subnet

up route add -net 5.9.24.96 netmask 255.255.255.224 gw 5.9.24.97 eth0

pre-up iptables-restore \< /etc/iptables/iptables.rules