Friday, November 22, 2013

Set a static internal IP

1. find a hooked interface

2. make a script in /etc/sysconfig/network-scripts
For example:
$cd /etc/sysconfig/network-scripts
$touch ifcfg-em1
$vim ifcfg-em1

DEVICE=em1
HWADDR=A4:BA:DB:1A:AC:4F this is the mac address of the interface
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.0.27 this is the static IP you want to set
BROADCAST=192.168.0.255
NETMASK=255.255.255.0

NAME=em1

3. restart the device
$ ifdown em1
$ ifup em1

4. finally, check if the static ip has been assigned to interface em1
$ ifconfig

Check if the interface hook or not

$ yum install ethtool

$ ifconfig to see how may interfaces available

$ ethtool [Interface Name]

[root@sr2s7 home]# ethtool em1
Settings for em1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d

        Link detected: yes Means the link is hooked.

mount NFS using /etc/fstab

First, you may need to authenticate the local machine to the NFS server.

Then,

Please add the following line to the end of your /etc/fstab:

NFS_SERVER:/vol/vol1_home    /home           nfs4    defaults        1 1

This is the format:
SERVERIP:REMOTE_FILE      LOCAL_FILE    FILE_FORMAT 


After this, do "mount -a" should get your home directory mounted.

Other commands about mount:
mount -a: mount all of the files in /etc/fstab
umount /home: unmount the local home direcotry from NFS server


Thursday, November 7, 2013

Good summary of SRTM and DRTM

http://security.hsr.ch/mse/projects/2011_Root_of_Trust_for_Measurement.pdf