Pi #B+ connected via ethernet cable to router


#1

I can access my printer via ethernet cable to router perfectly.everything works including usb camera.My question is how to assign a static ip address for this type of connection.


#2

Just did it 2 days ago:

Edit /etc/dhcpcd.conf and add the following to the end of the file:

interface eth0
static ip_address=10.1.1.30/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1 8.8.8.8

Replace 10.1.1.30 and 10.1.1.1 with your actual static IP and gateway IP.

After saving the file reboot RPI.


#3

For what it's worth, I think it's characteristic to indent the commands under the initial entry (only). It creates paragraphs for the service to parse.


#4

Is this done in putty or on sd card.


#5

You can update it via Putty or directly on RPI, if you connect monitor and keyboard to it.


#6

OK,I did what U said.How to I know that the ip is static?
I ran ipconfig/all and it doesn't show my ip address I assigned.
Although it has been 2 days and I can still use octoprint fine.
Thanks for your help..


#7

Paste the configuration changes that you have made.


#8

Not to be redundant,The PI is connected directly to my router.It does not show up in network configurations.all ethernet ports show not connected.On my router on port it shows octopi.


#9

Sorry, that was port 3.