Skip to main content

Posts

Showing posts from May, 2015

SOME ROUTING INFO AND NETWORKING

NETWORK LAYERS Application eg.ssh Transport  UDP,TCP Internet     Packets Link          Ethernet *)  To show up all interface and info execute ip addr show ---------------------------------- rahul@rahul-Inspiron-3542:~$ ip addr show 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host        valid_lft forever preferred_lft forever 2: enp7s0: mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000     link/ether 74:e6:e2:00:24:53 brd ff:ff:ff:ff:ff:ff ---------------------------------- *) To show information about an interface execute ip -s link show l0 ---------------------------------- rahul@rahul-Inspiron-3542:~$ ip -s link show lo 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00  

RAID

Check the Raid installed lspci | grep RAID     Software Raid ============== Linux Support For Software RAID Currently, Linux supports the following RAID levels (quoting from the man page): LINEAR RAID0 (striping) RAID1 (mirroring) RAID4 RAID5 RAID6 RAID10 MULTIPATH, and FAULTY. MULTIPATH is not a Software RAID mechanism, but does involve multiple devices: each device is a path to one common physical storage device. FAULTY is also not true RAID, and it only involves one device. It provides a layer over a true device that can be used to inject faults. Install mdadm Type the following command under RHEL / CentOS / Fedora Linux: # yum install mdadm Type the following command under Debian / Ubuntu Linux: # apt-get update && apt-get install mdadm How Do I Create RAID1 Using mdadm? Type the following command to create RAID1 using /dev/sdc1 and /dev/sdd1 (20GB size each). First run fdisk on /dev/sdc and /dev/sdd with " Software R

Fantastic netcat

Need a transfer speed which is 100+ better than scp or rsync, just follow this dd bs=16M if=/root/netcattest/file.txt |bzip2 -c| pv -b | nc 185.46.120.66 19000 nc -l 19000|bzip2 -d|dd bs=16M of=/home/mhtmi1ky1gpgg9py/netcattest/file.txt ------------------------------------- Server(sender) $tar -cvf - dir_name | nc -l 1567 Client (Receiver) $nc -n 172.31.100.7 1567 | tar -xvf -  ------------------------------- sender tar -cvf - netcattest | bzip2 -z | nc -l 1567 receiver nc -n 72.34.47.10 1567 | bzip2 -d | tar -xvf -