[Suns-at-Home] Use SUN box as a network switch

Jason Grove jason@sungeek.net
Sun, 14 Jan 2007 21:37:13 -0500


Darrick Burch wrote:
>> I have a really odd request and hope someone has done this. Is it
> feasible to turn an Ultra 1 into a simple 4 port network switch with a
> QFE card installed? I am not sure how to configure the routing table
> such that the devices attached to the QFE ports will be fully visable on
> the rest of the network. The devices attached the the QFE ports  will be
> on the same subnet at the main network which the main network port will
> be attached (HME0). For example:
> 
>> Ultra 1 HME0: 192.168.0.20
>>    PC attached to QFE0: 192.168.0.100
>>    Printer attached to QFE1: 192.168.0.101
>>    Printer attached to QFE2: 192.168.0.102
>>    Printer attached to QFE2: 192.168.0.103


My $0.02... Solaris 9 and below will act as a router by default if you 
do not have an /etc/defaultrouter file. What this means is like Darrick 
Burch said,  you can assign each qfe# a differnet IP, i.e:

qfe0: 192.168.0.1
qfe1: 192.168.1.1
qfe2: 192.168.2.1
qfe3: 192.168.3.1

then assign each item attached to those cards an ip in that subnet, if 
you are going to only have that one item, plus the qfe in the subnet, 
you could get by with a subnet mask of 255.255.255.248. Then assign each 
item an ip address of 192.168.0.2,192.168.1.2,192.168.2.2,192.168.3.2, 
and make it's default route the qfe address (i.e. 192.168.0.1,etc).. 
what this will do is make you have 4 networks and the solaris machine 
will do the routing between them. I had originally thought about IPMP 
but that would not work well since you are trying to make a switch. 
Basically unless you want to go spend the $25 for a hub or switch, you 
are going to have to have a different network for each device attached 
to the ultra1. (Also remember that you need to use cross over cables for 
all the connections.)

jason