<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DHCP | no dogma blog</title><link>https://nodogmablog.bryanhogan.net/tag/dhcp/</link><atom:link href="https://nodogmablog.bryanhogan.net/tag/dhcp/index.xml" rel="self" type="application/rss+xml"/><description>DHCP</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Sat, 07 Nov 2026 00:00:00 +0000</lastBuildDate><image><url>https://nodogmablog.bryanhogan.net/media/icon_hu9c23d68d4e9f1f9acfa8237e5c2ea674_3344_512x512_fill_lanczos_center_3.png</url><title>DHCP</title><link>https://nodogmablog.bryanhogan.net/tag/dhcp/</link></image><item><title>Setting up a Raspberry Pi without a Monitor, Keyboard, or Network</title><link>https://nodogmablog.bryanhogan.net/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/</link><pubDate>Sat, 07 Nov 2026 00:00:00 +0000</pubDate><guid>https://nodogmablog.bryanhogan.net/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/</guid><description>&lt;p>&lt;em>This is very similar to &lt;a href="https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/">my previous post&lt;/a> about sharing internet access from Ubuntu to a new Raspberry Pi.&lt;/em>&lt;/p>
&lt;p>&lt;em>In this, I will show how you can start using your Raspberry Pi without a monitor, keyboard, Ethernet network, or wifi connection.&lt;/em>&lt;/p>
&lt;p>I am not going to explain how to set up the Pi, that is covered in many other places. I suggest following the guide on the &lt;a href="https://www.raspberrypi.com/documentation/computers/getting-started.html" target="_blank" rel="noopener">Raspberry Pi website&lt;/a>.
Follow the headless instructions, &lt;strong>but I will show how to connect to it when you don&amp;rsquo;t have an Ethernet or wifi network&lt;/strong>.&lt;/p>
&lt;h2 id="my-setup">My Setup&lt;/h2>
&lt;p>I have -&lt;/p>
&lt;ul>
&lt;li>Ubuntu on my laptop (but similar steps should work on other OSes)&lt;/li>
&lt;li>Raspberry Pi 4 with the 64-bit Lite OS&lt;/li>
&lt;li>an Ethernet cable connecting the two devices&lt;/li>
&lt;/ul>
&lt;h2 id="follow-the-headless-setup-instructions">Follow the headless setup instructions&lt;/h2>
&lt;p>Install the OS on the SD card, give your Pi a name, for example &lt;code>pi4&lt;/code>, and enable SSH. Don&amp;rsquo;t put in any wifi credentials, because you don&amp;rsquo;t have a network to connect to&lt;/p>
&lt;h2 id="sharing-internet-from-laptop-to-raspberry-pi">Sharing Internet from Laptop to Raspberry Pi&lt;/h2>
&lt;p>On the Ubuntu computer where you imaged the SD card, plug in an Ethernet cable. Don&amp;rsquo;t connect it to the Pi just yet. It doesn&amp;rsquo;t have to be a crossover cable, a regular Ethernet cable will work.&lt;/p>
&lt;h3 id="1-the-ethernet-connection">1. The Ethernet Connection&lt;/h3>
&lt;p>Go to Settings → Network.&lt;/p>
&lt;p>There might be a few sections - the top one is probably the one you need. It might be called Wired, Ethernet, PCI Ethernet, or something similar.&lt;/p>
&lt;figure id="figure-network-connections">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Network Connections" srcset="
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_4d870b7811f48aac7aadab70cce4c332.webp 400w,
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_954c4e35a40029a2bdd4a2a6805160ae.webp 760w,
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_4d870b7811f48aac7aadab70cce4c332.webp"
width="760"
height="139"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Network Connections
&lt;/figcaption>&lt;/figure>
&lt;h3 id="2-changing-the-profile">2. Changing the Profile&lt;/h3>
&lt;p>Click the gear icon to edit the profile, move to the IPv4 tab, and change the method to &lt;strong>Shared to other computers&lt;/strong>. Click Apply.&lt;/p>
&lt;figure id="figure-sharing-the-connection">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Sharing the connection" srcset="
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_c380e0d5b40f8dcc0685bc38b89ba087.webp 400w,
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_dc18cdff8fb90ff31ea55bf0a7d5e236.webp 760w,
/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_c380e0d5b40f8dcc0685bc38b89ba087.webp"
width="760"
height="504"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Sharing the connection
&lt;/figcaption>&lt;/figure>
&lt;h3 id="3-connecting-the-laptop-and-the-pi">3. Connecting the Laptop and the Pi&lt;/h3>
&lt;p>If you haven&amp;rsquo;t done so already, plug the cable into the laptop and the Pi. The Pi should get an IP address from the laptop via DHCP.&lt;/p>
&lt;h3 id="4-finding-the-pis-ip-address">4. Finding the Pi&amp;rsquo;s IP Address&lt;/h3>
&lt;p>I know the name of my Pi is &lt;code>pi4&lt;/code>, so I can ping it at &lt;code>pi4.local&lt;/code> to see its IP address -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ping -c1 pi4.local&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>If I forgot the name of my Pi, I can check the address the laptop handed out over the cable:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">sudo cat /var/lib/NetworkManager/dnsmasq-*.leases&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>This will show something like -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">1793837033 xx:xx:xx:xx:xx:xx 10.42.0.23 pi4 yy:yy:yy:yy:yy:yy:yy&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The IP address is in the middle of the line.&lt;/p>
&lt;h3 id="5-ssh-into-the-pi">5. SSH into the Pi&lt;/h3>
&lt;p>I can &lt;code>ssh&lt;/code> to the Pi using the name or the IP address -
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh pi4.local&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic"># or &lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh 10.42.0.23&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/p>
&lt;p>That&amp;rsquo;s it, you set up Pi and connected to it without any network.&lt;/p>
&lt;h3 id="6-resetting-the-profile">6. Resetting the profile&lt;/h3>
&lt;p>After you disconnect the Pi, change the profile back to the original method (probably &lt;code>Automatic (DHCP)&lt;/code>), so that when you plug the laptop into a router, it gets an IP address from the router.&lt;/p></description></item><item><title>Sharing Internet Access from a Ubuntu Laptop to a Raspberry Pi</title><link>https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/</link><pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate><guid>https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/</guid><description>&lt;p>&lt;em>&lt;strong>This and the &lt;a href="https://nodogmablog.bryanhogan.net/2026/11/setting-up-a-raspberry-pi-without-a-monitor-keyboard-or-network/">next post&lt;/a> are going to be almost identical because the one technique achieves two distinct goals, and I want each title to reflect just one goal.&lt;/strong>&lt;/em>&lt;/p>
&lt;p>&lt;em>&lt;strong>In this, I will show how to share a laptop&amp;rsquo;s internet with the Pi. In the next post, I will show how to SSH to the Pi from a laptop if you have no monitor, keyboard, or shared network.&lt;/strong>&lt;/em>&lt;/p>
&lt;p>I recently got a Raspberry Pi 4, and sometimes I&amp;rsquo;m out and about with it and my laptop. If I want to SSH into the Pi, a few things have to align -&lt;/p>
&lt;ul>
&lt;li>the laptop and the Pi need to be on the same wifi network&lt;/li>
&lt;li>that wifi network needs to allow communication between devices&lt;/li>
&lt;li>the Pi needs to be authenticated with the wifi network, but I don&amp;rsquo;t have a monitor or keyboard with me.&lt;/li>
&lt;/ul>
&lt;p>If I connect the Pi to my laptop with an Ethernet cable, then I can &lt;code>ssh&lt;/code> to the Pi and work with it. A happy side effect is that the Pi will have internet access, too, using my laptop&amp;rsquo;s wifi connection - my laptop becoming a router for the Pi.&lt;/p>
&lt;h2 id="my-setup">My Setup&lt;/h2>
&lt;p>I have -&lt;/p>
&lt;ul>
&lt;li>Ubuntu on my laptop&lt;/li>
&lt;li>Raspberry Pi 4 with the 64-bit Lite OS&lt;/li>
&lt;li>an Ethernet cable connecting the two devices&lt;/li>
&lt;/ul>
&lt;h2 id="sharing-internet-from-laptop-to-raspberry-pi">Sharing Internet from Laptop to Raspberry Pi&lt;/h2>
&lt;p>Plug the cable into the laptop and the Pi. It doesn&amp;rsquo;t have to be a crossover cable, a regular Ethernet cable will work.&lt;/p>
&lt;h3 id="1-the-ethernet-connection">1. The Ethernet Connection&lt;/h3>
&lt;p>Go to Settings → Network.&lt;/p>
&lt;p>There might be a few sections - the top one is probably the one you need. It might be called Wired, Ethernet, PCI Ethernet, or something similar.&lt;/p>
&lt;figure id="figure-network-connections">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Network Connections" srcset="
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_adda23245c38a668ffce354161a7919c.webp 400w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_954c4e35a40029a2bdd4a2a6805160ae.webp 760w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_adda23245c38a668ffce354161a7919c.webp"
width="760"
height="139"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Network Connections
&lt;/figcaption>&lt;/figure>
&lt;h3 id="2-changing-the-profile">2. Changing the Profile&lt;/h3>
&lt;p>Click the gear icon to edit the profile, move to the IPv4 tab, and change the method to &lt;strong>Shared to other computers&lt;/strong>. Click Apply.&lt;/p>
&lt;figure id="figure-sharing-the-connection">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Sharing the connection" srcset="
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_2000342111b3f5d896ba2ac56c714611.webp 400w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_dc18cdff8fb90ff31ea55bf0a7d5e236.webp 760w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_2000342111b3f5d896ba2ac56c714611.webp"
width="760"
height="504"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Sharing the connection
&lt;/figcaption>&lt;/figure>
&lt;h3 id="3-connecting-the-laptop-and-the-pi">3. Connecting the Laptop and the Pi&lt;/h3>
&lt;p>Plug the cable into the laptop and the Pi. The Pi should get an IP address from the laptop via DHCP.&lt;/p>
&lt;h3 id="4-finding-the-pis-ip-address">4. Finding the Pi&amp;rsquo;s IP Address&lt;/h3>
&lt;p>I know the name of my Pi is &lt;code>pi4&lt;/code>, so I can ping it at &lt;code>pi4.local&lt;/code> to see its IP address -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ping -c1 pi4.local&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>If I forgot the name of my Pi, I can check the address the laptop handed out over the cable:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">sudo cat /var/lib/NetworkManager/dnsmasq-*.leases&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>This will show something like -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">1793837033 xx:xx:xx:xx:xx:xx 10.42.0.23 pi4 yy:yy:yy:yy:yy:yy:yy&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The IP address is in the middle of the line.&lt;/p>
&lt;h3 id="5-ssh-into-the-pi">5. SSH into the Pi&lt;/h3>
&lt;p>I can &lt;code>ssh&lt;/code> to the Pi using the name or the IP address -
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh pi4.local&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic"># or &lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh 10.42.0.23&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/p>
&lt;p>The Pi should now have internet access.&lt;/p>
&lt;p>From the Pi, try pinging &lt;code>9.9.9.9&lt;/code> and &lt;code>quad9.com&lt;/code> to verify that the Pi has internet and DNS access.&lt;/p>
&lt;h3 id="6-resetting-the-profile">6. Resetting the profile&lt;/h3>
&lt;p>After you disconnect the Pi, change the profile back to the original method (probably &lt;code>Automatic (DHCP)&lt;/code>), so that when you plug the laptop into a router, it gets an IP address from the router.&lt;/p>
&lt;h2 id="future-posts">Future posts&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>I will cover how to do the above when the laptop is running a VPN. &lt;a href="https://nodogmablog.bryanhogan.net/2026/11/connecting-a-raspberry-pi-to-ubuntu-when-using-a-vpn-and-sharing-the-internet-connection/">Here is that post&lt;/a>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Having to change the profile manually each time is a bit of a pain. But it is possible to set up multiple profiles for the same interface and have the laptop pick the right one by itself.&lt;/p>
&lt;/li>
&lt;/ol></description></item></channel></rss>