Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Connecting Access Switches to a Distribution Switch

Note: This example uses Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that does not support ELS, see Example: Connecting an Access Switch to a Distribution Switch. For ELS details, see Getting Started with Enhanced Layer 2 Software.

In large local area networks (LANs), you commonly need to aggregate traffic from a number of access switches into a distribution switch.

This example describes how to connect access switches to a distribution switch:

Requirements

This example uses the following hardware and software components:

  • Three EX Series access switches.
  • One EX Series distribution switch.

    Note: In an access switch-distribution switch topology, you can connect EX Series switches that run a version of Junos OS that supports ELS with EX Series switches that do not run a version of Junos OS that supports ELS. However, this example uses switches running ELS only to show how to configure this topology using the ELS CLI.

  • Junos OS Release 12.3R2 or later that supports ELS for EX Series switches.

Before you connect an access switch to a distribution switch, be sure you have:

Overview and Topology

In a large office that is spread across several floors or buildings, or in a data center, you commonly aggregate traffic from a number of access switches into a distribution switch. This configuration example shows a simple topology to illustrate how to connect three access switches to a distribution switch.

In the topology, the LAN is segmented into two VLANs, one for the sales department and the second for the support team. One 1-Gigabit Ethernet port on one of the access switch's uplink modules connects to the distribution switch, to one 1-Gigabit Ethernet port on the distribution switch.

Figure 1 shows an EX9200 distribution switch that is connected to three EX4300 access switches.

Figure 1: Sample Access Switch-Distribution Switch Topology

Sample Access Switch-Distribution Switch Topology

Table 1 describes the components of the example topology. The example shows how to configure one of the three access switches. The other access switches could be configured in the same manner.

Table 1: Components of the Topology for Connecting an Access Switch to a Distribution Switch

PropertySettings

Access switch hardware

Three EX4300 switches, each with an uplink module with 1-Gigabit Ethernet ports..

Distribution switch hardware

One EX9208 with up to three EX9200-40T line cards installed, which at full duplex, can provide up to 240 1-Gigabit ports.

VLAN names and tag IDs

sales, tag 100
support, tag 200

VLAN subnets

sales: 192.0.2.0/25 (addresses 192.0.2.1 through 192.0.2.126)
support: 192.0.2.128/25 (addresses 192.0.2.129 through 192.0.2.254)

Trunk port interfaces

On the access switch: ge-0/2/0
On the distribution switch: ge-0/0/0

Access port interfaces in VLAN sales (on access switch)

Avaya IP telephones: ge-0/0/3 through ge-0/0/19
Wireless access points: ge-0/0/0 and ge-0/0/1
Printers: ge-0/0/22 and ge-0/0/23
File servers: ge-0/0/20 and ge-0/0/21

Access port interfaces in VLAN support (on access switch)

Avaya IP telephones: ge-0/0/25 through ge-0/0/43
Wireless access points: ge-0/0/24
Printers: ge-0/0/44 and ge-0/0/45
File servers: ge-0/0/46 and ge-0/0/47

  

Configuring the Access Switch

To configure the access switch:

CLI Quick Configuration

To quickly configure the access switch, copy the following commands and paste them into the switch terminal window:

[edit]
set interfaces ge-0/0/0 unit 0 description "Sales wireless access point port"
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members sales
set interfaces ge-0/0/3 unit 0 description "Sales phone port"
set interfaces ge-0/0/3 unit 0 family ethernet-switching vlan members sales
set interfaces ge-0/0/22 unit 0 description "Sales printer port"
set interfaces ge-0/0/22 unit 0 family ethernet-switching vlan members sales
set interfaces ge-0/0/20 unit 0 description "Sales file server port"
set interfaces ge-0/0/20 unit 0 family ethernet-switching vlan members sales
set interfaces ge-0/0/24 unit 0 description "Support wireless access point port"
set interfaces ge-0/0/24 unit 0 family ethernet-switching vlan members support
set interfaces ge-0/0/26 unit 0 description "Support phone port"
set interfaces ge-0/0/26 unit 0 family ethernet-switching vlan members support
set interfaces ge-0/0/44 unit 0 description "Support printer port"
set interfaces ge-0/0/44 unit 0 family ethernet-switching vlan members support
set interfaces ge-0/0/46 unit 0 description "Support file server port"
set interfaces ge-0/0/46 unit 0 family ethernet-switching vlan members support
set interfaces ge-0/2/0 unit 0 description "Uplink module port connection to distribution switch"
set interfaces ge-0/2/0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ge-0/2/0 native-vlan-id 1
set interfaces ge-0/2/0 unit 0 family ethernet-switching vlan members [sales support]
set interfaces ge-0/2/0 unit 0 family ethernet-switching vlan members 1
set interfaces irb unit 0 family inet address 192.0.2.1/25
set interfaces irb unit 1 family inet address 192.0.2.129/25
set vlans sales description “Sales VLAN”
set vlans sales l3-interface irb.0
set vlans sales vlan-id 100
set vlans support description “Support VLAN”
set vlans support vlan-id 200
set vlans support l3-interface irb.1

Step-by-Step Procedure

To configure the access switch:

  1. Configure the 1-Gigabit Ethernet interface on the uplink module to be the trunk port that connects to the distribution switch:
    [edit interfaces]
    user@access-switch# set ge-0/2/0 unit 0 description "Uplink module port connection to distribution switch"
    user@access-switch# set ge-0/2/0 unit 0 family ethernet-switching interface-mode trunk
  2. Specify the VLANs to be aggregated on the trunk port:
    [edit interfaces]
    user@access-switch# set ge-0/2/0 unit 0 family ethernet-switching vlan members [ sales support ]
  3. To handle untagged packets that are received on the trunk port, create a native VLAN by configuring a VLAN ID and specifying that the trunk port is a member of the native VLAN:
    [edit interfaces]
    user@access-switch# set ge-0/2/0 native-vlan-id 1
    user@access-switch# set ge-0/2/0 unit 0 family ethernet-switching vlan members 1
  4. Configure the sales VLAN:
    [edit vlans]
    user@access-switch# set sales description "Sales VLAN"
    user@access-switch# set sales vlan-id 100
    user@access-switch# set sales l3-interface irb.0
  5. Configure the support VLAN:
    [edit vlans]
    user@access-switch# set support description "Support VLAN"
    user@access-switch# set support vlan-id 200
    user@access-switch# set support l3-interface irb.1
  6. Create the subnet for the sales VLAN:
    [edit interfaces]
    user@access-switch# set irb unit 0 family inet address 192.0.2.1/25
  7. Create the subnet for the support VLAN:
    [edit interfaces]
    user@access-switch# set irb unit 1 family inet address 192.0.2.129/25
  8. Configure the interfaces in the sales VLAN:
    [edit interfaces]
    user@access-switch# set ge-0/0/0 unit 0 description "Sales wireless access point port"
    user@access-switch# set ge-0/0/0 unit 0 family ethernet-switching vlan members sales
    user@access-switch# set ge-0/0/3 unit 0 description "Sales phone port"
    user@access-switch# set ge-0/0/3 unit 0 family ethernet-switching vlan members sales
    user@access-switch# set ge-0/0/20 unit 0 description "Sales file server port"
    user@access—switch# set ge-0/0/20 unit 0 family ethernet-switching vlan members sales
    user@access-switch# set ge-0/0/22 unit 0 description "Sales printer port"
    user@access-switch# set ge-0/0/22 unit 0 family ethernet-switching vlan members sales
  9. Configure the interfaces in the support VLAN:
    [edit interfaces]
    user@access-switch# set ge-0/0/24 unit 0 description "Support wireless access point port"
    user@access-switch# set ge-0/0/24 unit 0 family ethernet-switching vlan members support
    user@access-switch# set ge-0/0/26 unit 0 description "Support phone port"
    user@access-switch# set ge-0/0/26 unit 0 family ethernet-switching vlan members support
    user@access-switch# set ge-0/0/44 unit 0 description "Support printer port"
    user@access-switch# set ge-0/0/44 unit 0 family ethernet-switching vlan members support
    user@access-switch# set ge-0/0/46 unit 0 description "Support file server port"
    user@access-switch# set ge-0/0/46 unit 0 family ethernet-switching vlan members support

Results

Display the results of the configuration:

user@access-switch> show configuration
interfaces {
    ge-0/0/0 {
        unit 0 {
            description "Sales wireless access point port";
            family ethernet-switching {
                vlan {
                    members sales;
                }
            }
        }
    }
    ge-0/0/3 {
        unit 0 {
            description "Sales phone port";
            family ethernet-switching {
                vlan {
                    members sales;
                }
            }
        }
    }
    ge-0/0/20 {
        unit 0 {
            description "Sales file server port";
            family ethernet-switching {
                vlan {
                    members sales;
                }
            }
        }
    }
    ge-0/0/22 {
        unit 0 {
            description "Sales printer port";
            family ethernet-switching {
                vlan {
                    members sales;
                }
            }
        }
    }
    ge-0/0/24 {
        unit 0 {
            description "Support wireless access point port";
            family ethernet-switching {
                vlan {
                    members support;
                }
            }
        }
    }
    ge-0/0/26 {
        unit 0 {
            description "Support phone port";
            family ethernet-switching {
                vlan {
                    members support;
                }
            }
        }
    }
    ge-0/0/44 {
        unit 0 {
            description "Support printer port";
            family ethernet-switching {
                vlan {
                    members support;
                }
            }
        }
    }
    ge-0/0/46 {
        unit 0 {
            description "Support file server port";
            family ethernet-switching {
                vlan {
                    members support;
                }
            }
        }
    }
    ge-0/2/0 {
        native-vlan-id 1;
        unit 0 {
            description "Uplinking module connection to distribution switch";
            family ethernet-switching {
                interface-mode trunk;
                vlan {
                    members [ 1 sales support ];
                }
            }
        }
    }
    irb {
        unit 0 {
            family inet {
                address 192.0.2.1/25;
            }
        }
        unit 1 {
            family inet {
                address 192.0.2.129/25;
            }
        }
    }
}
vlans {
     sales {
        description "Sales VLAN";
        vlan-id 100;
        l3-interface irb.0;
    }
    support {
        description "Support VLAN";
        vlan-id 200;
        l3-interface irb.1;
    }
}

Tip: To quickly configure the access switch, issue the load merge terminal command, then copy the hierarchy and paste it into the switch terminal window.

Configuring the Distribution Switch

To configure the distribution switch:

CLI Quick Configuration

To quickly configure the distribution switch, copy the following commands and paste them into the switch terminal window:

set interfaces ge-0/0/0 unit 0 description "Connection to access switch"
set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members [ sales support ]
set interfaces ge-0/0/0 native-vlan-id 1
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members 1
set interfaces irb unit 0 family inet address 192.0.2.2/25
set interfaces irb unit 1 family inet address 192.0.2.130/25
set vlans sales description "Sales VLAN"
set vlans sales vlan-id 100
set vlans sales l3-interface irb.0
set vlans support description "Support VLAN"
set vlans support vlan-id 200
set vlans support l3-interface irb.1

Step-by-Step Procedure

To configure the distribution switch:

  1. Configure the interface on the switch to be the trunk port that connects to the access switch:
    [edit interfaces]
    user@distribution-switch# set ge-0/0/0 unit 0 description "Connection to access switch"
    user@distribution-switch# set ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk
  2. Specify the VLANs to be aggregated on the trunk port:
    [edit interfaces]
    user@distribution-switch# set ge-0/0/0 unit 0 family ethernet-switching vlan members [ sales support ]
  3. To handle untagged packets that are received on the trunk port, create a native VLAN by configuring a VLAN ID and specifying that the trunk port is a member of the native VLAN:
    [edit interfaces]
    user@distribution-switch# set ge-0/0/0 native-vlan-id 1
    user@distribution-switch# set ge-0/0/0 unit 0 family ethernet-switching vlan members 1
  4. Configure the sales VLAN:
    [edit vlans]
    user@distribution-switch# set sales description "Sales VLAN"
    user@distribution-switch# set sales vlan-id 100
    user@distribution-switch# set sales l3-interface irb.0

    The VLAN configuration for the distribution switch includes the set l3-interface irb.0 command to route traffic between the sales and support VLANs. The VLAN configuration for the access switch does not include this statement because the access switch is not monitoring IP addresses. Instead, the access switch is passing the IP addresses to the distribution switch for interpretation.

  5. Configure the support VLAN:
    [edit vlans]
    user@distribution-switch# set support description "Support VLAN"
    user@distribution-switch# set support vlan-id 200
    user@distribution-switch# set support l3-interface irb.1

    The VLAN configuration for the distribution switch includes the set l3-interface irb.1 command to route traffic between the sales and support VLANs. The VLAN configuration for the access switch does not include this statement because the access switch is not monitoring IP addresses. Instead, the access switch is passing the IP addresses to the distribution switch for interpretation.

  6. Create the subnet for the sales VLAN:
    [edit interfaces]
    user@distribution-switch# set irb unit 0 family inet address 192.0.2.2/25
  7. Create the subnet for the support VLAN:
    [edit interfaces]
    user@distribution-switch# set irb unit 1 family inet address 192.0.2.130/25

Results

Display the results of the configuration:

user@distribution-switch> show configuration
interfaces {
    ge-0/0/0 {
        native-vlan-id 1;
        unit 0 {
            description "Connection to access switch";
            family ethernet-switching {
                interface-mode trunk;
                vlan {
                    members [ 1 sales support ];
                }
            }
        }
    }
    irb {
        unit 0 {
            family inet {
                address 192.0.2.2/25;
            }
        }
        unit 1 {
            family inet {
                address 192.0.2.130/25;
            }
        }
    }
}
vlans {
    sales {
        description "Sales VLAN";
        vlan-id 100;
        l3-interface irb.0;
    }
    support {
        description "Support VLAN";
        vlan-id 200;
        l3-interface irb.1;
    }
}

Tip: To quickly configure the distribution switch, issue the load merge terminal command, then copy the hierarchy and paste it into the switch terminal window.

Verification

To confirm that the configuration is working properly, perform these tasks:

Verifying the VLAN Members and Interfaces on the Access Switch

Purpose

Verify that the sales and support VLANs have been created on the switch.

Action

List all VLANs configured on the switch:

user@access-switch> show vlans
Routing instance        VLAN name             Tag         Interfaces
default-switch          sales                    100
                                                             ge-0/0/20.0
                                                             ge-0/0/22.0
                                                             ge-0/0/3.0*
                                                             ge-0/0/0.0*
                                                             ge-0/2/0.0*
default-switch          support                  200
                                                             ge-0/0/24.0
                                                             ge-0/0/26.0
                                                             ge-0/0/44.0*
                                                             ge-0/0/46.0*
                                                             ge-0/2/0.0*

Meaning

The output shows the sales and support VLANs and the interfaces that are configured as members of the respective VLANs.

Verifying the VLAN Members and Interfaces on the Distribution Switch

Purpose

Verify that the sales and support VLANs have been created on the switch.

Action

List all VLANs configured on the switch:

user@distribution-switch> show vlans
Routing instance        VLAN name             Tag         Interfaces
default-switch          sales                    100
                                                             ge-0/0/0.0*
default-switch          support                  200
                                                             ge-0/0/0.0*

Meaning

The output shows the sales and support VLANs and the interface (ge-0/0/0.0) that is configured as a member of both VLANs. Interface ge-0/0/0.0 is also the trunk interface connected to the access switch.

Published: 2014-04-23