VLAN HowTo

Introduction

This document outlines a couple of common VLAN use-cases and details how to set up VLANs. VLANs enables isolating groups of users and network devices in a shared LAN infrastructure.

The first use-case segments the LAN ports on a single switch into multiple VLANs.

   .---------------------.
   |                     |
   |    Switch/Router    |
   |                     |
   '--+-+-+-------+-+-+--'
      | | |       | | |
      | | |       | | |
      VLAN 1      VLAN 2

Figure 1: VLANs on single switch.

Th second use-case exemplifies how VLANs can span multiple switches by use of VLAN trunk lines.

   .---------------------.            .---------------------.
   |                     |            |                     |
   |    Switch/Router    |            |    Switch/Router    |
   |                     |            |                     |
   '--+-+-+----+-+-+---+-'            '-+---+-+-+----+-+-+--'
      | | |    | | |   |   VLAN Trunk   |   | | |    | | |
      | | |    | | |   '----------------'   | | |    | | |
      VLAN 1   VLAN 2                       VLAN 1   VLAN 2

Figure 2: VLANs spanning multiple switches.

Note

The guide below assumes that your device has a factory default configuration and that you can access the CLI via its console port.

Use-case 1: Single Switch

   .---------------------.
   |                     |
   |    Switch/Router    |
   |                     |
   | VLAN 1      VLAN 2  |
   '--+-+-+-------+-+-+--'
      | | |       | | |
      | | |       | | |

Figure 3: VLAN and port view.

We wish to segment the Ethernet ports on our switch into two VLANs; VLAN 1 and 2. In Figure 3, each VLAN is assigned three Ethernet ports.

             .---------------------.
             |                     |
             |     Switch/Router   |
             |                     |
             |  vlan1       vlan2  |
             '----+-----------+----'
               .1 |           | .1
                  |           |
   192.168.1.0/24 |           |
   ---+-----+-----+--+--      |
      |     |        |        | 192.168.2.0/24
                         --+--+-----+-----+----
                           |        |     |

Figure 4: Network interface view.

Adding a VLAN also creates a management interface for each VLAN; vlan1 and vlan2. Here we have assigned IP addresses 192.168.1.1/24 and 192.168.2.1/24, respectively. This means we can manage the device remotely using SSH, HTTP/HTTPS, SNMP, etc., via hosts on VLAN 1 and 2.

On switches with IP forwarding1, we can now also enable routing of traffic between VLAN 1 and 2.

Logging in to your switch

Log in using the admin and default password (admin).

Note

Remember to change the admin password before deploying to production!

example-41-5a-80 login: admin
Password: Password not echoed
.--.--.--.-----.-----.-------.-----.----.--------.-----.
|  |  |  |  -__|__ --|_     _|  -__|   _|        |  _  |
|________|_____|_____| |___| |_____|__| |__|__|__|_____|
                                       www.westermo.com 

\\/ Westermo WeOS v5.3.x master/5.2.0-rc1-964-gbdd6c89 -- Jul 24 11:58 CEST 2018
Type: 'help' for help with commands, 'exit' to logout or leave a context.

example-41-5a-80:/#>

Inspect the current VLAN and network interface status using the show vlan and show iface CLI commands. In factory default configuration, all Ethernet ports are assigned to VLAN 1 (untagged). The example below shows the CLI status assuming all Ethernet ports are disconnected; VLAN 1 and its associated interface (vlan1) will both have operational status DOWN.

example-41-5a-80:/#> show vlan
VID  NAME             OPER UNTAGGED/TAGGED
   1 vlan1            DOWN U:ALL
                           T:

example-41-5a-80:/#> show iface
INTERFACE NAME    OPER  ADDRESS/LENGTH      SOURCE      MAC/PTP ADDRESS
lo                UP    127.0.0.1/8         static      00:00:00:00:00:00
vlan1             DOWN  NONE                            00:07:7c:41:5a:81
example-41-5a-80:/#>

Create a Second VLAN

To configure a second VLAN, here VLAN 2, enter the Global Configuration context and list VLAN configuration overview.

example-41-5a-80:/#> configure
example-41-5a-80:/config/#> show vlan
VID  NAME             ADM. UNTAGGED/TAGGED
   1 vlan1            UP   U:ALL
                           T:

example-41-5a-80:/config/#>

Here all ports are assigned to VLAN 1 (untagged) and VLAN 1 is configured administratively UP, i.e. enabled.

We will now create a second VLAN (VLAN 2), and assign it a set of ports (eth15 to eth28). We assign all ports untagged, assuming they will all be access ports where hosts in VLAN 2 can connect.

example-41-5a-80:/config/#> vlan 2
Creating new VLAN vid:2 with name: vlan2
example-41-5a-80:/config/vlan-2/#> untagged eth15..eth28
Moving untagged port eth15 from vid 1 to vid 2.
Moving untagged port eth16 from vid 1 to vid 2.
Moving untagged port eth17 from vid 1 to vid 2.
Moving untagged port eth18 from vid 1 to vid 2.
Moving untagged port eth19 from vid 1 to vid 2.
Moving untagged port eth20 from vid 1 to vid 2.
Moving untagged port eth21 from vid 1 to vid 2.
Moving untagged port eth22 from vid 1 to vid 2.
Moving untagged port eth23 from vid 1 to vid 2.
Moving untagged port eth24 from vid 1 to vid 2.
Moving untagged port eth25 from vid 1 to vid 2.
Moving untagged port eth26 from vid 1 to vid 2.
Moving untagged port eth27 from vid 1 to vid 2.
Moving untagged port eth28 from vid 1 to vid 2.
example-41-5a-80:/config/vlan-2/#> show
 VLAN ID          : 2
 Status           : Enabled
 Name             : vlan2
 Channel          : 0
 Priority         : Disabled
 Untagged         : U:eth15..eth28
 Tagged           : T:
 Forbid           : F:
 IGMP             : Disabled
example-41-5a-80:/config/vlan-2/#> end
example-41-5a-80:/config/#> show vlan

VID  NAME             ADM. UNTAGGED/TAGGED
   1 vlan1            UP   U:eth1..eth14
                           T:

   2 vlan2            UP   U:eth15..eth28
                           T:

example-41-5a-80:/config/#> leave Configuration activated.
Remember "copy run start" to save to flash (NVRAM).
example-41-5a-80:/#> copy running-config startup-config 

That was it! To view the VLAN operational status, we can run the show vlan command again. As you can see, both VLAN 1 and 2 have the intended ports assigned, and both have operational status DOWN, implying that all ports on the respective VLANs have link down.

example-41-5a-80:/#> show vlan
VID  NAME             OPER UNTAGGED/TAGGED
   1 vlan1            DOWN U:eth1..eth14
                           T:

   2 vlan2            DOWN U:eth15..eth28
                           T:

example-41-5a-80:/#>

Configure IP Settings

We will now configure the intended IP addresses for network interface vlan1 (192.168.1.1/24) and vlan2 (192.168.2.1/24). First we inspect the existing interface status and configuration overview.

example-41-5a-80:/#> show iface
INTERFACE NAME    OPER  ADDRESS/LENGTH      SOURCE      MAC/PTP ADDRESS
lo                UP    127.0.0.1/8         static      00:00:00:00:00:00
vlan1             DOWN  NONE                            00:07:7c:41:5a:81
vlan2             DOWN  DISABLED                        00:07:7c:41:5a:8f
example-41-5a-80:/#> configure
example-41-5a-80:/config/#> show iface
INTERFACE NAME    ADM.  ADDRESS/LEN         DISTANCE  MTU    MAC ADDRESS
lo                UP    127.0.0.1/8               16  AUTO   AUTO
vlan1             UP    dhcp                       1  AUTO   AUTO
                        link-local
vlan2             UP    DISABLED                  16  AUTO   AUTO

example-41-5a-80:/config/#>

As you can see, there exist three network interfaces; lo, vlan1 and vlan2. lo is the loopback interface and is not discussed further here.

First we configure interface vlan1, which is the network interface associated with VLAN 1. In the factory default configuration, vlan1 is configured to (1) acquire an IP address via DHCP, and (2) also to setup a link-local address (range 169.255.0.0/16). These are good defaults, but in this example we remove both these methods and give vlan1 a static IP address of 192.168.1.1/24.

example-41-5a-80:/config/#> iface vlan1
example-41-5a-80:/config/iface-vlan1/#> show
Name          : vlan1
Admin Mode    : Up
MAC Address   : AUTO
IP Addresses  :
  Inet dhcp
    arping    : Enabled
    Client ID : Disabled
  Inet link-local
MTU           : AUTO (1500)
ICMP Redirect : Sending
Proxy ARP     : Disabled
ARP Notify    : Enabled
ARP Accept    : Enabled
Distance      : 1
example-41-5a-80:/config/iface-vlan1/#> inet static 192.168.1.1/24
example-41-5a-80:/config/iface-vlan1/inet-static-192.168.1.1/#> end
example-41-5a-80:/config/iface-vlan1/#> show
Name          : vlan1
Admin Mode    : Up
MAC Address   : AUTO
IP Addresses  :
  Inet dhcp
    arping    : Enabled
    Client ID : Disabled
  Inet link-local
  Inet static
    192.168.1.1/24
MTU           : AUTO (1500)
ICMP Redirect : Sending
Proxy ARP     : Disabled
ARP Notify    : Enabled
ARP Accept    : Enabled
Distance      : 1
example-41-5a-80:/config/iface-vlan1/#> no inet dhcp
example-41-5a-80:/config/iface-vlan1/#> no inet link-local 
example-41-5a-80:/config/iface-vlan1/#> show
Name          : vlan1
Admin Mode    : Up
MAC Address   : AUTO
IP Addresses  :
  Inet static
    192.168.1.1/24
MTU           : AUTO (1500)
ICMP Redirect : Sending
Proxy ARP     : Disabled
ARP Notify    : Enabled
ARP Accept    : Enabled
Distance      : 1
example-41-5a-80:/config/iface-vlan1/#> end
example-41-5a-80:/config/#> show iface
INTERFACE NAME    ADM.  ADDRESS/LEN         DISTANCE  MTU    MAC ADDRESS
lo                UP    127.0.0.1/8               16  AUTO   AUTO
vlan1             UP    192.168.1.1/24             1  AUTO   AUTO
vlan2             UP    DISABLED                  16  AUTO   AUTO

example-41-5a-80:/config/#>

Next, we configure interface vlan2, which is the newly created network interface associated with VLAN 2. New network interfaces have no IP setting by default. Here we assign it address 192.168.2.1/24.

example-41-5a-80:/config/#> iface vlan2
example-41-5a-80:/config/iface-vlan2/#> show
Name          : vlan2
Admin Mode    : Up
MAC Address   : AUTO
IP Addresses  :
  No addresses configured.
MTU           : AUTO (1500)
ICMP Redirect : Sending
Proxy ARP     : Disabled
ARP Notify    : Enabled
ARP Accept    : Enabled
Distance      : 16
example-41-5a-80:/config/iface-vlan2/#> inet static 192.168.2.1/24
example-41-5a-80:/config/iface-vlan2/inet-static-192.168.2.1/#> end
example-41-5a-80:/config/iface-vlan2/#> show 
Name          : vlan2
Admin Mode    : Up
MAC Address   : AUTO
IP Addresses  :
  Inet static
    192.168.2.1/24
MTU           : AUTO (1500)
ICMP Redirect : Sending
Proxy ARP     : Disabled
ARP Notify    : Enabled
ARP Accept    : Enabled
Distance      : 16
example-41-5a-80:/config/iface-vlan2/#> end
example-41-5a-80:/config/#> show iface
INTERFACE NAME    ADM.  ADDRESS/LEN         DISTANCE  MTU    MAC ADDRESS
lo                UP    127.0.0.1/8               16  AUTO   AUTO
vlan1             UP    192.168.1.1/24             1  AUTO   AUTO
vlan2             UP    192.168.2.1/24            16  AUTO   AUTO

example-41-5a-80:/config/#> leave
Configuration activated.  Remember "copy run start" to save to flash (NVRAM).
example-41-5a-80:/#> copy running-config startup-config 
example-41-5a-80:/#> show iface
INTERFACE NAME    OPER  ADDRESS/LENGTH      SOURCE      MAC/PTP ADDRESS
lo                UP    127.0.0.1/8         static      00:00:00:00:00:00
vlan1             DOWN  192.168.1.1/24      static      00:07:7c:41:5a:81
vlan2             DOWN  192.168.2.1/24      static      00:07:7c:41:5a:8f
example-41-5a-80:/#> 

Operational Status

In the examples we have show, the operational status of the VLANs and associated network interfaces has been stated as DOWN. The reason is that all ports in these VLANs have had link down, as all ports have been disconnected. The criteria for operational status for (VLAN) network interfaces, VLANs and Ethernet ports are as follows:

  • Network interfaces: A (VLAN) network interface is operationally UP if it is Enabled and if its associated VLAN is operationally UP (see below).
  • VLAN: A VLAN is operationally UP if it is Enabled and if at least one of its associated (Ethernet) ports are operationally UP (see below).
  • Ethernet Port: An Ethernet port is operationally UP if it is Enabled and if it has determined physical link UP.

Thus, before any Ethernet cable has been connected on the switch, the operational status of network interfaces, VLANs and ports will all be DOWN (see below).

example-41-5a-80:/#> show iface
INTERFACE NAME    OPER  ADDRESS/LENGTH      SOURCE      MAC/PTP ADDRESS
lo                UP    127.0.0.1/8         static      00:00:00:00:00:00
vlan1             DOWN  192.168.1.1/24      static      00:07:7c:41:5a:81
vlan2             DOWN  192.168.2.1/24      static      00:07:7c:41:5a:8f
example-41-5a-80:/#> show vlan
VID  NAME             OPER UNTAGGED/TAGGED
   1 vlan1            DOWN U:eth1..eth14
                           T:

   2 vlan2            DOWN U:eth15..eth28
                           T:

example-41-5a-80:/#> show port
PORT    LINK     TYPE       SPEED  STATE           VLAN
eth1    Down   No-SFP  ----------  No-Link         U:1
eth2    Down   No-SFP  ----------  No-Link         U:1
eth3    Down   No-SFP  ----------  No-Link         U:1
eth4    Down   No-SFP  ----------  No-Link         U:1
eth5    Down   No-SFP  ----------  No-Link         U:1
eth6    Down   No-SFP  ----------  No-Link         U:1
eth7    Down   1000-T  ----------  No-Link         U:1
eth8    Down   1000-T  ----------  No-Link         U:1
eth9    Down   1000-T  ----------  No-Link         U:1
eth10   Down   1000-T  ----------  No-Link         U:1
eth11   Down   No-SFP  ----------  No-Link         U:1
eth12   Down   No-SFP  ----------  No-Link         U:1
eth13   Down   No-SFP  ----------  No-Link         U:1
eth14   Down   No-SFP  ----------  No-Link         U:1
eth15   Down   1000-T  ----------  No-Link         U:2
eth16   Down   1000-T  ----------  No-Link         U:2
eth17   Down   1000-T  ----------  No-Link         U:2
eth18   Down   1000-T  ----------  No-Link         U:2
eth19   Down   No-SFP  ----------  No-Link         U:2
eth20   Down   No-SFP  ----------  No-Link         U:2
eth21   Down   No-SFP  ----------  No-Link         U:2
eth22   Down   No-SFP  ----------  No-Link         U:2
eth23   Down   1000-T  ----------  No-Link         U:2
eth24   Down   1000-T  ----------  No-Link         U:2
eth25   Down   1000-T  ----------  No-Link         U:2
eth26   Down   1000-T  ----------  No-Link         U:2
eth27   Down   No-SFP  ----------  No-Link         U:2
eth28   Down   No-SFP  ----------  No-Link         U:2

If we now connect hosts to one port on each VLAN (here ports eth7 and eth15), we will get port UP on these ports. This will in turn make VLANs 1 and 2 come up, as well as their associated network interfaces (vlan1 and vlan2).

example-41-5a-80:/#> show port
PORT    LINK     TYPE       SPEED  STATE           VLAN
eth1    Down   No-SFP  ----------  No-Link         U:1
eth2    Down   No-SFP  ----------  No-Link         U:1
eth3    Down   No-SFP  ----------  No-Link         U:1
eth4    Down   No-SFP  ----------  No-Link         U:1
eth5    Down   No-SFP  ----------  No-Link         U:1
eth6    Down   No-SFP  ----------  No-Link         U:1
eth7    Up     1000-T  1000M-Full  Forwarding      U:1
eth8    Down   1000-T  ----------  No-Link         U:1
eth9    Down   1000-T  ----------  No-Link         U:1
eth10   Down   1000-T  ----------  No-Link         U:1
eth11   Down   No-SFP  ----------  No-Link         U:1
eth12   Down   No-SFP  ----------  No-Link         U:1
eth13   Down   No-SFP  ----------  No-Link         U:1
eth14   Down   No-SFP  ----------  No-Link         U:1
eth15   Up     1000-T  1000M-Full  Forwarding      U:2
eth16   Down   1000-T  ----------  No-Link         U:2
eth17   Down   1000-T  ----------  No-Link         U:2
eth18   Down   1000-T  ----------  No-Link         U:2
eth19   Down   No-SFP  ----------  No-Link         U:2
eth20   Down   No-SFP  ----------  No-Link         U:2
eth21   Down   No-SFP  ----------  No-Link         U:2
eth22   Down   No-SFP  ----------  No-Link         U:2
eth23   Down   1000-T  ----------  No-Link         U:2
eth24   Down   1000-T  ----------  No-Link         U:2
eth25   Down   1000-T  ----------  No-Link         U:2
eth26   Down   1000-T  ----------  No-Link         U:2
eth27   Down   No-SFP  ----------  No-Link         U:2
eth28   Down   No-SFP  ----------  No-Link         U:2
example-41-5a-80:/#> show vlan 
VID  NAME             OPER UNTAGGED/TAGGED
   1 vlan1            UP   U:eth1..eth14
                           T:

   2 vlan2            UP   U:eth15..eth28
                           T:

example-41-5a-80:/#> show iface
INTERFACE NAME    OPER  ADDRESS/LENGTH      SOURCE      MAC/PTP ADDRESS
lo                UP    127.0.0.1/8         static      00:00:00:00:00:00
vlan1             UP    192.168.1.1/24      static      00:07:7c:41:5a:81
vlan2             UP    192.168.2.1/24      static      00:07:7c:41:5a:8f
example-41-5a-80:/#> 

Use-case 2: Multiple Switches

This case shows how to extend VLANs over multiple switches. This implies that VLANs will share switches and also cables, here referred to as VLAN trunk cables or VLAN trunks.

   .---------------------.              .---------------------.
   |                     |              |                     |
   |    Switch/Router    |              |    Switch/Router    |
   |       (Alice)       |              |        (Bob)        |
   |                     |              |                     |
   '--+-+-+----+-+-+---+-'              '-+---+-+-+----+-+-+--'
      | | |    | | |   |    VLAN Trunk    |   | | |    | | |
      | | |    | | |   '------------------'   | | |    | | |
     VLAN 1    VLAN 2      VLAN 1 and 2       VLAN 1   VLAN 2

Figure 5: Extending VLANs over Multiple Switches

Figure 5 shows a case with two switches (Alice and Bob) and two VLANs (1 and 2), but the scenario can easily be extended to make use of more switches and VLANs. Additional information:

  • IP subnets: We assume that IP subnet 192.168.1.0/24 is used on VLAN 1, and 192.168.2.0/24 is used on VLAN 2, just as in Use Case 1 above.
  • Switch Alice will be assigned address 192.168.1.1/24 and 192.168.2.1/24 on her interfaces vlan1 and vlan2, just like the single switch in Use Case 1. These addresses are only used for remote management of Alice (SSH, HTTP/HTTPS, SNMP, Ping, etc.) and possibly also for IP forwarding if Alice should act as router.
  • Similarly, switch Bob will be assigned address 192.168.1.2/24 and 192.168.2.2/24 on his interfaces vlan1 and vlan2.

What is new here, as compared to Use Case 1, is that each switch must configure a VLAN trunk port. This port should carry packets both for VLAN 1 and VLAN 2, implying use of VLAN tagging.

In our examples we have assumed that port eth1 on Alice (and Bob) is configured as the VLAN trunk port. Except from that, the mapping of ports to VLANs is the same here as in Use Case 1.

In the following sub-sections we show the VLAN and network interface configuration of Alice and Bob. Only the necessary steps are shown; for more details, see the corresponding steps in Use Case 1.

Configure VLANs

The CLI commands below are used for configuring VLAN 1 and 2 on switch Alice. It is assumed that Alice has factory default configuration before configuration.

Note

Use the same commands to set up VLANs at Bob.

alice:/#> configure 
alice:/config/#> vlan 2
Creating new VLAN vid:2 with name: vlan2
alice:/config/vlan-2/#> untagged eth15..eth28
Moving untagged port eth15 from vid 1 to vid 2.
Moving untagged port eth16 from vid 1 to vid 2.
Moving untagged port eth17 from vid 1 to vid 2.
Moving untagged port eth18 from vid 1 to vid 2.
Moving untagged port eth19 from vid 1 to vid 2.
Moving untagged port eth20 from vid 1 to vid 2.
Moving untagged port eth21 from vid 1 to vid 2.
Moving untagged port eth22 from vid 1 to vid 2.
Moving untagged port eth23 from vid 1 to vid 2.
Moving untagged port eth24 from vid 1 to vid 2.
Moving untagged port eth25 from vid 1 to vid 2.
Moving untagged port eth26 from vid 1 to vid 2.
Moving untagged port eth27 from vid 1 to vid 2.
Moving untagged port eth28 from vid 1 to vid 2.
alice:/config/vlan-2/#> tagged eth1
alice:/config/vlan-2/#> end
alice:/config/#> vlan 1
alice:/config/vlan-1/#> tagged eth1
alice:/config/vlan-1/#> end
alice:/config/#> show vlan
VID  NAME             ADM. UNTAGGED/TAGGED
   1 vlan1            UP   U:eth2..eth14
                           T:eth1

   2 vlan2            UP   U:eth15..eth28
                           T:eth1

alice:/config/#> end
Configuration activated.  Remember "copy run start" to save to flash (NVRAM).
alice:/#> 

Configure IP Settings

alice:/#> configure
alice:/config/#> iface vlan1
alice:/config/iface-vlan1/#> inet static 192.168.1.1/24
alice:/config/iface-vlan1/inet-static-192.168.1.1/#> end
alice:/config/iface-vlan1/#> no inet dhcp
alice:/config/iface-vlan1/#> no inet link-local 
alice:/config/iface-vlan1/#> end
alice:/config/#> iface vlan2
alice:/config/iface-vlan2/#> inet static 192.168.2.1/24
alice:/config/iface-vlan2/inet-static-192.168.2.1/#> end
alice:/config/iface-vlan2/#> end
alice:/config/#> show iface

INTERFACE NAME    ADM.  ADDRESS/LEN         DISTANCE  MTU    MAC ADDRESS
lo                UP    127.0.0.1/8               16  AUTO   AUTO
vlan1             UP    192.168.1.1/24             1  AUTO   AUTO
vlan2             UP    192.168.2.1/24            16  AUTO   AUTO

alice:/config/#> end
Configuration activated.  Remember "copy run start" to save to flash (NVRAM).
alice:/#> 

Set up Bob in a similar manner, only with different management addresses.

bob:/#> configure
bob:/config/#> iface vlan1
bob:/config/iface-vlan1/#> inet static 192.168.1.2/24
bob:/config/iface-vlan1/inet-static-192.168.1.2/#> end
bob:/config/iface-vlan1/#> no inet dhcp
bob:/config/iface-vlan1/#> no inet link-local 
bob:/config/iface-vlan1/#> end
bob:/config/#> iface vlan2
bob:/config/iface-vlan2/#> inet static 192.168.2.2/24
bob:/config/iface-vlan2/inet-static-192.168.2.2/#> end
bob:/config/iface-vlan2/#> end
bob:/config/#> show iface

INTERFACE NAME    ADM.  ADDRESS/LEN         DISTANCE  MTU    MAC ADDRESS
lo                UP    127.0.0.1/8               16  AUTO   AUTO
vlan1             UP    192.168.1.2/24             1  AUTO   AUTO
vlan2             UP    192.168.2.2/24            16  AUTO   AUTO

bob:/config/#> end
Configuration activated.  Remember "copy run start" to save to flash (NVRAM).
bob:/#> 

Verifying Connectivity

If you now connect port eth1 on Alice to port eth1 on Bob, hosts connected to VLAN 1 ports at Alice will be able to communicate with hosts connected to VLAN 1 ports on Bob (and the same goes for hosts on VLAN 2 ports).

As a basic test you can check that the VLAN trunk ports (eth1) on Alice and Bob come up, and that Alice can ping Bob over both VLANs.

Note

In this case, port eth1 is an SFP port at both Alice and Bob, where we have used Gbit Fibre SFPs at both ends. The SFPs must be inserted before booting the switches to be detected.

alice:/#> show port
PORT    LINK     TYPE       SPEED  STATE           VLAN
eth1    Up    1000-SX  1000M-Full  Forwarding      T:1,2
eth2    Down   No-SFP  ----------  No-Link         U:1
eth3    Down   No-SFP  ----------  No-Link         U:1
eth4    Down   No-SFP  ----------  No-Link         U:1
eth5    Down   No-SFP  ----------  No-Link         U:1
eth6    Down   No-SFP  ----------  No-Link         U:1
eth7    Down   1000-T  ----------  No-Link         U:1
eth8    Down   1000-T  ----------  No-Link         U:1
eth9    Down   1000-T  ----------  No-Link         U:1
eth10   Down   1000-T  ----------  No-Link         U:1
eth11   Down   No-SFP  ----------  No-Link         U:1
eth12   Down   No-SFP  ----------  No-Link         U:1
eth13   Down   No-SFP  ----------  No-Link         U:1
eth14   Down   No-SFP  ----------  No-Link         U:1
eth15   Down   1000-T  ----------  No-Link         U:2
eth16   Down   1000-T  ----------  No-Link         U:2
eth17   Down   1000-T  ----------  No-Link         U:2
eth18   Down   1000-T  ----------  No-Link         U:2
eth19   Down   No-SFP  ----------  No-Link         U:2
eth20   Down   No-SFP  ----------  No-Link         U:2
eth21   Down   No-SFP  ----------  No-Link         U:2
eth22   Down   No-SFP  ----------  No-Link         U:2
eth23   Down   1000-T  ----------  No-Link         U:2
eth24   Down   1000-T  ----------  No-Link         U:2
eth25   Down   1000-T  ----------  No-Link         U:2
eth26   Down   1000-T  ----------  No-Link         U:2
eth27   Down   No-SFP  ----------  No-Link         U:2
eth28   Down   No-SFP  ----------  No-Link         U:2
alice:/#> ping count 3 192.168.1.2
Press Ctrl-C to abort PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.715 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.481 ms
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.466 ms

--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.466/0.554/0.715 ms
alice:/#> ping count 3 192.168.2.2
Press Ctrl-C to abort PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: seq=0 ttl=64 time=1.142 ms
64 bytes from 192.168.2.2: seq=1 ttl=64 time=0.480 ms
64 bytes from 192.168.2.2: seq=2 ttl=64 time=0.460 ms

--- 192.168.2.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.460/0.694/1.142 ms
alice:/#>

  1. Assuming the switch has software level Extended