Freebsd networking: Difference between revisions
From wikinotes
m (Will moved page Freebsd-networking to Freebsd networking) |
No edit summary |
||
Line 1: | Line 1: | ||
= Manual Connection = | = Documentation = | ||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| freebsd handbook: network communication || https://docs.freebsd.org/en/books/handbook/partiv/ | |||
|- | |||
|} | |||
</blockquote><!-- Documentation --> | |||
= Tools = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| [[freebsd ifconfig]] | |||
|- | |||
|} | |||
</blockquote><!-- Tools --> | |||
= Usage = | |||
<blockquote> | |||
== Manual Connection == | |||
<blockquote> | <blockquote> | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 9: | Line 29: | ||
</source> | </source> | ||
</blockquote><!-- Manual Connection --> | </blockquote><!-- Manual Connection --> | ||
</blockquote><!-- Usage --> | |||
= | = Examples = | ||
<blockquote> | <blockquote> | ||
== Static IP == | == Static IP == | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 29: | Line 49: | ||
ifconfig em0 inet 192.168.0.254 netmask 255.255.255.0 | ifconfig em0 inet 192.168.0.254 netmask 255.255.255.0 | ||
</source> | </source> | ||
</blockquote><!-- Examples --> | |||
</blockquote><!-- |
Revision as of 03:27, 7 August 2021
Documentation
freebsd handbook: network communication https://docs.freebsd.org/en/books/handbook/partiv/
Tools
freebsd ifconfig
Usage
Manual Connection
# Starting a manual network connection from CLI sudo route add default 192.168.1.1 # Set path to your router ifconfig # find interface you want ifconfig em0 up # set interface 'up' dhclient em0 # (equivalent of DHCPCD, requests IP address)
Examples
Static IP
# /etc/rc.conf ifconfig_nfe0="inet 192.168.1.220 netmask 255.255.255.0" defaultrouter="192.168.1.1"# If you still are not able to get outside the internal # network, try deleting and re-adding the default router from CLI route delete default route add default 192.168.1.1 # The following should restart your internet connection. ifconfig em0 inet 192.168.0.254 netmask 255.255.255.0