Monday, July 25, 2016

RHCE7 Objective: Network Bonding and Teaming

NIC/Channel Bonding RHEL6

Saturday, May 14, 2016

Ethernet Bonding in Redhat Linux (Port Trunk) with Multiple Vlan

Hi Friends,
I have done this project  for a High Frequency Trading Server. In this i created a bond [logical interface] with multiple VLANs from [2 physical interface] at blade server.
From this i achieved redundancy of Ethernet Ports and backend Networking.


1) First go to #cd /etc/sysconfig/network-scripts and edit [ifcfg-eth0]


DEVICE=eth0
HWADDR=00:0a:f7:66:ff:f2
TYPE=Ethernet
UUID=64a6fa8a-3bha-4d46-8080-830149e031a0
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
IPV6INIT=no
USERCTL=no

2) Edit [ifcfg-eth1]

DEVICE=eth1
HWADDR=00:0A:F7:66:FF:F0
TYPE=Ethernet
UUID=fcdde1bc-2bgaa-4fc7-a358-31f47587cd5b
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
IPV6INIT=no
USERCTL=no


3) Create a new Ifcfg-bond0 after making a copy of ifcfg-eth0 and edit it as below
DEVICE=bond0
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPV6INIT=no
USERCTL=no
BONDING_OPTS="mode=0 miimon=100"


4) Create a new Ifcfg-bond0.51 (In this 51 is tagged to Vlan 51)
DEVICE=bond0.51
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
ONPARENT=yes
IPADDR=10.211.211.156
NETMASK=255.255.255.240
GATEWAY=10.211.211.145
IPV6INIT=no
USERCTL=no
VLAN=yes


5) Create a new Ifcfg-bond0.58 (In this 58 is tagged to Vlan 58)
DEVICE=bond0.58
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
ONPARENT=yes
IPADDR=13.13.13.5
NETMASK=255.255.255.0
GATEWAY=
IPV6INIT=no
USERCTL=no
VLAN=yes

6) Edit the /etc/modprobe.d/bonding.conf file and edit as below


[root@localhost]#vi /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 mode=0 miimon=100

#(Bonding Load Balancing methods are defined at below no. 10)


7)  Go to the backend switches and allow the Vlan Trunk with Vlan allowed[51 & 58]
8) Then restart the network service
#service network restart

9) Now its time to check the vlans connectivity Guys.. It should definitely work. I did it on RHEL 5.7 64 Bit server.

10) Details of Load Balancing methods : (In my case mode=0 was success)

 You can set up your bond interface according to your needs. Changing one parameters (mode=X) you can have the following bonding types:
mode=0 (balance-rr)
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

mode=1 (active-backup)
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.

mode=2 (balance-xor)
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.

mode=3 (broadcast)
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.

mode=4 (802.3ad)
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.

    Pre-requisites:
    1. Ethtool support in the base drivers for retrieving
    the speed and duplex of each slave.
    2. A switch that supports IEEE 802.3ad Dynamic link
    aggregation.
    Most switches will require some type of configuration
    to enable 802.3ad mode.

mode=5 (balance-tlb)
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.

    Prerequisite:
    Ethtool support in the base drivers for retrieving the
    speed of each slave.

mode=6 (balance-alb)
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.

The most used are the first four mode types...

Also you can use multiple bond interface but for that you must load the bonding module as many as you need.
Presuming that you want two bond interface you must configure the /etc/modules.conf as follow:

    alias bond0 bonding
    options bond0 -o bond0 mode=0 miimon=100
    alias bond1 bonding
    options bond1 -o bond1 mode=1 miimon=100

Test :
To check status type : watch -n cat /proc/net/bonding/bond0

Alternate Way if facing errors related to delaying initialization then (Ifcfg-bond0.x) vlan interface shold be present before this vconfig command:

Use the vconfig command instead to add VLAN which is more appropriate to create VLAN tagging.
#yum install vconfig -y 
###If you dont have the package already installed 
 
#modprobe 8021q 
###To load the VLAN module 
 
#vconfig add bond0 58
###To add a VLAN inteface with ID 58 
 
#vconfig rem bond0.58 
###To remove the interface 
 
#ifconfig bond0.58 
###To view the status/information of VLAN interface 
 
#ifconfig bond.58 192.168.58.100 netmask 255.255.255.0 broadcast 192.168.58.255 up 
### To assign an IP to this interface 
 
#cat /proc/net/vlan/bond0.58 
or check ifconfig |more


Thanks
Rohit Kumar

Wednesday, May 11, 2016

WhatsApp on Desktop Application

Introducing WhatsApp's desktop app

Today we're introducing a desktop app so you have a new way to stay in touch anytime and anywhere - whether on your phone or computer at home or work. Like WhatsApp Web, our desktop app is simply an extension of your phone: the app mirrors conversations and messages from your mobile device.
The new desktop app is available for Windows 8+ and Mac OS 10.9+ and is synced with WhatsApp on your mobile device. Because the app runs natively on your desktop, you'll have support for native desktop notifications, better keyboard shortcuts, and more.
To download the app, visit https://www.whatsapp.com/download from your desktop browser. Then, open the app and scan the QR code using the WhatsApp app on your phone (look for WhatsApp Web menu under Settings).
Just like WhatsApp Web, the new desktop app lets you message with friends and family while your phone stays in your pocket.

Thursday, March 31, 2016

How to create CRONTAB to restart ubuntu





Use cron (should already be installed):

Edit crontab:
sudo crontab -e

The first time you might have to choose your preferred editor (like nano)

Insert a line like
0 6   *   *   *    /sbin/shutdown -r +5
at the bottom. Explanation:
m      h    dom        mon   dow       command
minute hour dayOfMonth Month dayOfWeek commandToRun
so the line
  0 6   *   *   *    /sbin/shutdown -r +5

would reboot your system every day at 6:05am. (6:00am + 5 minutes)

Ctrl+X, Y, Enter should get you out of crontab (if using nano)

Note: you might have to run crontab -e as root, because shutdown needs root.

Monday, February 29, 2016

Windows - Set the size of the "Buffer Memory"


[ Windows ] Set the size of the "Buffer Memory"

 
By default Windows 7/Vista make use of only 512 Kb of your RAM as "Buffer Memory", to optimize exchanges between the Hard drive and the Main Memory.
If your system sports more that 1GB of RAM, then you can increase the space allocated.

For this you must make some modifications in the registry (better make up a backup before).
  • Click on Start/Run/regedit.
  • Expand the following key: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/Memory Management.
  • Search for the following value: IoPageLockLimit
  • In the case the value doesn't exist, create it:
    • Right click and choose New > DWORD Value (32bit).
    • Name the value IoPageLockLimit and double click it.
  • Select Hexadecimal (base).
  • Enter value F0000 and click OK.
  • Close the Registry Editor and restart your PC to apply the change.

Wednesday, February 10, 2016

Server has a weak, ephemeral Diffie-Hellman public key

Hi,
I am writing this blog to help saving time for admins like me who are getting this error in their browsers "Server has a weak, ephemeral Diffie-Hellman public key"

The server.xml in tomcat is looks similar to this :

       clientAuth="false" sslProtocol="TLS"/> 

With Firefox, I get the untrusted communication error. and there are no errors in catalina.log.

Solution :
Just add this below keystorePass

ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"

 and Save.

It should look like this :

ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"
clientAuth="false" sslProtocol="TLS"/>

Thats all friends, restart the service and the page will open normal.

Thanks
Rohit Kumar

Tuesday, February 9, 2016

3COM MSR Series Router Configuration Commands

3COM MSR Series Router Configuration Commands

System is starting...

Do you want to check SDRAM? [Y/N]
Booting Normal Extend BootWare...

************************************************************************
H3C MSR20-11 BootWare, Version 2.09 ************************************************************************
Copyright (c) 2004-2008 Hangzhou H3C Technologies Co., Ltd.
Compiled Date : Jan 5 2009
CPU Type : MPC8323E
CPU L1 Cache : 16KB
CPU Clock Speed : 333MHz
Memory Type : DDR SDRAM
Memory Size : 256MB
Memory Speed : 266MHz
BootWare Size : 1024KB
CPLD Version : 1.0
PCB Version : 3.0

Boot Ware Validating...
Press Ctrl+B to enter extended boot menu...
Starting to get the main application file--flash:/main.bin!...............................................................................................
The main application file is self-decompressing.......................................... Done!

System application is starting...
Press ENTER to get started.
system-view
System View: return to User View with Ctrl+Z.
[H3C]

[H3C]int e0/0
[H3C-Ethernet0/0]ip add
[H3C-Ethernet0/0]ip address 172.17.0.1 255.255.255.0
[H3C-Ethernet0/0]quit
[H3C]

[H3C]int s0/0
[H3C-Serial0/0]ip address 172.20.0.1 255.255.255.252
[H3C-Serial0/0]link-protocol hdlc or link-protocol ppp
[H3C-Serial0/0]quit
[H3C]
[H3C]sysname MSR2011
[MSR2011]

[H3C]ip route-static 0.0.0.0 0.0.0.0 172.20.0.2
[H3C]undo ip route-static 0.0.0.0 0.0.0.0 172.20.0.2

[H3C]int e0/0.100 (Sub Interface dot1q config)
[H3C-Ethernet0/0.100]vlan-type dot1q vid 100
[H3C-Ethernet0/0.100]ip address 172.19.0.1 255.255.255.0

[H3C]int e0/1
[H3C-Ethernet0/1]port link-mode route
[H3C-Ethernet0/1]ip address 172.18.0.1 255.255.255.0
[H3C-Ethernet0/1]dis this
interface Ethernet0/1
port link-mode route
ip address 172.18.0.1 255.255.255.0

[H3C]telnet server enable
% Start Telnet server

[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
[H3C-ui-vty0-4]quit
[H3C]

[H3C]local-user test
New local user added.
[H3C-luser-test]password simple xyz or [H3C-luser-test]password cipher xyz
[H3C-luser-test]service-type telnet
[H3C-luser-test]authorization-attribute level 3
[H3C-luser-test]quit
[H3C]

[H3C]user-interface aux 0
[H3C-ui-aux0]authentication-mode password
[H3C-ui-aux0]set authentication password simple 3com

[H3C]user-interface aux 0 (
[H3C-ui-aux0]undo authentication-mode
[H3C-ui-aux0]undo set authentication password

[H3C]dns resolve
[H3C]dns server 4.2.2.2

[H3C]dis ip int brie (To view ip address details of interfaces)
*down: administratively down , (s): spoofing
Interface Physical Protocol IP Address Description
Aux0 down down unassigned Aux0 Inte...
Ethernet0/0 up up 172.17.0.1 Ethernet0...
Ethernet0/1 up up 172.18.0.1 Ethernet0...
Serial0/0 up up 172.20.0.1 Serial0/0...
Vlan-interface1 down down 192.168.1.1 Vlan-inte...

[H3C]save (For Saving Configuration)
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait........
Configuration is saved to device successfully.

[H3C]save abc.cfg
The current configuration will be saved to flash:/abc.cfg. Continue? [Y/N]:y
Now saving current configuration to the device.
Saving configuration flash:/abc.cfg. Please wait..........
Configuration is saved to flash successfully.

dir
Directory of flash:/
0 -rw- 13738388 Jan 01 2007 00:02:22 main.bin
1 -rw- 1008 Jan 01 2007 00:12:00 startup.cfg
2 -rw- 1008 Jan 01 2007 00:13:08 abc.cfg

delete abc.cfg
Delete flash:/abc.cfg?[Y/N]: y
%Delete file flash:/abc.cfg...Done.

reset save (To Clear saved configuration)
The saved configuration file will be erased. Are you sure? [Y/N]: y
Configuration file in flash is being cleared.
Please wait ............. Configuration file in flash is cleared.

reboot (To reboot Router)
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Current configuration may be lost in next startup if you continue. Continue? [Y/N]:y
System is rebooting now.
Now rebooting, please wait...

[H3C-Ethernet0/0]shut (To Down ethernet port)
[H3C-Ethernet0/0]undo shut (To Up ethernet port)
[H3C]dis cu (To show current configuration of Router)
[H3C]dis sa (To show saved configuration of Router)
[H3C]dis ver (To show BootROM version of Router)
[H3C]display diagnostic-information (To view all information)
[H3C]display interface (To view interface)

[H3C]clock timezone IST add 05:30:00
[H3C]dis clock
12:39:00 IST Sat 05/16/2009
Time Zone : IST add 05:30:00
[H3C]ntp-service unicast-server x.x.x.x (where x.x.x.x is a ip add of ntp server)

[H3C]display device manuinfo (To view Sr. No. of Router)
slot 0
DEVICE_NAME           : MSR 20-10
DEVICE_SERIAL_NUMBER : 210235A0A7B098000075
MAC_ADDRESS           : 0023-8962-9DE7
MANUFACTURING_DATE   : 2009-08-27
VENDOR_NAME          : H3C

[H3C]interface Serial0/0 (Multilink Serial Config)
[H3C-Serial0/0]link-protocol ppp
[H3C-Serial0/0]ppp mp Mp-group 10
[H3C-Serial0/0]quit
[H3C]interface Mp-group10
[H3C-Mp-group10]ip address X.X.X.X 255.255.255.252

[H3C]interface LoopBack0 (To assign Loopback IP address.)
[H3C-Loopback0]ip address 172.36.0.1 255.255.255.255

[H3C]ping x.x.x.x (where x.x.x.x is destination ip address)

[H3C]ping -s 1500 x.x.x.x
(where 1500 is datagram size & x.x.x.x is destination ip address)

[H3C]ping -c 100 x.x.x.x
(where 100 is no.of times to ping & x.x.x.x is destination ip address)

[H3C]interface Vlan-interface1 (To assign IP address to Vlan Interface)
[H3C-Vlan-interface1]ip address 192.168.1.1 255.255.255.0
[H3C-Vlan-interface1]ip address 192.168.2.1 255.255.255.0 sub
(To assign secondary IP address)

[H3C]user-interface console 0
[H3C-ui-console0]screen-length 0 ( 0 means to display all information at one time)
[H3C-ui-console0]undo screen-length (To restore screen length to default 24 lines)
[H3C]ip count enable (To Enable IP accounting)
[H3C]interface ethernet 0/0
[H3C-Ethernet0/0]ip count inbound-packets
[H3C-Ethernet0/0]ip count outbound-packets

[H3C]undo ip count enable (To Remove IP accounting)
[H3C]interface ethernet 0/0
[H3C-Ethernet0/0]undo ip count inbound-packets
[H3C-Ethernet0/0]undo ip count outbound-packets

VRRP Config on Primary Router :-
[H3C]interface ethernet 0/0
[H3C-Ethernet0/0]ip address 10.10.10.2 255.255.255.0
[H3C-Ethernet0/0]vrrp vrid 1 virtual-ip 10.10.10.1 (Set Virtual IP address)
[H3C-Ethernet0/0]vrrp vrid 1 priority 110 (Set Higher Priority for Primary router)
[H3C-Ethernet0/0]vrrp vrid 1 preempt-mode timer delay 5

Set the interface to be tracked -
[H3C-Ethernet0/0]vrrp vrid 1 track interface ethernet 0/1 reduced 30 or
[H3C-Ethernet0/0]vrrp vrid 1 track interface Serial0/0 reduced 30

VRRP Config on Secondary Router :-
[H3C]interface ethernet 0/0
[H3C-Ethernet0/0]ip address 10.10.10.3 255.255.255.240
[H3C-Ethernet0/0]vrrp vrid 1 virtual-ip 10.10.10.1 (Set Virtual IP address)
[H3C-Ethernet0/0]vrrp vrid 1 preempt-mode timer delay 5

[H3C-Ethernet1/0]display vrrp verbose (To verify VRRP configuration)

BGP Config :-
bgp 64520 (where 64520 is BGP no.)
import-route direct
import-route static
undo synchronization
peer x.x.x.x as-number 9730 (where x.x.x.x is ISP side POP end IP)

ISDN Config as a Backup :-
#
acl number 2011
rule 0 permit time-range test
#
acl number 3001
rule 0 permit ip source x.x.x.x 0
#
local-user test
password simple cisco
service-type ppp
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1 p="">
authorization-attribute level 3
service-type telnet
#
interface Bri0/0
link-protocol ppp
dialer enable-circular
dialer-group 1
dialer circular-group 0
dialer timer idle 300
dialer timer wait-carrier 300
dialer queue-length 60
#
interface Dialer0
link-protocol ppp
ppp authentication-mode chap
ppp chap user airtel
ppp chap password simple cisco
ppp mp
ip address 10.10.10.10 255.255.255.252
dialer enable-circular
dialer-group 1
dialer timer idle 300
dialer timer wait-carrier 300
dialer queue-length 60
dialer threshold 0 in-out
dialer route ip 10.10.10.9 user airtel broadcast 44332211
#
interface Serial1/0
link-protocol ppp
ip address 20.20.20.10 255.255.255.252
standby interface Dialer0
standby timer delay 3 300
qos car inbound acl 3001 cir 10 cbs 1000 ebs 0 green pass red discard
#
ip route-static 0.0.0.0 0.0.0.0 20.20.20.9
ip route-static 0.0.0.0 0.0.0.0 10.10.10.9 preference 80
#
dialer-rule 1 acl 2011
#
Multicasting Config at Hub Location:-

#
multicast routing-enable
#
acl number 2111
rule 0 permit source 239.0.0.2 0 (where 239.0.0.2 is multicast group1)
rule 1 permit source 239.0.0.3 0 (where 239.0.0.3 is multicast group2)
rule 3 deny
#
interface Ethernet0/0
port link-mode route
ip address x.x.x.x x.x.x.x
igmp enable
igmp version 3
pim sm
#
pim
ssm-policy 2111

Multicasting Config at Spoke Location:-

#
multicast routing-enable
#
acl number 2111
rule 0 permit source 239.0.0.2 0 (where 239.0.0.2 is multicast group1)
rule 1 permit source 239.0.0.3 0 (where 239.0.0.3 is multicast group2)
rule 3 deny
#
interface Ethernet0/0
port link-mode route
ip address x.x.x.x x.x.x.x
igmp enable
igmp version 3
igmp static-group 239.0.0.2 source 192.168.2.X (where 192.168.2.X is multicast source)
igmp static-group 239.0.0.3 source 192.168.3.X (where 192.168.3.X is multicast source)
pim sm
#
pim
ssm-policy 2111

To verify Multicast config :-
[H3C]display pim interface
[H3C]display pim routing-table
To take backup of Firmware/config file from Router to PC using tftp server.

tftp 172.17.0.2 put main.bin (172.17.0.2 is a tftp server IP add.)
(main.bin is a firmware file name)
File will be transferred in binary mode.
Copying file to remote tftp server. Please wait... /
TFTP: 4840428 bytes sent in 58 second(s).
File uploaded successfully.

To restore Firmware/config file from PC to Router using tftp server.

tftp 172.17.0.2 get main.bin (172.17.0.2 is a tftp server IP add.)
(main.bin is a firmware file name)

To take backup of Firmware/config file from Router to PC using ftp server.
Enable ftp server & service-type ftp for admin user using foll. Command.
[H3C]FTP server enable
[H3C]local-user admin
[H3C-luser-admin]service-type ftp

Go to command prompt C:\Documents and Settings\Administrator>cd\
c:\ftp 172.17.0.1 (Router ethernet IP add.)
Connected to 172.17.0.1
220 FTP service ready.
User (172.17.0.1:(none)): admin
331 Password required for admin.
Password:
230 User logged in.

ftp> ls
200 Port command okay.
150 Opening ASCII mode data connection for /*.
main.bin
startup.cfg
abc.cfg
226 Transfer complete.
ftp: 34 bytes received in 0.40Seconds 0.08Kbytes/sec.

ftp>get abc.cfg (To take backup of Firmware/config file from Router to PC)
200 Port command okay.
150 Opening ASCII mode data connection for /abc.cfg.
226 Transfer complete.
ftp: 2814 bytes received in 0.00Seconds 2814000.00Kbytes/sec.
ftp> quit
221 Server closing.
ftp>put abc.cfg (To restore Firmware/config file from PC to Router)
To set new boot-loader file for boot startup use foll. Command.

boot-loader file cfa0:/msr201x-cmw520-r1719p01.bin main
This command will set the boot file. Continue? [Y/N]:y........
The specified file will be used as the main boot file at the next reboot on slot 0!

dis boot-loader
The boot file used at this reboot:cfa0:/ msr201x-cmw520-r1719p01.bin attribute: main
The boot file used at the next reboot:cfa0:/main.bin attribute: main
The boot file used at the next reboot:cfa0:/main.bin attribute: backup
Failed to get the secure boot file used at the next reboot!

To enable netstream on the interface.

[H3C]interface e0/0
[H3C-Ethernet0/0]ip netstream inbound
[H3C-Ethernet0/0]ip netstream outbound

To set the netflow server setting, please ensure to check the port number(9996).
[H3C]ip netstream export host x.x.x.x 9996 (where x.x.x.x is Netflow server IP add.)
[H3C]ip netstream export source interface e0/1

To check the status on router.
[H3C]display ip netstream cache

To configure the SNMP basic information, including version and community name.

[H3C]snmp-agent trap enable
[H3C]snmp-agent sys-info version v1
[H3C]snmp-agent community read public
[H3C]snmp-agent community write private
[H3C]snmp-agent target-host trap address udp-domain 172.17.0.2 params securityname private
[H3C]snmp-agent target-host trap address udp-domain 172.17.0.2 params securityname public

To remove snmp-agent target-host :

[H3C]undo snmp-agent target-host x.x.x.x securityname public
[H3C]undo snmp-agent target-host x.x.x.x securityname private

[H3C]display arp all
reset arp all
IP SEC config :
#
acl number 3999
rule 0 permit ip source xx.xx.xx.xx yy.yy.yy.yy (where yy.yy.yy.yy is wild card mask)
rule 1 deny ip
#
ike proposal 1
encryption-algorithm 3des-cbc
dh group2
authentication-algorithm md5
#
ike dpd xxxx
#
ike peer xxxx
pre-shared-key cipher yyyy
remote-address x.x.x.x
local-address y.y.y.y
dpd xxxx
#
ipsec proposal 1
esp authentication-algorithm sha1
esp encryption-algorithm 3des
#
ipsec policy 1 1 isakmp
security acl 3999
ike-peer xxxx
proposal 1

Nqa Track config :
#
nqa entry admin test
type icmp-echo
destination ip x.x.x.x (where x.x.x.x is remote end ip add. Which we have to monitor)
frequency 1000
probe count 5
probe timeout 800
reaction 1 checked-element probe-fail threshold-type consecutive 2 action-type trigger-only
#
ip route-static 0.0.0.0 0.0.0.0 x.x.x.x track 1
ip route-static 0.0.0.0 0.0.0.0 y.y.y.y preference 80 (where y.y.y.y is second path ip add.)
#
track 1 nqa entry admin test reaction 1
#
nqa schedule admin test start-time now lifetime forever
#
NAT Config for Internet Link & MPLS link on single interface :-

#
dns resolve
dns server X.X.X.X (where X.X.X.X is dns server IP address)
#
acl number 2001
rule 0 permit source 192.168.1.0 0.0.0.255 (where 192.168.1.0 is local LAN network)
#
interface Ethernet0/0.100
vlan-type dot1q vid 100
ip address 172.16.4.22 255.255.255.252 (MPLS Link IP address)
#
interface Ethernet0/0.200
vlan-type dot1q vid 200
nat outbound 2001
ip address 125.20.4.226 255.255.255.252 (Internet Link IP address)
#
interface Vlan-interface1 or interface Ethernet0/1
ip address 192.168.1.1 255.255.255.0 (Local LAN Network)
ip address 125.20.8.225 255.255.255.240 sub (Public IP Pool)
#
ip route-static 0.0.0.0 0.0.0.0 125.20.4.225 (Default Route to Internet Link)
#

NAT Config for Internet Link having Public IP Pool :-

#
dns resolve
dns server X.X.X.X (where X.X.X.X is dns server IP address)
#
acl number 2001
rule 0 permit source 192.168.0.0 0.0.0.255
#
interface Ethernet0/0
port link-mode route
nat outbound 2001
ip address X.X.X.X 255.255.255.252 (Public IP address)
#
interface Ethernet0/1
port link-mode route
ip address 192.168.0.1 255.255.255.0 (Local LAN Network)
#
ip route-static 0.0.0.0 0.0.0.0 X.X.X.X (Default Route to Internet Link)
#
Tunnel Interface Config :-
[H3C]interface tunnel 0
[H3C-Tunnel0]source X.X.X.X (X.X.X.X is source IP add.)
[H3C-Tunnel0]destination Y.Y.Y.Y (Y.Y.Y.Y is destination IP add.)
[H3C-Tunnel0]keepalive 5 5

SSH Server Configuration Using Password Authentication :-

[H3C]public-key local create rsa (Generate RSA key to enable SSH server)
[H3C]public-key local create dsa (Generate DSA key to enable SSH server)
[H3C]ssh server enable (To enable SSH server)
[H3C]local-user test (To create New User with Password for SSH access)
[H3C-luser-test]password simple xyz or [H3C-luser-test]password cipher xyz
[H3C-luser-test]service-type ssh
[H3C-luser-test]authorization-attribute level 3
[H3C-luser-test]quit
[H3C] user-interface vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme
[H3C-ui-vty0-4] protocol inbound ssh
[H3C-ui-vty0-4] quit
[H3C]ssh user test service-type stelnet authentication-type password

[H3C]dis public-key local rsa public (To view rsa public key)
[H3C]dis public-key local dsa public (To view dsa public key)

Link Aggregation:-

[H3C] link-aggregation group 1 mode manual
[H3C] interface ethernet 0/1 (Add ports Ethernet 0/1 through Ethernet 0/2 to the group.)
[H3C-Ethernet0/1] port link-aggregation group 1
[H3C-Ethernet0/1] interface ethernet 0/2
[H3C-Ethernet0/2] port link-aggregation group 1

[H3C] display link-aggregation interface
[H3C] display link-aggregation summary

Port Mirroring Configuration :-

[H3C] mirroring-group 1 local
# Add port Ethernet 1/1 and Ethernet 1/2 to the port mirroring group as source ports. Add port Ethernet 1/3 to the port mirroring group as the destination port.
[H3C] mirroring-group 1 mirroring-port ethernet 1/1 ethernet 1/2 both
[H3C] mirroring-group 1 monitor-port ethernet 1/3

# Display the configuration of all the port mirroring groups.
[H3C] display mirroring-group all

Wednesday, January 6, 2016

Windows Store Apps in Windows 10 / 8 e.g., calculator not working

How to re-register Windows Store Apps in Windows 10 / 8

We have seen many issues in which users having trouble using Windows Store Apps in Windows 10 / 8 and Windows 8.1. Sometimes, the apps refuse to start and take you back to the Start Screen. In some other scenarios, you may receive This app can’t open error. In yet other cases, users are not able to update existing apps to solve the issues they’re experiencing with the current version. In all such cases, there is one thing you can try, and that is to re-register the apps.
re-register Windows Store Apps in Windows 8
If the system apps are unable to start due to issues with the user account, the problem can be solved by creating a new admin account, because Windows automatically sets apps to factory defaults for new accounts. Re-registering of apps is an offline operation and you don’t need to stay connected to the Internet for that. It can be done via executing a simple command in Windows PowerShell. If you’re facing issues with multiple issues with apps on your system, try to re-register the apps and get rid of the issues.

Re-register Windows Store Apps

1. Press Windows Key + Q, type powershell and select Windows PowerShell from the results, right click over it and choose Run as administrator.
Re-Register-Modern-Apps-1
2. In the administrative Windows PowerShell window, type following command and hit Enter key then:
Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Re-Register-Modern-Apps-2
Once the command is successfully executed, you can close Windows PowerShell and reboot the machine. After restarting the system, problems with apps on your Windows should be fixed.

Good Luck..

Friday, January 1, 2016

Best Way to Create PDF Printer in Ubuntu

Instructions: How to Create Virtual PDF Printer in Ubuntu 12.04

Creating PDF printer in Ubuntu 12.04 is easier and does not require you to navigate online. follow these instructions:
Open your terminal, then type these following command:
sudo apt-get install cups-pdf
If installation is complete, you can navigate to System Settings -> Hardware -> Printers, cups-pdf automatically detected as Printer.
Printers Settings
Your PDF printer is now ready use. default “printing location” is at /home/username/PDF
Test_page.pdf — (Test page)_166

Monday, December 28, 2015

How to use Missing Pause/Break key on Dell or almost all laptops

1) click the START, then type REGEDIT into the search box. This will start the registry editor.

2) Explore the Registry, expanding each element
HKEY_LOCAL_MACHINE
-SYSTEM
-Current Control Set
- Control
- Keyboard Layout
Click on the Scancode Map, and EDIT the key values to match that shown below.
i.e. to have values of : 00,00,00,00,00,00,00,00,02,00,00,00,46,e0,44,00,00,00,00,00
Once Done you will need to re-boot your laptop, but after that you can use as the pause/Break Key.

(Option)
If you want you can copy/Paste the text below into a *.txt file.
Save the file onto your desktop and rename as New_Reg_Key.reg because of the *.reg extension you can then double_click the file to add the new registry key.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,46,e0,44,00,00,00,00,00

Thursday, December 17, 2015

How to disable USB storage usage in Ubuntu

Hi,
To stop USB storage in ubuntu, go ahead with these commands in terminal with sudo rights..

1) sudo gedit /etc/modprobe.d/blacklist.conf

Add in last line

2)blacklist usb_storage

and restart. Its done. Cheers...

Thursday, March 26, 2015

40-inch Xiaomi Mi TV 2 smart TV announced for just $320

If you’re an entertainment buff looking for something affordable for your living room, then the 40″ Xiaomi Mi TV 2 will certainly grab your attention. Marked at a low price of only $320 and packed with some really good features, it is bound to make headway in the smart TV market.
The Xiaomi Mi TV 2 comes with a 1080p full HD screen. The crisp display is composed of a Sharp SDP X-GEN LED backlit panel that renders a contrast ratio of 5000:1. It has a slim frame with a thickness of only 14.5mm. The smart TV runs on a MStar 6A908 SoC processor built with a quad core Cortex A9 CPU that clocks a speed of 1.45GHz.
xiaomi-mi-tv-2
The gaming and TV experience is enhanced by a Mali 450 M4 GPU and the MIUI TV software based on the Android 4.4 KitKat OS. An update to Lollipop will be made available later. The Mi TV 2 holds 1.5GB RAM and 8GB storage capacity. For playback and entertainment in general, it includes a H.265 10-bit hardware decoder which supports FLV, MKV, MOV, MP4, MOV, TS and AVI video formats.
Also see: Xiaomi begins selling accessories via Mi India website
The Xiaomi smart TV has Dolby MS12 virtual surround sound technology for audio clarity. It can be purchased in a variety of vibrantly colored rear casings that add to its aesthetic value. If you remember, the company launched a more advanced Android-based smart TV with a 49″ panel of 4K resolution at a modest rate of $645 only last year.
xiaomi-smart-tv
Xiaomi Mi TV 2 smart TV specifications:
– Display: 40″ full HD LED Sharp SDP X-GEN panel, 5000:1 contrast ratio
– Processor: MStar 6A908 Cortex-A9 built with quad core 1.45GHz CPU
– Graphics: Mali-450 MP4 4+2 core GPU
– Memory: 1.5GB RAM, 8GB storage
– OS: Android 4.4-based MIUI TV
– Playback features: H.265 10-bit hardware video decoder, Dolby virtual surround sound
The Xiaomi Mi TV 2 will be released in China on March 31. However, its non-availability outside its home country may be a worry for interested global buyers, and India is currently the only nation expected to receive it too.
http://tanglesolutions.com

Thursday, February 26, 2015

National Stock Exchange 10G switch configuration support in Algo Trading

Hi,
Recently i had configured NSE configuration for 10G Switch (IBM & CISCO). This configuration includes BGP(Border Gateway Protocol), PIM, Multicast forwarding etc. This configuration was based on the template provided by the stock exchange.

If any Stock Broker and member working on ALGO and High Frequency Trading needs support related to switch configuration in NSE Colo in 1G or 10G, can contact me on my email id :

rohitchoudhary1978@gmail.com.

Thanks
Rohit

All Queries are ivited....

Tuesday, February 24, 2015

Don’t buy power bank before you read this

1) What’s power bank?
Power bank serve as an ‘extra battery’ or external charger for your phone or other electronic devices.

2) Where is power bank made from?
Majority of the power banks in the market are actually made in China.

3) How do I charge the power bank?
You can charge your power bank via the charger that came with your phone, computer usb port or using other power bank

4) How long do I need to charge the power bank?
It’s depending on the REAL CAPACITY of the power bank. The larger REAL CAPACITY, the longer charging time may required. Different charging methods may result different charging time as well. Charging with the original charger will be faster than charging with computer usb port.

5) Why sometime I need longer time to charge the same power bank?
Even though using the same charging method, the charging time may be differ due to environment,temperature, power flow and etc

6) What is mAh?
mAh mean milli Ampere Hour, the capacity of the power bank is measure with mAh

7) A 12000mAh REAL CAPACITY power bank, able to charge a 1500mAh capacity phone for 8 times full?
This is a common mistake make by most of the people. For rough calculation of the total charge time, kindly use this formula
REAL CAPACITY * conversion rate * phone battery health / phone capacity = total charge times
EXAMPLE: 12000 x 0.8 x 0.8 / 1500 = 5.12 charge times (0.5-1 times plus minus)

8) What’s conversation rate?
Conversation rate is the remaining percentage of the battery after the battery lost in heat or PCB operation.

9) What’s phone battery health?
In simple, it’s mean how‘healthy’ your phone battery is. Phone battery storage capacity will be lower and lower. That’s also the reason why our phone can last longer when it’s newly bought than after 3-6 months we used it. Different mobile phone models also will affect the calculation as some phone drain battery faster than the other.

10) What’s PCB?
PCB means Printed Circuit Board,its control all the operation flow inside the power bank. A good quality PCB will allow the power bank to charge more and have better durability

11) What’s 18650 power bank and what’s Li-Polymer power bank?
The common type will be 18650 and a better type will be Li-Polymer

12) What’s the different between 18650 and Li-Polymer?
- 18650 size and dimension are fix. Li-Polymer size and dimension are flexible.
- 18650 produce more heat. Li-Polymer are much more safer
- 18650 are cheaper. Li-Polymer are more expensive
- 18650 have higher self discharge rate.Li-Polymer have a very low self discharge rate
- 18650 battery durability will drop faster.  Li-Polymer battery capacity are more durable

13) What’s the common mAh use in 18650?
Common mAh use in 18650 is around 1300mAh to 2200mAh.

14) What’s the common REAL CAPACITY in 18650 power bank in the market?
- Power bank using 1pcs 18650 is 1200mAh – 2600mAh
- Power bank using 2pcs 18650 is 2500mAh – 4400mAh
- Power bank using 3pcs 18650 is 3750mAh – 6600mAh
- Power bank using 4pcs 18650 is 5200mAh – 8800mAh
- Power bank using 5pcs 18650 is 6500mAh –11000mAh
- Power bank using 6pcs 18650 is 7800mAh –13200mAh
- Power bank using 7pcs 18650 (no info)
- Power bank using 8pcs 18650 is 10400mAh –14400mAh

15) Is there any power bank use higher than 2200mAh per 18650?
Yes. There are, but it’s not common due to the expensive pricing.

16) What’s the different between branded power bank and generic power bank?
Branded power bank mostly sell in REAL CAPACITY. Generic power bank mostly sell in MARKING CAPACITY. That’s the reason why you will never see any branded power bank (standard size) have anything as high as 30000mAh – 50000mAh. That’s also the reason why a good 12000-13000mAh power bank are able to charge more or about the same like the market 30000-50000mAh power bank

17)  Is it true branded power bank won’t explode and generic power bank will explode?
Anything to do with battery, will have chance to explode. No matter it’s branded power bank or generic power bank.But chances for both branded and generic power bank to explode are near to 0%.If power bank is easy to explode, everyone will use power bank in war instead of bomb


Courtsey : http://tanglesolutions.com

Thursday, January 8, 2015

Generate CSR for Red Hat Linux Apache / SSL Server

Generate CSR for Red Hat Linux Apache / SSL Server

Step 1: Generating the Private Key


   1. Use the cd command to move to the /etc/httpd/conf directory.

   2. As root, type in one of the following three commands to generate your key:

   3. If you're using Official Red Hat Linux Professional and you want to use the included password feature, type in the following command: make genkey

   4. Your key will be generated and you will be asked to enter and confirm a password. Please note that you will need to remember and enter this password every time you start your secure Web server, so don't forget it.

   5. If you're using Official Red Hat Linux Professional and you don't want to be required to type in a password every time you start your secure Web server, use the following command instead of make genkey to create your key (note that the following command should be typed in all on one line): 


            /usr/sbin/sslgenrsa -rand /dev/urandom -out ssl.key/server.key 2048

   6. Then use the following command to set the correct permissions on your key: 


            chmod go-rwx ssl.key/server.key

   7. If you use the above commands to create your key, you will not need to use a password to start your secure Web server. However, we don't recommend that you disable the password feature for your secure Web server, since it decreases the level of security for your server.

   8. Your key will be created and saved to a file named server.key. If you're using Official Red Hat Linux Professional, server.key will be located in the /etc/httpd/conf/ssl.key directory. If you're using Official Red Hat Linux Professional, International Edition, server.key will be located in /etc/httpd/conf.


Step 2: Create the Certificate Signing Request


   1. In the /etc/httpd/conf directory, become root and type in one of the following two commands:

   2. If you're using Official Red Hat Linux Professional, type in the following command: 
           make certreq

   3. If you're using Official Red Hat Linux Professional, International Edition, type in the following single command (all on one line): 
           /usr/bin/openssl req -new -key /etc/httpd/conf/server.key -out /etc/httpd/conf/server.csr

   4. You will be prompted for your password (if you used a password when you generated your key). Type in the password, if necessary.

   5. You'll see some instructions and you will be prompted for responses. Your inputs will be incorporated into the CSR.

   6. When you've finished entering your information, a file named server.csr will be created. If you're using Official Red Hat Linux Professional, server.csr will be located in the /etc/httpd/conf/ssl.csr directory.

   7. You have just created a key pair and a CSR.

   8. The server.csr file contains your certificate request. To copy and paste the information into the orderform, open the file in a text editor that does not add extra characters (Notepad or Vi are recommended).

   9. Go to our website ssl.nu for the SSL Certicate request


Terms defined:
Country Name (C):
Use the two-letter code without punctuation for country, for example: US or CA.

State or Province (S):
Spell out the state completely; do not abbreviate the state or province name, for example: California

Locality or City (L):
The Locality field is the city or town name, for example: Berkeley.

Organization (O):
If your company or department has an &, @, or any other symbol using the shift key in its name, you must spell out the symbol or omit it to enroll.  Example: XYZ Corporation

Organizational Unit (OU):
This field is optional; but can be used to help identify certificates registered to an organization. The Organizational Unit (OU) field is the name of the department or organization unit making the request.

Common Name (CN):
The Common Name is the Host + Domain Name. It looks like "www.company.com" or "company.com".
Note: When prompted for your "first- and lastname", enter the desired Common Name.

SSL Certificates can only be used on Web servers using the Common Name specified during enrollment. For example, a certificate for the domain "domain.com" will receive a warning if accessing a site named "www.domain.com" or "secure.domain.com", because "www.domain.com" and "secure.domain.com" are different from "domain.com".

Networking4all certificates can only be used on Web servers using the Common Name specified during enrollment. For example, a certificate for the domain "domain.com" will receive a warning if accessing a site named "www.domain.com" or "secure.domain.com", because "www.domain.com" and "secure.domain.com" are different from "domain.com".


Please do not enter your email address, challenge password or an optional company name when generating the CSR.

Courtsey : http://tanglesolutions.com

Friday, December 19, 2014

Micromax's Yu Yureka With 64-Bit Octa-Core SoC, Cyanogen OS Launched at Rs. 8,999

yu_yureka.jpg
























Micromax's new Yu brand of Cyanogen OS-based smartphones were unveiled on Thursday with the launch of Yu Yureka. The smartphone, priced at Rs. 8,999, will go up for registrations via Amazon on Friday (2pm IST), and it will start shipping in the second week of January.

Early adopters will get a leather back cover worth Rs. 999 free. Notably, the company is also touting "free replacement or repair" at the user's doorstep. The Yu Yureka (AO5510) smartphone runs on a custom-build of Cyanogen OS, Cyanogen OS 11, what Rahul Sharma, co-founder of Micromax, calls the "temple of customisation" and "Android on steroids", boasting of the "thousands of features over and above stock Android."

Micromax's Yu Yureka smartphone features dual-SIM support, with slots for Micro-SIM cards (4G+3G). It bears a 5.5-inch HD (720x1280 pixels) IPS display with a pixel density of 267ppi and Gorilla Glass 3 protection. The smartphone notably also features Cat. 4 4G LTE connectivity with up to 150Mbps download speeds and 50Mbps upload speeds, apart from Band 40 and Band 3 support.

It runs on a 64-bit 1.5GHz octa-core Snapdragon 615 SoC (MSM8939), coupled with Adreno 405 GPU and 2GB of RAM. The Yu Yureka bears a 13-megapixel Sony Exmor CMOS sensor rear autofocus camera with an f/2.2 aperture and flash. A front-facing 5-megapixel fixed-focus camera is also onboard.

The Yureka comes with 16GB of inbuilt storage expandable via microSD card (up to 32GB), and sports a 2500mAh Li-Po battery claiming talk time up to 8 hours, standby time up to 310 hours, video playback time of up to six hours, and gaming up to 4 hours. 

The Yu Yureka measures 154.8x78x8.8mm. Connectivity options include Bluetooth 4.0, Micro-USB, Wi-Fi 802.11 b/g/n, GPS, and a 3.5mm audio jack. Onboard sensors include an accelerometer, proximity sensor, ambient light sensor, and gyroscope.

The Cyanogen OS 11 build is based on Android 4.4.4 KitKat, and an Android 5.0 Lollipop-based build is promised.

Co-founders of Cyanogen Inc, Kurt McMaster and Steve Kondik, appeared at the event via webcast, and spoke about their early motivation for creating CyanogenMod, wanting to "modify and change Android" to create a mobile platform with the features "they wanted to see" on the open source operating system.

McMaster said there was a "level of stagnation in the smartphone market ever since Steve Jobs unveiled the iPhone, where the predominant mobile paradigm was to swipe, tap, and open an app." He explained how Cyanogen set out to defeat that paradigm. He added that the partnership will see the company bring a number of global and local services to Cyanogen in India, which he described as the the fastest growing smartphone market in the world, "There's a battle being fought in India, and Cyanogen+Yu, we intend to win that battle."

Other Cyanogen executives present at the event spoke of the 'personalisation, security, performance' of Cyanogen OS. Starting with customisations, Cyanogen stressed that Yu users will be able to modify icons, fonts, boot screen animation, taps, and more via the Themes app that will debut on the smartphone. Two free custom Yu themes will be available at launch.

As for privacy, Cyanogen said users will be able to edit and customise permissions of each app, apart from use features like Find & Wipe device, device encryption, Pin Scramble, Blacklist for spam callers, and a Protected Apps section.

Speaking about performance, Cyanogen executives detailed the camera and gallery apps of Cyanogen OS 11, and said that the current slow mo functionality at @60fps will be boosted to 120fps soon. The company also detailed that the highly-anticipated third-party Android continuity feature, NextBit Baton, which allows for backup and cloud synchronisation of logins, apart from app data and settings, will debut on the Yu Yureka. The NextBit Baton Pass feature lets users continue their work on another device. The AudioFX app's 24-bit high-res lossless audio was also emphasised.

Interestingly, Sharma clarified that the Yureka phone will feature an unlockable bootloader, kernel source, and full Android build tree. As for power users, Micromax claims warranty will not be voided on rooting the smartphone. Commenting on the feature, Sharma said, "You are the master, you control your destiny, you create the software, we'll put it on your devices." 


Courtsey : http://tanglesolutions.com