Unix IP Commands

Display Current Config for all NIC’s: ifconfig

Display Current Config for dc0: ifconfig dc0

Assign multiple IP’s: ifconfig dc0:0 192.168.1.2

Assign second IP: ifconfig dc0:1 192.168.1.3

Disable network card: ifconfig dc0 down

Enable network card: ifconfig dc0 up

Assign IP/Subnet: ifconfig dc0 inet 192.168.1.2 netmask 255.255.255.0

Assign Gateway: route delete default && route add default 192.168.1.1

*You MUST be at the ROOT user to make/save any changes. You will need to save your changes in the /etc/rc.conf file. Network cards are referred to as dc0, dc1, dc2, etc based on their position on the PCI bus.
*Special thanks to Romanov Sergey Vladimirovich from Moscow for the UNIX commands!

The following two tabs change content below.

Brian Gilbert

Brian has been a website administrator with WhatIsMyIP.com since early 2006. He's known in the forum as WIMIAdmin. He has an extensive computer background that started back in the early 80's when his mom bought him his first computer, a Texas Instruments TI-99/4A. Brian has turned his passion for technology into a full time gig.

Latest posts by Brian Gilbert (see all)