GNS3-IOUVM 更改IP地址为静态
2015-10-11 07:49
211 查看
在GNS3 IOU VM1.3.9中使用的是 Debian Linux。
Debian中网卡的设置可以通过/etc/network/interfaces文件来进行,
具体可分为三种不同的配置方式,这里只说2种:DHCP自动获取、静态分配IP地址。
具体设置如下: 在进行配置之前,首先进入/etc/network目录中,编辑interfaces文件,且IOU vm 1.3.9中集成的是nano编辑器
具体命令如下:
nano /etc/network/interfaces
ps:保存退出:CTRL+X 问你是否保存 敲入 Y 文件名不变
1、查看是否有双网卡
ifconfig -a //得到eth0、 eth1、 eth*.....等网卡信息
注意:如果只有一个eth0,则需在VM机中添加 网络适配器 —— 仅主机模式
2、nano /etc/network/interfaces
以下为配置说明:
网卡通过DHCP自动获取IP地址
interfaces正文如下:#后为注释
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#
# The loopback network interface(配置环回口)
# 开机自动激lo接口
auto lo
# 配置lo接口为环回口
iface lo inet loopback
# The primary network interface (配置主网络接口)
#开机自动激活eth0接口
auto eth0
#配置eth0接口为DHCP自动获取
iface eth0 inet dhcp
#开机自动激活eth1接口
auto eth1
#配置eth1接口为静态设置IP地址,(当然也可以DHCP获取,我试的没成功,郁闷)
iface eth1 inet static
address 192.168.56.128
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
#配置网关,可省
gateway 192.168.56.1
#配置NDS,可省
# dns-* options are implemented by the resolvconf package, if installed(DNS设置)
#dns-nameservers 192.168.1.1
#dns-search test.com
interfaces正文如上
配置完毕后保存,重启计算机(reboot)或
重启网络服务即可将网卡配好。(service
networking restart)
Debian中网卡的设置可以通过/etc/network/interfaces文件来进行,
具体可分为三种不同的配置方式,这里只说2种:DHCP自动获取、静态分配IP地址。
具体设置如下: 在进行配置之前,首先进入/etc/network目录中,编辑interfaces文件,且IOU vm 1.3.9中集成的是nano编辑器
具体命令如下:
nano /etc/network/interfaces
ps:保存退出:CTRL+X 问你是否保存 敲入 Y 文件名不变
1、查看是否有双网卡
ifconfig -a //得到eth0、 eth1、 eth*.....等网卡信息
注意:如果只有一个eth0,则需在VM机中添加 网络适配器 —— 仅主机模式
2、nano /etc/network/interfaces
以下为配置说明:
网卡通过DHCP自动获取IP地址
interfaces正文如下:#后为注释
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#
# The loopback network interface(配置环回口)
# 开机自动激lo接口
auto lo
# 配置lo接口为环回口
iface lo inet loopback
# The primary network interface (配置主网络接口)
#开机自动激活eth0接口
auto eth0
#配置eth0接口为DHCP自动获取
iface eth0 inet dhcp
#开机自动激活eth1接口
auto eth1
#配置eth1接口为静态设置IP地址,(当然也可以DHCP获取,我试的没成功,郁闷)
iface eth1 inet static
address 192.168.56.128
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
#配置网关,可省
gateway 192.168.56.1
#配置NDS,可省
# dns-* options are implemented by the resolvconf package, if installed(DNS设置)
#dns-nameservers 192.168.1.1
#dns-search test.com
interfaces正文如上
配置完毕后保存,重启计算机(reboot)或
重启网络服务即可将网卡配好。(service
networking restart)
相关文章推荐
- git 使用小结
- HTML5 WebSocket+Tomcat实现真●Web版即时聊天室(单人+多人)
- 面试题——Spring作用
- UVA - 1339 Ancient Cipher
- 【bzoj2226】【spoj5971】【lcmsum】【数论】
- VS2010中“工具>选项中的VC++目录编辑功能已被否决”解决方法
- C++与类型转换相关的四个关键字及其特点
- Spring Boot实践应用开发(8)
- 2007年NOIP提高组 统计数字
- LeetCode Algorithms #100 <Same Tree>
- 2011年NOIP提高组 铺地毯
- 解析大型.NET ERP系统:十三种界面设计模式
- OSChina 周日乱弹 —— 旅游被宰后正确处理方式
- Lua入门
- codevs 1293 送给圣诞夜的极光
- 毕业5年决定人的一生(转)-- 大家千万不要错过这篇文章
- hdu5499 SDOI
- LeetCode Algorithms #237 <Delete Node in a Linked List>
- 为什么不能用memcached存储Session
- *LeetCode-Interleaving String