|
FAQ: How to setup more than 255 virtual ethernets on Solaris 8 (SPARC)
By Colin A. Bitterfield EX-SUN Microsystems, Inc. Contact Me
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<N)) do n=n+1 addr="$IP3.$IP2.$IP1.$IP0" ifconfig $PIF:$n $addr plumb ifconfig $PIF:$n $addr up IP0=IP0+1 if ((IP0==254)) then IP0=0 IP1=IP1+1 if ((IP1==254)) then IP1=0 IP2=IP2+1 fi fi done
------
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:
- Consider putting in a hostname into etc hosts.
- Consider setting up IPMP in Solaris 8
- Make sure that your application does not bind to all IPs unless you want it to.
- Some software may have real issues (unnamed Database company specific version) with too many virtual interfaces. This is a warning for good trouble shooting.
- Consider looking into this parameter "tcp_deferred_ack_interval=1" if you are going to be transferring lots of small files.
- It takes a really long time to configure this many interfaces.. *HOURS*
References:
SUN Microsystems, Inc: Infodocs:
- How to set up virtual interfaces, multiple TCP/IP addresses to the same interface? (15659)
- How to create 1024 Virtual Interfaces? (16369)
- Sun FastEthernet Support Document/FAQ (17416)
|