Showing posts with label Juniper. Show all posts
Showing posts with label Juniper. Show all posts

Monday, September 28, 2015

How to configure EIGRP and Standard Access List (ACL) on Cisco Router


Junpier block traffic
The first term is set to match icmp-echo-request traffic destine for the IP address of 192.168.10.1/24.
The second term is to pass (or accept) all other traffic.
Without the second term all traffic not matching the first term would be dropped.
Lastly the filter is applied to an interface on the inbound direction.

R1#set firewall filter LAN-inbound term BLOCK from destination-address 192.168.10.1/24
R1#set firewall filter LAN-inbound term BLOCK from icmp-type echo-request
R1#set firewall filter LAN-inbound term BLOCK then log
R1#set firewall filter LAN-inbound term BLOCK then discard
R1#set firewall filter LAN-inbound term accept-all-else then accept
R1#set interfaces em1 family inet filter input LAN-inbound


How to configure OSPFv2 on Cisco Router




R1 connect to R2 via ethernet

R1#set interface em1 unit 0 family inet address 1.1.1.1/24
R1#set interface lo1 unit 0 family inet address 11.11.11.11/24
R1#set protocol ospf area 0.0.0.0 interface em1
R1#set protocol ospf area 0.0.0.0 interface lo1

R2#set interface em1 unit 0 family inet address 2.2.2.2/24
R2#set interface lo2 unit 0 family inet address 22.22.22.22/24
R2#set protocol ospf area 0.0.0.0 interface em1
R2#set protocol ospf area 0.0.0.0 interface lo2

show configuration
show ospf neighbor
show protocols ospf

How to configure inter-VLAN static route and RIPv2


Juniper inter-vlan
set interfaces em1 vlan-tagging
set interfaces em1 unit 10 vlan-id 10 family inet address 192.168.10.1/24
set interfaces em1 unit 20 vlan-id 20 family inet address 192.168.20.1/24


Friday, July 23, 2010

RIP configuration

router rip
network
=>enable routing protocol RIP version 1 (classful, same subnet used throughout whole network)
=> routing table send out thru broadcast address 255.255.255.255


router rip
version 2
network
=>enable routing protocol RIP version 2 (classless, able to used different subnet VLSM)
=> routing table send out thru multicast address 224.0.0.9, UDP Port number 520
no auto-summary => no auto summarization
default-information originate => generate a default route into RIP
passive-interface fa0/0 => prevent routing update out thru interface fa0/0

Load Balancing
maximum-paths
=> default 4, maximum 6
=> IOS version 12.3 onwards up to 16

By default, RIP uses broadcast or multicast to push out routing table. If there's a need, we can push update using unicast neighbor 



Juniper
R2#set protocol rip group RIPGROUP2 neighbor em2.0
R3#set protocol rip group RIPGROUP3 neighbor em2.0

Group name is local significant

Be default Junos dont advertise route, need to create a policy
R2#set policy-options policy-statement RPOLICY term 1 from protocol rip
R2#set policy-options policy-statement RPOLICY term 1 from protocol direct
R2#set policy-options policy-statement RPOLICY term 1 then accept
R2#set protocol rip group RIPGROUP2 export RPOLICY

R3#set policy-options policy-statement RPOLICY term 1 from protocol rip
R3#set policy-options policy-statement RPOLICY term 1 from protocol direct
R3#set policy-options policy-statement RPOLICY term 1 then accept
R3#set protocol rip group RIPGROUP3 export RPOLICY

show route

Friday, June 18, 2010

Default route


R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0/1 or
R1(config)#ip route 0.0.0.0 0.0.0.0 200.0.0.2


Send all packets destined for networks not in my routing table to 200.0.0.2 or out interface s0/0/1
**Normally used for connection to ISP

Juniper


set routing-options static route 0.0.0.0/0 next-hop 200.0.0.2

Thursday, May 13, 2010

Static route & floating Static route



Cisco


ip route next-hop address => admin distance of 1
ip route local exit interface => admin distance of 0 like connected interface

e.g. on R1 router
ip route 10.10.30.0 255.255.255.0 10.10.20.2 or
ip route 10.10.30.0 255.255.255.0 s0

** Adding the permanent keyword to a static route statement will keep the static routes in the routing table even if the interface goes down 

floating static route (Backup route)
ip route 10.10.30.0 255.255.255.0 s0
ip route 10.10.30.0 255.255.255.0 s0 91

when running eigrp which has a default AD of 90, eigrp route will appear in routing table and only when that route goes down will the floating static route appear. Serves as a backup route.


Juniper


set routing-options static route 10.10.30.0/24 next-hop 10.10.20.2


IPv6
Cisco - ipv6 route 2001:db8::/32 s0 fe80::1/64
Juniper - set routing-options rib inet6.0 static route 2001:200:20:1::1/128 next-hop 2001:200:30:2::2




Thursday, June 11, 2009

Interface configuration

Cisco


Interface (fa0/0 or s0/0/0 etc… …>)
Description (describe link) =>useful for troubleshooting as it can tell you where is it connected to
Ip address (ip address) (subnet mask)
No shut
hint: subnet mask
/32 255.255.255.255 no useful IP address
/31 255.255.255.254 no useful IP address
/30 255.255.255.252 useful for WAN link, 4 IPs (1 network, 1 broadcast, 2 user IPs)
/29 255.255.255.248 8 IPs (1 network, 1 broadcast, 6 user IPs)
/28 255.255.255.240 16 IPs (1 network, 1 broadcast, 14 user IPs)
/27 255.255.255.224 32 IPs (1 network, 1 broadcast, 30 user IPs)
/26 255.255.255.192 64 IPs (1 network, 1 broadcast, 62 user IPs)
/25 255.255.255.128 128 IPs (1 network, 1 broadcast, 126 user IPs)
/24 255.255.255.0
/23 255.255.254.0
/22 255.255.252.0
/21 255.255.248.0
/20 255.255.240.0


Juniper
Interface (fxp0,lo0,em0,fe-x/0/y,se-x/0/y)
x = PIM slot
y = Port Number



inet => IPv4


root@router#set interfaces em0 unit 0 family inet address (ip address)/(prefix)
root@router#commit


IPv6
Cisco - ipv6 address 2001:db8::1/64
Juniper - set interfaces em0 unit 0 family inet6 address 2001:200:30:2::1/64

Create username login

Cisco
username (name) password privilege (level) (password)

level 15 (Cisco administrator / super-user access)
level 7 (moderate user access)


Junipers
set system login user (name) classs (class)  authentication plain-text-password



               Login class
  operator             permissions [ clear network reset trace view ]
  read-only            permissions [ view ]
  super-user           permissions [ all ]
  unauthorized         permissions [ none ]

Friday, May 22, 2009

Telnet login using IP address

Cisco


Line vty 0 4
Logging synchronous
Password (level 1 password) =>encrypt password
Login local =>enable password login
Session-limit 1 =>limit to 1 login session
Motd-banner =>display warning message


Juniper


set system services telnet  => enable telnet service on the router
set system login user user1 class super-user authentication plain-text-password


=>You will prompted to set your password


Replace user1 with the username you will like to create
Replace super-user with the level of access right you will like to give to the user

Thursday, May 14, 2009

Hostname


Cisco


Router(config)#Hostname B10_L23_R30
B10_L23_R30(config)#


Juniper



[edit]
root# set system host-name B10_L23_R30


[edit]
root# commit
commit complete


[edit]
root@B10_L23_R30# [edit]

Wednesday, May 13, 2009

Banner - Warning Message

Cisco


Banner login % (warning message) %
Banner motd % (warning message) %

e.g. 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                                                                                   *
*                                                                                 *
*    Please navigate away from this website or ip address now if                     *
*    you are not an authorised personnel belonging to ABC Pte Ltd *
*    You will be prosecuted as the host IP that you are using has                    *
*   already been captured by our system if you attempt to navigate                    *
*                                          any further                                           *
*                                                                                 *
*                                                                                 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



Juniper

Special Characters—You can format the message using the following special characters:
  • \n—New line
  • \t—Horizontal tab
  • \'—Single quotation mark
  • \"—Double quotation mark
  • \\—Backslash

root@B10_L23_R30# set system login message "\n\n\n\tPlease Do not enter!!!\n\tYou will be prosecuted under the law\n\tPlease contact abc@company.com to gain access.\n\n\n"



e.g.




                Please Do not enter!!!
                You will be prosecuted under the law
                Please contact abc@company.com to gain access.