BBB Rev C access internet from laptop via eth0 setup

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

BBB Rev C access internet from laptop via eth0 setup

Postby troy » Tue Nov 17, 2015 5:50 am

Hi everyone,
I have just installed arch linux ver 4.0.4-1-ARCH on the BBB sdcard and successfully loaded from it. Currently I can access the BBB thru the uart serial(usb) port from my laptop, but I am facing the problem to set up the internet sharing by ethernet cable for the BBB.
I have read the article from <https://wiki.archlinux.org/index.php/Netctl> ,<https://wiki.archlinux.org/index.php/Dhcpd> and several other websites tutorial but failed to start anyway.
What I have done/created code so far:
1. In "/etc/systemd/network/eth0.network" my code is
$this->bbcode_second_pass_code('', '
[Match]
Name=eth0

[Network]
DHCP=no

[Address]
Address=192.168.2.22
#IPForward=yes

[Route]
#Gateway=192.168.1.1
')

2. In "/etc/systemd/system/dhcpd4@eth0.service" my code is
$this->bbcode_second_pass_code('', '
[Unit]
Description=IPv4 DHCP server on %I
Wants=network.target
After=network.target

[Service]
Type=forking
PIDFile=/run/dhcpd4.pid
ExecStart=/usr/bin/dhcpd -4 -q -pf /run/dhcpd4.pid %I
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target
')


3. In "/etc/dhcpd.conf"
$this->bbcode_second_pass_code('', '
option domain-name-servers 192.168.1.1;
option subnet-mask 255.255.255.0;
option routers 192.168.1.100;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.101 192.168.2.250;
}
')


4. In "/etc/resolv.conf" my code is:
$this->bbcode_second_pass_code('', '
nameserver 192.168.1.1
')

Then from terminal, I typed:
ip link set dev eth0 up <--- no issue
systemctl enable dhcpd4@eth0.service <---no issue
sytemctl start dhcpd4@eth0.service <--- i got error "Job for dhcpd4@eth0.service failed. See "systemctl status dhcpd4@eth0.service" and "journalctl -xe" for details."
systemctl status dhcpd4@eth0.service <---i got message red highlight "Failed to start IPv4 DHCP server on eth0."
journalctl -xe <---i got message red highlight " /testcase-data/phandle-tests/consumer-a: arguments"
ifconfig <--- seems alright with "inet 192.168.2.22 netmask 255.255.255.0 broadcast 192.168.2.255"

After that i reboot, i got the loading error on "Failed to start IPv4 DHCP server on eth0", but still can login.
I am not sure why is it so complicated to just activate the eth0 via ethernet cable to get internet access from my laptop. I have been trying this for few weeks, just couldn't get it work. Please advice me on the detail workaround.. thanks.


additional note:
From my laptop- window 7
Under "Network Connections"
The beaglebone black connection was detected in "Local Area Connection"-
I got my internet service with wifi connection in "Wireless Network Connection"; Here, I have set the >Properties>Sharing>allow other network users to connect..>"Local Area Connection".
troy
 
Posts: 5
Joined: Wed Nov 04, 2015 2:42 am

Re: BBB Rev C access internet from laptop via eth0 setup

Postby WarheadsSE » Tue Nov 17, 2015 5:48 pm

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: BBB Rev C access internet from laptop via eth0 setup

Postby troy » Tue Nov 17, 2015 11:12 pm

Hi, WarheadsSE
Thanks for your prompt reply.

I am totally new to linux system. I am trying to comprehend how to work from the links you have provided.. I have some questions though:

https://github.com/WarheadsSE/PKGs/tree ... t-deadbeef
What should I do with the package? Download it to laptop and install it to the BBB through serial-usb connection? I am not sure how to do that.. direct installation to the BBB via internet? i don't have internet access to the BBB directly for now.

http://archlinuxarm.org/platforms/armv7 ... s-ui-tabs2
This is the workaround to use the usb connection with laptop to get internet access? After get internet access via usb for the BBB then I can download the package from the first link to make the ethernet internet share from laptop to work?


Are this 2 links inter-related to get the eth0 working and get internet access from laptop? Or either one of them works.

I am totally mess up with the setup and lost my mind on it.. Please elaborate a bit on the procedure.thanks alot..
troy
 
Posts: 5
Joined: Wed Nov 04, 2015 2:42 am

Re: BBB Rev C access internet from laptop via eth0 setup

Postby WarheadsSE » Wed Nov 18, 2015 4:39 am

You want your laptop to give internet access to your BBB, or the other way around?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: BBB Rev C access internet from laptop via eth0 setup

Postby troy » Wed Nov 18, 2015 5:51 am

Hi,

My laptop is having internet access, I would like to share it to the BBB. BBB is connected to laptop via ethernet cable/cross over cable, the laptop is able to detect the connection but "ipv4 connectivity: no network access" as shown in the network configuration windows.

With "ifconfig" command from terminal(thru serial-usb debugger using Putty), I can see the eth0 was assigned with proper inet address as set in "eth0.network", but it is different from the ip I have seen in windows under the "change adapter setting > Local Area Connection".

Thanks for the concern..
troy
 
Posts: 5
Joined: Wed Nov 04, 2015 2:42 am

Re: BBB Rev C access internet from laptop via eth0 setup

Postby WarheadsSE » Wed Nov 18, 2015 2:47 pm

You should not have the DHCP server on the BBB if you want it being a client.

http://windows.microsoft.com/en-us/wind ... =windows-7

What happens on the BBB, with directions on the abolve page, and the BBB configured via eth0.network to get DHCP? (DHCP=yes)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: BBB Rev C access internet from laptop via eth0 setup

Postby troy » Wed Nov 18, 2015 10:28 pm

Ah.. I think I have mistakenly set up server-(dhcp server) and client at the same time. Is that causing conflict for the system? This will be confusing and complicated for me right now. (I would like to use the BBB as web server and client(receiving internet service from other source etc laptop) together in future though.)

I will just narrow down my problem to only receiving internet service from laptop for now.
The link you have sent me regarding to laptop/window7(server side?) setup, i do understand well and I have done it already.
and next step is the procedure to set configuration on the BBB via eth0 in which I am suffering right now..
troy
 
Posts: 5
Joined: Wed Nov 04, 2015 2:42 am

Re: BBB Rev C access internet from laptop via eth0 setup

Postby WarheadsSE » Thu Nov 19, 2015 1:50 pm

If it does not get a DHCP address normally (client only!) then, you might need to get IPV4LL addressing. Thanks MS.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: BBB Rev C access internet from laptop via eth0 setup

Postby troy » Mon Nov 23, 2015 5:15 am

IPV4LL...I reckon that is another new thing for me.

Is there really no explicit way to configure the internet sharing with host from BBB? Via netctl or systemd, both or either? The related information on the web is like scattering around here and there and seemingly lead to endless possibility way to do one single task for the BBB..Hmm.

Anyway thanks for your respond..
troy
 
Posts: 5
Joined: Wed Nov 04, 2015 2:42 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 5 guests

cron