Network/Juniper/Survival guide

De MonPtitSite
Sauter à la navigation Sauter à la recherche
Accueil SysAdmin Hobbies                  


Juniper- Petit guide de survie pour un newbie ...


Sites Références

Notes

There are several acronyms for interface types and components:

  * IFD – Interface Physical Device
  * IFL – Interface Logical Device
  * IFF – Address Family
  * IFA – Address Entry

Common interface names are:

   * ge – Gigabit ethernet
   * xe – 10G ethernet
   * et – 100G ethernet
   * ae – aggregated ethernet (LAG/etherchannel)
   * vlan or irb – Logical interface based on VLAN


SFP’s can be of different speeds (eg, one may be 1G, and another may be 10G). So be aware that the interface names may change based on the SFP used.

The interface naming convention is type-x/y/z

   Type is ge, xe, etc
   x – FPC (aka linecard)
   y – module or slot
   z – port number

There are several names for management interfaces. Each platform may use different names. These include fxp0, em0, me0, and vme0. Some of these are physical, and others are virtual.

Some interfaces, such as pimd, pime, dsc, ipip, and gre, are special interfaces that are used for special purposes.

An unnumbered interface does not have an IP address. This helps conserve IP addresses.

All interfaces are configured with a unit. This contains logical interface information, like addressing. Sometimes this is used to create sub-interfaces. Physical properties (duplex, link speed, etc) are not configured in the unit.

Each unit may have one or more family. This is where the address is applied. For example, the inet family is for IPv4 addressing.

Addresses can be primary, preferred, or secondary. Primary addresses are used for locally sourced (broadcast or multicast) traffic, destined to a remote subnet. Preferred addresses are for locally sourced traffic to the local subnet.

Configuring voice ports means three main steps:

  * Configuring a voice VLAN
  * Configuring PoE
  * Configuring LLDP-MED

Junos supports regex during configuration.

Command Summary

Juniper OS Command summary
Command Mode Description
show system uptime operational Get uptime & date of all fpc
show log messages operational Dump system logs
show cli history operational Get cli commands history
show interfaces terse operational Get a simplified view of all interfaces on the system
show interfaces [extensive] operational Get interface statistics
show interfaces terse operational Get a simplified view of all interfaces on the system
show lacp interfaces aexx [extensive] operational Get bond LACP interface statistics
set interfaces INTERFACE … configuration Configures an interface
set interfaces INTERFACE description configuration Adds a description to an interface
set interfaces INTERFACE unit NUMBER family inet address … configuration Configures an IPv4 address
set interfaces INTERFACE disable configuration Disables an interface
set vlans NAME vlan-id ID configuration Defines a VLAN
show vlans operational Shows a list of configured VLANs
set interfaces INTERFACE unit 0 family ethernet-switching interface-mode <access/trunk> configuration Sets a layer-2 port type (trunk port or access port)
set interfaces INTERFACE unit 0 family ethernet-switching vlan members VLAN configuration Adds VLANs to the port
set interfaces INTERFACE vlan-tagging configuration Enables VLAN tagging, which enables the use of units as subinterfaces
set poe interface all configuration Enables PoE on all interfaces
set protocols lldp-med interface all configuration Enables LLDP-MED on all interfaces
rename configuration Renames some configuration
deactivate configuration Deactivates any part of the config
copy configuration Copy some configuration from one place to another
replace configuration Replace some configuration
annotate configuration Adds annotations into the config, like comments in code


Advanced Commands Summary

Juniper OS Command summary
Command Mode Description
configure operational Switch to configuration mode
delete interface <interface> operational Delete an interface (ex : delete xe-0/0/0)
commit check operational Validate a conf without apply
commit operational apply a modified conf
commit confirmed <timeout in min> operational Apply a conf and roll back after x min if not commited in timelapse
load set terminal operational Input a set of commands from the terminal until ^D is pressed
set interfaces <interface name> mtu 9126 operational Configure Jumbo frame on an interface
set interfaces <interface name> unit 0 family ethernet-switching interface-mode trunk operational Configure a TRUNK on an interface
set interfaces <interface name> unit 0 family ethernet-switching vlan members [ VLANS or vlans id ] operational Configure VLANs allowed in a trunk
delete apply-groups <group name> operational Remove a group applied
show interfaces \\ display set \\ grep description operational Display commands used for interfaces descriptions settings
show \\ display set operational Display commands used for all con figuration settings

Additional References

Explanation of “ifd” and “ifl” indexes https://kb.juniper.net/InfoCenter/index?page=content&id=KB2820

Router Interfaces Overview https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-interface-naming-overview.html

Performing Loopback Testing https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ethernet-fast-and-gigabit-loopback-testing.html

Configuring Default, Primary, and Preferred Addresses and Interfaces https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html