Linux Network Configurations
Using ifconfig (obsolete and replaced by ip but it still works):
Synopsis: ifconfig ethX {address | up | down }
ifconfig ethX address #Assign an ip address.
more info on ifconfig
ip address can also be setup by editing ifcfg-ethX
vi /etc/sysconfig/network/ifcfg-eth0 #editing eth0 in openSUSE.
vi /etc/sysconfig/network-scripts/ifcfg-eth0 #editing eth0 in RHEL 6.
Add: IPADDR=’x.x.x.x/x’ # Example: IPADDR=’192.168.1.7/24′
Using ip:
Synopsis: ip { link | addr | help} #common options use.
Examples:
ip link #shows the status of all NICs.
ip addr #shows the ip address of all NICs.
ip link set ethX { {up | down} | address | mtu | name }
Examples:
ip link eth2 up #enable eth2.
To configure gateway, use route.
route add default gw x.x.x.x #adding default gateway
route add -net x.x.x.x netmask x.x.x.0 dev ethX #gateway for specific NIC
route -e # To view Kernel IP routing table (route -n works also).
Ethtool – Display or change ethernet card settings.
Synopsis: ethtool ethX
ethtool –i ethX #shows the version of the NIC driver.
CentOS USB Install
Installing CentOS 5.5 from USB
A linux system is needed to prepare a USB flash drive, I used openSUSE:
1. Identify USB drive:
dmesg
… [sdb] Attached SCSI removable disk
This mean the USB drive is /dev/sdb
2. Erase USB drive:
dd if=/dev/zero of=/dev/sdb bs=65536 count=10000
3. Create a 10 MB W95 FAT32 partition and make it active:
fdisk /dev/sdb
Enter n to add a new partition
Command (m for help):n
p #for primary partition
1 #for partition one
<Enter> #default 1
+10M #for adding 10MB
t #to change the type
b #Windows 95 FAT32
#Create data partition
n #new partition
p #for primary partition
2 #for partition two
<Enter> #Starting cylinder – default
<Enter> #Last cylinder default
a #toggle bootable flag
1 #partition one
w #write to disk
4. Verify partitions:
fdisk -l
5. Make the filesystems for the two partitions:
mkfs.vfat -n BOOT /dev/sdb1
mkfs.ext2 -m 0 -b 4096 -L DATA /dev/sdb2
6. Mount by unplug/plug the USB drive:
sdb1 should be /media/BOOT
sdb2 should be /media/DATA
7. Create a folder centos on the DATA partition and copy the iso files:
mkdir /media/DATA/centos
cp -r /download/* /media/DATA/centos/; sync #Assuming the isos are in /download folder
8. Install syslinux on the BOOT partition:
syslinux -s /dev/sdb1
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdb
9. Mount the first iso image and copy isolinux to the BOOT partition:
mkdir /mnt/cdimage
mount -ro loop /download/CentOS-5.5-x86_64-bin-1of8.iso /mnt/cdimage
cd /media/BOOT
cp -rv /mnt/cdimage/isolinux syslinux
10. Edit syslinux.cfg:
mv syslinux/isolinux.cfg syslinux/syslinux.cfg #isolinux.cfg to syslinux.cfg
rm -f syslinux/isolinux.bin #delete isolinux.bin
vi syslinux/syslinux.cfg #add “method=hd:sda2:/centos” to the “append”
Example:
kernel vmlinuz
append initrd=initrd.img method=hd:sda2:/centos
Done preparing USB flash drive.
Boot from the USB flash drive to install CentOS 5.5
Fibre Channel SAN
Fibre Channel SAN Notes from Brocade FC Protocol Training.
Fabric: term to describe a generic switching environment, it can consist of one or more interconnected switches (domains).
One Fibre Channel Switch = One Fabric Domain.
Maximum Domains = 239 in a single Fabric based on 24-bit addressing.
Principal Switch: Determine precedence between FC Swithced without adding a separate external. Fabric management software. it facilitates the initialization of the Fabric, and acts as controller of domains.
Switch Ports:
E_port – expansion port, connects 2 FC switches together to make a Fabric.
F_port – Fabric port where N_port attaches.
FL_port – Fabric loop port where NL_Port attaches.
Device Ports:
N_port – port designator for direct fabric attached devices.
NL_port – device that is attached to the loop (seldom used, support for old FC stuff).
FC_ID: 24 Bit Address Space: Dynamically assigned during login.
| Domain ID | Area ID | Node ID |
Domain ID = upper 8 bits, identifies the FC Switch
Area ID = middle 8 bits, identifies port number
Node ID = lower 8 bits, N_Port address
Unique Identification:
-Fixed 64bit value assigned by manufacturer.
-Used in mapping to upper layer protocols.
WWPN: uniquely identify a port (Port_Name).
WWNN: uniquely identify a node (Node_Name).
FC defines two types of login procedures:
Fabric Login (flogi) – After link established, N_Port sends flogi frames to the fabric and receive responses back.
N_Port Login (plogi) – Enable a N_port to communicate with another N_port. Once logged in, it will stay indefinitely.
FC transmits data in frames, defines variable length:
36 bytes of overhead
SOF – 4 bytes
Header – 24 bytes
CRC – 4 bytes
EOF – 4 bytes
Up to 2112 bytes of payload
Optional Header – up to 64 bytes
Data – up to 2048 bytes
FC Layers:
FC-4: Upper layer protocola interface – SCSI, IP, and so on roughly as transport layer in the OSI model.
FC-3: common Services
FC-2: Data delivery – Framing Protocol and Flow Control. Similer to layer 2 of OSI.
FC-1: Encoding – 8b/10b (1,2,4,9 Gb/s) and 64b/66b (10 Gb/s). Link Controls
FC-0: Physical Interface – Media Connectors and Cables.
FC starndards site: http://www.t11.org
FC-FS: Fibre Channel Framing and Signaling Interface
FC-LS: Fibre Channel Link Service
FC-GS: Fibre Channel General Services
FCP: Fibre Channel Protocol for SCSI
FC switches:
Brocade 4900: 4Gb FC
Cisco MDS 9216A: 2Gb and 4Gb FC
Cisco MDS 9222i: 4Gb FC and 1Gb Ethernet
Targets:
EMC Symmetrix
EMC Clariion CX4
IBM DS4700
Categories: Data Storage, Network Tags: Fibre Channel, SAN
