虚拟机
1 虚拟机软件
虚拟机软件使用的是VMware Workstation 6.5.0 build-118166。
宿主机操作系统为Slackware 12.2。
在初始安装时一共配置10块虚拟网卡,除vmnet0为桥接外,vmnet1到vmnet9均为host-only。关闭nat和dhcp服务。设置IP地址,以方便宿主机和所有虚拟机的交互:
- vmnet0,bridge -> eth0
- vmnet1,host-only,10.10.10.199
- vmnet2,host-only,10.10.20.199
- vmnet3,host-only,172.16.0.199
- vmnet4,host-only,10.20.10.199
- vmnet5,host-only,10.20.20.199
- vmnet6,host-only,172.17.0.199
- vmnet7,host-only,192.168.0.199
- vmnet8,host-only,192.168.1.199
- vmnet9,host-only,172.18.0.199
2 网卡映射
与网络结构图一致,各个虚拟网卡对应的网络和IP地址范围如下:
网卡设备 | 虚拟网络 | IP范围 |
---|---|---|
/dev/vmnet0 | bridged | 172.31.0.0/16 |
/dev/vmnet1 | home-work | 10.10.10.0/24 |
/dev/vmnet2 | home-server | 10.10.20.0/24 |
/dev/vmnet3 | home-gate | 172.16.0.0/24 |
/dev/vmnet4 | away-work | 10.20.10.0/24 |
/dev/vmnet5 | away-server | 10.20.20.0/24 |
/dev/vmnet6 | away-gate | 172.17.0.0/24 |
/dev/vmnet7 | other-work | 192.168.0.0/24 |
/dev/vmnet8 | other-server | 192.168.1.0/24 |
/dev/vmnet9 | other-gate & outer-machines | 172.18.0.0/24 |
3 IP地址
注:对于*-gate和router,所有操作系统的IP和机器名都是一样的,同一时刻每种只能启动一台;对于*-work和*-server,每种操作系统拥有不同的IP和机器名,可以同时启动多台。
3.1 home network
3.1.1 home-gate
接口 | 网卡 | IP | hostname |
---|---|---|---|
eth0 | /dev/vmnet1 | 10.10.10.1/24 | home-gate/home/gate.home/ server.home/www.home/ftp.home/ www/ftp |
eth1 | /dev/vmnet3 | 172.16.0.10/24 | |
eth2 | /dev/vmnet2 | 10.10.20.1/24 |
- domain: copyleft.net
- gateway: 172.16.0.1(router)
3.1.2 home-work
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet1 | 10.10.10.10/24 | sk24-home-work |
Slackware(2.6) | eth0 | /dev/vmnet1 | 10.10.10.20/24 | sk26-home-work |
OpenBSD | eth0 | /dev/vmnet1 | 10.10.10.30/24 | ob-home-work |
FreeBSD | eth0 | /dev/vmnet1 | 10.10.10.40/24 | fb-home-work |
CentOS | eth0 | /dev/vmnet1 | 10.10.10.50/24 | ct-home-work |
Debian | eth0 | /dev/vmnet1 | 10.10.10.60/24 | db-home-work |
Ubuntu server | eth0 | /dev/vmnet1 | 10.10.10.70/24 | ub-home-work |
- domain: copyleft.net
- gateway: 10.10.10.1(home-gate)
- nameserver: 10.10.10.1(home-gate)
3.1.3 home-server
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet2 | 10.10.20.10/24 | sk24-home-server |
Slackware(2.6) | eth0 | /dev/vmnet2 | 10.10.20.20/24 | sk26-home-server |
OpenBSD | eth0 | /dev/vmnet2 | 10.10.20.30/24 | ob-home-server |
FreeBSD | eth0 | /dev/vmnet2 | 10.10.20.40/24 | fb-home-server |
CentOS | eth0 | /dev/vmnet2 | 10.10.20.50/24 | ct-home-server |
Debian | eth0 | /dev/vmnet2 | 10.10.20.60/24 | db-home-server |
Ubuntu server | eth0 | /dev/vmnet2 | 10.10.20.70/24 | ub-home-server |
- domain: copyleft.net
- gateway: 10.10.20.1(home-gate)
3.2 away network
3.2.1 away-gate
接口 | 网卡 | IP | hostname |
---|---|---|---|
eth0 | /dev/vmnet4 | 10.20.10.1/24 | away-gate/away/gate.away/ server.away/www.away/ftp.away |
eth1 | /dev/vmnet6 | 172.17.0.10/24 | |
eth2 | /dev/vmnet5 | 10.20.20.1/24 |
- domain: copyleft.net
- gateway: 172.17.0.1(router)
3.2.2 away-work
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet4 | 10.20.10.10/24 | sk24-away-work |
Slackware(2.6) | eth0 | /dev/vmnet4 | 10.20.10.20/24 | sk26-away-work |
OpenBSD | eth0 | /dev/vmnet4 | 10.20.10.30/24 | ob-away-work |
FreeBSD | eth0 | /dev/vmnet4 | 10.20.10.40/24 | fb-away-work |
CentOS | eth0 | /dev/vmnet4 | 10.20.10.50/24 | ct-away-work |
Debian | eth0 | /dev/vmnet4 | 10.20.10.60/24 | db-away-work |
Ubuntu server | eth0 | /dev/vmnet4 | 10.20.10.70/24 | ub-away-work |
- domain: copyleft.net
- gateway: 10.20.10.1(away-gate)
- nameserver: 10.20.10.1(away-gate)
3.2.3 away-server
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet5 | 10.20.20.10/24 | sk24-away-server |
Slackware(2.6) | eth0 | /dev/vmnet5 | 10.20.20.20/24 | sk26-away-server |
OpenBSD | eth0 | /dev/vmnet5 | 10.20.20.30/24 | ob-away-server |
FreeBSD | eth0 | /dev/vmnet5 | 10.20.20.40/24 | fb-away-server |
CentOS | eth0 | /dev/vmnet5 | 10.20.20.50/24 | ct-away-server |
Debian | eth0 | /dev/vmnet5 | 10.20.20.60/24 | db-away-server |
Ubuntu server | eth0 | /dev/vmnet5 | 10.20.20.70/24 | ub-away-server |
- domain: copyleft.net
- gateway: 10.20.20.1(away-gate)
3.3 other network
3.3.1 other-gate
接口 | 网卡 | IP | hostname |
---|---|---|---|
eth0 | /dev/vmnet7 | 192.168.0.1/24 | other-gate/other/gate.other/ server.other/www.other/ftp.other/ www/ftp |
eth1 | /dev/vmnet9 | 172.18.0.10/24 | |
eth2 | /dev/vmnet8 | 192.168.1.1/24 |
- domain: other.net
- gateway: 172.18.0.1(router)
3.3.2 other-work
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet7 | 192.168.0.10/24 | sk24-other-work |
Slackware(2.6) | eth0 | /dev/vmnet7 | 192.168.0.20/24 | sk26-other-work |
OpenBSD | eth0 | /dev/vmnet7 | 192.168.0.30/24 | ob-other-work |
FreeBSD | eth0 | /dev/vmnet7 | 192.168.0.40/24 | fb-other-work |
CentOS | eth0 | /dev/vmnet7 | 192.168.0.50/24 | ct-other-work |
Debian | eth0 | /dev/vmnet7 | 192.168.0.60/24 | db-other-work |
Ubuntu server | eth0 | /dev/vmnet7 | 192.168.0.70/24 | ub-other-work |
- domain: other.net
- gateway: 192.168.0.1(other-gate)
- nameserver: 192.168.0.1(other-gate)
3.3.3 other-server
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet8 | 192.168.1.10/24 | sk24-other-server |
Slackware(2.6) | eth0 | /dev/vmnet8 | 192.168.1.20/24 | sk26-other-server |
OpenBSD | eth0 | /dev/vmnet8 | 192.168.1.30/24 | ob-other-server |
FreeBSD | eth0 | /dev/vmnet8 | 192.168.1.40/24 | fb-other-server |
CentOS | eth0 | /dev/vmnet8 | 192.168.1.50/24 | ct-other-server |
Debian | eth0 | /dev/vmnet8 | 192.168.1.60/24 | db-other-server | Ubuntu server | eth0 | /dev/vmnet8 | 192.168.1.70/24 | ub-other-server |
- domain: other.net
- gateway: 192.168.1.1(other-gate)
3.4 router
接口 | 网卡 | IP | hostname |
---|---|---|---|
eth0 | /dev/vmnet0 | 172.31.1.1/16 | router |
eth1 | /dev/vmnet3 | 172.16.0.1/24 | |
eth2 | /dev/vmnet6 | 172.17.0.1/24 | |
eth3 | /dev/vmnet9 | 172.18.0.1/24 |
- domain: outer.net
- gateway: 172.31.0.199(物理路由器)
3.5 outer machines
系统 | 接口 | 网卡 | IP | hostname |
---|---|---|---|---|
Slackware(2.4) | eth0 | /dev/vmnet9 | 172.18.0.20/24 | sk24-out-server1 |
Slackware(2.6) | eth0 | /dev/vmnet9 | 172.18.0.30/24 | sk26-out-server2 |
CentOS | eth0 | /dev/vmnet9 | 172.18.0.40/24 | ct-out-server3 |
Ubuntu server | eth0 | /dev/vmnet9 | 172.18.0.50/24 | ub-out-server4 |
OpenBSD | eth0 | /dev/vmnet9 | 172.18.0.60/24 | ob-out-server5 |
FreeBSD | eth0 | /dev/vmnet9 | 172.18.0.70/24 | fb-out-server6 |
Debian | eth0 | /dev/vmnet9 | 172.18.0.80/24 | db-out-server7 |
- domain: outer.net
- gateway: 172.18.0.1(router)
- nameserver: 172.31.0.199(物理路由器)
3.6 develop
开发机develop作为每种系统的开发平台,安装编译开发等工具,本身不作为测试系统的一部分。为了能与其他机器通信,需要配置10块网卡:
接口 | 网卡 | IP |
---|---|---|
eth0 | /dev/vmnet0 | 172.31.1.X/16 |
eth1 | /dev/vmnet1 | 10.10.10.X/24 |
eth2 | /dev/vmnet2 | 10.10.20.X/24 |
eth3 | /dev/vmnet3 | 172.16.0.X/24 |
eth4 | /dev/vmnet4 | 10.20.10.X/24 |
eth5 | /dev/vmnet5 | 10.20.20.X/24 |
eth6 | /dev/vmnet6 | 172.17.0.X/24 |
eth7 | /dev/vmnet7 | 192.168.0.X/24 |
eth8 | /dev/vmnet8 | 192.168.1.X/24 |
eth9 | /dev/vmnet9 | 172.18.0.X/24 |
其中X的分配如下:
系统 | X | hostname |
---|---|---|
Slackware(2.4) | 250 | sk24-develop |
Slackware(2.6) | 240 | sk26-develop |
OpenBSD | 230 | ob-develop |
FreeBSD | 220 | fb-develop |
CentOS | 210 | ct-develop |
Debian | 200 | db-develop |
Ubuntu server | 190 | ub-develop |
- domain: develop.net
4 系统配置记录
sk24 | sk26 | ob | fb | ct | db | ub | |
---|---|---|---|---|---|---|---|
develop | [详情] | [详情] | |||||
home-gate | [详情] | [详情] | [详情] | [详情] | [详情] | [详情] | [详情] |
home-work | [详情] | [详情] | [详情] | ||||
home-server | [详情] | [详情] | |||||
away-gate | [详情] | [详情] | |||||
away-work | [详情] | [详情] | |||||
away-server | [详情] | [详情] | |||||
other-gate | [详情] | [详情] | |||||
other-work | [详情] | [详情] | |||||
other-server | [详情] | [详情] | |||||
router | [详情] | [详情] | |||||
out-server | [详情] | [详情] | [详情] | [详情] | [详情] | [详情] | [详情] |
注:sk24为2.4内核的Slackware,如slackware 11.0;sk26为2.6内核的Slackware,如slackware 12.2;ob为OpenBSD;fb为FreeBSD;ct为CentOS;db为Debian;ub为Ubuntu server。