[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] connect tap device to the Internet
From: |
Sergio R. Caprile |
Subject: |
Re: [lwip-users] connect tap device to the Internet |
Date: |
Sat, 27 Feb 2016 13:32:56 -0300 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
That shouldn't be a problem providing you configure things right.
Are you using Linux, Windoze, MacOS ???
Check a TUN/TAP primer for your OS
In Linux you can configure TUN/TAP for bridging or routing, depending on
which interface type you have. I prefer routing, so your TUN/TAP and
lwIP will be on a network, the TUN/TAP address will be lwIP's default
gateway and the rest of your machine(s) will be in other network(s).
Your machine hosting lwIP will have to be able to route.
Check a routing primer for your OS
In my machine, I connect via PPPoE through eth1, tap0 connects to lwIP
using the examples from 1.4.1
address@hidden ~]$ /sbin/ifconfig
eth0 Link encap:Ethernet
inet addr:192.168.69.1 Bcast:192.168.69.255 Mask:255.255.255.0
eth1 Link encap:Ethernet
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
ppp0 Link encap:Point-to-Point Protocol
inet addr:181.26.199.74 P-t-P:200.63.148.219
Mask:255.255.255.255
tap0 Link encap:Ethernet
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
lwIP
/* startup defaults (may be overridden by one or more opts) */
IP4_ADDR(&gw, 192,168,0,1);
IP4_ADDR(&ipaddr, 192,168,0,2);
IP4_ADDR(&netmask, 255,255,255,0);