Вы находитесь на странице: 1из 6

Let’s start by setting the hostname of the switch and the timezone.

set system host-name kleos


set system time-zone Africa/Tunis

Let’s set the root password.

set system root-authentication plain-text-password


{enter local root password}
{confirm local root password}

Let’s set the DNS and NTP server

set system name-server X.X.X.X


set system name-server Y.Y.Y.Y
set system domain-name acme.com
set system ntp server X.X.X.X
set system ntp server Y.Y.Y.Y

Let’s enable logging and set a SYSLOG server where Z.Z.Z.Z is your syslog server IP
address

set system syslog host Z.Z.Z.Z any notice


set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file messages daemon info
set system syslog file interactive-commands interactive-commands any

Let’s create some VLANs and assign them names and VLAN IDs and L3 interfaces
(DATA = 8, VOICE = 16, SECURITY = 99);

set vlans DATA vlan-id 8


set vlans DATA l3-interface irb.8
set vlans VOICE vlan-id 16
set vlans VOICE l3-interface irb.16
set vlans SECURITY vlan-id 99
set vlans SECURITY l3-interface irb.99

Let’s assign some IP addresses to our Layer3 interfaces for each VLAN;

set interfaces irb unit 8 family inet address 10.200.8.1/22


set interfaces irb unit 16 family inet address 10.200.16.1/22
set interfaces irb unit 99 family inet address 10.200.99.1/24
set interfaces irb unit 0 family inet address 10.200.0.11/32

Now it’s time to configure some ports… by default all ports belong to VLAN 1 (the
default VLAN) as access ports. In JunOS we need to use the wildcard command to
configure multiple interfaces with a single command. In the samples below I’m
configuring ports 0-47 on the first two switches in the virtual chassis (stack).

wildcard range set interfaces ge-[0]/0/[0-5] unit 0 family ethernet-


switching interface-mode access
wildcard range delete interfaces ge-[0$]/0/[0-5] unit 0 family ethernet-
switching vlan members default
Now, let’s add the voice VLAN to those same ports. I’m using Avaya 1600 Series IP
phones with an Avaya Communication Manager.

wildcard range set switch-options voip interface ge-[0]/0/[0-5].0 vlan


VOICE
wildcard range set switch-options voip interface ge-[0]/0/[0-5].0
forwarding-class expedited-forwarding

Let’s setup DHCP relay for the DATA and VOICE VLANs where X.X.X.X is your
DHCP server;

set forwarding-options dhcp-relay server-group dhcp-srv X.X.X.X


set forwarding-options dhcp-relay active-server-group dhcp-srv
set forwarding-options dhcp-relay group all interface irb.8

Since we’re not using the local management port let’s disable the alarm (show chassis
alarms).

set chassis alarm management-ethernet link-down ignore

Let’s set the SNMP configuration;

set snmp name "B99-SW01-EAST"


set snmp description "Juniper Switch"
set snmp location " First Floor"
set snmp contact " IT Technical Services"
set snmp community public authorization read-only

Configuring Static Routing


To configure the switch's default gateway:

[edit]
user@switch# set routing–options static route 0.0.0.0/0 next-hop 10.0.1.1

 To configure a static route and specify the next address to be used when routing traffic to
the static route:

[edit]
user@switch# set routing-options static route 198.51.100.0/24 next-hop 10.0.0.2

 To always keep the static route in the forwarding table:

[edit]
user@switch# set routing-options static route 198.51.100.0/24 retain

 To remove inactive routes from the forwarding table:


[edit]
user@switch# set routing-options static route 198.51.100.0/24 active

CLI command: power-off

root@lab1> request system power-off

CLI command: reboot

root@lab1> request system reboot

CLI command: reset switch

root@lab1> request system zeroize

Reverting to the Factory-Default Configuration by Using the load factory-default


Command

 [edit]
user@switch# load factory-default
 [edit]
user@switch# delete system commit factory-settings
 [edit]
user@switch# set system root-authentication plain-text-password
 [edit]
user@switch# commit

How to perform initial switch configuration using EZsetup via CLI for the EX-series
switch

[KB10908] Show Article Properties


SUMMARY:
JUNOS for EX-series switches come with an EZsetup initial configuration wizard to help get
your switch operational quickly. EZsetup automates the initial configuration by presenting a
series of basic initial configuration options such as the management IP address, root
password, system time settings, and management VLAN settings. The EZsetup wizard is
available in both a J-Web GUI version and a CLI-based version. The information below
describes the step to run EZsetup over CLI.
SYMPTOMS:

SOLUTION:
Initial Switch Configuration Using CLI

To configure the switch:

1. Connect the console port to a laptop or PC using the RJ-45 to DB-9 serial port adapter.
The RJ-45 cable and RJ-45 to DB-9 serial port adapter are supplied with the switch.

2. At the prompt type ezsetup.

3. Enter the hostname.

4. Enter the root password. You are prompted to re-enter the root password.

5. Enter yes to enable services like telnet and SSH.

6. Next, select one of the switch management options:

7. Manage the switch using the default VLAN. In this scenario all data ports are
configured as members of the default VLAN. Specify the management and gateway
address for the default VLAN. This IP address is used to connect to the switch.
8. Manage the switch using the management port. Specify the IP address and gateway of
the management interface. Use this IP address to connect to the switch.

9. Specify the SNMP Read Community, Location, and Contact to configure SNMP
parameters. These parameters are optional.

10. Specify the system date and time. Select the time zone from the list.

The configured parameters are displayed. Enter yes to save the configuration.
Configuring a User Account

[edit system login user kleos]


user@host# set authentication plain-text-password
New password: type password here
Retype new password: retype password here

user@host# set class super-user


user@host# commit

Configuring SSH, Telnet, HTTPS/HTTPservices;

user@host# set system services ssh


user@host# set system services ssh root-login allow

set system services telnet

set system services web-management http


set system services web-management https system-generated-certificate

user@host# commit

Display Log

user@host> show log messages

Вам также может понравиться