Juniper CLI - make your work faster

In this next lines you are going to read about some commands that can make your work with Junos easier
(Simple RegExp and Junos examples) 
This list is mainly for thought memorizing.

1. show interfaces in two lines list with MTU
show interfaces | match "mtu|interface:" |trim 19
 2. show interfaces without second line with logical interface with family
user@switch# run show interfaces terse                 
Interface               Admin Link Proto    Local                 Remote
ge-0/0/0                up    up  
ge-0/0/0.0              up    up   eth-switch
ge-0/0/1                up    up  
ge-0/0/1.0              up    up   eth-switch
ge-0/0/2                up    down
ge-0/0/2.0              up    down eth-switch
... output truncated

user@switch# run show interfaces terse |except "\."   
Interface               Admin Link Proto    Local                 Remote
ge-0/0/0                up    up 
ge-0/0/1                up    up 
ge-0/0/2                up    down
... output truncated

3. show ipv4 address on your switch or router, show only interfaces:
user@switch> show interfaces terse |match "inet "
ge-0/0/12.3212          up    up   inet  
ge-0/0/13.3200          up    up   inet 
ge-0/0/13.3202          up    up   inet   
ge-1/0/1.107            up    up   inet     xx.yyy.zz.1/30 
ge-1/0/13.3201          up    up   inet 
ge-1/0/13.3203          up    up   inet   

user@switch> show interfaces terse |match "inet " |trim 44   

You could then save it to text file (add | save filename ad the end of command
show interfaces terse |match "inet " |trim 44 | save ipv4.txt

) and transfer your linux.Then do some things with it. For example calculate subnet address from ip address with ipcalc i.e.
ipcalc | grep Network

So. I did a batch file
from file like this: 

to file like this:

ipcalc | grep Network >> networks.out
ipcalc | grep Network >> networks.out

with this two commands:
sed -e 's/^/ipcalc /' ipv4.txt > networks.sed1
sed -e 's/$/| grep Network >> networks.out/' networks.sed1 > networks.sed2

chmod a+x networks.sed1
bash networks.sed1
hopefuly gives you

4. just another tidily  output for sflow interfaces (EX4200 Junos 10.0S10)
show interfaces terse |match "eth-switch|aenet" | match "ge|xe" | no-more
ge-0/0/0.0              up    up   eth-switch
ge-0/0/1.0              up    up   eth-switch
ge-0/0/2.0              up    up   eth-switch
ge-0/0/3.0              up    up   eth-switch
ge-0/0/4.0              up    up   eth-switch
ge-0/0/5.0              up    up   eth-switch
ge-0/0/6.0              up    up   eth-switch
ge-0/0/8.0              up    up   aenet    --> ae6.0
ge-0/0/10.0             up    up   eth-switch
... And you need to throw it edit it with spreadsheet or via bash or something else.
Remove text after space, then add string to beginning of line.
sed 's/ .*//;s/, .*//' sflow01.txt | sed s/^/"set protocols sflow interfaces "/


How to install xerox workcentre 3210 on ubuntu 11.10

You have two possibilities
A) run shell script from extracted WC 3210 Linux Driver or longer manual method. Manual method doesn't install -for me- unnecessary files, icons, applications.

1. Download WC 3210 Linux Driver from this webpage.
2. Extract downloaded file to your desktop.
3. find these two extracted files wc3210.ppd (/home/jozef/Desktop/Linux/noarch/at_opt/share/ppd/wc3210.ppd) and rastertosamsungspl (/home/jozef/Desktop/Linux/i386/at_root/usr/lib/cups/filter/rastertosamsungspl)
4. try to install new printer from menu
4a. run (X)ubuntu menu -> System -> Printing)
4b. add printer - Network Printer - select your xerox 3210
4c. from window Choose Driver select "Provide PPD file" and select wc3210.ppd
5. your ubuntu screams this: 

and you will go to next step
6. Run terminal (Ctrl+Alt+T)
7. copy file  rastertosamsungspl from step 3 to /usr/lib/cups/filter/ as root:
sudo cp /home/jozef/Desktop/Linux/i386/at_root/usr/lib/cups/filter/rastertosamsungspl /usr/lib/cups/filter/

That's all


Why I like Junos CLI

Why I like Junos CLI

hierarchical configuration to make it easier to read configurations

load .. to load yours configuration (load merge <url-file,www,...>, load merge terminal relative,
... or just use bunch of set just like any other OS
to see it like that ^ from configuration mode use show | display set

commiting configuration to apply it at right time and avoid late night drive to work (candidate configuration, rollback, commit confirmed, ...)

annotations to comment your configuration

configuration groups, interface-ranges to inherit your configuration

pipe to make configuration easier to read and do other stuff

junoscript, junos automation to make network management easier and
I am using only basic scripts.

netconf to configure and manage it remotely, possibly through your own web management


juniper ex8200 and bgp full table, :-( [j-nsp] TCAM full on EX8200?

I created three scenarios for customer. One of that was ex8208 with acting also like bgp full view router. But after reading this I am going to consider it
Ex8208 has may have some problem with full routing table. :-(


New ubuntu 11.10 - tomorrow 13. oct 2011

"Oneiric Ocelot" is the code name for Ubuntu 11.10, scheduled for release on 13 October 2011. See the Oneiric release schedule

[j-nsp] JUNOS and martian (JFYI), IANA

INANA allocated new addresses. These are martians for Juniper.
for example
Take a look at RFC5735 which obsoletes RFC3330.

So if you have it as martians, you possibly cannot route to that remote subnets. Also transit ISPs should change this if they dont route them.

Workaround - Deleting Martian Addresses:





> p.s. set routing-options martians orlonger allow
> fixes it.

Couple updates about it.

martians are per table in Junos, so if you run internet in vrf (yes,
there are such people!) you need to use that command per routing instance.

RIPE NCC was awared about this issue and now reallocate blocks to those
who got addrs from
IANA changed it. there was now there is nothing