I want to use my YUN as a network router DHCP server for both WiFi and wired Ethernet.
The WiFi part of it works..... BUT when I plug a ethernet cable from YUN straight to my computers ethernet connection, it dont work, my computer cant connect.
Here is my configuration files, can anyone help?
/etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 11
option hwmode 11ng
option path 'platform/ar933x_wmac'
option htmode HT20
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid Arduino
option encryption none
rouch_neck:
No I didnt, wouldnt the DHCP in the YUN generate an IP address for the computer on the wired ethernet port? because it does for WiFi.
No, by default, the Ethernet port is a DHCP client, not a server, and will not hand out addresses. The default setup is as if the Yun were a router: the Ethernet port is the WAN port that is connected to a cable modem, DSL modem, or other upstream router, while the WiFi interface is the LAN port where the rest of the network connects. As such, the Ethernet port gets its IP address from the upstream router or modem.
You need to specifically enable the DHCP server to hand out addresses on the Ethernet port. Step 3 of this page might help: Set up dhcp server at wan (ethernet port)
In my YUN after upgrade to 1.5.3 DHCP did not generate an IP address for the computer on the wired ethernet port. I have to manually set IP settings in my computer to make connection. I made downgrade to 1.1 and now working with automatically IP settings(DHCP generate an IP address for the computer )
ShapeShifter, so, I guess using it in the default way would be ok too (plugging in YUN ethernet cable into my home router and getting an IP address from my home router for the YUN).
So, using the default set up, do you know how I can change the DEFAULT YUN network configuration files so that the home router will always give the YUN the SAME IP address every time I plug the ethernet cable from the YUN into my home router?
rouch_neck:
Thanks ShapeShifter, so, I guess using it in the default way would be ok too (plugging in YUN ethernet cable into my home router and getting an IP address from my home router for the YUN).
Correct, that's the way I usually use mine.
So, using the default set up, do you know how I can change the DEFAULT YUN network configuration files so that the home router will always give the YUN the SAME IP address every time I plug the ethernet cable from the YUN into my home router?
I know of no way to change the Yun settings to get what you want. If you want the Yun to always have the same network IP address, I know of two choices:
Set up the Yun to not use DHCP, and set it up with a static address. You must make sure that the address is unique, not used by another device, and not in the range of addresses that the DHCP server in the router is handing out.
Leave the Yun as a DHCP client, and update the router's DHCP settings to set up a "Static DHCP" entry based on the Yun's hardware MAC address: whenever the Yun requests an address, the router sees that it's coming from the Yun's MAC address, and it gives it the pre-determined IP address. You still have to make sure the assigned address is unique, but that's a lot easier since all of the addresses are determined in the router settings: they are all in the same place.
Option 1 is easier, but it can be more difficult to maintain over time, especially if you have several systems set up that way: any network change could mean updating a lot of different devices. I think Option 2 is easier in the long run, but it means you do need to have administrative access to the router.
When I must have a static address, I now use option 2 (I gave up on Option 1 many years ago.) However, I don't do that with the Yun's: I let them have random addresses, and I access them by name (like Yun1.local)
So, using the default set up, do you know how I can change the DEFAULT YUN network configuration files so that the home router will always give the YUN the SAME IP address every time I plug the ethernet cable from the YUN into my home router?
Thanks
@rouch_neck,
typically to accomplish your task, you want to have your home router set a "static" IP.
You can also apply a "static" IP on your Yun, if you follow the directions on the OpenWRT pages.
Here is a link to the Recipes section of OpenWRT websites. The website has more information, if you look around