# Raspberry 3 LAN WAN Help needed

**URL:** <https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377>\
**Category:** Installing and Using OpenWrt\
**Created:** [February 4, 2017, 10:21am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377 "2017-02-04T10:21:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 4, 2017, 10:21am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/1 "2017-02-04T10:21:15Z")

</div>

Hello to the board. First oaf all: Please excuse if my English is not that good - hopefully you will understand my problem. 🙂  
So here we go: I am behinf a AVM Router "Fritz.Box 7390." with IP 192.168.178.1  
I installed LEDE on a Raspberry Pi 3 and assigned 192.168.178.2 on "eth0"  
I can reach the Gui and the SSH Connect also works. I bought a TP-Link UE300 USB/LAN Adapter in order to connect the PI directly behind the Fritz.Box Router. I created an interface "eth1" using DHCP client mode and connected the LAN Port of the AVM Router to the USB/Lan Adapter - no connection.  
Here are 2 questions: What IP do I have to assign to the WAN interface (DDNS Account possible?) to get at least a connection to the Internet.  
The UE300 should work out of the box with Rasbian. How to manage my problem with LEDE?  
Any help would be appeciated. Thanks in advance- you all have a great weekend.  
Regards from Germany.

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 4, 2017, 10:46am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/2 "2017-02-04T10:46:51Z")

</div>

Its not really clear to me what kind of network you want to set up.

telco-router \<--wifi--\> LEDE \<--wired--\> PC ?

You wrote about LAN and WAN, do you want to route on the LEDE bnox or do you want to bridge them all into one broadcast network?

Routing: 192.168.178.0/24 between Fritz and LEDE, 192.168.179.0/24 for instance between LEDE and PC, firewalled so you have different "security zones"?

Bridging: All devices are in the 192.168.178.0/24 broadcast network range, you try to use LEDE as as a network distribution bridge?

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 4, 2017, 11:01am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/3 "2017-02-04T11:01:39Z")

</div>

Odie, thanks for the quick reply. I wanted to setup Fritz\<--wired--\> LEDE \<-- wired --\> Switch \<-- wired --\> Win Clients  
Normally all devices are in 192.168.178.0/24 so different "security zones" like you told (192.168.179.0/24) would be great.  
Bridging would also be ok. What is not clear for me: Which version could be manages with only the eth0 interface of the pi?

Gerd

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 4, 2017, 11:29am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/4 "2017-02-04T11:29:08Z")

</div>

If your switch is VLan capable you could use two VLan Interfaces on the pi's one interface side and a trunk on your switch port.

If not or if this sounds strange to you because you havn't done such setups yet you could use a secondary virtual ip address on port eth0:1 of your pi's eth0.

Or you simply use an additional usb network adapter. In order to make these work you need to install the needed kmod-\* package. (Openwrt/LEDE is a little different than "normal" Linux distros in driver management, they are not all installed by default).

Your UE300 uses the RTL8153 chipset, try installing kmod-usb-net-rtl8150 or kmod-usb-net-rtl8152, maybe you are lucky and one of them works.

If your pi can ping your fritz router when connected to lan but not the rest of the internet try

route add -net default gw 192.168.178.1  
echo "nameserver 192.168.178.1" \>\>/etc/resolv.conf  
ping [google.de](http://google.de) (or someserver else:)

If you can ping outbound install the driver for eth1, either via LuCi or on the shell

opkg update  
opkg install kmod-usb-net-rtl8152  
reboot

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 4, 2017, 11:32am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/5 "2017-02-04T11:32:50Z")

</div>

Thanks again - I will try that and report..

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 4, 2017, 2:11pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/6 "2017-02-04T14:11:31Z")

</div>

My Orico HR02 nic-hub combo works with kmod-usb-net-rtl8152, good chance your UE300 does too

root@lede:~# lsusb  
Bus 002 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. **RTL8153** Gigabit Ethernet Adapter  
...  
lsmod:  
mii 3328 5 mcs7830,ax88179\_178a,usbnet,r8169, **r8152**

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 5, 2017, 12:26pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/7 "2017-02-05T12:26:42Z")

</div>

Odie, thanks again. I did like you told me.  
Here are the results:  
root@lede:~# lsusb  
-ash: lsusb: not found  
root@lede:~#

root@lede:~# lsmod  
brcmfmac 160604 0  
brcmutil 4032 1 brcmfmac  
cfg80211 226160 1 brcmfmac  
compat 8128 2 brcmfmac,cfg80211  
crc\_ccitt 1024 1 ppp\_async  
evdev 10112 0  
fat 44128 1 vfat  
hid 80724 2 usbhid,hid\_generic  
hid\_generic 640 0  
ip6\_tables 9432 2 ip6table\_mangle,ip6table\_filter  
ip6t\_REJECT 1024 2  
ip6table\_filter 640 1  
ip6table\_mangle 1024 0  
ip\_tables 9700 3 iptable\_nat,iptable\_mangle,iptable\_filter  
ipt\_MASQUERADE 704 1  
ipt\_REJECT 896 2  
iptable\_filter 704 1  
iptable\_mangle 832 0  
iptable\_nat 832 1  
nf\_conntrack 57068 9 nf\_nat\_ipv4,nf\_conntrack\_ipv6,nf\_conntrack\_ipv4,xt\_state,xt\_conntrack,xt\_CT,nf\_nat\_masquerade\_ipv4,nf\_nat,nf\_conntrack\_rtcache  
nf\_conntrack\_ipv4 5376 9  
nf\_conntrack\_ipv6 5824 4  
nf\_conntrack\_rtcache 2432 0  
nf\_defrag\_ipv4 960 1 nf\_conntrack\_ipv4  
nf\_defrag\_ipv6 13140 1 nf\_conntrack\_ipv6  
nf\_log\_common 2304 2 nf\_log\_ipv4,nf\_log\_ipv6  
nf\_log\_ipv4 3200 0  
nf\_log\_ipv6 3648 0  
nf\_nat 9224 4 nf\_nat\_ipv4,xt\_nat,nf\_nat\_redirect,nf\_nat\_masquerade\_ipv4  
nf\_nat\_ipv4 3586 1 iptable\_nat  
nf\_nat\_masquerade\_ipv4 1348 1 ipt\_MASQUERADE  
nf\_nat\_redirect 896 1 xt\_REDIRECT  
nf\_reject\_ipv4 1856 1 ipt\_REJECT  
nf\_reject\_ipv6 2112 1 ip6t\_REJECT  
nls\_cp437 4480 1  
nls\_iso8859\_1 2944 1  
nls\_utf8 896 0  
ppp\_async 6404 0  
ppp\_generic 19920 3 pppoe,ppp\_async,pppox  
pppoe 7808 0  
pppox 1168 1 pppoe  
r8152 29056 0  
slhc 4416 1 ppp\_generic  
snd 39712 9 snd\_bcm2835,snd\_compress,snd\_pcm\_oss,snd\_mixer\_oss,snd\_pcm,snd\_timer,snd\_rawmidi,snd\_seq\_device,snd\_hwdep  
snd\_bcm2835 15132 0  
snd\_compress 6400 0  
snd\_hwdep 4484 0  
snd\_mixer\_oss 11648 1 snd\_pcm\_oss  
snd\_pcm 59464 3 snd\_bcm2835,snd\_pcm\_dmaengine,snd\_pcm\_oss  
snd\_pcm\_dmaengine 2112 0  
snd\_pcm\_oss 31200 0  
snd\_rawmidi 14880 0  
snd\_seq\_device 1988 1 snd\_rawmidi  
snd\_timer 15816 1 snd\_pcm  
soundcore 3656 1 snd  
usbhid 22740 0  
vfat 7936 1  
x\_tables 9412 23 ipt\_REJECT,ipt\_MASQUERADE,xt\_time,xt\_tcpudp,xt\_state,xt\_nat,xt\_multiport,xt\_mark,xt\_mac,xt\_limit,xt\_conntrack,xt\_comment,xt\_TCPMSS,xt\_REDIRECT,xt\_LOG,xt\_CT,iptable\_mangle,iptable\_filter,ip\_tables,ip6t\_REJECT,ip6table\_mangle,ip6table\_filter,ip6\_tables  
xt\_CT 2560 0  
xt\_LOG 832 0  
xt\_REDIRECT 704 0  
xt\_TCPMSS 2624 0  
xt\_comment 512107  
xt\_conntrack 2368 12  
xt\_limit 1220 20  
xt\_mac 640 0  
xt\_mark 704 0  
xt\_multiport 1280 0  
xt\_nat 1216 0  
xt\_state 768 0  
xt\_tcpudp 1728 8  
xt\_time 1664 0  
root@lede:~#  
For it looks like no support yet in my system. The UE300 got the RTL8153 chip. I couldn´t find a driver in the LEDE available package section.  
Anyway thank you for the support.

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 5, 2017, 12:31pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/8 "2017-02-05T12:31:20Z")

</div>

Just install kmod-usb-net-rtl8152, worked with my rtl8153 device.

Good luck!

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 5, 2017, 12:50pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/9 "2017-02-05T12:50:50Z")

</div>

Thats what I did. r8152 shows up in "lsmod" but no similar interface - only eth0.

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 5, 2017, 3:42pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/10 "2017-02-05T15:42:24Z")

</div>

Hmmmm... Is r8152 loaded and known to mii?

Here on my Atom box:

root@lede:~# dmesg | grep r8152  
[6.916494] usbcore: registered new interface driver r8152  
[7.047378] r8152 2-1.1:1.0 eth1: v1.08.2  
[11.323264] r8152 2-1.1:1.0 eth1: Promiscuous mode enabled

root@lede:~# lsmod | grep r8152  
mii 3328 5 mcs7830,ax88179\_178a,usbnet,r8169,r8152  
r8152 30016 0

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 5, 2017, 4:08pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/11 "2017-02-05T16:08:47Z")

</div>

Are there different Versions of the UE300? Those with usb id 2357:0601 seem to be recognized as cdc\_ether.

[http://askubuntu.com/questions/824567/tp-link-ue300-on-16-04-server-not-working-as-3-0-device](http://askubuntu.com/questions/824567/tp-link-ue300-on-16-04-server-not-working-as-3-0-device)

TP-Link says RTL8153...

> **[UE300\_V1\_Datasheet.pdf](https://static.tp-link.com/res/down/doc/UE300_V1_Datasheet.pdf)**
>
> 1845.48 KB

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 5, 2017, 4:30pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/12 "2017-02-05T16:30:43Z")

</div>

dmesg:  
2.629838] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:99:1a:dd  
[2.876951] usb 1-1.5: new high-speed USB device number 4 using dwc\_otg  
[2.997691] usb 1-1.5: New USB device found, idVendor=2357, idProduct=0601  
[3.006905] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=6  
[3.016561] usb 1-1.5: Product: USB 10/100/1000 LAN  
[3.023716] usb 1-1.5: Manufacturer: TP-LINK  
[3.030266] usb 1-1.5: SerialNumber: 000001000000

root@lede:~# dmesg | grep r8152  
[6.458854] usbcore: registered new interface driver r8152

it is still no eth1 inerface loaded. I could post the hole dmesg if that would help but I didn´t want to flood this post.  
Gerd

EDIT: It seems it is that device as from that post from "[askubuntu.com](http://askubuntu.com)"  
I will have a look what cdc\_ether means.. 🙂

I installed usbutils. Now lsusb says:  
root@lede:~# lsusb  
Bus 001 Device 004: ID 2357:0601  
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter  
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
root@lede:~#

---

<div class="post-metadata">

**Author:** ![odie](https://forum.openwrt.org/letter_avatar/odie/32/6_449c533f586939b6e5f246632a46421f.png) [@odie](https://forum.openwrt.org/u/odie)\
**Post date:** [February 5, 2017, 5:41pm UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/13 "2017-02-05T17:41:15Z")

</div>

I'm running out of ideas with your usb net dev (,maybe your ue300's usb id is missing in r8152.ko) 🙂

In this case, if your switch doesnt support vlans, i would try a simple alias config in /etc/config/network, but i was never in a situation where i had to try this. 😉

config interface wan  
option 'ifname' 'eth0'  
option 'proto' 'static'  
option 'ipaddr' '192.168.178.2'  
option 'netmask' '255.255.255.0'  
option 'gateway' '192.168.178.1'  
option 'dns' '192.168.178.1'

config interface lan  
option 'ifname' 'eth0'  
option 'proto' 'static'  
option 'ipaddr' '192.168.179.1'  
option 'netmask' '255.255.255.0'

See: [https://wiki.openwrt.org/doc/uci/network#aliasesthe\_new\_way](https://wiki.openwrt.org/doc/uci/network#aliasesthe_new_way)

Fritz --- Switch --- Raspi  
(\_\_\_\_\_\_)| ------- Client on 192.168.179.2

---

<div class="post-metadata">

**Author:** ![sledge](https://forum.openwrt.org/letter_avatar/sledge/32/6_449c533f586939b6e5f246632a46421f.png) [@sledge](https://forum.openwrt.org/u/sledge)\
**Post date:** [February 6, 2017, 11:27am UTC](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/14 "2017-02-06T11:27:24Z")

</div>

Holy Cow - I am working with the Pi and Rasbian for 1 year now...but couldn´t get into LEDEs Bash. I will stop this project for a time and try to get deeper in it.  
By the way: The UE300 is recognized on Rasbian Jessi out of the box as eth1.  
Thanks again,  
Gerd
