Now it is time to get some housekeeping done on these routers. We will configure the interfaces on each of them. Once that is complete, we will create a Rescue configuration. A rescue configuration is a known working configuration that we can roll back to at any time. We will use this rescue config to reset the routers to a base state before each lab. Here is our Lab Topology:
First up though, we need to get R4 (The Cisco router) configured and setup.
For R4 we need to configure E0 with an IP of 192.168.14.4/24 and the loopback with 4..4.4.4/32. Once we have it configured, we will save the config to FLASH as base.txt so we can reload it later on.
Router#
Router#conf t
Router (config)#interface Loopback0
Router (config-if)# ip address 4.4.4.4 255.255.255.255
Router (config-if)#exit
Router (config)#interface Ethernet0
Router (config-if)# ip address 192.168.14.4 255.255.255.0
Router (config-if)#no shut
Router(config-if)#exit
Router(config)#hostname R4
R4(config)#exit
R4#wr mem
Building configuration…
[OK]
R4#copy run flash:base.txt
Destination filename [base.txt]?
Erase flash: before copying? [confirm]n
Verifying checksum… OK (0xECC2)
991 bytes copied in 2.048 secs (484 bytes/sec)
R4#
Ok, R4 has a base configuration on it. Now we can get back to Junos, starting with J1.
J1 specs are as follows:
fe-0/0/7 will have an IP of 192.168.14.1/24
ge-0/0/0 will have an IP of 192.168.12.1/24
fe-0/0/2 will have an IP of 192.168.13.1/24
lo0 will have an IP of 1.1.1.1/32
root@J1> edit
Entering configuration mode
[edit]
root@J1# set interfaces fe-0/0/7 unit 0 family inet address 192.168.14.1/24
[edit]
root@J1# set interfaces ge-0/0/0 unit 0 family inet address 192.168.12.1/24
[edit]
root@J1# set interfaces fe-0/0/2 unit 0 family inet address 192.168.13.1/24
[edit]
root@J1# set interfaces lo0 unit 0 family inet address 1.1.1.1/32
Ok, let us take a look at what we are about to commit to the router. You do this by issuing the command show | compare
root@J1# show | compare
[edit]
+ interfaces {
+ ge-0/0/0 {
+ unit 0 {
+ family inet {
+ address 192.168.12.1/24;
+ }
+ }
+ }
+ fe-0/0/2 {
+ unit 0 {
+ family inet {
+ address 192.168.13.1/24;
+ }
+ }
+ }
+ fe-0/0/7 {
+ unit 0 {
+ family inet {
+ address 192.168.14.1/24;
+ }
+ }
+ }
+ lo0 {
+ unit 0 {
+ family inet {
+ address 1.1.1.1/32;
+ }
+ }
+ }
+ }
[edit]
root@J1#
Ok, let’s get this committed and quit the config.
[edit]
root@J1# commit and-quit
commit complete
Exiting configuration mode
root@J1>
Good, that is done. Now we should be able to PING R4
root@J1> ping 192.168.14.4 rapid
PING 192.168.14.4 (192.168.14.4): 56 data bytes
…..
— 192.168.14.4 ping statistics —
5 packets transmitted, 0 packets received, 100% packet loss
Hmm, it’s not pinging. Why?
Ahh!!! these are SRX devices – aka firewalls! We need to disable packet inspection!
[edit]
root@J1# set security forwarding-options family inet6 mode packet-based
[edit]
root@J1#set security forwarding-options family mpls mode packet-based
[edit]
root@J1# set security forwarding-options family iso mode packet-based
Time to check to see what we will be applying to this SRX as well as J2 and J3!
root@J1# show | compare
[edit]
+ security {
+ forwarding-options {
+ family {
+ inet6 {
+ mode packet-based;
+ }
+ mpls {
+ mode packet-based;
+ }
+ iso {
+ mode packet-based;
+ }
+ }
+ }
+ }
[edit]
root@J1#
Looking good – let’s commit the change.
[edit]
root@J1# commit
warning: You have changed mpls flow mode.
You have to reboot the system for your change to take effect.
If you have deployed a cluster, be sure to reboot all nodes.
commit complete
[edit]
root@J1# exit
Exiting configuration mode
Time to reboot – the command to do that is request system reboot
root@J1> request system reboot
Reboot the system ? [yes,no] (no) yes
Shutdown NOW!
[pid 1660]
root@J1>
*** FINAL System shutdown message from root@J1 ***
System going down IMMEDIATELY
While J1 reboots, we should apply those commands to J2 and J3. Again, we will use the load merge command to merge in the following:
security {
forwarding-options {
family {
inet6 {
mode packet-based;
}
mpls {
mode packet-based;
}
iso {
mode packet-based;
}
}
}
}
J2:
[edit]
root@J2# load merge terminal
[Type ^D at a new line to end input]
security {
forwarding-options {
family {
inet6 {
mode packet-based;
}
mpls7 {
mode packet-based;
}
iso {
mode packet-based;
}
}
}
}
^D
load complete
[edit]
root@J2# commit and-quit
warning: You have changed mpls flow mode.
You have to reboot the system for your change to take effect.
If you have deployed a cluster, be sure to reboot all nodes.
commit complete
Exiting configuration mode
root@J2> request system reboot
Reboot the system ? [yes,no] (no) yes
And now J3:
[edit]
root@J3# load merge terminal
[Type ^D at a new line to end input]
security {
forwarding-options {
family {
inet6 {
mode packet-based;
}
mpls {
mode packet-based;
}
iso {
mode packet-based;
}
}
}
}
^D
load complete
[edit]
root@J3# commit and-quit
warning: You have changed mpls flow mode.
You have to reboot the system for your change to take effect.
If you have deployed a cluster, be sure to reboot all nodes.
commit complete
Exiting configuration mode
root@J3> request system reboot
Reboot the system ? [yes,no] (no) yes
Ok, that is all three of them updated. Now, back to J1 to see if we can PING between J1 and R4.
J1 (ttyu0)
login: jfry
Password:
— JUNOS 12.1R2.9 built 2012-05-31 08:58:52 UTC
jfry@J1>
Since I logged in as jfry here, right to the CLI!
jfry@J1> ping 192.168.14.4 rapid
PING 192.168.14.4 (192.168.14.4): 56 data bytes
!!!!!
— 192.168.14.4 ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.408/6.723/10.290/2.699 ms
jfry@J1>
There we go, that was the problem. Little things like that can drive you nuts!
Oh, and that PING statement, rapid, means it will send 5 rapid ping commands.
Ok, so now that J1 is working, we can finish the config on J2 and J3!
J2 is configured as follows:
ge-0/0/0 with an IP of 192.168.12.2/24
ge-0/0/1 with an IP of 192.168.23.2/24
lo0 with an IP of 2.2.2.2/32
[edit]
jfry@R2# set interfaces ge-0/0/0 unit 0 family inet address 192.168.12.2/24
[edit]
jfry@R2# set interfaces ge-0/0/1 unit 0 family inet address 192.168.23.2/24
[edit]
jfry@R2# set interfaces lo0 unit 0 family inet address 2.2.2.2/32
[edit]
jfry@J2# commit and-quit
commit complete
Exiting configuration mode
Now we should be able to Ping R1’s interface of 192.168.12.1
jfry@J2> ping 192.168.12.1 rapid
PING 192.168.12.1 (192.168.12.1): 56 data bytes
!!!!!
— 192.168.12.1 ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.374/8.066/29.766/10.853 ms
Good, now to J3!
J3 is configured as follows:
fe-0/0/1 with an IP of 192.168.23.3/24
fe-0/0/2 with an IP of 192.168.13.3/24
lo0 with an IP of 3.3.3.3/32
[edit]
jfry@J3# set interfaces fe-0/0/1 unit 0 family inet address 192.168.23.3/24
[edit]
jfry@J3# set interfaces fe-0/0/3 unit 0 family inet address 192.168.13.3/24
Whoops! That was supposed to be fe-0/0/2, hmm. What can we do? Delete the command and re-enter it all? Nope! Here is another cool feature of Junos, rename!
First, here is the interface configuration
jfry@J3> show configuration interfaces fe-0/0/3
unit 0 {
family inet {
address 192.168.13.3/24;
}
}
jfry@J3>
Now, we let us rename it to fe-0/0/2.
jfry@j3> edit
Entering configuration mode
[edit]
jfry@J3# rename interfaces fe-0/0/3 to fe-0/0/2
[edit]
jfry@J3# commit and-quit
Now let us take a look at the config for fe-0/0/2
jfry@J3> show configuration interfaces fe-0/0/2
unit 0 {
family inet {
address 192.168.13.3/24;
}
}
That is a great feature; you can just rename an interface!
Ok, back to the configs.
jfry@J3> edit
[edit]
jfry@J3# set interfaces lo0 unit 0 family inet address 3.3.3.3/32
[edit]
jfry@J3# commit and-quit
commit complete
Exiting configuration mode
jfry@J3>
Now we should be able to ping R2 192.168.23.2 and R1 192.168.13.1.
jfry@J3> ping 192.168.23.2 rapid
PING 192.168.23.2 (192.168.23.2): 56 data bytes
!!!!!
— 192.168.23.2 ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.803/7.207/28.526/10.660 ms
jfry@J3> ping 192.168.13.1 rapid
PING 192.168.13.1 (192.168.13.1): 56 data bytes
!!!!!
— 192.168.13.1 ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.914/7.551/28.659/10.559 ms
jfry@J3>
Good, we have connectivity!
Now we need to save these configs as Rescue configs. The command to do that is request system configuration rescue save. The rescue config is then saved in /config/db/rescue.conf on the system.
J1:
jfry@J1> request system configuration rescue save
J2:
jfry@J2> request system configuration rescue save
J3:
jfry@J3> request system configuration rescue save
Ok, that is all done.
Just a couple of other quick things that you might want to know.
How to check to see who is logged into the system:
jfry@J1> show system users
2:24PM up 38 mins, 1 user, load averages: 0.19, 0.08, 0.17
USER TTY FROM LOGIN@ IDLE WHAT
jfry u0 – 1:50PM – -cli (cli)
How to check the uptime on the device and last configuration:
jfry@J1> show system uptime
Current time: 2012-08-09 14:24:26 UTC
System booted: 2012-08-09 13:46:52 UTC (00:37:34 ago)
Protocols started: 2012-08-09 13:49:45 UTC (00:34:41 ago)
Last configured: 2012-08-09 13:44:03 UTC (00:40:23 ago) by root
2:24PM up 38 mins, 1 user, load averages: 0.17, 0.08, 0.17
How to disable spacebar auto-completion
To disable the spacebar auto-completion in Junos, you can enter the following command from the prompt ( you are not in edit mode )
jfry@J1> set cli complete-on-space off
Disabling complete-on-space
To turn back on:
jfry@J1> set cl com on
Enabling complete-on-space
Junos – Interface Configuration and Connectivity
13 Tuesday Nov 2012
in
RAJ said:
thanks for the post…….its vary helpful.
RAJ said:
thanks for the post…….its vary helpful.
Chris Jones said:
… why wold you disable the complete on space?
Chris Jones said:
… why wold you disable the complete on space?