• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris 11 : How to configure VLAN tagging on a network interface

by admin

A virtual local area network (VLAN) are basically used to isolate groups of users from each other for ease of network administration and security. In Solaris 11, VLANs are created using dladm and the IP address is assigned using ipadm. The post describes configuration of VLAN tagging on network interface with an example.

Configuration

To list out the physical network interfaces on the system use:

# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         1000   full      e1000g0

Verify the VLANs configured on the system with :

# dladm show-vlan

Now create VLAN tag 789 on interface net0 :

# dladm create-vlan -l net0 -v 789

Verify

Check the configured VLAN

# dladm show-vlan
LINK                VID      OVER                FLAGS
net789000           789      net0                -----

Configuring IP address

We can now configure an IP address on this new VLAN we just created. The newly created will VLAN as a new interface will show up in the command “dladm show-link”.

# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         1000   full      e1000g0
# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
net789000           vlan      1500   up       net0

Configure an IP adresss using this new interface net789000.

# ipadm create-ip net789000
# ipadm create-addr -T static -a 192.168.1.45/24 net789000/v4
# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           192.168.1.45/24
net789000/v4      static   ok           192.168.1.45/24
lo0/v6            static   ok           ::1/128
net0/v6           addrconf ok           fe80::20c:29ff:fe64:7351/10

Another method to create a vlan tagged interface is to create a vnic and specifiy the vlan id :-

# dladm create-vnic -l net0 -v 768 vnic768
# dladm show-vnic
LINK                OVER              SPEED  MACADDRESS        MACADDRTYPE VIDS
vnic768             net0              1000   2:8:20:f:b8:6b    random      768
NOTE : dladm show-vlan will only show you the vlan objects you create with dladm create-vlan and since the object above is a vnic object that has a vlan tag id you will need to use dladm show-vnic to see the vnic object. Notice that a vnic object as has a valid vid also.

Filed Under: Solaris, Solaris 11

Some more articles you might also be interested in …

  1. Solaris Zones : How To Change The Number Of CPUs Using Dynamic Resource Pools
  2. How to configure Solaris 10 Link Based IPMP
  3. The ultimate Solaris jumpstart troubleshooting guide
  4. Solaris 11 : How to verify whether I’m logged into a Kernel Zone?
  5. Oracle VM Server for SPARC (Ldoms) : How to Change Primary/Control Domain’s UUID
  6. A beginners guide to Service Management Facility (SMF) in Solaris
  7. Resolving File System Full Situations in Solaris
  8. How to configure Shared Memory Parameters in Solaris 10,11
  9. Creating network interface alias for network boot or jumpstart installation at OBP
  10. Solaris : How to determine number of free/used inodes in a file system

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright