虚拟机做网关实现局域网上网
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-06
|
虚拟机做网关实现局域网上网<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
一直都是用的XP通过ADSL上网,XP没有路由的功能,一直只能让宿主机和客户机(虚拟机)其中的一个上网.今天突发奇想,用虚拟机做宿主机的网关,形成一个小型局域网上网的模型.
宿主机:XP,192.168.1.11
虚拟机:redhat 9,192.168.1.13
要保证linux上已经装了拨号软件pppoe
将虚拟机的网关设置去掉
[root@localhost root]# less /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.1.13
NETMASK=255.255.255.0
TYPE=Ethernet
USERCTL=no
PEERDNS=no
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
配置adsl连接信息
[root@localhost root]# adsl-setup
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): 输入adsl帐号
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where ''X'' is a number.
(default eth0): 输入连接modem的网卡
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter ''no'' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): 直接回车即可
DNS
Please enter the IP address of your ISP''s primary DNS server.
If your ISP claims that ''the server will provide dynamic DNS addresses'',
enter ''server'' (all lower-case) here.
If you just press enter, I will assume you know what you are
,修改了本地连接之后,再用adsl连接会报域上的用户名/密码错误.没办法只好把modem重启了.
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn
为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
|