Monday, August 4, 2025
198 Mexico News
No Result
View All Result
  • Home
  • BUSINESS NEWS
  • VIDEO NEWS
  • FEATURED NEWS
    • MEXICO USA TRADE NEWS
    • MEXICO EU NEWS
    • MEXICO UK NEWS
    • MEXICO BRAZIL NEWS
    • MEXICO INDIA NEWS
    • MEXICO GULF NATIONS NEWS
    • MEXICO CHINA NEWS
    • MEXICO EGYPT NEWS
    • MEXICO AFRICA NEWS
    • MEXICO NIGERIA NEWS
    • MEXICO THAILAND NEWS
  • POLITICAL NEWS
  • TECHNOLOGY
  • CRYPTO
  • AGRICULTURE
  • MORE NEWS
    • MEXICO IMMIGRATION NEWS
    • MEXICO SCHOLARSHIP NEWS
    • MEXICO VENTURE CAPITAL NEWS
    • MEXICO EDUCATION NEWS
    • MEXICO BUSINESS HELP
    • MEXICO PARTNESHIPS
    • MEXICO MANUFACTURE NEWS
    • MEXICO UNIVERSITY NEWS
    • MEXICO JOINT VENTURE NEWS
  • ASK IKE LEMUWA
  • CONTACT
198 Mexico News
  • Home
  • BUSINESS NEWS
  • VIDEO NEWS
  • FEATURED NEWS
    • MEXICO USA TRADE NEWS
    • MEXICO EU NEWS
    • MEXICO UK NEWS
    • MEXICO BRAZIL NEWS
    • MEXICO INDIA NEWS
    • MEXICO GULF NATIONS NEWS
    • MEXICO CHINA NEWS
    • MEXICO EGYPT NEWS
    • MEXICO AFRICA NEWS
    • MEXICO NIGERIA NEWS
    • MEXICO THAILAND NEWS
  • POLITICAL NEWS
  • TECHNOLOGY
  • CRYPTO
  • AGRICULTURE
  • MORE NEWS
    • MEXICO IMMIGRATION NEWS
    • MEXICO SCHOLARSHIP NEWS
    • MEXICO VENTURE CAPITAL NEWS
    • MEXICO EDUCATION NEWS
    • MEXICO BUSINESS HELP
    • MEXICO PARTNESHIPS
    • MEXICO MANUFACTURE NEWS
    • MEXICO UNIVERSITY NEWS
    • MEXICO JOINT VENTURE NEWS
  • ASK IKE LEMUWA
  • CONTACT
No Result
View All Result
198 Mexico News
No Result
View All Result

How Do I Set a Static IP Address on Raspberry Pi?

by 198 Mexico News
March 11, 2022
in MEXICO TECHNOLOGY NEWS
Reading Time: 8 mins read
A A
0
Home MEXICO TECHNOLOGY NEWS

[ad_1]

If you’re using your Raspberry Pi as a home server or often need to access it remotely from another device, setting a static IP address for it is a very good idea. This means you’ll be able to find the Raspberry Pi at the same address every time, rather than a new address being set dynamically whenever it is rebooted.

This is also useful to avoid confusion when you have multiple Raspberry Pi devices connected to your network.

Fortunately, once you know how, setting up a static IP address is a fairly simple and quick process.


What Is an IP Address?

An Internet Protocol (IP) address is used to uniquely identify each device on a computer network, or the network itself on the internet – more on that later. The IP address is normally written in ‘dot-decimal’ notation: four decimal numbers, each ranging from 0 to 255, separated by dots. An example is 192.168.1.107.

By default in Raspberry Pi OS, which is a Linux-based operating system, your Raspberry Pi’s IP address is reconfigured automatically each time you reboot it, so it may well change. Naturally, this is not ideal when you need a reliable address at which to connect to the Raspberry Pi from another device, such as when using it as a server.

MAKEUSEOF VIDEO OF THE DAY

Private vs. Public IP

A public IP address is used to identify your local network on the wider internet. This typically changes every time your router connects to the internet, although you may be able to make it static depending on your internet service provider.

You can find the public IP address on a Linux system such as Raspberry Pi OS by entering a special Terminal command, or simply by doing a web search for ‘What’s my IP?’. It is only required if you intend to connect to a device from outside your network, which we won’t cover here.

Instead, we are looking at the private IP addresses used to identify each device on your own local network. While it may be possible to reserve a certain address for your Raspberry Pi in your wireless router’s settings for the same purpose, here we’ll be showing you how to set a static IP from the Raspberry Pi itself.


1. DHCP Configuration

Raspberry Pi OS (formerly know as Raspbian) uses DHCP (Dynamic Host Configuration Protocol) to assign an IP address to the Raspberry Pi automatically whenever it is rebooted.

Read More: What is DHCP?

To change that behavior so that it uses the same static IP address each time, you will need to modify the configuration file for the DHCP client daemon, dhcpcd.conf.

Before that, you will need some information on your current network setup so you can add the required details to the configuration file. You will require the following info:

• The type of network connection. This is either wlan0 if your Raspberry Pi is connected to the router wirelessly, or eth0 if it’s connected using an Ethernet cable.

• The Raspberry Pi’s currently assigned IP address – it’s safest to reuse this for its static IP so that you can be sure the latter hasn’t already been to another device on the network. If not, make sure another device isn’t already using it.

To find the Raspberry Pi’s current IP address, enter the following command in a Terminal window:

hostname -I

• Your router’s gateway IP address – the one used to contact it from the local network, not its public IP. It varies depending on the router model, but typically starts with 192.168.

To find it, enter the following command and note the first IP address given:

ip r | grep default
Raspberry Pi router gateway IP

• Your router’s DNS (Domain Name System) IP address. This is typically the same as its gateway address, but may be set to another value to use an alternative DNS – such as 8.8.8.8 for Google, or 1.1.1.1 for Cloudflare.

To find the current DNS IP address, enter the command:

sudo nano /etc/resolv.conf
Raspberry Pi DNS IP

Note the IP address after nameserver – that’s the DNS address – and then press Ctrl + X to close the file.

2. Add Static IP Settings

Now you have found all your network connection information, it’s time to edit the dhcpcd.conf configuration file to add the settings you need to set up a static IP address for your Raspberry Pi:

sudo nano /etc/dhcpcd.conf

If you haven’t edited the file previously, it will mainly contain various comment lines preceded by a hash (#) symbol. At the bottom, add the following lines, replacing the emboldened names with your own network details:

interface NETWORK 
static ip_address=STATIC_IP/24
static routers=ROUTER_IP
static domain_name_servers=DNS_IP

Replace the emboldened names as follows:

• NETWORK – your network connection type: eth0 (Ethernet) or wlan0 (wireless).

• STATIC_IP – the static IP address you want to set for the Raspberry Pi.

• ROUTER_IP – the gateway IP address for your router on the local network.

• DNS_IP – the DNS IP address (typically the same as your router’s gateway address).

Here is an example configuration to set the static IP to 192.168.1.120 with a wireless connection to a router at 192.168.1.254:

interface wlan0
static ip_address=192.168.1.120/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254
Raspberry Pi dhcpcd static IP configuration

Once you have entered the settings, press Ctrl + X and then Y and ENTER to close and save the modified configuration file.

3. Reboot the Raspberry Pi

With the dhcpcd.conf configuration file modified, restart your Raspberry Pi to effect the changes and set the static IP address for it:

sudo reboot

Rather than using an address assigned automatically by DHCP, the Raspberry Pi will now attempt to connect to the router using the new static IP address that you set in the dhcpcd.conf file.


To check that it is working correctly, enter the following command:

hostname -I

You should now see the static IP address that you set in the dhcpcd.conf configuration file.

Raspberry Pi static IP set

Set a Static IP Address: Success

Congratulations: you have set up a static IP address on your Raspberry Pi and it should now retain that address automatically whenever it boots up. Now you can go ahead and use your Raspberry Pi as a NAS, media or game server, and connect to it reliably at the same address every time.

You might also like

The semiconductor bill is uniting political rivals

Abortion bans have raised the stakes of the midterms. Will billionaire donors step up?

Genshin Impact Mesmerizing Dream At Sea Web Event Answers, Rewards

raspberry-pi-zero-retro-game
10 Game Servers You Can Run on a Raspberry Pi

The Raspberry Pi can do many wonderful things, including run as a game server. Here are some of the best games it can host.

Read Next


About The Author

Phil King
(31 Articles Published)

Phil is the Junior Editor for DIY projects at MUO and a freelance writer and editor with 20+ years of experience. He has edited numerous official Raspberry Pi books and is a regular contributor to The MagPi magazine.

More
From Phil King

Subscribe to our newsletter

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!

Click here to subscribe

[ad_2]

Source link

Tags: addressRaspberrysetStatic
Previous Post

Global Competition News in US and Mexico

Next Post

Whale moves $1.17 billion in BTC out of Coinbase as U.S. inflation soars

Recommended For You

The semiconductor bill is uniting political rivals

by 198 Mexico News
July 25, 2022
0
The semiconductor bill is uniting political rivals

The news: Last month, Stanford’s Sewer Coronavirus Alert Network, or SCAN, added monkeypox to the suite of viruses it checks wastewater for daily. Since then, the virus has...

Read moreDetails

Abortion bans have raised the stakes of the midterms. Will billionaire donors step up?

by 198 Mexico News
July 25, 2022
0
Abortion bans have raised the stakes of the midterms. Will billionaire donors step up?

During the 2020 election, left-leaning billionaires — particularly tech billionaires — who previously hadn’t been big political spenders emerged as a powerful political force. Several of Silicon Valley’s...

Read moreDetails

Genshin Impact Mesmerizing Dream At Sea Web Event Answers, Rewards

by 198 Mexico News
July 25, 2022
0
Genshin Impact Mesmerizing Dream At Sea Web Event Answers, Rewards

Help Paimon remember her dream using inspiration to earn Primogems and Mora in Genshin Impact's Mesmerizing Dream at Sea web event.Updated on July 24th, 2022Genshin Impact developer HoYoverse...

Read moreDetails

Intel apologizes to scavenger hunt winners for delays and reveals prizes

by 198 Mexico News
July 24, 2022
0
Intel apologizes to scavenger hunt winners for delays and reveals prizes

In context: In January, the months-long and platform-spanning Intel Xe HPG Scavenger Hunt reached its exciting end. Intel said that the prizes would be new Arc Alchemist GPUs...

Read moreDetails

How to Type or Insert the Apple Logo () on an iPhone, iPad, or Mac

by 198 Mexico News
July 23, 2022
0
How to Type or Insert the Apple Logo () on an iPhone, iPad, or Mac

Did you know that you can effortlessly type or insert the Apple logo () in messages, notes, browser search bars, and other text fields on your iPhone, iPad,...

Read moreDetails
Next Post
Whale moves $1.17 billion in BTC out of Coinbase as U.S. inflation soars

Whale moves $1.17 billion in BTC out of Coinbase as U.S. inflation soars

Mexican president lashes out at EU ‘lies’ over his media-bashing rhetoric | Andrés Manuel López Obrador

Mexican president lashes out at EU ‘lies’ over his media-bashing rhetoric | Andrés Manuel López Obrador

Leave a Reply Cancel reply

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

  • Trending
  • Comments
  • Latest

Best Online Casinos That Payout No Deposit

February 16, 2025

Top Uk Slots Sites

February 16, 2025

First Casinos In Australia

February 16, 2025

Beat Online Casino Bonus

February 16, 2025
How to Use 3 Way Calling For Fast Network Marketing Success

How to Use 3 Way Calling For Fast Network Marketing Success

July 24, 2022
Did you know Sacramento shares a name with these other places?

Did you know Sacramento shares a name with these other places?

July 22, 2022
Mexico Makes Risky Bet on Liquefied Gas in New Global Scenario — Global Issues

Mexico Makes Risky Bet on Liquefied Gas in New Global Scenario — Global Issues

June 30, 2022

Free Online Practice Casino Games

February 16, 2025

Merkur Slots App

0

Beat Online Casino Bonus

0

Black Diamond Casino 100 Free Spins Bonus 2025

0

Top Uk Slots Sites

0

King Billy Casino No Deposit Bonus 100 Free Spins

0

Can Casino Control Slot Machines

0

New Uk Casinos No Deposit Bonus Codes

0

Best Online Casinos That Payout No Deposit

0

Merkur Slots App

February 16, 2025

Beat Online Casino Bonus

February 16, 2025

Black Diamond Casino 100 Free Spins Bonus 2025

February 16, 2025

Top Uk Slots Sites

February 16, 2025

King Billy Casino No Deposit Bonus 100 Free Spins

February 16, 2025

Can Casino Control Slot Machines

February 16, 2025

New Uk Casinos No Deposit Bonus Codes

February 16, 2025

Best Online Casinos That Payout No Deposit

February 16, 2025
198 Mexico News

198 Mexico News will provide the latest news update as the government facing a growing challenging in preventing Mexico from breaking apart along ethnic and religious lines.

198massmedia Group. USA. 3821 Dominion Drive, Dumfries, USA. 22026.

Toll Free 1 888 642 8433.
Contact: info@198mexiconews.com

LATEST UPDATES

Merkur Slots App

Beat Online Casino Bonus

Black Diamond Casino 100 Free Spins Bonus 2025

Top Uk Slots Sites

King Billy Casino No Deposit Bonus 100 Free Spins

Can Casino Control Slot Machines

New Uk Casinos No Deposit Bonus Codes

Best Online Casinos That Payout No Deposit

RECOMMENDED

No Content Available
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2025 - 198 Mexico News.

No Result
View All Result
  • Home
  • BUSINESS NEWS
  • VIDEO NEWS
  • FEATURED NEWS
    • MEXICO USA TRADE NEWS
    • MEXICO EU NEWS
    • MEXICO UK NEWS
    • MEXICO BRAZIL NEWS
    • MEXICO INDIA NEWS
    • MEXICO GULF NATIONS NEWS
    • MEXICO CHINA NEWS
    • MEXICO EGYPT NEWS
    • MEXICO AFRICA NEWS
    • MEXICO NIGERIA NEWS
    • MEXICO THAILAND NEWS
  • POLITICAL NEWS
  • TECHNOLOGY
  • CRYPTO
  • AGRICULTURE
  • MORE NEWS
    • MEXICO IMMIGRATION NEWS
    • MEXICO SCHOLARSHIP NEWS
    • MEXICO VENTURE CAPITAL NEWS
    • MEXICO EDUCATION NEWS
    • MEXICO BUSINESS HELP
    • MEXICO PARTNESHIPS
    • MEXICO MANUFACTURE NEWS
    • MEXICO UNIVERSITY NEWS
    • MEXICO JOINT VENTURE NEWS
  • ASK IKE LEMUWA
  • CONTACT

Copyright © 2025 - 198 Mexico News.