Posts

Configure OSPF Juniper SRX

Quick page to remind me how to configure OSPF on SRX's as its been a while. ############# # R1 # ############# set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.1/24 set interfaces lo0 unit 0 family inet address 1.1.1.1/32 set routing-options router-id 1.1.1.1 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set security zones security-zone TRUST interfaces ge-0/0/0.0 host-inbound-traffic system-services ping set security zones security-zone TRUST interfaces ge-0/0/0.0 host-inbound-traffic system-services traceroute set security zones security-zone TRUST interfaces ge-0/0/0.0 host-inbound-traffic system-services ssh set security zones security-zone TRUST interfaces ge-0/0/0.0 host-inbound-traffic protocols ospf set security zones security-zone TRUST address-book address BAML 159.5.153.0/24 set security zones security-zone TRUST host-inbound-traffic system-services all se...

Factory default a cisco router

1. Connect to the serial console. 2. Power off the router and then power on. 3. Send the router a  BREAK . This should bring you to the  rommon  prompt 4. Type this command at the rommon prompt in order to boot from Flash. rommon 1 > confreg 0x2142 5. Reset the router. rommon 2 > reset 6. The router should now boot into the Initial config dialogue: Would you like to enter the initial configuration dialog? [yes/no]: yes 7. Follow the prompts, to set a basic config. 8. Enter enable mode and set the router to boot from the right place Router> enable Router> conf t Router(config)> config-register 0x2102 Router(config)> end Router> wr mem 9. Reload the router to check it worked properly

Turn and SRX into a router

I use the below if i am working in lab environment and want to test something that does not require security to be configured. It is 100 percent not best practice for a production enviroment but if you only have SRX's in your lab and security is not a concern then its a passable workaround. set security forwarding-options family inet6 mode packet-based set security forwarding-options family mpls mode packet-based set security forwarding-options family iso mode packet-based

Python - Things to remember page

This page is all the things you should try and memorize when learning to code in python. Check out Learnpythonthehardway.org if you want to learn more about python. Symbols : + plus - minus / slash * asterisk % percent < less-than > greater-than <= less-than-equal >= greater-than-equal Escape Sequences This all of the escape sequences Python supports. You may not use many of these, but memorize their format and what they do anyway. Try them out in some strings to see if you can make them work. ESCAPE WHAT IT DOES. \\ Backslash (\) \' Single-quote (') \" Double-quote (") \a ASCII bell (BEL) \b ASCII backspace (BS) \f ASCII formfeed (FF) \n ASCII linefeed (LF) \N{name} Character named name in the Unicode database (Unicode only) \r Carriage Return (CR) \t Horizontal Tab (TAB) \uxxxx Character with 16-bit hex value xxxx (Unicode only) \Uxxxxxxxx Character with 32-bit hex value xxxxxxxx (Unicode only) \v ASCII vertic...

Upgrading JUNOS via USB

I borrowed this guide from Juniper but keeping it here incase i cannot find it going forward. You need to have a fat32 or smaller than 4gb partitioned USB flash disk.  Enter the shell as root: user@switch> start shell user root Password: root@switch% Before inserting the USB device, perform the following: root@% ls /dev/da* /dev/da0 /dev/da0s1c /dev/da0s2a /dev/da0s3 /dev/da0s3e /dev/da0s1 /dev/da0s1f /dev/da0s2c /dev/da0s3c /dev/da0s1a /dev/da0s2 /dev/da0s2f /dev/da0s3d Insert the USB drive in the USB port. The following output will be displayed: root@% umass1: TOSHIBA TransMemory, rev 2.00/1.00, addr 3 da2 at umass-sim1 bus 1 target 0 lun 0 da2: <TOSHIBA TransMemory 5.00> Removable Direct Access SCSI-0 device da2: 40.000MB/s transfers da2: 983MB (2013184 512 byte sectors: 64H 32S/T 983C) root@% ls /dev/da* /dev/da0 /dev/da0s1c /dev/da0s2a /dev/da0s3 /dev/da0s3e /dev/da0s1 /dev/da0s1f /dev/da0s2c /dev/da0s3c /dev/da2 /dev/da0s1a /dev/da...

Redistributing routes between VRF and INET.0 with logical tunnels

Vendor: Juniper Device: MX series Software: 11.4R9.4 If you don't want to use RIB groups to leak routes between the inet.0 \ VRF routing tables do not fear there is another solution. Using logical tunnels we can form adjancies between the inet.0 and l3vpn tables and redistribute routes. In this example we will use ibgp as the igp.  Note: MX Series routers must be equipped with a Trio MPC/MIC module ################################################################### set interfaces lt-1/2/0 unit 13 description "GLOBAL" Configure the Global IBGP Session set routing-instances L3VPN_(groupname) interface lt-1/2/0.14 show route receive-protocol bgp 1.1.1.2 Configure the lt interfaces  set interfaces lt-1/2/0 unit 13 encapsulation ethernet set interfaces lt-1/2/0 unit 13 peer-unit 14 set interfaces lt-1/2/0 unit 13 family inet address 192.168.0.1/30 set interfaces lt-1/2/0 unit 14 description "L3VPN" set interfaces lt-1/2/0 unit 14 encapsulation...