Friday, December 25, 2009

How to setup more than 255 virtual ethernets

 

Introduction:

Solaris 8 can support up to 8192 virtual ethernets per card (HME, QFE or GE). On virtual interfaces greater than 255 and on Solaris 8, the following needs to be considered:

It will take over 1 hours to plumb and IP address all of the interfaces.
You will need to create an RC script to due the setup.
You should consider using RUN level 4 (init 4) for starting the interfaces.
You will need to run an NDD command to allow that many interfaces.
You will need to consider networking and routing issues (not covered by this FAQ)
FYI: Don't try creating 8192 files (hostname.hme:????). It won't work and it will take 2 hours for the system to boot with errors.

Step 1.

Modify /etc/init.d/inetinit

Add the following line to the bottom:

"/usr/sbin/ndd -set /dev/ip ip_addrs_per_if 8192" (8192 is the max number of interfaces)

Step 2.

Create a start/stop script in /etc/init.d/ and link to K & S scripts. This sample was orginally found in SUN Solve infodoc 16369 and was modified. When I have time I am going to re-write this as bourne shell and consider some methods for parallizing it.

script follows: (download just the script from here)

Name it like (/etc/init.d/virtual.if)

##!/bin/ksh
# Configuration Area
# set this value to the nuber of logical interfaces you want per physical IF
typeset -i N=500
#
#set these to the IP addrs you want to configure
typeset -i IP3=172
typeset -i IP2=16
typeset -i IP1=10
typeset -i IP0=0
typeset -i n=0
# What kind of interface (le, hme, qfe, ge)
PIF=hme0
# No Changes below this line
##################################################
while ((n Step 3:
Test the ndd and the script prior to linking the start/stop script.
Make the script executable (chmod +x /etc/init.d/virtual.if)

Step 4:

Link the scripts
(I recommend putting it in run level four and changing the inittab when you get everything working otherwise)
ln /etc/init.d/virtual.if /etc/rc2.d/K10virtual.interfaces
ln /etc/init.d/virtual.if /etc/rc3.d/S99virtual.interfaces

Caveats and issues:

1)Consider putting in a hostname into etc hosts.

2)Consider setting up IPMP in Solaris 8

3)Make sure that your application does not bind to all IPs unless you want it to.

4)Some software may have real issues (unnamed Database company specific version) with too many virtual interfaces. This is a warning for good trouble shooting.

5)Consider looking into this parameter "tcp_deferred_ack_interval=1" if you are going to be transferring lots of small files.

6)It takes a really long time to configure this many interfaces.. *HOURS*

 

No comments:

Post a Comment