SRX Series Services Gateways · Topic 2 of 4
SRX Interfaces and Initial Configuration
Learn SRX interface naming, logical units and families, the factory default configuration, root password, host name, SSH and zones in a first SRX commit.
- 6 min
- Interface names follow
type-fpc/pic/port; addresses live on a unit under a family such asinet. - Security zones contain logical interfaces, and each logical interface belongs to one zone only.
- An interface in no zone is in the null zone and its traffic is dropped.
What it is
An SRX interface has a physical part, the port, and one or more logical units that carry addresses. Every interface that carries transit traffic must also belong to a security zone, which is the main difference from a Junos router.
The initial configuration is the small set of settings you commit on a new or reset device: a root password, a host name, management access, interface addresses, zones and a default route.
How it works
Interface naming
Junos names a physical interface type-fpc/pic/port. On a branch SRX the FPC number is usually 0, so the first Gigabit Ethernet port is ge-0/0/0.
| Name | Meaning |
|---|---|
ge | Gigabit Ethernet port |
xe | 10 Gigabit Ethernet port |
et | 25, 40 or 100 Gigabit Ethernet port |
fxp0 | Out-of-band management port on larger models and the vSRX |
lo0 | Loopback interface |
irb | Integrated routing and bridging interface, the Layer 3 gateway for a VLAN |
st0 | Secure tunnel interface for route-based IPsec VPNs |
reth | Redundant Ethernet interface in a chassis cluster |
Logical units and families
The address is configured on a unit under a family. Unit 0 is the usual unit for an untagged Ethernet port, and ge-0/0/1.0 means port ge-0/0/1, unit 0.
user@srx# set interfaces ge-0/0/1 unit 0 family inet address 10.10.10.1/24
user@srx# set interfaces ge-0/0/0 unit 0 family inet dhcp
| Family | Carries |
|---|---|
inet | IPv4 |
inet6 | IPv6 |
ethernet-switching | Layer 2 switching on supported branch models |
You assign the logical interface, not the physical port, to a security zone:
user@srx# set security zones security-zone trust interfaces ge-0/0/1.0
user@srx# set security zones security-zone untrust interfaces ge-0/0/0.0
A logical interface belongs to exactly one zone. An interface with an address but no zone is in the null zone, and the SRX drops traffic that arrives on it.
Checking interfaces
| Command | Shows |
|---|---|
show interfaces terse | Every interface, its admin and link state, family and address |
show interfaces ge-0/0/1 extensive | Detailed counters and errors for one port |
show security zones | Each zone and the interfaces in it |
Factory default configuration
A branch SRX ships with a factory default configuration so that it can work as a basic office firewall out of the box. Typically one port is in the untrust zone as a DHCP client toward the internet, and the other ports are in the trust zone. Policies permit trust to untrust traffic, source NAT translates it to the untrust interface address, and traffic from untrust to trust is denied.
The exact port layout differs by model. You can load the factory default again in configuration mode with load factory-default, but you must still set a root password before you can commit it.
The first commit
On a device with no root password, you log in at the console as root with no password. That opens the shell, so you type cli to reach operational mode, then configure.
root@% cli
root> configure
[edit]
root# set system root-authentication plain-text-password
New password:
Retype new password:
root# set system host-name srx-branch
root# set system login user admin class super-user authentication plain-text-password
root# set system services ssh
root# set system ntp server 192.0.2.10
root# set routing-options static route 0.0.0.0/0 next-hop 203.0.113.1
root# commit
Junos refuses any commit until a root password exists. That is the most tested fact about the initial configuration.
Allowing management traffic to the SRX
Enabling system services ssh turns the SSH service on, but a revenue port still drops SSH unless its zone or interface allows it with host-inbound-traffic:
user@srx# set security zones security-zone trust host-inbound-traffic system-services ssh
user@srx# set security zones security-zone trust host-inbound-traffic system-services ping
Both settings are needed. The service must run on the device, and the ingress zone or interface must allow it in. The Security Zones page covers host-inbound-traffic in full.
Useful first-day commands
Before every commit, show | compare in configuration mode lists your uncommitted changes.
| Command | Purpose |
|---|---|
commit check | Validate the candidate without activating it |
commit confirmed | Roll back automatically unless you confirm, useful for remote changes |
request system configuration rescue save | Save the current active configuration as the rescue configuration |
request system zeroize | Erase all configuration and data and return to the factory state |
Use commit confirmed when you change the zone, address or host-inbound-traffic of the interface carrying your own SSH session. If you lock yourself out, Junos rolls the change back by itself.
Common mistakes
Trying to put one interface in two zones. A logical interface belongs to exactly one zone. If you need the same port in two zones, configure two logical units, for example with VLAN tagging.
Forgetting the zone entirely. An interface with an address but no zone drops all traffic, so a ping to the next hop fails even though show interfaces terse shows the link up.
Expecting system services ssh to be enough. On a revenue port, SSH also has to be allowed by host-inbound-traffic on the ingress zone or interface.
Committing without a root password. The commit fails until system root-authentication is set.
request system zeroize erases the configuration and the stored data, not only the configuration. Use load factory-default if you only want the default configuration back.
What to remember for the exam
- Interface names follow
type-fpc/pic/port; addresses live on a unit under a family such asinet. - Security zones contain logical interfaces, and each logical interface belongs to one zone only.
- An interface in no zone is in the null zone and its traffic is dropped.
- The branch factory default puts one port in untrust as a DHCP client and the rest in trust, with source NAT from trust to untrust.
- A root password must be set before the first commit.
load factory-defaultrestores the default configuration;request system zeroizewipes the device.- Management services need both
system servicesand host-inbound-traffic on the ingress zone or interface.
Check yourself
Why does an SRX refuse your first commit after
load factory-default?A root password has not been set. Junos requires
system root-authenticationbefore any commit.An interface has an IPv4 address but is not in any security zone. What happens to traffic arriving on it?
It is dropped, because the interface is in the null zone.
SSH is enabled under
system services, but SSH to ge-0/0/1 still fails. What is missing?The ingress zone or interface does not allow SSH with
host-inbound-traffic system-services ssh.
Topic 2 of 4 in SRX Series Services Gateways
Test yourself on SRX Series Services Gateways
The full Juniper JNCIA-SEC JN0-232 question bank has 658 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.