Configuring a Basic MPLS VPN

March 08, 2016
It's been a long time I'm away from blogging due to some R&D on the network with Juniper boxes. On this tutorial I'm going to configure very basic MPLS VPN configuration in GNS3. After that we go for EoMPLS configuration.

This is the logical topology for this tutorial.
Here I only post the configuration file from PE other router configuration is almost same. Here is the points should be remember.

1. Make sure IGP with MPLS is configure on PE,P, it shouldn't be configure on customer facing interface.
2. Make sure all loopback interface is reachable. 
3. Configure VRF with RD and RT, then applied it on right interface.
4. Configure MP-BGP on PE and peer it.
5. Make sure to redistribute the CE IGP protocol into the BGP and vice versa.

Below command can be copy paste into your router. Before that make sure you had make change necessary things.

Config from PE1

PE1#sh run
Building configuration...

Current configuration : 2126 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE1
!
ip cef
ip tcp synwait-time 5
!
!
!
!
ip vrf CustA
 rd 100:1
 route-target export 1:100
 route-target import 1:100
!
no ip domain lookup
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf network point-to-point
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 192.168.11.2 255.255.255.252
 ip ospf 1 area 0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip vrf forwarding CustA
 ip address 192.168.13.1 255.255.255.252
 duplex auto
 speed auto
!
!
router eigrp 1
 auto-summary
 !
 address-family ipv4 vrf CustA
 redistribute bgp 1 metric 1500 2000 200 100 15000
 network 192.168.13.0
 no auto-summary
 autonomous-system 100
 exit-address-family
!
router ospf 1
 log-adjacency-changes
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf CustA
 redistribute eigrp 100
 no auto-summary
 no synchronization
 exit-address-family
 =============
CE1#ping 192.168.24.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.24.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/70/92 ms

CE1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     192.168.13.0/30 is subnetted, 1 subnets
C       192.168.13.0 is directly connected, FastEthernet0/1
     192.168.24.0/30 is subnetted, 1 subnets
D       192.168.24.0 [90/307200] via 192.168.13.1, 00:50:22, FastEthernet0/1


Juniper DHCP Server Configuration

September 01, 2015
We already configure our QEMU in GNS3 and run our vSRX Router. Now its time to configure DHCP server in our vSRX router. Lets began.
Logical Diagram for this tutorial



To configure DHCP server

Assign Lowest and highest IP range
root# set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.50 high 192.168.1.200

Assign DNS server (in my case I had used Router interface IP)
root# set system services dhcp pool 192.168.1.0/24 name-server 192.168.1.1

Assign IP address of the router
root# set system services dhcp pool 192.168.1.0/24 router 192.168.1.1

Assign the lease time
root# set system services dhcp pool 192.168.1.0/24 default-lease-time 3600



Assign DHCP as an allowed inbound service for the interface which we are going to enable DHCP.

root# set security zones security-zone untrust interfaces ge-0/0/1 host-inbound-traffic system-services dhcp

Assign IP address to the client faced interface.
root# set interfaces ge-0/0/1 unit 0 family inet address 192.168.1.1/24



Check our client get the IP Address from the server.


How to statically assign IP with fixed MAC address

root#set system service dhcp static-binding 00:50:79:66:68:00 fixed-address 192.168.1.100

PC1>show ip

Request DHCP IP

PC1>dhcp -d




Enjoy

vSRX GNS3 QEMU

September 01, 2015
In this tutorial I'm going to run vSRX JunOS in QEMU and configure it as DHCP Server. Lets began with installing vSRX into QEMU.

I have try vSRX to run into Vbox but never succeeded. So I better to choose QEMU otherwise waste of time.

In my case I had used junos-vsrx-12.1X46-D10.2-domestic to mount into QEMU. Search for it.
Now we have to convert our .vdi file into .image, for that use following command

cd d:\junos\
c:\Program Files\GNS3\qemu\>qemu-img.exe convert -O qcow2 d:\junos\junos-vsrx-12.1X46-D10.2-domestic-disk1.vdi d:\junos\junos-vsrx-12.1X46-D10.2-domestic.img

We just made our image ready to run into QEMU. Go the GNS3

Note: Strongly recommended to use QEMU in linux and enable KVM otherwise it eats up all your CPU and RAM.

-nographic -smp 2 -enable-kvm

>edit>preference>choose "QEMU VMs"
Click on "New" Choose "Default " Gave Name "vSRX" (in my case).






I'll use following topology to configure DHCP server for the tutorial. 



Now we ready to move on the next step. Configuration DHCP








Juniper Message from syslogd

September 01, 2015
While doing some lab test, this weird syslogd message appear every seconds on the console terminal, so it was very difficult to complete the lab.


This messages are due the following syslog configuration . 


So for now we are going to de-activate it to generating the message

#deactivate system syslog user * 
#commit