Raspberry Pi a static IP provided

For this we open a terminal and go to / etc / network /, for we modify the interfaces file we first take a backup of the original file with the command:

Login als root: >> cp interfaces interfaces2

The command we'll now see that under the / etc / network file is added interface2, This is the backup file that can always be put back by the command mv.

Etc.: >> mv interfaces2 interfaces

The command ll exists by default in Debian Wheezy, it is an alias for the command ls -l. If you want to use this command out of laziness you can deposit a line through an alias in the file bash.bashrc. The bash.bashrc file under the / etc directory.
>> nano /etc/bash.bashrc
You navigate using the arrows are key to the foot of the page and adds the line alias ll = 'ls -l' to it.

Now to have this done, we can assign a static IP address, we open interfaces with the following command:

>> Nano /etc/network/interfaces

The following config file emerges:

etcnetworkinterfaces

 

 

etcnetworkinterfaces

 

 

 

 

Here we are going to change the line iface eth0 inet dhcp to static and the standards of your network.

For me, this will look like:etcnetworkinterfaces

etcnetworkinterfaces2

 

 

 

 

 

What have we done:

We changed DHCP to static and we 3 added lines. If the first address that we want to give to our node 10.10.10.7. as 2and our subnet mask 255.255.255.0 and finally the IP address of our default gateway ( het IP adress van de router ).

uf

Leave a Reply

Your email address will not be published. Required fields are marked *