Tag: Interface

Junos: vSRX Interface Un-Alignment Recovery

Junos: vSRX Interface Un-Alignment Recovery

Please follow the below steps to perform re-alignment of the network interfaces on the vSRX appliance this can happen if you have been using a release older than D62

How to recover.
1.Shutdown node0 and node1
2. Remove all NICs
3. Power up node0 and node1 , when it reaches config loading power off node0 and node1
4. Add 3 NIC to node0 and node 1 and power on the nodes
5.Check the cluster status , node0 and node1 should see each other and fabric link should be up and working
If you require more network interfaces to be added to your appliance please follow the KB in the link below

http://www.juniper.net/techpubs/en_US/vsrx15.1×49/topics/task/configuration/security-vsrx-vmware-adding-interfaces.html#jd0e206

If you are making changes to network firewalls ensure that you have a backup and a revert plan as a pro-cautionĀ 

Junos: Hidden Commands Monitor Interface Traffic

Junos: Hidden Commands Monitor Interface Traffic

Found a useful command today that allows you to capture interface traffic and dum it into a pcap file and you can even view the content of the file within the SRX CLI

To Start Traffic Monitoring

user@srx>monitor traffic interface ge-0/0/1.0 write-file test.pcap

To View Capture File

user@srx>monitor traffic read-file test.pcap

 

 

 

PS: Using Forms to Return PC Hostname

PS: Using Forms to Return PC Hostname

The following script is a short demo to show you how to build a form and display the PC host name in a text box on the button click action

#Generated Form Function
function GenerateForm {
#region Import the Assemblies
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
#endregion

#region Generated Form Objects
$form1 = New-Object System.Windows.Forms.Form
$textBox1 = New-Object System.Windows.Forms.TextBox
$button1 = New-Object System.Windows.Forms.Button
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
#endregion Generated Form Objects

#----------------------------------------------
#Generated Event Script Blocks
#----------------------------------------------
#Provide Custom Code for events specified in PrimalForms.
$button1_OnClick=
{
#TODO: Place custom script here
$textBox1.Text = $env:COMPUTERNAME

}

$handler_form1_Load=
{
#TODO: Place custom script here

}

$OnLoadForm_StateCorrection=
{#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}

#----------------------------------------------
#region Generated Form Code
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 261
$System_Drawing_Size.Width = 284
$form1.ClientSize = $System_Drawing_Size
$form1.DataBindings.DefaultDataSourceUpdateMode = 0
$form1.Name = "form1"
$form1.Text = "GET PC Name"
$form1.add_Load($handler_form1_Load)

$textBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 73
$System_Drawing_Point.Y = 120
$textBox1.Location = $System_Drawing_Point
$textBox1.Name = "textBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 20
$System_Drawing_Size.Width = 175
$textBox1.Size = $System_Drawing_Size
$textBox1.TabIndex = 1

$form1.Controls.Add($textBox1)

$button1.DataBindings.DefaultDataSourceUpdateMode = 0

$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 105
$System_Drawing_Point.Y = 91
$button1.Location = $System_Drawing_Point
$button1.Name = "button1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 23
$System_Drawing_Size.Width = 75
$button1.Size = $System_Drawing_Size
$button1.TabIndex = 0
$button1.Text = "GO!"
$button1.UseVisualStyleBackColor = $True
$button1.add_Click($button1_OnClick)

$form1.Controls.Add($button1)

#endregion Generated Form Code

#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($OnLoadForm_StateCorrection)
#Show the Form
$form1.ShowDialog()| Out-Null

} #End Function

#Call the Function
GenerateForm