ROS之利用ROS实现即插即用上网[转]
时间:2006-12-12 来源:zh8612
完成routeos的基本安装,
以我的机器为例,
更改网卡名
/interface
set ether1 name=local
set ether2 name=public
enable local
enable public
固定IP的话,设置网卡IP,因为我做的hotspot,在这里有台机器在上一级做NAT的,所以外部IP我是用10.4.8.199/24,大家可以在这里设置成ISP给的IP地址
/ip address
add address="192.168.2.1/24" interface=local
add address="10.4.8.199/16" interface=public
如果是用pppoe拨号则需要
/interface pppoe-client
add name="adsl" user="isp username" password="isp password" mtu=1492 mru=1492 \
interface=public add-default-route=yes use-peer-dns=yes disabled=no
/ip address
add address="192.168.2.1/24" interface=local
添加ip pool
/ip pool
add ranges=192.168.2.1-192.168.2.100 name=local_User_Pool
add ranges=192.168.2.101-192.168.2.200 name=Universal_User_Pool
添加DHCP server
/ip dhcp-server
add name=local interface=local address-pool=local_User_Pool \
dhs-server=192.168.2.1 gateway=192.168.2.1 lease-time=24h netmask=24 wins-server=10.4.1.10
设置正确的DNS
/ip dns
set primary-dns=202.96.134.133 secondary-dns=202.96.128.68
设置正确的DNS cache
/ip dns-cache
set enabled=yes primary-dns=202.96.134.133 secondary-server=202.96.128.68
设置NAT
/ip firewall src-nat
add action=masquerade
在这里只说明一下大家所说的ip pnp的设置,其实的如hotspot,firewall等的设置就不多说了
/ip hotspot universal
add address-pool=Universal_User_Pool disabled=no interface=local
就这么简单的设置。下面的客户端已经可以任意IP上internet了。
如果结合hotspot可以实现类似酒店里web页面登陆上网的功能。
RouteOS的功能很强大,像轻松实现VPN,透明代理等,他自带的一些小工具也比较好用,像通过ping检测服务器状态并触发事件,这个是很实用的功能。
欢迎大家交流使用心得。
以我的机器为例,
更改网卡名
/interface
set ether1 name=local
set ether2 name=public
enable local
enable public
固定IP的话,设置网卡IP,因为我做的hotspot,在这里有台机器在上一级做NAT的,所以外部IP我是用10.4.8.199/24,大家可以在这里设置成ISP给的IP地址
/ip address
add address="192.168.2.1/24" interface=local
add address="10.4.8.199/16" interface=public
如果是用pppoe拨号则需要
/interface pppoe-client
add name="adsl" user="isp username" password="isp password" mtu=1492 mru=1492 \
interface=public add-default-route=yes use-peer-dns=yes disabled=no
/ip address
add address="192.168.2.1/24" interface=local
添加ip pool
/ip pool
add ranges=192.168.2.1-192.168.2.100 name=local_User_Pool
add ranges=192.168.2.101-192.168.2.200 name=Universal_User_Pool
添加DHCP server
/ip dhcp-server
add name=local interface=local address-pool=local_User_Pool \
dhs-server=192.168.2.1 gateway=192.168.2.1 lease-time=24h netmask=24 wins-server=10.4.1.10
设置正确的DNS
/ip dns
set primary-dns=202.96.134.133 secondary-dns=202.96.128.68
设置正确的DNS cache
/ip dns-cache
set enabled=yes primary-dns=202.96.134.133 secondary-server=202.96.128.68
设置NAT
/ip firewall src-nat
add action=masquerade
在这里只说明一下大家所说的ip pnp的设置,其实的如hotspot,firewall等的设置就不多说了
/ip hotspot universal
add address-pool=Universal_User_Pool disabled=no interface=local
就这么简单的设置。下面的客户端已经可以任意IP上internet了。
如果结合hotspot可以实现类似酒店里web页面登陆上网的功能。
RouteOS的功能很强大,像轻松实现VPN,透明代理等,他自带的一些小工具也比较好用,像通过ping检测服务器状态并触发事件,这个是很实用的功能。
欢迎大家交流使用心得。
相关阅读 更多 +