• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to set DHCP offered ip address to particular ethernet in freebsd

July 21, 2013 by Sharad Chhetri Leave a Comment

In this post we will learn How to set DHCP offered ip address to particular ethernet in freebsd.
I freshly installed the freebsd 9.0-RELEASE in Virtual box. I added two ethernet or NIC to virtual machine.
After restart I found only my first ethernet has the ip address. The second ethernet does’not have any ip.

This tutorial is applicable to VPS and dedicated server also.

Follow the given below steps to get dhcp ipaddress

Step 1: First check does the Operating System has detected the ethernet or not.
Run the given below command.

freebsd# ifconfig


See the below given screenshot of output,here you can see the 2nd ethernet is detected but it has no ip address

freebsd-dhcp
freebsd-dhcp

Step 2: Edit the /etc/rc.conf file and add the line.

ifconfig_em1="DHCP"

Why ifconfig_em1, why not em2 em3 or other number
Answer: See in screenshot the em1 ethernet card does not have ip address, the em2 em3 em4 does’nt exist.

Step 3: Then run the given below command.
Command pattern is : /sbin/dhclient interface

freebsd# /sbin/dhclient em1

See the result in screenshot

freebsd-dhcp-result
freebsd-dhcp-result

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Configure ethernet to get IP address from DHCP in Ubuntu and Debian
  2. Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/Latest/
  3. linux release renew dhcp assigned ip address
  4. How to install vim in freebsd
  5. How to enable su access or switch to superuser in freebsd
  6. Enable ethernet in RHEL 6.0 and CentOS 6.0 : Tested In Virtual Box and VMware
  7. How to configure ethernet in CentOS 6 after installing in Virtual Box
  8. Allow root ssh login in FreeBSD 9.0
  9. Install Gnome Desktop on FreeBSD 10.3
  10. How to list users above or below particular user id

Filed Under: BSD, BSD troubleshooting, Linux Tagged With: freebsd

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to set JAVA environment variables in Linux

How to hide php version information in header

safest method to remove softlink in linux

Set GRUB password after installation of CentOS/Red Hat

How to encode and decode the strings with base64

How to zip directory in linux explained with examples

How to zip the directory in linux with command line

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy