In this example we will configure interface qfe1 with the an IP of 192.168.1.1 255.255.255.0 and set the speed to 100 full duplex.
Bring up the Interface
To bring up and plumb the interface, we first need to type the following, (change the IP to yours)
ifconfig qfe1 plumb
ifconfig qfe1 192.168.1.1 netmask 255.255.255.0 up
Update the /etc/netmasks file with the network address and subnet mask, if not already present (the required line is below),
192.168.1.0 255.255.255.0
For the new interface , first edit the /etc/hosts file and create a new entry. The space should be a tab.
192.168.1.1 solarisserver-qfe1
Now create a new file /etc/hostname.qfe1 and add the entry
solarisserver-qfe1
To do the above but using less effort (and lines) try the following,
ifconfig qfe1 plumb ; ifconfig qfe1 192.168.1.1 netmask 255.255.255.0 up
echo "192.168.1.0\t255.255.255.0" >> /etc/netmasks
echo "192.168.1.1\t"`hostname`-qfe1 >> /etc/hosts
echo `hostname`-qfe1 > /etc/hostname.qfe1
Set Duplex
ndd -set /dev/qfe instance 1
ndd -set /dev/qfe adv_100fdx_cap 1
Then to make the change permanent add to /etc/system
set /dev/qfe1 adv_100fdx_cap 1
Below is a reference to the difference abbreviations :
instance 1 = port instance 1
adv = advertise
cap = capability
1 = enabled
0 = disabled
Check the interface
Check the IP address and status of the interface
ifconfig -a
Set the interface we are going to check,
ndd -set /dev/qfe instance 1
To check the link, (reply of 1 = LED is active, 0 = Line is dead)
ndd -get /dev/qfe link_status
To check the negotiated speed,
1=100mbit for qfe & hme, 1 Gbit for ge.
0=10mbit for qfe & hme, 500 mbit for ge.
ndd -get /dev/qfe link_speed
To check link mode, (1= full-duplex, 0 = half-duplex)
ndd -get /dev/qfe link_mode
Remove the Interface
Disable interface qfe1
ifconfig qfe1 down
Remove the interface qfe1
ifconfig qfe1 unplumb
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a UNIX expert?
Here is our hand-picked selection of the best courses you can find online:
UNIX Administration Fundamentals
Vim Masterclass
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial