Configuring PIM on HP A5800 Switch

First make a copy of the configuration file on the tftp server:

backup startup-configuration to 192.168.1.100

To configure the PIM on the HP A5800 switch, connect to the switch via telnet and enter the following commands:

1) Enable the multicast routing switch and pim-sm in vlan 963 which comes from the provider.

system-view
multicast routing-enable
interface Vlan-interface 963
ip address 172.24.24.158 255.255.255.252
pim sm
quit

2) Turn on pim-sm and igmp in vlan 964 on which IPTV will be broadcast to the local network.

interface Vlan-interface 964
ip address 172.25.25.25 255.255.192.0
pim sm
igmp enable
quit

3) We’ll assign the static ip from which the multicast is broadcast.

pim
static-rp 10.0.200.200
quit

4) Add the route to ip from which the multicast is broadcast.

ip route-static 10.0.200.200 255.255.255.255 Vlan-interface963 172.24.24.157

5) Suppose that we accept multicast on vlan 963 tag.

interface Bridge-Aggregation1
port hybrid vlan 963 tagged

6) We will configure any free port for iptv verification and connect to it a computer for example with a playlist in the VLC player.

interface GigabitEthernet1/0/5
port access vlan 964

To test the health and diagnostics, you can use for example the following commands:

display pim interface
display pim interface verbose
display pim rp-info
display pim bsr-info
display pim neighbor
display pim routing-table
display igmp interface
display pim control-message counters
display pim claimed-route

Configuring low-level discovery in Zabbix

Low-level discovery allows you to automatically create data items, triggers, graphics.
Massively it is better not to use it, since in practice it noticed that it gives a significant load on the system.

Here is an example of the discovery configuration for viewing the port load of the managed switch.
To start, open the “Settings” – “Templates“, create a new template, or click “Discovery“.
Click “Create rule” and fill out the main parameters:

Continue reading “Configuring low-level discovery in Zabbix”

How to format UDF Volume in Ubuntu

I recently wanted to format the USB flash drive in the Ubuntu operating system, but since it was in UDF format, formatting was refused and many programs did not see it as a flash drive.

To begin with, let’s look at the discs:

sudo fdisk -lu

Then the solution was to execute the following command:

sudo shred -vzn 0 /dev/sdc

After that, the flash drive can be formatted by any program.

Install and configure lm-sensors

Run the command to install the utility in Ubuntu / Debian:

sudo apt-get install lm-sensors sensord

We introduce the sensor detection command:

sudo sensors-detect

Information about detected sensors will be recorded in the file /etc/modules

Let’s review the sensor data:

sensors

I’ll describe some of the start keys sensors:
-c, –config-file (specifying the configuration file)
-h, –help (display help)
-s, –set (execution of `set ‘messages (only from root)
-f, –fahrenheit (temperature display in fahrenheit)
-A, –no-adapter (do not show the adapter for each chip)
–bus-list (generating bus messages for sensors.conf
-u (raw conclusion)
-v, –version (display version of the program)

Installing and Configuring SNMPD + MRTG

MRTG (Multi Router Traffic Grapher) – a tool for displaying various data in graphs.

The installation command in Ubuntu/Debian:

sudo apt-get install mrtg snmp snmpd

In CentOS:

yum install mrtg net-snmp net-snmp-utils

The command below can tell you which additional modules are in the repository:

apt-cache search mrtg

Open the configuration file /etc/snmp/snmpd.conf

sudo nano /etc/snmp/snmpd.conf

Comment on the line:

com2sec paranoid default public

And uncomment the line:

com2sec readonly default public

Restart snmpd so that changes to the configuration file take effect:

sudo /etc/init.d/snmpd restart

You can check snmp by commands:

netstat -nlp | grep snmpd
snmpwalk -v2с -c public localhost

Beginners can generate a simple configuration file with the command:

sudo cfgmaker public@localhost >> /etc/mrtg.cfg

where public is the name of the community (the password is in other words), and localhost is the host address or ip.

Example of starting the configuration file /etc/mrtg.cfg:

WorkDir: /var/www/mrtg
Options[_]: growright, bits, nobanner
Background[_]: #B0C4DE
EnableIPv6: no
Language: russian
EnableSnmpV3: no
Interval: 10
Refresh: 600
Include: /etc/mrtg/server1.cfg
Include: /etc/mrtg/server2.cfg

Create the working directory:

sudo mkdir /var/www/mrtg

Then you must write or generate the index.html file with the command:

sudo indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

We look at the log /var/log/mrtg.log so that there are no errors.

Here is an example of setting up SNMP on D-Link switches:

private CommunityView Read Write
public CommunityView Read Only

Example of a manual start script (mrtg.sh):

#!/bin/bash
#run mrtg
LANG=C
export $LANG
/usr/bin/mrtg /etc/mrtg.cfg --logging /var/log/mrtg.log

IPTables rules for Samba

To open access to Samba in IPTables, you must add four rules at once:

sudo iptables -A INPUT -p udp -m udp --dport 137 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --dport 138 -j ACCEPT
sudo iptables -A INPUT -p tcp -m tcp --dport 139 -j ACCEPT
sudo iptables -A INPUT -p tcp -m tcp --dport 445 -j ACCEPT

To only allow access to a particular network, for example 192.168.1.0/24:

sudo iptables -A INPUT -s 192.168.1.0/24 -p udp -m udp --dport 137 -j ACCEPT
sudo iptables -A INPUT -s 192.168.1.0/24 -p udp -m udp --dport 138 -j ACCEPT
sudo iptables -A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 139 -j ACCEPT
sudo iptables -A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 445 -j ACCEPT

To remove a rule, we’ll specify the same command, replacing -A with -D, for example:

sudo iptables -D INPUT -s 192.168.1.0/24 -p udp -m udp --dport 137 -j ACCEPT
sudo iptables -D INPUT -s 192.168.1.0/24 -p udp -m udp --dport 138 -j ACCEPT
sudo iptables -D INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 139 -j ACCEPT
sudo iptables -D INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 445 -j ACCEPT

To view the list of rules, use the command:

sudo iptables -nvL

See also my articles:
Configuring IPTables
Installing and Configuring Samba on Linux