BeagleBoneBlack with debian. IP cannot be set to static - networking

I've set up my BeagleBoneBlack with Debian Jessi. As default config it worked with a dhcp ip: 192.168.1.105
But I need to configure the system to use a static ip. Therefore I did in /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
But after a reboot, still the old IP 192.168.1.105 is set. If I do
/etc/init.d/networking
the new IP is set. But after another reboot, the old one is back again.
Which setting will I have to change to?
I'm not using an additional SD card; Just the eMMC.
Thank you!
Daniel

Finally I found the solution.
An Intel Connection Manager was installed by default. I overwrites my definition.
After removing it, it works fine:
apt-get purge connman

Related

Assign Static IP Address in Ubuntu

I want to assign a static address to Ubuntu using the command below:
ifconfig eth0 192.168.5.2 netmask 255.255.255.0
But it says,
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
How will I fix it?
Just delete the rule files with this command :
sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old
Should solve the problem.

Raspberry pi is unable to reach gateway

Recently we brought raspberry pi 3b.Beginning we used to access the internet using an ethernet cable and it used to connect properly but now raspberry pi is not able to reach the gateway itself and it's taking its default IP address i.e 169.xxx.xxx.xx.
what would be the issue?we tried to reinstalling the operating system again the same issue .it worked for one day after that same problem.so please help me to solve the issue.
Finally, I am able to figure it out after trial and error method. I have missed "auto eth0" before the iface statement i.e
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
network 255.255.255.0
gateway xxx.xxx.xxx.xxx
dns-nameservers 8.8.8.8
Assuming that you have a windows computer available, open cmd and run the following command:
ipconfig
note down the values that display. Now on your pi, enter the command
sudo nano /etc/network/interfaces
This will open the network interfaces file. Look for the line similar to 'inet eth0 inet manual' Then remove this line and everything to do with the eth0 interface, since we are going to start over.
in the interfaces file, add the following section:
auto eth0
inet eth0 inet static
address xxx.xxx.xxx.xxx
network 255.255.255.0
gateway xxx.xxx.xxx.xxx
dns-nameservers 8.8.8.8
Replace the x in address with the first 3 groups of the value taken from the windows system. For example, if the ip address on the windows system was 192.168.0.221, enter 192.168.0.xxx
The last group of xxx for address should be something unique to everything else on your network.
'gateway' should be whatever the gateway value in windows was (assuming these machines are on the same network)
[Ctrl]+[x], Save changes
reboot via
sudo reboot
once the system has rebooted
ifconfig eth0
should list the new settings. Test them by pinging the below address (google)
sudo ping 8.8.8.8

Configure LXC to use wireless hosted network

I found most of the configuration is for giving static or private network. But I want it to act as a different machine so it will get a separate IP address from the DHCP and I want to do it through nmcli.
Thanks in advance.
If you are using docker as tagged, rather than LXC, use pipework to map the wlan interface from the host to the container
pipework eth2 $CONTAINERID 10.10.9.9/24
or alternatively let the container do the dhcp negotiation for you
pipework eth1 $CONTAINERID dhclient
This setup is based on a macvlan interface so the same concept should work with LXC you just won't get the easy front end.
I'm confused if this is a docker question or an LXC question.
EDIT: as per the comments, wlan interface support in a bridge depends on the wlan vendor. It may work, or it may not work at all.
In any case, you should be able to create a bridge, add your wlan0 interface to the bridge, and then have your LXC container connect to this bridge directly. Then, when you run your DHCP client in the container, it will grab it from the wlan0 interface.
Configure bridge (manually for now)
# ifconfig wlan0 up
# brctl addbr br0
# brctl addif br0 wlan0
# ifconfig br0 up
# dhclient br0
Configure LXC configuration
If using traditional priviliged LXC, edit the container's config file at /var/lib/lxc/$NAME/config,
and update this value to point to your new bridge.
lxc.network.link = br0
Run DHCP in container
# lxc-attach -n $NAME
# dhclient eth0
# ip a
If the output to ip a shows the desired IP, you're all set!
If you want to make the configuration persistent, you'll have to add the bridge to your /etc/network/interfaces file.
IEEE 802.11 doesn’t like multiple MAC addresses on a single client, so bridge and macvlans are not the right solution here.
Use ipvlan in L2 mode.

openstack instance getting ip and not getting ip

I am new to openstack and I followed the installation guide of icehouse for ubuntu 12.04/14.04
I chose 3 node architecture. Controller, Nova, Neutron.
The 3 nodes are installed in VM's. I used nested KVM. Inside VM's kvm is supported so nova will use virt_type=kvm. In controller I created 2 nics. eth0 is a NAT interface with ip 203.0.113.94 and eth1 a host only interface with ip 10.0.0.11.
In nova there are 3 nics. eth0 NAT - 203.0.113.23, eth1 host only 10.0.0.31 and eth2 another host only 10.0.1.31
In neutron 3 nics. eth0 NAT 203.0.113.234, eth1 host only 10.0.0.21 and eth2 another hosty only 10.0.1.21 (during installation guide in neutron node i created a br-ex (and a port to eth0) which took the settings of eth0 and eth0 settings are:
auto eth0 iface eth0 inet manual up ifconfig $IFACE 0.0.0.0 up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down)
Everything seemed fine. I can create networks, routers etc, boot instances but I have this error.
When I launch an instance it takes a fixed ip but when I log in into instance (cirros) can't ping anything. ifconfig with no ip.
I noticed that in demo-net (tenant network) properties under subnet in the ports field it has 3 ports. 172.16.1.1 network:router_interface active 172.16.1.3 network:dhcp active 172.16.1.6 compute:nova down
I searched for solutions over the net but couldn't find anything!
Any help?
Ask me if you want specific logs because I don't know which ones to post!
Thanks anyway!
Looks like you are using Fixed IP to ping..If so please assign floating IP to your instance, and then try to ping..
If you have already assigned floating IP and you are pinging using that IP..please upload log of your instance

Issue setting static ETH0 IP BeagleBone Black Version C Debian Preloaded

Settings in /etc/network/interfaces seems to have no effect on my BeagleBone Black Version C. I want to set my beaglebone black's ethernet IP address to a static IP as I have done with all my other internet-of-things devices running Debian. I edited /etc/network/interfaces as I have before, but I do not see any changes via ifconfig. This is after a restart of networking AND a restart of the beaglebone. I have googled somewhat, and posted to the beaglebone forums after searching them, and I still do not have a solution. I noticed a commented line in interfaces suggesting that the settings are set via an init script, but this is where I get a little lost. I have moderate knowledge of Debian, but I have not peeled back enough layers apparently. I am connecting my beaglebone black via ethernet connector. WIFI is a beast I will tackle later.
I set my router to reserve a specific IP based on MAC ID, but I would like to know what I am missing here.
iface usb0 inet static
address 192.168.0.103
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1
You are missing the auto line
auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1
(Just for diagnosis) - Also remove the gateway line from it
and after you get the connection run this command to add the gateway
root prompt :) #
route add default gateway 192.168.0.1
i was playing around a lot with networking on it so i got the answer. Hope this resolve your issue do post.
Do the configurations in wicd. Run "wicd-client" which opens GUI to make the configuration. Apparently wicd configurations overwrite what you do in /etc/network/interfaces
Another alternative to setting the ipaddress to be static on boot. Even without a ethernet jack plugged in, which was my issue.
Caution: this is hacky, and there probably better streamlined approach
Edit the /opt/scripts/boot/autoconfigure_usb0.sh script
line 92 and 139 set the usb0 default ipaddress
/sbin/ifconfig usb0 ${deb_usb_address} netmask ${deb_usb_netmask} || true
insert the following line after it, in both places
/sbin/ifconfig usb0 ${deb_usb_address} netmask ${deb_usb_netmask} || true
/sbin/ifconfig eth0 192.168.0.123 netmask 255.255.255.0 || true
then it will boot up with that as the static IP address even if you don't have anything plugged it.

Resources