Technical Documentation

Example: Connecting an Access Switch to a Distribution Switch

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 an access switch to a distribution switch:

Requirements

This example uses the following hardware and software components:

  • For the distribution switch, one EX4200-24F switch. This model is designed to be used as a distribution switch for aggregation or collapsed core network topologies and in space-constrained data centers. It has twenty-four 1-Gigabit Ethernet fiber SFP ports and an EX-UM-2XFP uplink module with two 10-Gigabit Ethernet XFP ports.
  • For the access switch, one EX3200-24P, which has twenty-four 1-Gigabit Ethernet ports, all of which support Power over Ethernet (PoE), and an uplink module with four 1-Gigabit Ethernet ports.
  • JUNOS Release 9.0 or later 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 a single access switch 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 the access switch's uplink module connects to the distribution switch, to one 1-Gigabit Ethernet port on the distribution switch.

Figure 1 shows one EX4200 switch that is connected to the three access switches.

Figure 1: Topology for Configuration

Image g020300.gif

Table 1 explains 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

Property Settings

Access switch hardware

EX3200-24P, 24 1-Gigabit Ethernet ports, all PoE-enabled (ge-0/0/0 through ge-0/0/23); one 4-port 1–Gigabit Ethernet uplink module (EX-UM-4SFP)

Distribution switch hardware

EX4200-24F, 24 1-Gigabit Ethernet fiber SPF ports (ge-0/0/0 through ge-0/0/23); one 2–port 10–Gigabit Ethernet XFP uplink module (EX-UM-4SFP)

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/1/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

Unused interfaces on access switch

ge-0/0/2 and ge-0/0/25

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/1/0 unit 0 description “Uplink module port connection to distribution switch”


set interfaces ge-0/1/0 unit 0 family ethernet-switching port-mode trunk

set interfaces ge-0/1/0 unit 0 family ethernet-switching native-vlan-id 1


set interfaces ge-0/1/0 unit 0 family ethernet switching vlan members [sales support]


set interfaces vlan unit 0 family inet address 192.0.2.1/25


set interfaces vlan unit 1 family inet address 192.0.2.129/25

set vlans sales interface ge-0/0/0.0


set vlans sales interface ge-0/0/3.0


set vlans sales interface ge-0/0/22.0


set vlans sales interface ge-0/0/20.0

set vlans sales l3-interface vlan.0


set vlans sales vlan-id 100


set vlans sales vlan-description “Sales VLAN”


set vlans support interface ge-0/0/24.0


set vlans support interface ge-0/0/26.0


set vlans support interface ge-0/0/44.0


set vlans support interface ge-0/0/46.0


set vlans support vlan-id 200


set vlans support l3–interface vlan.1


set vlans support vlan-description “Support VLAN”

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 ge-0/1/0 unit 0]
    user@access-switch# set description “Uplink module port connection to distribution switch”
    user@access-switch# set ethernet-switching port-mode trunk
  2. Specify the VLANs to be aggregated on the trunk port:

    [edit interfaces ge-0/1/0 unit 0]
    user@access-switch# set ethernet-switching vlan members [ sales support ]
  3. Configure the VLAN ID to use for packets that are received with no dot1q tag (untagged packets):

    [edit interfaces ge-0/1/0 unit 0]
    user@access-switch# set ethernet-switching native-vlan-id 1
  4. Configure the sales VLAN:

    [edit vlans sales]
    user@access-switch# set vlan-description “Sales VLAN”
    user@access-switch# set vlan-id 100
    user@access-switch# set l3-interface vlan.0
  5. Configure the support VLAN:

    [edit vlans support]
    user@access-switch# set vlan-description “Support VLAN”
    user@access-switch# set vlan-id 200
    user@access-switch# set l3-interface vlan.1
  6. Create the subnet for the sales broadcast domain:

    [edit interfaces]
    user@access-switch# set vlan unit 0 family inet address 192.0.2.1/25
  7. Create the subnet for the support broadcast domain:

    [edit interfaces]
    user@access-switch# set vlan 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
  10. Configure descriptions and VLAN tag IDs for the sales and support VLANs:

    [edit vlans]
    user@access-switch# set sales vlan-description “Sales VLAN”
    user@access-switch# set sales vlan-id 100
    user@access-switch# set support vlan-description “Support VLAN”
    user@access-switch# set support vlan-id 200
  11. To route traffic between the sales and support VLANs and associate a Layer 3 interface with each VLAN:

    [edit vlans]
    user@access-switch# set sales l3-interface vlan.0
    user@access-switch# set support l3-interface vlan.1

Results

Display the results of the configuration:

user@access-switch> show
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 sales;
}
}
}
ge-0/0/46 {
unit 0 {
description “Support file server port”;
family ethernet-switching {
vlan members support;
}
}
}
ge-0/1/0 {
unit 0 {
description “Uplink module port connection to distribution switch”;
family ethernet-switching {
port-mode trunk;
vlan members [ sales support ];
native-vlan-id 1;
}
}
}
vlan {
unit 0 {
family inet address 192.0.2.1/25;
}
unit 1 {
family inet address 192.0.2.129/25;
}
}
}
vlans {
sales {
vlan-id 100;
vlan-description “Sales VLAN”;
l3-interface vlan.0;
}
support {
vlan-id 200;
vlan-description “Support VLAN”;
l3-interface vlan.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.

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 description “Connection to access switch”

set interfaces ge-0/0/0 ethernet-switching port-mode trunk

set interfaces ge-0/0/0 ethernet-switching vlan members [ sales support ]

set interfaces ge-0/0/0 ethernet-switching native-vlan-id 1

set interfaces vlan unit 0 family inet address 192.0.2.2/25

set interfaces vlan unit 1 family inet address 192.0.2.130/25

set vlans sales vlan-description “Sales VLAN”

set vlans sales vlan-id 100

set vlans sales l3-interface vlan.0

set vlans support vlan-description “Support VLAN”

set vlans support vlan-id 200

set vlans support l3-interface vlan.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 ge-0/0/0 unit 0]
    user@distribution-switch# set description “Connection to access switch”
    user@distribution-switch# set ethernet-switching port-mode trunk
  2. Specify the VLANs to be aggregated on the trunk port:

    [edit interfaces ge-0/0/0 unit 0]
    user@distribution-switch# set ethernet-switching vlan members [ sales support ]
  3. Configure the VLAN ID to use for packets that are received with no dot1q tag (untagged packets):

    [edit interfaces]
    user@distribution-switch# set ge-0/0/0 ethernet-switching native-vlan-id 1
  4. Configure the sales VLAN:

    [edit vlans sales]
    user@distribution-switch# set vlan-description “Sales VLAN”
    user@distribution-switch# set vlan-id 100
    user@distribution-switch# set l3-interface vlan.0

  5. Configure the support VLAN:

    [edit vlans support]
    user@distribution-switch# set vlan-description “Support VLAN”
    user@distribution-switch# set vlan-id 200
    user@distribution-switch# set l3-interface vlan.1
  6. Create the subnet for the sales broadcast domain:

    [edit interfaces]
    user@distribution-switch# set vlan unit 0 family inet address 192.0.2.2/25
  7. Create the subnet for the support broadcast domain:

    [edit interfaces]
    user@distribution-switch# set vlan unit 1 family inet address 192.0.2.130/25

Results

Display the results of the configuration:

user@distribution-switch> show
interfaces {
ge-0/0/0 {
description “Connection to access switch”;
unit 0 {
family ethernet-switching {
port-mode trunk;
vlan members [ sales support ];
native-vlan-id 1;
}
}
}
vlan {
unit 0 {
family inet address 192.0.2.2/25;
}
unit 1 {
family inet address 192.0.2.130/25;
}
}
}
vlans {
sales {
vlan-id 100;
vlan-description “Sales VLAN”;
l3-interface vlan.0;
}
support {
vlan-id 200;
vlan-description “Support VLAN”;
l3-interface vlan.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 have been created on the switch.

Action

List all VLANs configured on the switch:


user@switch> show vlans
Name           Tag     Interfaces
default       
                       ge-0/0/1.0, ge-0/0/2.0, ge-0/0/4.0, ge-0/0/5.0,
                       ge-0/0/6.0, ge-0/0/7.0, ge-0/0/8.0*, ge-0/0/9.0,                        
                       ge-0/0/10.0, ge-0/0/11.0*, ge-0/0/12.0, ge-0/0/13.0,
                       ge-0/0/14.0, ge-0/0/15.0, ge-0/0/16.0, ge-0/0/17.0, 
                       ge-0/0/18.0, ge-0/0/19.0*,ge-0/0/21.0, ge-0/0/23.0,
                       ge-0/0/25.0, ge-0/0/27.0*,ge-0/0/28.0, ge-0/0/29.0,
                       ge-0/0/30.0, ge-0/0/31.0*,ge-0/0/32.0, ge-0/0/33.0,
                       ge-0/0/34.0, ge-0/0/35.0*,ge-0/0/36.0, ge-0/0/37.0,
                       ge-0/0/38.0, ge-0/0/39.0*,ge-0/0/40.0, ge-0/0/41.0,
                       ge-0/0/42.0, ge-0/0/43.0*,ge-0/0/45.0, ge-0/0/47.0,
                       ge-0/1/1.0*, ge-0/1/2.0*, ge-0/1/3.0*

sales         100
                       ge-0/0/0.0*, ge-0/0/3.0, ge-0/0/20.0, ge-0/0/22.0,
                       ge-0/1/0.0*,  

support       200
                       ge-0/0/24.0*, ge-0/0/26.0, ge-0/0/44.0, ge-0/0/46.0,
                       
mgmt          
                       me0.0*

Meaning

The output shows the sales and support VLANs and the interfaces associated with them.

Verifying the VLAN Members and Interfaces on the Distribution Switch

Purpose

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

Action

List all VLANs configured on the switch:


user@switch> show vlans
Name           Tag     Interfaces
default       
                       ge-0/0/1.0, ge-0/0/2.0, ge-0/0/3.0, ge-0/0/4.0,
                       ge-0/0/5.0, ge-0/0/6.0, ge-0/0/7.0*, ge-0/0/8.0,                        
                       ge-0/0/9.0, ge-0/0/10.0*, ge-0/0/11.0, ge-0/0/12.0,
                       ge-0/0/13.0, ge-0/0/14.0, ge-0/0/15.0, ge-0/0/16.0, 
                       ge-0/0/17.0, ge-0/0/18.0*, ge-0/0/19.0, ge-0/0/20.0,
                       ge-0/0/21.0, ge-0/0/22.0*, ge-0/0/23.0, ge-0/1/1.0*,
                       ge-0/1/2.0*, ge-0/1/3.0*

sales         100
                       ge-0/0/0.0*

support       200
                       ge-0/0/0.0*
                       
mgmt          
                       me0.0*

Meaning

The output shows the sales and support VLANs associated to interface ge-0/0/0.0. Interface ge-0/0/0.0 is the trunk interface connected to the access switch.


Published: 2009-07-22