[转] Solaris Network Interface Setup


Create a tagged Interface

Show available network interfaces:

# dladm show-link
igb0            type: non-vlan  mtu: 1500       device: igb0
igb1            type: non-vlan  mtu: 1500       device: igb1

Create VLAN tagging for the appropriate interface:

The interface name is the concatenation of the interface name + vlan id * 1000 + interface id

  • igb0 vlan 2000 = ibg + 2000 * 1000 + 0 = igb2000000
  • igb1 vlan 2000 = ibg + 2000 * 1000 + 1 = igb2000001
# ifconfig igb200000 plumb

Assign IP address and subnet mask to the previous created interface and start it up:

# ifconfig igb2000000 10.29.0.11 255.255.255.0 up

If there is an other interface with the same IP address already existing you have to unplumb this one first and to re-run the previous command. Only unplumb an interface if you are currently connected via an other interface!

# ifconfig igb0 unplumb

If you get an error message like the one below the command has to be partially executed.

ifconfig: setifdstaddr: SIOCSLIFDSTADDR: nge2000000: Cannot assign requested address

# ifconfig igb2000000 inet 10.29.0.11
# ifconfig igb2000000 netmask 255.255.255.0
# ifconfig igb2000000 up

To verify the VLAN tagging:

dladm show-link
igb0            type: non-vlan  mtu: 1500       device: igb0
igb2000000      type: vlan 2000 mtu: 1500       device: igb0
igb1            type: non-vlan  mtu: 1500       device: igb1

To make this persistant across reboots you need to create the /etc/hostname.if file:

# vi /etc/hostname.igb2000000
s0011

# vi /etc/hosts
10.29.0.11      s0011

# vi /etc/netmasks
10.29.0.0       255.255.255.0

If the IP address was already assigned to an interface it is possible to move this file to the new interface name.

# mv /etc/hostname.igb0 /etc/hostname.igb2000000

Create ipmp

use ipadm to create IP multipathing:

# ipadm create-ipmp ipmp0
# ipadm add-ipmp -i e1000g1 -i e1000g2 ipmp0

e1000g1 and e1000g2 are the two ethernet interfaces.

Take down the firewalls

svcs -a |grep network |egrep “pfil|ipf”

svcadm disable  svc:/network/ipfilter:default

Advertisements
By Ctrl | Alt | Del Posted in Solaris

One comment on “[转] Solaris Network Interface Setup

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s