|  | 69 | The "multiport" config routine has been made into a (messy) script: | 
          
            |  | 70 | {{{ | 
          
            |  | 71 | #!/bin/sh | 
          
            |  | 72 |  | 
          
            |  | 73 | echo IP addr '('x.x.x.x/mask')' | 
          
            |  | 74 | read IP_ADDR | 
          
            |  | 75 | echo Serial '('e.g. /dev/ttyS0')' | 
          
            |  | 76 | read SERIAL | 
          
            |  | 77 |  | 
          
            |  | 78 | echo "configure" >> $SERIAL | 
          
            |  | 79 | sleep 1 | 
          
            |  | 80 | echo "set interface management-ethernet eth0 address $IP_ADDR" >> $SERIAL | 
          
            |  | 81 | sleep 1 | 
          
            |  | 82 | echo "set vlans vlan-id 8" >> $SERIAL | 
          
            |  | 83 | echo "set system services telnet connection-limit 7" >> $SERIAL | 
          
            |  | 84 |  | 
          
            |  | 85 | for i in `seq 1 48` | 
          
            |  | 86 | do | 
          
            |  | 87 | echo "set interface gigabit-ethernet ge-1/1/$i family ethernet-switching native-vlan-id 8" | 
          
            |  | 88 | sleep 1 | 
          
            |  | 89 | done >> $SERIAL | 
          
            |  | 90 |  | 
          
            |  | 91 | echo "set interface gigabit-ethernet ge-1/1/47 family ethernet-switching port-mode trunk" >> $SERIAL | 
          
            |  | 92 | echo "set interface gigabit-ethernet ge-1/1/47 family ethernet-switching native-vlan-id 1" >> $SERIAL | 
          
            |  | 93 | echo "set interface gigabit-ethernet ge-1/1/47 family ethernet-switching vlan members 8" >> $SERIAL | 
          
            |  | 94 | echo "commit" >> $SERIAL | 
          
            |  | 95 | sleep 8 | 
          
            |  | 96 | echo "save running-to-startup" >> $SERIAL | 
          
            |  | 97 | echo "exit" >> $SERIAL | 
          
            |  | 98 | echo "configs complete..." | 
          
            |  | 99 | }}} | 
          
            |  | 100 | To use it, run as root, specifying the IP address you want the switch to be set to and the serial interface to the switch. |