123HELPDESK

IT professionals voor ondernemers

Solaris 10: Add Physical interface PDF Afdrukken

How to Add and configure a Physical Interface After Installation in Solaris 10


1. Configure and plumb each interface.

  # ifconfig <interface> plumb up
This command is located in the /usr/sbin directory. The ifconfig command most commonly used to display information about the configuration of the network interface specified.

  • The plumb argument to the ifconfig command opens the device associated with the physical interface name and sets up the streams needed for TCP/IP to use the device. This is required for the interface to be displayed in the output of the ifconfig -a command.
  • The unplumb argument to the ifconfig command destroys streams associated with the driver and closes the device. An interface will not be displayed in the output of the ifconfig -a command after it has been removed with the ifconfig unplumb command.

For example, for qfe0 you would type:

# ifconfig qfe0 plumb up
# ifconfig -a
qfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

Check the status line for each interface that is displayed. Ensure that the output contains an UP flag on the status line.
Status flags indicate as follows:
  • UP - The interface is marked up and sends and receives packets through the interface.
  • NOTRAILERS - A trailer is not included at the end of the Ethernet frame. Trailers were a method used in Berkeley UNIX versions that puts the header information at the end of the packet. This option is not supported in the Solaris environment but is provided for command-line backward compatibility.
  • RUNNING - The interface is recognized by the kernel.
  • MULTICAST - The interface supports a multicast address. l BROADCAST - The interface supports a broadcast address.

To make the interface configuration persist across reboots, perform the following steps:

1. Create an /etc/hostname.interface file for each interface to be configured.

For example, to add a qfe0 interface, you would create the following file:

# vi /etc/hostname.qfe0

2. Edit the /etc/hostname.interface file.

At a minimum, add the IPv4 address of the interface to the file. You can also add a netmask and other configuration information to the file.

3. Add entries for the new interfaces into the /etc/inet/hosts file.

The following example shows how to add two interfaces, qfe0 and qfe1.


Note –
Interfaces that are explicitly configured with the ifconfig command do not persist across a reboot.


# ifconfig qfe0 plumb up
# ifconfig qfe1 plumb up
# ifconfig qfe0 10.0.0.32 netmask 255.0.0.0
# ifconfig qfe1 10.0.0.33 netmask 255.0.0.0


# ifconfig -a
lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
ether 8:0:20:c1:8b:c3
qfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.0.0.32 netmask ff000000 broadcast 10.255.255.255
ether 8:0:20:c8:f4:1d
qfe1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 10.0.0.33 netmask ff000000 broadcast 10.255.255.255
ether 8:0:20:c8:f4:1e


Example adding two Persistent Interface Configurations, qfe0 and qfe1

# dladm show-link
eri0 type: legacy mtu: 1500 device: eri0
qfe0 type: legacy mtu: 1500 device: qfe0
qfe1 type: legacy mtu: 1500 device: qfe1
qfe2 type: legacy mtu: 1500 device: qfe2
qfe3 type: legacy mtu: 1500 device: qfe3
bge0 type: non-vlan mtu: 1500 device: bge0

# vi /etc/hostname.qfe0
192.168.84.3 netmask 255.255.255.0
# vi /etc/hostname.qfe1
192.168.84.72 netmask 255.255.255.0
# vi /etc/inet/hosts
# Internet host table
#
127.0.0.1 localhost
10.0.0.14 myhost
192.168.84.3 interface-2
192.168.84.72 interface-3
For Solaris 10 11/06 and earlier releases:# vi /etc/inet/ipnodes
10.0.0.14 myhost
192.168.84.3 interface-2
192.168.84.72 interface-3

 
< Vorige   Volgende >