VirtualBoxã§ã¯ãã¼ã³ã使ãã
VirtualBoxã§ä½æããä»®æ³ãã·ã³ããã¼ã¹ã«æ°ããä»®æ³ãã·ã³ãç¨æããæ¹æ³ã
è¤è£½å ã®ä»®æ³ãã·ã³
- Ubuntu 12.04 64 bit
- NICã¯NATç¨ã¨ãã¹ããªã³ãªã¼ã¢ããã¿ã¼ç¨ã®2ã¤
CentOSçã¯ãVirtualBoxã§CenOSã®ã¯ãã¼ã³ã使ãã - 使¥ãã¼ããåç §ã
ã¯ãã¼ã³ä½æ
1. VirtualBoxããã¼ã¸ã£ã§ãè¤è£½å ã®ä»®æ³ãã·ã³ã鏿
ä»®æ³ãã·ã³ã¯é»æºãªãã®ç¶æ ã«ããã
2. å³ã¯ãªãã¯ããã¡ãã¥ã¼ãããã¯ãã¼ã³ãã鏿
- ãæ°ãããã·ã³åãã¦ã£ã¶ã¼ã
- ä»®æ³ãã·ã³åãå ¥åãã
- ããã¹ã¦ã®ãããã¯ã¼ã¯ã«ã¼ãã®MACã¢ãã¬ã¹ãååæåãããªã³
- ãç¶ããããã¿ã³ãããã¦æ¬¡ã¸
- ãã¯ãã¼ã³ã®ã¿ã¤ããã¦ã£ã¶ã¼ã
- ããã¹ã¦ãã¯ãã¼ã³ãã鏿
- ãã¯ãã¼ã³ããã¿ã³ãæ¼ã
ããã§ã¯ãã¼ã³ã使ãããã
è¤è£½å¾ã®è¨å®
è¤è£½ããä»®æ³ãã·ã³ã®è¨å®ãè¡ãã
ãããã¯ã¼ã¯ã®åè¨å®
ãããã¯ã¼ã¯ã«ã¼ãã®MACã¢ãã¬ã¹ãåæåããã®ã§ãä¸è¨ã®ããã«ãã¡ã¤ã«ãç·¨éãã¦NICãåè¨å®ããã
$ cat /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 0x8086:/sys/devices/pci0000:00/0000:00:03.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:6f:25:a5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:08.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:8d:3e:c5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:03.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:97:d9:5b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:08.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:e0:8b:24", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
è¤è£½åã®è¨å®(ä¸2ã¤)ãåé¤ããæ°ããè¨å®(ä¸2ã¤)ã®NAMEãããããeth0, eth1ã«ããã
$ cat /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 0x8086:/sys/devices/pci0000:00/0000:00:03.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:97:d9:5b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:08.0 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:e0:8b:24", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
è¨å®å¾ãåèµ·åããã
åèµ·åå¾ãifconfigã³ãã³ãã§eth0ã¨eth1ã表示ãããã°OKã