Wednesday, July 21, 2010

JUNOS 101 #2

#2 OSPF
1. Establish OSPF neighbors between EX-8216 over 10G link (area 0)
2. Configure Vlan1 in ospf area 1.




switch #1

protocols {
ospf {
area 0.0.0.0 {
interface xe-0/0/0.0;
}
}
}

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.1/30;
}
}
}
}




switch #2

protocols {
ospf {
area 0.0.0.0 {
interface xe-0/0/0.0;
}
area 0.0.0.1 {
interface vlan.1;
}
}
}

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.2/30;
}
}
}
}

interface {
vlan {
unit 1 {
family inet {
address 1.1.1.1/24;
}
}
}
}

JUNOS 101 #1

I got a few Juniper boxes to test, 2 x EX-8216 and a few pizza boxes. This is the first time I am working on Junos boxes. These are configuration notes from my first days with Junos on EX-8216.

#1 BGP
Following configuration is
1. Establish a BGP session between two EX-8216
2. Redistribute static route into BGP


Switch #1

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.1/30;
}
}
}
}

routing-options {
static {
route 20.20.20.0/24 next-hop 192.168.14.1;
}
router-id 2.2.2.1;
autonomous-system 1;
}

protocols {
bgp {
group ToAS2 {
type external;
family inet {
unicast;
}
export Static;
peer-as 2;
neighbor 2.2.2.2;
}
}
|

policy-options {
policy-statement Static {
term static {
from protocol static;
}
then accept;
}
}


crusader@j-testms1-re0# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2.2.2.2 2 26364 26345 0 0 1w1d5h 0/0/0/0 0/0/0/0

[edit]
crusader@j-testms1-re0#




Switch #2

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.2/30;
}
}
}
}

routing-options {
router-id 2.2.2.2;
autonomous-system 2;
}


protocols {
bgp {
group ToAS1 {
type external;
family inet {
unicast;
}
peer-as 1;
neighbor 2.2.2.1;
}
}
}

crusader@j-testms2-re0# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 3 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2.2.2.1 1 26346 26366 0 0 1w1d5h 1/3/3/0 0/0/0/0

[edit]
crusader@j-testms2-re0#

[edit]
crusader@j-testms2-re0# run show route protocol bgp

inet.0: 9 destinations, 11 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2.2.2.0/30 [BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0
20.20.20.0/24 *[BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0
192.168.14.0/24 [BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0

inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)

Tuesday, February 9, 2010

Network CLI Utilities

Shows the multicast groups that the host already joined in

netstat -ng (Linux)
netsh interface ip show joins (Windows / RRAS service needs to be enabled and started)

Shows UDP/TCP/IP statistics

netstat -su (Linux)
netstat -st (Linux)
netsh interface ip show udpstats (Windows)
netsh interface ip show tcpstats (Windows)
netsh interface ip show ipstats (Windows)

ping+traceroute on steroids
lft (Linux - stands for Layer4 traceroute)
pathping (Windows)