In the S50layer3 script separate VLANs are set up for each port. The VLANs, are labeled as zhp0..zhpn. Each VLAN is associated with an individual zre interface. There is always a one to one connection between VLANs and zhp interfaces. Remember, zre and zhp interfaces can begin with a zero value but a VLAN cannot (that is, zhp0 has zre0 on vlan1, zhp1 has zre1 on vlan2). Each zhp interface is assigned a separate IP address in the example script.

The S50layer3 script executes the following commands:

Runs zconfig command to create 48 untagged VLANs (one for each switch port).

/usr/sbin/zconfig zhp0..47: vlan1..48=zre0+

/usr/sbin/zconfig zre0..47=untag1+

NOTE : Double periods (..) after vlan1 and untag1 are used to indicate a range of values. The plus (+) sign after zre1 is a wildcard character that means auto-incremented and causes each zhp interface to hold only one zre (that is, zhp0 has zre1 on vlan1, zhp1 has zre1 on vlan2).

Runs the Linux ifconfig(1M) command for each interface to assign default IP addresses (10.0.0.43-10.0.47.43), sets the netmask and brings up the interfaces.

ifconfig zhp0 10.0.00.42 netmask 255.255.255.0 up ifconfig zhp1 10.0.01.42 netmask 255.255.255.0 up ifconfig zhp2 10.0.02.42 netmask 255.255.255.0 up

.

.

.

ifconfig zhp21 10.0.45.42 netmask 255.255.255.0 up ifconfig zhp22 10.0.46.42 netmask 255.255.255.0 up ifconfig zhp23 10.0.47.42 netmask 255.255.255.0 up

Runs the OpenArchitect zl3d. The zl3d application monitors the Linux routing tables and updates the switch routing tables for each interface configured above.

/usr/sbin/zl3d zhp0..47

zl3d initially creates and adds each zhp interface (VLAN) to the switch routing tables. The zhp0..zhp47 is shorthand for the list of interfaces (zhp0, zhp1, …, zhp47) to monitor with zl3d.

To Modify the Layer 3 Script

Modify the example script you copied into the /etc/rcZ.d directory. Adjust and assign

Ethernet Switch Blade User's Guide

release 3.2.2j

page 53

Page 53
Image 53
Znyx Networks bh5700 manual Usr/sbin/zl3d zhp0..47