Настройка сетевых интерфейсов в 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




# default route to access subnet

up route add -net netmask gw eth0

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