文章摘至(http://www.centoscn.com/CentOS/config/2015/0413/5169.html)
前段时间也学习了不少和网络相关的知识,也通过了各种实践。但从来没有从零开始进行实际锻炼。
今天就来信偿试一下。以下是此次过程中的详细记录。其中包括对网络的部分理解和对遇到问题的记录。 实践内容及目的: 1、使用网桥模式,将多台linux虚拟机桥接在一起。(如果有实体主机,原理一样。) 2、配制网络,使虚拟机和主机,虚拟机和虚拟机之间能够网络互通。 3、虚拟机可以访问外网。(如能ping 通www.baidu.com) 需要设置的参数: 主机ip地址:192.168.1.101 (这个自己将这个ip配制死了,不会由dhcp动态分配,在下面的操作,这步已经默认做好。) 虚拟机1与虚拟机2通过网桥连接,并和主机设置成同一个网段以便主机,虚拟机之间都可以相互通信 虚拟机1IP:192.168.1.11 虚拟机2IP:192.168.1.22 网关地址:192.168.1.1(这是路由器地址,通过设置主机与虚拟机的网关ip,进而可以访问外网)































