<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Set static IP in FreeBSD Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/set-static-ip-in-freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 11 Dec 2018 12:13:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Set a static IP address in FreeBSD</title>
		<link>https://www.osradar.com/set-a-static-ip-address-in-freebsd/</link>
					<comments>https://www.osradar.com/set-a-static-ip-address-in-freebsd/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Wed, 12 Dec 2018 11:00:24 +0000</pubDate>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[from DHCP to static FreeBSD]]></category>
		<category><![CDATA[Set static IP in FreeBSD]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8276</guid>

					<description><![CDATA[<p>Default Configuration of the Network on FreeBSD is DHCP. Let me show you how to change or set IP addresses from Dynamic to Static. i will take this example from my FreeBSD  VM. but that should work  also for bare metal servers. My   Network Configuration i : root@FreeBSD12:~ # ifconfig em0: flags=8843&#60;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&#62; metric 0 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/set-a-static-ip-address-in-freebsd/">Set a static IP address in FreeBSD</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Default Configuration of the Network on FreeBSD is DHCP. Let me show you how to change or set IP addresses from Dynamic to Static. i will take this example from my FreeBSD  VM. but that should work  also for bare metal servers.</p>
<p><strong>My   Network Configuration</strong> i :</p>
<pre class="">root@FreeBSD12:~ # ifconfig
em0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=81009b&lt;RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER&gt;
ether 00:0c:29:ac:76:78
inet6 fe80::20c:29ff:feac:7678%em0 prefixlen 64 scopeid 0x1
inet 192.168.65.162 netmask 0xffffff00 broadcast 192.168.65.255
media: Ethernet autoselect (1000baseT &lt;full-duplex&gt;)
status: active
nd6 options=23&lt;PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL&gt;
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; metric 0 mtu 16384
options=680003&lt;RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6&gt;
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21&lt;PERFORMNUD,AUTO_LINKLOCAL&gt;
root@FreeBSD12:~ #</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-8278" src="https://www.osradar.com/wp-content/uploads/2018/12/ifconfig.png" alt="" width="815" height="255" srcset="https://www.osradar.com/wp-content/uploads/2018/12/ifconfig.png 815w, https://www.osradar.com/wp-content/uploads/2018/12/ifconfig-300x94.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/ifconfig-768x240.png 768w" sizes="(max-width: 815px) 100vw, 815px" /></p>
<p>Netmask  : This 0xffffff00 is written in dotted-quad notation as 255.255.255.0</p>
<p><strong>Find  My gateway</strong></p>
<pre class="">root@FreeBSD12:~ # netstat -rn
Routing tables

Internet:
Destination Gateway Flags Netif Expire
default 192.168.65.2 UGS em0
127.0.0.1 link#2 UH lo0
192.168.65.0/24 link#1 U em0
192.168.65.162 link#1 UHS lo0</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-8279" src="https://www.osradar.com/wp-content/uploads/2018/12/ifconfig2.png" alt="" width="897" height="334" srcset="https://www.osradar.com/wp-content/uploads/2018/12/ifconfig2.png 897w, https://www.osradar.com/wp-content/uploads/2018/12/ifconfig2-300x112.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/ifconfig2-768x286.png 768w" sizes="(max-width: 897px) 100vw, 897px" /></p>
<p><strong>DNS Server</strong></p>
<p>Because its an VM, the DNS server is the same as the gateway. in your case my DNS is something else.</p>
<pre class="">root@FreeBSD12:~ # cat /etc/resolv.conf
# Generated by resolvconf
search localdomain
nameserver 192.168.65.2</pre>
<p>The actual status of rc.conf file.</p>
<p><img loading="lazy" class="alignnone size-full wp-image-8281" src="https://www.osradar.com/wp-content/uploads/2018/12/dhcp.png" alt="" width="624" height="181" srcset="https://www.osradar.com/wp-content/uploads/2018/12/dhcp.png 624w, https://www.osradar.com/wp-content/uploads/2018/12/dhcp-300x87.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>Lets  change  the Ip from  DHCP to static  ip  192.168.65.10 / default  gateway is 192.168.65.2 with adding the two lines  to  rc.conf</p>
<pre class="">ifconfig_em0="inet 192.168.65.10 netmask 255.255.250.0"
defaultrouter="192.168.65.2"</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-8284" src="https://www.osradar.com/wp-content/uploads/2018/12/rc-net.png" alt="" width="548" height="174" srcset="https://www.osradar.com/wp-content/uploads/2018/12/rc-net.png 548w, https://www.osradar.com/wp-content/uploads/2018/12/rc-net-300x95.png 300w" sizes="(max-width: 548px) 100vw, 548px" /></p>
<p><strong>Restart the network Services with.</strong></p>
<pre class="">/etc/netstart</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-8287" src="https://www.osradar.com/wp-content/uploads/2018/12/netstat.png" alt="" width="825" height="406" srcset="https://www.osradar.com/wp-content/uploads/2018/12/netstat.png 825w, https://www.osradar.com/wp-content/uploads/2018/12/netstat-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/netstat-768x378.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/netstat-324x160.png 324w" sizes="(max-width: 825px) 100vw, 825px" /></p>
<p>Waaw cool !!</p>
<p><strong>Connect from Other Server and see if the new Ip working</strong></p>
<pre class="">➤ ssh root@192.168.65.10
Warning: Permanently added '192.168.65.10' (RSA) to the list of known hosts.
Password for root@FreeBSD12.osradar.local:
Last login: Tue Dec 11 11:55:04 2018 from 192.168.65.1
FreeBSD 12.0GENERIC

Welcome to FreeBSD!</pre>
<p>Enjoy</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/set-a-static-ip-address-in-freebsd/">Set a static IP address in FreeBSD</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/set-a-static-ip-address-in-freebsd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
