Sunday, 28 June 2015

Configuring backup router


Backup Router

When a router or switch is booting, the routing protocol process (rpd) is not running; therefore, the router or switch has no static or default routes. To allow the router or switch to boot and to ensure that the router or switch is reachable over the network if the routing protocol process fails to start properly, you configure a backup router (running IP version 4 [IPv4] or IP version 6 [IPv6]), which is a router that is directly connected to the local router or switch (that is, on the same subnet).
To achieve network reachability while loading, configuring, and recovering the router or switch, but without the risk of installing a default route in the forwarding table, include the destination option. Specify the address in the format network/mask-length so that the entire network is reachable through the backup router.
By default, all hosts (default route) are reachable through the backup router. To eliminate the risk of installing a default route in the forwarding table, include the destination option, specifying an address that is reachable through the backup router. Specify the address in the format network/mask-length so that the entire network is reachable through the backup router.
Note: The routes 0.0.0.0/0 or ::/0 should not be used as a destination address in the backup router configuration. You must include a proper subnet range of /8 or higher in the destination address.
When the routing protocols start, the address of the backup router is removed from the local routing and forwarding tables. To have the address remain in these tables, configure a static route for that address by including the static statement at the [edit routing-options] hierarchy level.Back

Configuring a Backup Router Running IPv4

To configure a backup router running IPv4, include the backup-router statement at the [edit system] hierarchy level:
[edit system]backup-router address <destination destination-address>;
The following example shows how to configure a backup router running IPv4 and have its address remain in the routing and forwarding tables:
Note: The Routing Engine on the backup router only supports 16 destinations addresses. If you configure more than 16 destination addresses, the Junos OS ignores destination addresses after the sixteenth address and displays a commit-time warning message to this effect.
[edit]system {backup-router 192.168.1.254 destination 208.197.1.0/24;}routing-options {static {route 208.197.1.0/24 {next-hop 192.168.1.254;retain;}}}
To configure a backup router running IPv4:
  1. Include the backup-router statement at the [edit system] hierarchy level.
    [edit groups group-name system]backup-router address <destination destination-address>;
    For example:
    [edit groups re0 system]backup-router 192.168.1.254 destination 172.16.1.0/24;
    [edit groups re1 system]backup-router 192.168.1.254 destination 172.16.1.0/24;
  2. (Optional) Configure a static route to the management network.
    Junos OS only uses the backup router during the boot sequence. If you want to configure a backup router for use after startup, you can set up a static route. The static route goes into effect when the routing protocol process is running.
    routing-options {static {route 172.16.1.0/24 {next-hop 192.168.1.254;retain;}}}
  3. If you used one or more configuration groups, apply the configuration groups, substituting the appropriate group names.
    For example:
    [edit]user@host# set apply-groups [re0 re1]
  4. Commit the changes:
    [edit]root@# commit

Saturday, 27 June 2015

start junos

Juniper Networks routers are specialized network devices that run network operating system software, which is called JUNOS software. We talk about JUNOS features that run on the J-series, M-series, and T-series router platforms. The M-series and T-series platforms are larger routers typically used by network service providers, telephone companies, large enterprise companies, and universities. The J-series routers are smaller routers designed for use by businesses and other organizations to connect multiple sites or to connect to the Internet. The JUNOS software is pre-installed on a new Juniper Networks routers: when you turn the router on, the software automatically starts running. The first task you have to perform is configuring the router.
for example

 root# cli
 root@>
 cli> configure
 [edit]
 root@# set system host-name router1
 root@# set system domain-name mynetwork.com
 root@# set interfaces fxp0 unit 0 family inet address 192.168.15.1/24
 root@# set system backup-router 192.168.15.2
 root@# set system name-server 192.168.15.3
 root@# set system root-authentication plain-text-password
 New password:
 Retype password:
 root@ show
 system {
     host-name router1 
;
     domain-name mynetwork.com;
     backup-router 192.168.15.2;
     root-authentication {
          encrypted-password "$1$ZUlES4dp$OUwWo1g7cLoV/aMWpHUnC/"; ## SECRET-DATA;
     }
     name-server {
          192.168.15.3;
 }
 interfaces {
     fxp0 {
         unit 0 {
             family inet {
                 address 192.168.15.1/24;
             }
         }
     }
 }
 root@# commit
 root@router1# exit
 root@router1>
While the configuration shown in this recipe provides the minimum needed to access the router from another system on the network, you should add a few other settings to the configuration to provide a more robust level of basic network connectivity:
 [edit]
 root@router1#  
set system ntp server 192.168.2.100
 root@router1# set system time-zone America/Los_Angeles
 root@router1#  
set system services ssh
 root@router1# set interfaces lo0 unit 0 family inet address 207.17.139.42/32
 root@router1# set system login user aviva class superuser
 root@router1# set system log user aviva authentication plain-text-password
 New password:
 Retype new password:
 root@router1# commit
 P address of the router's fxp0 interface, with the set interfaces fxp0 command. fxp0 is an Ethernet management interface that provides a separate out-of-band management network on the router. (The J-series routers do not have a dedicated management interface. You use one of the built-in Fast Ethernet interfaces, fe-0/0/0 or fe-0/0/1, instead.) Juniper Networks recommends that you manage all M-series and T-series routers using the fxp0 interface, which is reserved for managing the router, so no traffic is forwarded through it. As part of the physical setup for the router, you should connect fxp0 to an Ethernet network over which you can perform management tasks. Optimally, the router should also be able to reach its DNS and NTP servers through this network. If you prefer, you can use any other interface router as a management interface. For the remainder of this book, we assume that fxp0 (or fe-0/0/0 on J-series routers) is configured as the management interface.
IP address of a backup router, with the set system backup-router command. Choose a router that is directly connected to the local router. Your router uses this backup router only when it is booting and only if the JUNOS routing software (called the routing protocol process, or RPD) does not start. If RPD does not start, the router will have no static or default routes, so you will not be able to access it directly but will have to go through the backup router. When the router is booting, it creates a static route to the backup router. This route is removed from the routing table as soon as the routing software starts.
For routers with two Routing Engines, the backup Routing Engine, RE1, still uses the backup router as a default gateway after the router has booted, so you can use the backup router to log in to RE1.(RE0 is the primary, or master, Routing Engine.see next post configuring back-router