风云资源站

Linux架设EOIP

简介:一个传输于IP层,运行于链路层,隶属于RouterOS系统的高级虚拟局域网组件。

安装:

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/linux-eoip/linux-eoip-0.5.tgz
tar -xvzf linux-eoip-0.5.tgz
cd linux-eoip-0.5
./configure
make
make install

 

配置:/etc/eoip.cfg(架设远程ip为1.1.1.1)

[zeoip0]
id=1
dst=1.1.1.1

 

启动:

# /usr/local/bin/eoip /etc/eoip.cfg

 

添加IP:

# /sbin/ifconfig zeoip0 10.254.254.2 netmask 255.255.255.252 up

 

添加路由(客户端):

# route add -net 10.2.0.0/16 gw 10.254.254.1

 

查看:

# ifconfig
zeoip0    Link encap:Ethernet  HWaddr 5B:25:C9:44:6A:79  
          inet addr:10.254.254.2  Bcast:10.254.254.3  Mask:255.255.255.252
          inet6 addr: fe80::5425:d9ff:fe80:6b79/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:167397 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138861 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:14934574 (14.2 MiB)  TX bytes:12520192 (11.9 MiB)
# ps ax|grep dhcp
5180 ?        Ss     0:02 /usr/sbin/dhcpd eth1 zeoip0
27356 pts/1    S+     0:00 grep dhcp

 

运行DHCP服务器: /etc/sysconfig/dhcpd中添加DHCPDARGS=”eth1 zeoip0″

我要评论