• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
sharadchhetri.com

sharadchhetri.com

Linux,Cloud Computing And DevOps

  • Home
  • Linux
  • CloudComputing
    • Introduction Cloud Computing
    • Amazon AWS
  • Free E-Books
  • About Me

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

Do'nt be greedy, share the knowledge!

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

Related

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

Follow Us

  • Facebook
  • Twitter
  • GitHub
  • YouTube

Recent Posts

  • How to install Java (OpenJDK) on Ubuntu Linux
  • How to install Groovy on Ubuntu 20.04 LTS
  • How to Disable selinux in Red Hat or CentOS
  • How to remove date from WordPress Post URL
  • How to install Mariadb 10.4 server on CentOS 8 / RHEL 8

Top Posts & Pages

  • How to delete mail queue in Postfix
  • How to start / stop / restart / reload iptables on CentOS 7 / RHEL 7
  • How to set hostname and FQDN on CentOS 7 and RHEL 7
  • How to install MySQL Server 5.6 on CentOS 7 / RHEL 7
  • How to fix read only USB pen drive in Ubuntu
  • How to setup Jenkins Credentials for Git repo access
  • How to create Jenkins user by command line and GUI
  • How to find absolute path of command on Linux / Unix : which command
  • make command not found in linux CentOS Red Hat ubuntu Debian
  • 4 different commands to check the load average in linux

DevOps Posts

  • vagrant cloud flow

    Install Vagrant on Ubuntu and create first VM

  • git jenkins credential github

    How to setup Jenkins Credentials for Git repo access

  • terraform

    how to install terraform in Linux : CentOS-Ubuntu

  • docker image

    How to create Ubuntu docker base image

  • Install Ansible on Ubuntu / CentOS / RHEL

Footer

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Sharad Chhetri is an experienced Linux - Cloud Engineer & freelancer. Working on Open Source Technology since RHEL 4.0 (Red Hat Enterprise Linux). He loves sharing the knowledge which earned from real scenarios. Don't be surprised if you find him in technology seminars and meetup groups. You can contact him on email for freelance projects at admin@sharadchhetri.com. Read More…

Tags

Amazon AWS apache automation awk bash script CentOS centos 7 debian devops docker freebsd ftp ghost git grep hostname jenkins kvm linux linux command linux commands MariaDB Server mysql Nagios nginx Octopress owncloud Owncloud 6 php postfix postgres python Red Hat rpm sed selinux ssh swap ubuntu user management vagrant varnish virtualbox vsftp wordpress

Recent Comments

  • Ali on How to delete mail queue in Postfix
  • Mehar on How to install Java (OpenJDK) on Ubuntu Linux
  • Ramone Burrell on How to fix read only USB pen drive in Ubuntu
  • Pera on How to fix read only USB pen drive in Ubuntu
  • Ubuntu on How to fix read only USB pen drive in Ubuntu
  • Nitin Sharma on Install and configure rsyslog Centralized logging server in CentOS 6.5
  • Sharad Chhetri on Install and configure rsyslog Centralized logging server in CentOS 6.5
  • nitin on Install and configure rsyslog Centralized logging server in CentOS 6.5

Copyright © 2009 - 2021 · All Rights Reserved sharadchhetri.com · · Privacy Policy ·
· sitemap.xml · ·The content is copyrighted to sharadchhetri.com and may not be reproduced on other websites without our permission. ·

Copyright © 2021 · Genesis Sample on Genesis Framework · WordPress · Log in