55
Copyright © 2003 Juniper Networks, Inc. Proprietary and Confidential www.juniper.net 1 JUNOS Basic Configuration

JUNOS Basic Configuration

  • Upload
    hakiet

  • View
    304

  • Download
    3

Embed Size (px)

Citation preview

Page 1: JUNOS Basic Configuration

Copyright © 2003 Juniper Networks, Inc. Proprietary and Confidential www.juniper.net 1

JUNOS Basic Configuration

Page 2: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 2

Page 3: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 3

Page 4: JUNOS Basic Configuration

4Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Powerup and Powerdown

§ Powerup

• Connect all cables

• Turn on one power supply

• Turn on second power supply

§ Powerdown

• Shut down JUNOS routing software

• CLI request system halt command

• Turn off power supplies

Page 5: JUNOS Basic Configuration

5Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Visible Activity at Startup

§ Craft interface displays:

• Starting Routing Engine• Starting PFE• Starting Cards

§ FPC LEDs

• Blink green while testing

• Become solid green when tests pass

§ Alarm LEDs light as needed

Page 6: JUNOS Basic Configuration

6Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Initial Configuration

§ Using serial console

• Root password

• Machine name

• IP address (prefix) and prefix length assigned to management interface (fxp0)

• DNS server

Page 7: JUNOS Basic Configuration

7Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Troubleshooting

§ Craft interface

• Red LEDs indicate failure

• LCD displays all major and minor alarms

§ Syslog messages

• Contain more detailed information

• CLI show log messages command

§ CLI

• Interactive failure analysis using show commands

• monitor log files using monitor command

Page 8: JUNOS Basic Configuration

8Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Boot Devices and Media

§ Removable media

• Used for install and upgrade, normally left empty

• RE —PCMCIA flash card

§ Flash drive

• Solid-state media

• Primary source for booting software

§ Hard drive

• Secondary source for booting software

Page 9: JUNOS Basic Configuration

9Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Software Installation

§ Arrives preinstalled from factory onto

• Flash drive

• Hard drive (alternate copy)

• Removable media (e.g. PCMCIA)

§ Can boot from alternate copy

• If flash drive fails, router can still boot from hard drive or removable media

§ Upgradable

• Upgrade packages available through the Internet or on removable media

Page 10: JUNOS Basic Configuration

10Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Boot Sequence

§ Hardware controlled

• Software notifies hardware when boot completes

Success? Success? Success?

Removablemedia Halt

Done

Solid-stateflash disk

Rotatingdisk

Done Done

Page 11: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 11

Page 12: JUNOS Basic Configuration

12Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Initial Configuration

§ Root password

• Root password not set at factory

• Must use console to configure root password

§ Router and domain name

§ Management interface IP address and prefix length

§ Default router IP address

§ DNS server IP address

Page 13: JUNOS Basic Configuration

13Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Initial Configuration§ Enter configuration mode

root@> configure

[edit]

root@#

§ Set root password

• Plain text knownroot@# set system root-authentication

plain-text-password

• Pre-encrypted passwordroot@# set system root-authentication

encrypted-password encrypted-password

• SSH (secure shell) keyroot@# set system root-authentication

ssh-rsa key

Page 14: JUNOS Basic Configuration

14Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Initial Configuration§ Set router name

[edit]

root@# set system host-name lab2

§ Set router domain name [edit]

root@# set system domain-name juniper.net

§ Commit changes so far[edit]

root@# commit

commit complete

[edit]

root@lab2#

Page 15: JUNOS Basic Configuration

15Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Initial Configuration§ Set management Ethernet IP address and prefix

[edit]

root@lab2# set interfaces fxp0 unit 0 family inet address ip-address/prefix-length

§ Set default route[edit]

root@lab2# set system backup-router gateway-address

root@lab2# set routing-options static route default nexthop gateway-address retain no-readvertise

§ Set name server address[edit]

root@lab2# set system name-server ns-address

Page 16: JUNOS Basic Configuration

16Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Full Installation

§ Reinstall JUNOS software if storage media fails or is corrupted

§ Future major software revisions may require full installation

§ Three steps

• Prepare to reinstall JUNOS software

• Reinstall JUNOS software

• Configure JUNOS software

Page 17: JUNOS Basic Configuration

17Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Full Installation: Preparation

§ Record basic information

• Router name

• Management interface IP address and prefix length

• Default router IP address

• Domain name and DNS server IP address

§ Copy existing configuration file to a safe place on the network

• Located in /config/juniper.conf

• Full installation erases both flash and rotating drives

§ Locate your Juniper installation media

• LS-120 floppy or PCMCIA card contains entire JUNOS distribution

Page 18: JUNOS Basic Configuration

18Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Full Installation: Reinstallation

§ Insert installation media into Routing Engine

• PCMCIA flash card

§ Reboot router

• Use the CLI from the serial console

root@lab2> request system halt

• Power-cycle router

§ Follow prompts

• Enter configuration information saved during installation preparation

§ System reboots automatically after installation completes

Page 19: JUNOS Basic Configuration

19Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Full Installation: Software Configuration§ Log in as root

no-name (ttyd0)

login: root

Last login: date on ttyd0

Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994

The Regents of the University of California. All rights reserved.

---JUNOS 4.0R1 built 2000-02-10 09:29:44 UTC

#

§ Start CLI# cli

root@no-name>

Page 20: JUNOS Basic Configuration

20Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Full Installation:Software Configuration§ Enter configuration mode

root@no-name> configure

[edit]

root@no-name#

§ Set root password

• Plain-textroot@no-name# set system root-authentication

plain-text-password text-password

• Pre-encrypted passwordroot@no-name# set system root-authentication

encrypted-password encrypted-password

• SSH keyroot@no-name# set system root-authentication

ssh-rsa key

Page 21: JUNOS Basic Configuration

21Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Software Update Packages

§ JUNOS software updates are contained in four packages

• jkernel–Operating system

• jroute–Routing Engine software

• jpfe–Packet Forwarding Engine software

• jdocs–On-line documentation

• jbundle–All four upgrade packages

§ Packages can be upgraded individually

§ CLI show system software command displays installed packages

Page 22: JUNOS Basic Configuration

22Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Package Naming Convention§ Software packages have standard names

package-m.nZnumber.tgz

• m.n is the major version number

• Z is a single uppercase letter

• A–Alpha

• B–Beta

• R–Release

• I–Internal

• number is the release number, which might include the build number for that release

§ For example

jbundle-4.0R1.2.tgz

Page 23: JUNOS Basic Configuration

23Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Upgrade Software Packages

§ Download current package from software download page at www.juniper.net

§ Add new packageroot@lab2> request system software add new-package-name

Checking available free disk space...11200k available,6076k suggested.

§ If needed, reboot routerroot@lab2> request system reboot

Page 24: JUNOS Basic Configuration

24Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Back Up Existing Software

§ System software and configuration can be backed up to rotating disk

§ Best used

• Before major upgrade to ensure system recovery if necessary

• When system is known stable

§ CLI request system snapshot command

Page 25: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 25

Page 26: JUNOS Basic Configuration

26Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Standard Interfaces

§ Interface contained on PIC

§ PIC plugs into FPC

• FPC has room for four PICs

§ FPC plugs into chassis

Physical Physical Interface Interface

CardCard

PICPIC

PICPIC

PICPIC

FPC

Page 27: JUNOS Basic Configuration

27Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Standard Interfaces

§ Packet-based SONET/SDH PICs• 4-port OC-3

• 1-port OC-12

• Standard packet version or channelized to DS-3 level

• 1-port OC-48

• Takes up all four PIC slots on M20 or M40

• Takes up one PIC slot on M160

• 1-port OC-192

• Takes up all four PIC slots on M160

• Not available on M20 or M40

Page 28: JUNOS Basic Configuration

28Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Standard Interfaces

§ ATM based SONET/SDH PICs

• 2-port OC-3 ATM

• 1-port OC-12 ATM

§ 4 port DS-3 PIC

• 4 ports

§ 4 port E-3 PIC

§ Ethernet PICs

• 1 Port Gigabit Ethernet

• 4 Port 100 Mbit Ethernet

Page 29: JUNOS Basic Configuration

29Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Standard Interfaces

§ System uses consistent names for all customer interfaces

§ Based on

• Interface port type

• FPC slot number

• PIC slot number within FPC

• Port number within PIC

Page 30: JUNOS Basic Configuration

30Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Interface Port Type§ at— ATM over SONET/SDH ports

§ e3— E-3 ports

§ fe— Fast Ethernet ports

§ so— SONET/SDH ports

§ t3— DS-3 ports

§ ds- Nx64k interfaces

§ ge— Gigabit Ethernet ports

§ ml- multilink

§ ls – link services

§ sp – adaptive services pic

§ vt- virtual interface

Page 31: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 31

Page 32: JUNOS Basic Configuration

32Copyright © 2003 Juniper Networks, Inc. www.juniper.net

FPC Slot Numbers

M40

3

2

1

0

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7M160

M20

Page 33: JUNOS Basic Configuration

33Copyright © 2003 Juniper Networks, Inc. www.juniper.net

PIC Slot Numbers

0

1

3

2

§ M40 and M160

• Top to bottom

§ M20

• Right to left

013 2

Page 34: JUNOS Basic Configuration

34Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Port Numbers

0

1

2

3

u M40 and M160v Top to bottomv Right to left

u M20v Right to leftv Bottom to top 01

23

Page 35: JUNOS Basic Configuration

35Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Test Your Knowledge (I)

On this mythical M40 PIC,what port number is this?

HyperNet

Page 36: JUNOS Basic Configuration

36Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Test Your Knowledge (II)

On this mythical M20 PIC,what port number is this?

Hyp

erNet

Page 37: JUNOS Basic Configuration

37Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Interface Names

§ Physical interfaces have standard names

• Type

• FPC slot

• PIC slot

• Port numberso-5/2/3

Page 38: JUNOS Basic Configuration

38Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Interface Names

§ Logical interfaces are used to set up Frame Relay DLCIs or ATM virtual circuits

§ Interface number is separate in meaning from the actual DLCI or ATM VC and can be any arbitrary value

§ Suggested convention is to keep them the same whenever possible

so-5/2/3.43

Page 39: JUNOS Basic Configuration

39Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Permanent Interfaces

§ Router has two permanent interfaces

• Out-of-band management interface is called fxp0

• Internal Routing Engine to PFE connection is called fxp1

Page 40: JUNOS Basic Configuration

Installation

• Power-up & Power-down

• Initial Configuration

Interface

• Standard Interfaces

• FPC, PIC & Port Number

• Configuring Interface

Agenda

Slide 40

Page 41: JUNOS Basic Configuration

41Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Interfaces

§ Two steps

• Configure physical properties

• Configure logical properties

Page 42: JUNOS Basic Configuration

42Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Interfaces• Physical properties

• Clocking

• Scrambling

• Frame check sequence (FCS)

• Maximum transmission unit (MTU)

• Keepalives

• Other link characteristics

• Logical properties

• Protocol family (Internet, ISO, MPLS)

• Addresses (IP address, ISO NET address)

• Virtual circuits (VCI/VPI, DLCI)

• Other characteristics

Page 43: JUNOS Basic Configuration

43Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Interfaces

§ Standard configuration statement hierarchyinterfaces {

interface-name {

physical-properties;

[…]

unit unit-number {

logical-properties;

[…]

}

}

}

Page 44: JUNOS Basic Configuration

44Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Physical Properties§ Configure physical properties of the interface using the set command:

set interface so-1/0/3 no-keepalives

§ Or park yourself in the interfaces section of the hierarchy and set many options

lab@omaha> configure

[edit]

lab@omaha# edit interfaces so-1/0/3

[edit interfaces so-1/0/3]

lab@omaha# set no-keepalives

lab@omaha# set sonet-options fcs 32

lab@omaha# commit

Page 45: JUNOS Basic Configuration

45Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Default Settings

§ Default settings for an interface are usually enough to get you talking

§ Most interfaces do not need complex setup

Page 46: JUNOS Basic Configuration

46Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Logical Interface Settings

§ Each physical interface has one or more logical interfaces

§ Logical interface separates configuration information for each ATM virtual circuit, Frame Relay DLCI, or VLAN

§ Some physical interface encapsulations allow only one possible logical interface

• PPP

• HDLC

Page 47: JUNOS Basic Configuration

47Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Logical Interface Settings

§ Logical settings

• Protocol family (Internet, ISO, MPLS)•Protocol MTU

•IP address

•Other protocol options

• Virtual circuit identifiers (VPI.VCI, DLCI)

• Other according to-circuit characteristics

Page 48: JUNOS Basic Configuration

48Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Unit Numbers

§ Each logical interface has a unit number

§ Number can be arbitrary

• Typically, the unit number is the same as the VC or DLCI number

§ Some physical interfaces have only one possible logical interface, and one unit number only, which must be configured as unit zero

Page 49: JUNOS Basic Configuration

49Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Logical Interfaces

§ Use the set command to configure a logical interface, using the unit number

§ For example

set interface so-1/0/3 unit 40 dlci 40

§ Or park yourself at the unit level

lab@omaha> configure

[edit]

lab@omaha# edit interfaces so-1/0/3 unit 40

[edit interfaces so-1/0/3 unit 40]

lab@omaha# set dlci 40

lab@omaha# set family inet address 10.0.20.1/24

lab@omaha# commit

Page 50: JUNOS Basic Configuration

50Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Protocol Families

§ Each major protocol is called a family

§ Internet protocol has TCP, UDP, and ICMP as family members

§ Most common protocol families are

• Internet (inet)

• International Standards Organization (iso)

• Traffic engineering (mpls)

• Multiple families can live on one logical interface

Page 51: JUNOS Basic Configuration

51Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Protocol Families

§ Internet protocol family (inet)

§ Allows you to set

• IP address: address A.B.C.D/prefix_length

• Remote address on point-to-point links: destination A.B.C.D

• Broadcast address: broadcast A.B.C.D

• MTU size: mtu bytes

• ICMP redirect control: no-redirects

Page 52: JUNOS Basic Configuration

52Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Configure Protocol Families§ Minimal sample configuration

lab@omaha> configure

[edit]

lab@omaha# edit interfaces so-1/0/3

[edit interfaces so-1/0/3]

lab@omaha# set unit 0 family inet address 10.0.20.1/24

lab@omaha# commit

§ Displayed as

interfaces {

so-1/0/3 {

unit 0 {

family inet {

address 10.0.20.1/24;

}

}

}

}

Page 53: JUNOS Basic Configuration

53Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Hands-On Session

Page 54: JUNOS Basic Configuration

54Copyright © 2003 Juniper Networks, Inc. www.juniper.net

System Configuration - 30 min

Level 2

JB Penang

KL

fxp00.2

fxp029.2

fxp00.1

fxp2

2.2

fxp0

2.1

fxp21.1

fxp21.2

fxp18.1

fxp2

31.2

fxp18.2

ManilaManila

fxp116.2

fxp215.2

fxp021.1

fxp116.1

SingaporeSingapore BangkokBangkok

fxp2

31.1

fxp124.2

fxp124.1

fxp013.2

1. Host name

2. Domain & DNS Server Name

3. Backup & Default Router

4. User Access to System

5. Time Zone

6. System Services telnet

7. Logging Services (optional)

Answer:

1. set host-name host-name

2. set domain-name juniper.net

set name-server 1.2.3.4

3. set back-up router gateway-addr

[edit routing-options static]

set route default nexthop gateway-addr

5. [edit system] set time-zone

6. set services telnet

7. [edit system] set syslog file filename

Domain juniper.net 1.2.3.4 Gateway 10.100.0.1Lab IP Address MapLab IP Address Map

10.0.x.y/2410.0.x.y/24

Page 55: JUNOS Basic Configuration

55Copyright © 2003 Juniper Networks, Inc. www.juniper.net

Interface Configuration -30 min

Area 0

JB Penang

KL

fxp00.2

fxp029.2

fxp00.1

fxp2

2.2

fxp0

2.1

fxp21.1

fxp21.2

fxp18.1

fxp2

31.2

fxp18.2

ManilaManila

fxp116.2

fxp215.2

fxp021.1

fxp116.1

SingaporeSingapore BangkokBangkok

fxp2

31.1

fxp124.2

fxp124.1

fxp013.2

1. Inventory your Interface

fxp0 :_________________

fxp1 :_________________

fxp2 :_________________

2. Configure the Interfaces

3. Check your work by

ping:__________________

traceroute:_____________

Lab IP Address MapLab IP Address Map10.0.x.y/2410.0.x.y/24