Figure 7.2: Layer 2 Switch
During the initial power up, a startup script called
/etc/rcZ.d/S50layer2
is executed at boot
time creating a single untagged VLAN (IP interface labeled as
zhp0
) which includes all Ethernet
and gigabit ports as one Layer2 switch. The interface to the host is then assigned the IP address of
10.0.0.42 to allow access to the switch. The
S50layer2
script does the following:
•
Uses
zconfig
to create and configure a single, untagged VLAN that contains all 24 switch
ports.
/usr/sbin/zconfig zhp0: vlan1=zre0..23
/usr/sbin/zconfig zre0..23=untag1
•
Uses
ifconfig(1M)
to assign the IP address 10.0.0.42 to the interface.
/usr/sbin/ifconfig zhp0 10.0.0.42 up
To create another VLAN that only contained the two ports, first use
zconfig
from the
command to build the VLAN and create a network interface for the host.
zconfig zhp1: vlan2=zre20,zre21
Then, bring up the interface with
ifconfig(1M)
:
ifconfig zhp1 193.08.1.1 up
Note that ports
zre20
and
zre21
are members of both vlan1 and vlan2, and that they are
tagged for vlan2. A port cannot be untagged for more than one VLAN. You can view the
configured VLANs with
zconfig
.
zconfig -a
Ethernet Switch Blade User's Guide
release 3.2.2j
page 95
Linux IP
zhp0
VLAN 1
24 10/100/1000 Ports
10.0.0.42
zre0
zre1
zre2
zre22
zre20
zre23
. . .
. . .
Downloaded from
www.Manualslib.com
manuals search engine