分页: 1 / 1

HP-UX - Add a VLAN using nwmgr

发表于 : 2013年 8月 3日 22:45 星期六
admin
1. Use nwmgr to create a VLAN interface.

代码: 全选

# nwmgr -a -S vlan [-c lanVPPA] -A vlanid=vlanid, ppa=PPA [,attr=value...] [--sc]
NOTE: Please refer to the nwmgr_vlan manpage for details on the attributes that may be set. Attributes not set will get the default values. The ppa can be a single interface, a failover group, or an aggregate.

For example, to add the VLAN tag 454 to the failover group lan900, use:

代码: 全选

# nwmgr -a -S vlan -A vlanid=454, ppa=900
VLAN interface lan5000 successfully configured.
lan5000 current values:
VPPA = 5000
Related PPA = 0
VLAN ID = 454
VLAN Name = UNNAMED
Priority = 0
Priority Override Level = CONF_PRI
ToS = 0
ToS Override Level = IP_HEADER
2. Use nwmgr to save the VLAN configuration so it will be persistent across reboots.

For example, to save all current VLAN settings:

代码: 全选

# nwmgr -s -A all --from cu --sa -S vlan
To save the specific interface:

代码: 全选

# nwmgr -s -c lan5000 -A all --from cu --sa
3. Edit the /etc/rc.config.d/netconf file to add the IP configuration for the VLAN interface.

For example:
INTERFACE_NAME[2]=”lan5000”
IP_ADDRESS[2]=”192.6.1.1”
SUBNET_MASK[2]=”255.255.224.0”
BROADCAST_ADDRESS[2]=””
INTERFACE_STATE[2]=””
DHCP_ENABLE[2]=”0”
NOTE: The index value must be different for each interface

4. Restart the network.

代码: 全选

# /sbin/init.d/net stop
# /sbin/init.d/vlan stop
# /sbin/init.d/hplm stop
# /sbin/init.d/hpapa stop
# /sbin/init.d/hplm start
# /sbin/init.d/hpapa start
# /sbin/init.d/vlan start
# /sbin/init.d/net start
NOTE: If you experience problems with the network, you should reboot the server. Restarting portions of the network may not correctly re-initialize other network subsystems.