Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > L

lanadmin_vlan(1M)

TO BE OBSOLETED
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

lanadmin_vlan: lanadmin — virtual LANs (VLANs)

SYNOPSIS

/usr/sbin/lanadmin -V create vlanid vlanid [pri priority] [tos ToS_value] [vppa vppa] [name name] [tos_override level] [pri_override level] ppa

/usr/sbin/lanadmin -V modify [vlanid vlanid] [pri priority] [tos ToS_value] [name name] [tos_override level] [pri_override level] vppa

/usr/sbin/lanadmin -V delete vppa

/usr/sbin/lanadmin -V scan

/usr/sbin/lanadmin -V info vppa

/usr/sbin/lanadmin -V basevppa

/usr/sbin/lanadmin -V help

/usr/sbin/lanadmin -p ppa

Remarks

The lanadmin, lanscan, and linkloop commands are deprecated. See WARNINGS section for more information.

DESCRIPTION

VLANs are logical, or "virtual," network segments that can span multiple physical network segments. A primary benefit of VLANs is that they can isolate broadcast and multicast traffic by determining which destinations should receive that traffic, thereby making better use of switch and end-station resources.

The commands described here are for interactive administration of HP-UX virtual LANs (VLANs). However, it is recommended that you use nwmgr (see nwmgr_vlan(1M) and nwmgr(1M)) for VLAN administration on 11i V3 release and forward. Changes made to VLANs interactively with the lanadmin -V command are not preserved between system reboots. See WARNINGS.

VLAN lanadmin Command Summary

lanadmin -V create

Create a VLAN.

lanadmin -V modify

Modify a VLAN.

lanadmin -V delete vppa

Delete a VLAN.

lanadmin -V scan

Identify all VLANs and their properties.

lanadmin -V info vppa

Identify a single VLAN and its properties. The command returns 0 on successful completion and -1 on failure.

lanadmin -V basevppa

Find the minimum acceptable value for a virtual PPA (VPPA).

lanadmin -V help

Display the usage message for the lanadmin -V options.

lanadmin -p ppa

Display the usage information for the interface corresponding to ppa. Test if upper-layer protocols or applications are running. Use it before deleting VLANs. See lanadmin(1M) for details.

VLAN lanadmin Options

The lanadmin command has the following VLAN options:

name name

Specify an optional name for the VLAN. The default is the null string (""). lanadmin displays this as UNNAMED. name is a string of 0 to 31 alphanumeric characters.

pri priority

Specify the 802.1p priority in the tag in the frame header. Switches use the 802.1p priority. The valid range for priority is 0-7. The default is 0.

pri_override level

Priority override provides a mechanism to convert IP level precedence (IPV4 ToS octet) to link level 802.1p user priority. Priority override applies to outbound frames only. The priority override level strings for outbound traffic are:

CONF_PRI

Your specified priority value will be used.

IP_HEADER

The IP header ToS will be converted to 802.1p priority.

CONF_TOS

Your specified ToS value will be converted to 802.1 priority.

tos ToS_value

Specify ToS, the IP precedence in the IP header. Switches ignore ToS. Routers may use it. The valid range is 0-255. The default is 0.

tos_override level

Provide a mechanism to override the IP level precedence in the header of an inbound IP packet. ToS override level strings for inbound traffic are:

IP_HEADER

The ToS value in the IP header will be used.

ETHER_HEADER

The Ether header 802.1p priority will be converted to the ToS value.

CONF_TOS

Your specified ToS value will be used.

CONF_PRI

Your specified 802.1 priority value will be converted to ToS.

vlanid vlanid

Uniquely identify the VLAN to which a frame belongs. The valid range for vlanid is 0-4094.

vppa vppa

Specify the virtual PPA (VPPA) number associated with a VLAN. See vppa in VLAN lanadmin Operands.

VLAN lanadmin Operands

The lanadmin command has the following VLAN operands:

ppa

The physical point of attachment (PPA) number of the LAN interface. See lanadmin(1M) for details.

vppa

The virtual PPA (VPPA) number associated with a VLAN. It is virtual because it does not have a unique hardware instance.

You can display current values of ppa and vppa with the lanscan command (see lanscan Options and lanscan(1M)).

lanscan Options

The lanscan command shows the number of interfaces available on the system such as lan0, or lan1. See lanscan(1M). The following lanscan options can be used to display VLAN information.

lanscan -a

Display the MAC addresses of all the interfaces on the system.

lanscan -i

Display the names of all the interfaces on the system.

lanscan -m

Display the MAC type for all the interfaces.

lanscan -n

Display the Network Management IDs for all the interfaces.

lanscan -p

Display the PPA or VPPA number for all the interfaces.

lanscan -v

Display the output in verbose mode with detailed information.

EXAMPLES

The examples explain the usage of the lanadmin and lanscan commands and how they can be used to work with virtual LANs (VLANs).

Creating a VLAN

When VLANs are configured on a LAN card, the lanscan output under Hardware Path shows VLANx, where x is a unique VLAN interface number.

To create VLANs, you use nwmgr, ncweb or the lanadmin -V create command. There are multiple required and optional arguments for creating VLANs. If you don't specify any or all of the optional arguments, the default values described in VLAN lanadmin Options are used.

You can either specify a virtual PPA (VPPA) number greater than the minimum allowed VPPA number (5000) or allow the system to assign a VPPA number.

Suppose you want to create a VLAN with a VPPA of 6050 and a vlanid of 4 on PPA 0, you can use the following command:

# lanadmin -V create vlanid 4 vppa 6050 0

Upon successful creation, the following message is displayed:

Successfully configured. lan6050: vlanid 4 name UNNAMED pri 0 tos 0 tos_override IP_HEADER pri_override CONF_PRI ppa 0

The message shows that you have successfully created VLAN 6050 on the system. If you do not assign a name to a VLAN, a standard string, UNNAMED, is displayed as the name.

To create a VLAN on PPA 1, while letting the system generate the VPPA, you would use the following command to create a VLAN with vlanid 75, priority 3, ToS 100, name honey, ToS override value CONF_TOS and priority override value IP_HEADER:

# lanadmin -V create vlanid 75 pri 3 tos 100 name honey tos_override CONF_TOS pri_override IP_HEADER 1

Upon successful creation, the following message is displayed:

Successfully configured. lan5000: vlanid 75 name honey pri 3 tos 100 tos_override CONF_TOS pri_override IP_HEADER ppa 1

The system has allotted the VPPA 5000 and successfully created a VLAN with the specified properties.

Let us create one more VLAN on interface 1 with different properties.

# lanadmin -V create vlanid 76 pri 2 tos 200 name bee tos_override ETHER_HEADER pri_override IP_HEADER 1

Upon successful creation, the following message is displayed:

Successfully configured. lan5001: vlanid 76 name bee pri 2 tos 200 tos_override ETHER_HEADER pri_override IP_HEADER ppa 1

Let us take a look at the lanscan, lanadmin -V scan, and lanscan -v snapshots of the system after successful creation of three VLANs: VLAN 6050 on PPA 0 and VLAN 5000 and 5001 on PPA 1.

# lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/4/0/0 0x001083FF9951 0 UP lan0 snap0 1 ETHER Yes 119 VLAN6050 0x001083FF9951 6050 UP lan6050 snap6050 14 ETHER Yes 119 1/4/0/0 0x006023456789 1 DOWN lan1 snap1 2 ETHER Yes 119 VLAN5000 0x006023456789 5000 DOWN lan5000 snap5000 15 ETHER Yes 119 VLAN5001 0x006023456789 5001 DOWN lan5001 snap5001 16 ETHER Yes 119

There are a few things to be noted from the above output:

  • VPPAs have VLANx as their Hardware Path where x is a unique number.

  • The VPPA has the same MAC address as the PPA on which it is created.

  • The VPPA has the same Hardware State as the PPA on which it is created.

  • The VPPA has a PPA associated with it.

  • In the lanscan output, VPPA information is shown immediately after the PPA on which it was created. For example, information about VLAN6050 is displayed after lan0 information. Information about VLAN5000 and VLAN5001 is displayed after lan1 information because VLAN5000 and VLAN5001 are associated with lan1.

The other properties which are not visible from the snapshot above but are common between the VPPA and the PPA on which it is created are Station Address, Speed and MTU setting. You can verify this by using the lanadmin commands to find out Station Address, Speed and MTU, respectively:

  • lanadmin -a vppa

  • lanadmin -s vppa

    lanadmin -m vppa

Now let's explore the outputs of lanadmin -V scan and lanscan -p.

# lanadmin -V scan VLAN Physical VLAN Pri Pri ToS ToS NAME Interface Interface ID Override Override Name Level Level lan6050 lan0 4 0 CONF_PRI 0 IP_HEADER UNNAMED lan5000 lan1 75 3 IP_HEADER 100 CONF_TOS honey lan5001 lan1 76 2 IP_HEADER 200 ETHER_HEADER bee # lanscan -p 0 6050 1 5000 5001

You can alternatively use the lanadmin -V info vppa command to get information about a specific VPPA. Let's say you are interested in VPPA 6050. The following command will get information regarding VPPA 6050.

# lanadmin -V info 6050 VLAN Physical VLAN Pri Pri ToS ToS NAME Interface Interface ID Override Override Name Level Level lan6050 lan0 4 0 CONF_PRI 0 IP_HEADER UNNAMED

Note that information related only to VPPA 6050 is displayed as a result of the info command.

Let's examine the lanscan -v output now. For the sake of simplicity, the output from only lan0, lan1, and newly created VPPAs has been displayed.

# lanscan -v ----------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/4/0/0 0x001083FF9951 0 UP lan0 snap0 1 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x001083FF9951 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information gelan ----------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# VLAN6050 0x001083FF9951 6050 UP lan6050 snap6050 14 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x001083FF9951 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information vlan Vlan ID Phy-PPA Priority ToS Priority-Override ToS-Override Name 4 0 0 0 CONF_PRI IP_HEADER UNNAMED ----------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 1/4/0/0 0x006023456789 1 DOWN lan1 snap1 1 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x006023456789 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information btlan ----------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# VLAN5000 0x006023456789 5000 DOWN lan5000 snap5000 15 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x006023456789 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information vlan Vlan ID Phy-PPA Priority ToS Priority-Override ToS-Override Name 75 1 3 64 CONF_PRI IP_HEADER honey ----------------------------------------------------------------------- Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# VLAN5001 0x006023456789 5001 DOWN lan5001 snap5001 15 ETHER Yes 119 Extended Station LLC Encapsulation Address Methods 0x006023456789 IEEE HPEXTIEEE SNAP ETHER NOVELL Driver Specific Information vlan Vlan ID Phy-PPA Priority ToS Priority-Override ToS-Override Name 76 1 2 200 IP_HEADER ETHER_HEADER bee -----------------------------------------------------------------------

You can configure an IP address on the VPPAs. Let's consider configuring VPPA 6050 with IP address 192.1.1.1. This can be done using the ifconfig command as it would be done for any PPA.

# ifconfig lan6050 192.1.1.1 netmask 0XFFFFF800 up

The snapshots for lanscan -v, lanscan, lanadmin -V info, and lanadmin -V scan remain the same.

Modifying a VLAN

You can modify a vlan while it is supporting traffic. If you modify a vlanid, traffic will be sent and received on the new vlanid but not on the former vlanid.

Let's try to modify the properties of the VPPAs already created, and also study the corresponding changes in various lanadmin and lanscan command outputs. Let's modify the vlanid, priority, and name of VPPA 6050. The following command will change the vlanid from 4 to 100, priority value from 0 to 7, and the name from the default name to candy for VPPA 6050.

# lanadmin -V modify vlanid 100 pri 7 name candy 6050 Successfully modified lan6050. Old value: vlanid 4 pri 0 name UNNAMED New value: vlanid 100 pri 7 name candy

Let's modify the properties tos, tos_override and pri_override for VPPA 5000. The following command can be used to change tos to 64 from 100, tos_override to IP_HEADER from CONF_TOS, and pri_override to CONF_PRI from IP_HEADER.

# lanadmin -V modify tos 64 tos_override IP_HEADER pri_override CONF_PRI 5000 Successfully modified lan5000. Old value: tos 100 tos_override CONF_TOS pri_override IP_HEADER New value: tos 64 tos_override IP_HEADER pri_override CONF_PRI

Let's take a look at the lanadmin -V scan, lanadmin -V info, and lanscan -v snapshot of the system after successful modification of two VPPAs: VPPA 6050 on PPA 0 and VPPA 5000 on PPA 1. The lanscan snapshot will remain the same as before the modification; however you can see differences in the lanscan -v and lanadmin -V scan snapshots before and after modification.

# lanadmin -V scan VLAN Physical VLAN Pri Pri ToS ToS NAME Interface Interface ID Override Override Name Level Level lan6050 lan0 100 7 CONF_PRI 0 IP_HEADER candy lan5000 lan1 75 3 CONF_PRI 64 IP_HEADER honey lan5001 lan1 76 2 IP_HEADER 64 ETHER_HEADER bee

You can alternatively use the lanadmin -V info vppa command to get information about a specific VPPA. Let's say you are interested in VPPA 6050. The following command will get information regarding VPPA 6050.

# lanadmin -V info 6050 VLAN Physical VLAN Pri Pri ToS ToS NAME Interface Interface ID Override Override Name Level Level lan6050 lan0 100 7 CONF_PRI 0 IP_HEADER candy

Deleting a VLAN

Before deleting a VLAN, ensure that there are no applications or upper layer protocols active on the VLAN by running:

# lanadmin -p vppa

This command displays the applications and commands that are presently using the interface. For example, if the only thing done to lan5000 was to configure an IP address, the lanadmin -p command output would look like:

# lanadmin -p 5000 Interface 5000 is being used by 'ifconfig' Process ID of application 'ifconfig' is 8631 Interface 5000 is being used by 'ifconfig' Process ID of application 'ifconfig' is 8631

Since the ifconfig command was used to configure an IP address, the command is displayed. There are two entries because when an IPv4 address is configured using ifconfig, it configures both IP and ARP on the interface.

To remove the IP and ARP streams, do:

# ifconfig lan5000 unplumb

The lanadmin -p 5000 output will not show any entries now, which means the interface can be deleted. To delete this VLAN, use the delete option as follows:

# lanadmin -V delete 5000

The lanadmin -p ppa command always displays the commands that use or are configured on the interface. Lets take another example, to delete the interface lan5001

# lanadmin -p 5001 Interface 5000 is being used by 'ifconfig' Process ID of application 'ifconfig' is 8631 Interface 5000 is being used by 'ifconfig' Process ID of application 'ifconfig' is 8631 Interface 5000 is being used by 'mib2agt' Process ID of application 'mib2agt' is 9010 Interface 5000 is being used by 'scopeux' Process ID of application 'scopeux' is 9020

In addition to IP and ARP being configured on the interface, two applications, mib2agt and scopeux, are using the interface. These applications are started during system bootup via the startup scripts /sbin/rc2.d/S565SnmpMib2 and /sbin/rc2.d/S810mwa, respectively. To stop these utilities, run the stop sequence of the scripts. To delete the lan5001 interface, type the following commands:

# ifconfig lan5001 unplumb # /sbin/rc2.d/S565SnmpMib2 stop # /sbin/rc2.d/S810mwa stop

Now, lanadmin -p 5001 will not display anything, and the interface can be deleted.

Once the interface is deleted, you can restart the scripts by issuing the start sequence:

# /sbin/rc2.d/S565SnmpMib2 start # /sbin/rc2.d/S810mwa start

Note: The start and stop sequence of the startup scripts will affect all the interfaces on the system, and they must be restarted once the delete operation is completed.

The above examples are not restrictive. The applications that use the interfaces depend on your environment.

WARNINGS

Interactive changes made to VLANs with the lanadmin -V command will not be preserved between system reboots. You must use the nwmgr command or ncweb interface (see nwmgr_vlan(1M) and ncweb(1M)). You can also manually edit the /etc/rc.config.d/vlanconf configuration file to preserve changes across reboots.

Obsolescence

lanadmin, lanscan, and linkloop commands are deprecated.These commands will be removed in a future HP-UX release. HP recommends the use of replacement command nwmgr(1M) to perform all network interface related tasks.

AUTHOR

lanadmin was developed by HP.

SEE ALSO

ifconfig(1M), lanadmin(1M), lanscan(1M), nwmgr(1M), nwmgr_vlan(1M), vlan(7).

HP-UX VLAN Administrator's Guide available on the HP Technical Documentation web site at http://docs.hp.com

IEEE 802.1d, IEEE 802.1Q f1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.