- 侏罗纪2016-02-19金牌会员73744
- 本帖最后由 侏罗纪 于 2016-2-19 19:24 编辑 *
研究了2天总算可以开小鸡,加的一个c段是二级子网静态路由,垃圾的要死,要转发,转发的ip明显比分配的5ip卡!不知道怎么回事!
现将设置教程发布出来!顺便鄙视一下论坛的某个mjj要给100RMB才给设置的ubi新加的ip段是静态路由的如果要用hyper-v开设vps需要设置静态路由新加的ip才能使用,
首先在需要在windows2008或者2012的服务管理里添加远程路由访问,添加以后到服务管理器里启动远程路由,选择自定义配置,
开启以后选静态路由右键,新建静态路由,ip填你加的ip段, ps:如果你加的ip段是 192.168.222.1-192.168.222.254
那你的静态路由的ip应该填192.168.222.0 网关填你的5ip的网关的后一个ip 子网掩码填255.255.255.0
然后到新开的vps里去配置你新加的ip你会发现ip神奇的通了!哈哈
windows2008安装静态路由的教程http://www.luyouqiwang.com/14376/
关于esxi xen 的配置方法ubi给的配置文件教程http://support.citrix.com/article/ctx121169
以下是关于hyper官方给的配置说明
Hello,
For using virtualization you need to provide gateway services to the
secondary subnet. Please refer to the instructions below for common operating systems.###
For Citrix XenServer, follow the instructions at http://support.citrix.com/article/CTX121169For Windows Server 2012 or Windows Server 2008 and HyperV, use the following procedure:
1 – Install the Remote Access (Windows Server 2012) or Routing and Remote Access Services (Windows Server 2008) server role
through the “Add Roles and Features Wizard”
2 – In Windows Server 2012, when you install the role, check the Routing box in the Role Services screen
3 – After the service has been installed, open the Routing and Remote Access tool.
4 – Right click on your local server, and then select Configure and Enable Routing and Remote Access
5 – From the Configuration screen, select Custom Configuration
6 – On the Custom Configuration screen, select LAN Routing and finish the wizard
7 – Once you have installed the service, you will need to add one IP address to the HyperV network interface from the secondary
prefix. This IP will be used as the gateway for the virtual machines.
8 – Your virtual machines should be configured to use the IP you configured in step 7 as their gateway.For ESXi, you will need to install a Linux based OS and enable routing thereon. We recommend CentOS 6.
1 – Install CentOS on a new VM
2 – Configure your CentOS VM with the following network properties:
2A) Configure an eth0 interface with the first/primary IP from your servers base assignment. Note that if you are using this IP
as your ESXi management address, you’ll need to change that to another address first. The first/primary IP from your
servers base assignment MUST be configured on the router VM.
2B) Configure an eth0:1 interface with the first usable IP address from your secondary IP prefix. This IP will be used as the
gateway for your VMs.- Enable IP forwarding:
3A) Type “echo 1 > /proc/sys/net/ipv4/ip_forward”
3B) Open the /etc/sysctl.conf file in vi or another text editor and adjust the line that sys “net.ipv4.ip_forward=0”
to “net.ipv4.ip_forward=1”- Ensure that iptables is stopped and its auto-start is disabled.
- Adjust your VMs to use the IP you configured on the eth0:1 address in step 2B.
###