Proxmox VE底层系统/etc/network/interface 配置
2011-08-26 18:44
399 查看
本文针对是Proxmox VE底层系统/etc/network/interface 配置
Default Configuration (bridged) 默认配置(桥接)
The installation program creates a single bridge (vmbr0), which is connected to the first ethernet card (eth0).
安装程序创建一个单一桥(vmbr0),它是连接到第一个以太网卡(eth0的)。
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
Virtual machine behaves like directly connected to the physical network.
虚拟机行为就像直接连接到物理网络。
Routed Configuration
路由配置
Most hosting providers does not support above setup. For security reason they stop networking as soon as they detect multiple MAC addresses.
大多数托管服务提供商不支持以上设置。 出于安全原因,他们停止联网,尽快为他们检测多个MAC地址。
A common setup is that you get a public IP (assume 192.168.10.2 for this example), and additional IP blocks for your VMs (10.10.10.1/255.255.255.0). For such situation we recommend the following setup.
一个常见的设置是,您会获得一个公网IP(假设这个例子192.168.10.2),和其它的IP为虚拟机(10.10.10.1/255.255.255.0)。对于这样的情况下,我们推荐以下设置。
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
Masquerading
Sometimes you want to use private IPs and masquerade the traffic:
有时你想使用私人IP和非真实地址:
auto vmbr1
iface vmbr1 inet static
address 192.168.0.234
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eth1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eth1 -j MASQUERADE
Unsupported Routing
不支持路由
Physical NIC (eg., eth1) cannot currently be made available exclusively for a particular KVM / Container , ie., without bridge and/or bond.
物理网卡(例如,eth1使用),目前不能提供专门针对特定的KVM /封装,即,无桥和/或直连。
本文配置来源于
http://pve.proxmox.com/wiki/Network_Model
Default Configuration (bridged) 默认配置(桥接)
The installation program creates a single bridge (vmbr0), which is connected to the first ethernet card (eth0).
安装程序创建一个单一桥(vmbr0),它是连接到第一个以太网卡(eth0的)。
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
Virtual machine behaves like directly connected to the physical network.
虚拟机行为就像直接连接到物理网络。
Routed Configuration
路由配置
Most hosting providers does not support above setup. For security reason they stop networking as soon as they detect multiple MAC addresses.
大多数托管服务提供商不支持以上设置。 出于安全原因,他们停止联网,尽快为他们检测多个MAC地址。
A common setup is that you get a public IP (assume 192.168.10.2 for this example), and additional IP blocks for your VMs (10.10.10.1/255.255.255.0). For such situation we recommend the following setup.
一个常见的设置是,您会获得一个公网IP(假设这个例子192.168.10.2),和其它的IP为虚拟机(10.10.10.1/255.255.255.0)。对于这样的情况下,我们推荐以下设置。
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
Masquerading
Sometimes you want to use private IPs and masquerade the traffic:
有时你想使用私人IP和非真实地址:
auto vmbr1
iface vmbr1 inet static
address 192.168.0.234
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eth1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eth1 -j MASQUERADE
Unsupported Routing
不支持路由
Physical NIC (eg., eth1) cannot currently be made available exclusively for a particular KVM / Container , ie., without bridge and/or bond.
物理网卡(例如,eth1使用),目前不能提供专门针对特定的KVM /封装,即,无桥和/或直连。
本文配置来源于
http://pve.proxmox.com/wiki/Network_Model
相关文章推荐
- 再次重提NetworkManager这个东西,千万别使用。使用pppoeconf来配置ADSL,/etc/network/interface来配置网卡
- Network学习3_CentOS系统下向/etc/sysconfig/network-scripts/目录添加ifcfg-Auto_em1来配置网络连接
- Ubuntu 网卡配置文件/etc/network/interfaces重启失效
- vmware虚拟机centos网络配置错误,执行/etc/init.d/network start 或 restart 提示Device eth0 has different MAC address than expected, ignoring
- Ubuntu网络接口配置文件:nano/etc/network/interfaces 以及 Ifconfig只显示一个lo
- Linux系统配置文件 /etc/sysconfig详解
- CentOS 修改配置文件/etc/profile后,系统坏了
- ubuntu /etc/network/interfaces 中配置虚拟链路
- 修改linux系统配置文件 /etc/inittab 默认从字符界面启动系统
- debian等的网络管理 配置 /etc/network/interfaces 和图形界面配置的区别
- Linux例行性工作之系统配置文件(用户级crontab -e与系统级/etc/crontab)
- Linux NFS(Network File System 网络文件系统) 安装与配置
- linux下系统启动时,几个配置文件 /etc/profile、~/.bash_profile 等几个文件的执行过程,先后顺序
- 转:ubuntu或linux网卡配置/etc/network/interfaces
- ubuntu或linux网卡配置/etc/network/interfaces
- /etc/sysconfig/network-scripts/ifcfg-eth0网卡配置文件
- CentOS 修改配置文件/etc/profile后,系统坏了
- Linux 文件系统的配置文件:/etc/fstab
- Debian系网络配置 /etc/network/interfaces
- openwrt 网络相关配置文件 /etc/config/network /etc/config/wireless