DHCP on CLI for Ubuntu-like systems

  1. Add these lines to /etc/network/interfaces, or tweak existing eth0 lines
    1. auto eth0
    2. iface eth0 inet dhcp
  2. bring it up
    1. sudo ifup eth0
  3. bring it down
    1. sudo ifdown eth0
  4. add some stuff to /etc/dhcp/dhclient.conf
    1. interface "eth0" {
    2.     prepend domain-name-servers,,;
    3.     supersede domain-search "mydom.com", "mydom-vpc.internal";
    4. }
  5. flush on occasion
    1. ip addr flush eth0


Popular posts from this blog

Debugging pfsense firewall rules clearly and easily

Direct ssh to a server via proxy using putty/plink on Windows

telnet vs netcat