Sunday, April 15, 2007

AIX 5.3 recommendation

lately I found a very interesting artical from IBM System mag open systems version Aug/Sept 2006 which states IBM are now recommending the following for AIX5.3

The new recommendations are to leave maxclient and maxperm at their default settings of 80, but to still set minperm to something like 5. We also don't change the strict settings. Instead, we alter other parameters as follows:

vmo -p -o minperm%=5
vmo -p -o lru_file_repage=0
vmo -p -o lru_poll_interval=10

Connecting Webserver to Oracle10g

Oracle client:
1. Download the Instant Client from Oracle
2. Be sure to get the basic and the sdk package for Linux (the basic in
RPM format to install the runtime environment and both the basic and sdk
in zip format to be used while compiling)
3. Install the RPM package (rpm -i)
4. Unzip both zips into the same directory
5. cd into the newly created directory (instantclient_10_x) and create a
softlink: libclntsh.so -> libclntsh.so.10.1

Apache/PHP:

1. Install apache2, do not install any PHP packages!
2. Install apache2-devel to get apxs2 (also required: libapr1-devel and
libapr-utils-devel)
3. Download the PHP source code and unzip it
4. Use configure as shown in FIG A
5. Enter make
6. Add the lib-directory generated by the RPM installed before (e.g
/usr/lib/oracle/10.2.0.3/client/lib) to the LD_LIBRARY_PATH
7. Enter make install
8. Copy the php.ini-recommended file to your apache config directory
(e.g. /etc/apache2)
9. Create the tnsnames.ora
10. cd into your apache config directory
11. (for apache 2) create a new file called php5.conf and copy the
content of FIG D into it
12. Be sure to include this conf in your vhost (e.g. Include
/etc/apache2/conf.d/php5.conf)
13. Edit the files containing module information (on SuSE 10.1:
/etc/sysconfig/apache2) and add the libphp5.so to the list of modules.
14. Start apache with the script from FIG C
15. Create a PHP page, only containing , save it in
your DocumentRoot and call it via a web browser. It should now display
an OCI8 information section.
16. You can now use the code from FIG E to test your Oracle database
connection


FIG A:
./configure
--with-oci8=instantclient,
--prefix=/usr/local
--with-apxs2=/usr/sbin/apxs2
--enable-sigchild
--with-config-file-path=/etc/apache2

FIG C:
LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}
TNS_ADMIN=
export LD_LIBRARY_PATH TNS_ADMIN
echo Starting Apache apache2ctl start

FIG D:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps

FIG E:
$c = OCILogon('', '',
'');
if($c != null){
echo "YAY!";
} else{
echo "DOH!";
}

$query = '';

$stid = OCIParse($c, $query); OCIExecute($stid, OCI_DEFAULT); while
($succ = OCIFetchInto($stid, $row)) { foreach ($row as $item) { echo
$item." "; } echo "
n"; }

OCILogoff($c); ?>

MPLS study notes

MPLS: Multi Protocol Label Switching
Packet forwarding is done based on Labels.
Labels are assigned when the packet enters into the network.
Labels are on top of the packet.
MPLS is functioning in frame-mode or cell-mode.
LSPs are unidirectional
Label Header:= Header 4 bytes, Label 20 bits.
Label Header can be used over Ethernet, 802.3, or PPP links
A label switch router (LSR) is a device that forwards based on labels.
An edge LSR labels and removes labels from packets.
LSRs distribute labels to the upstream neighbors
Forwarding tables (FIB) are built based on IP routing tables with no labeling information
MPLS convergence occurs immediately after the routing protocol convergence, based on labels already stored in LIB
LDP and TDP use a similar process to establish a session:
Hello messages are periodically sent on all interfaces enabled for MPLS.
UDP is used for hello messages. It is targeted at "all routers on this subnet" multicast address ( 224.0.0.2).
TCP is used to establish the session.
Both TCP and UDP use well-known LDP port number 646 (711 for TDP).
Penultimate hop popping optimizes MPLS performace (one less LFIB lookup).
PHP optimizes MPLS performance by reducing the number of table lookups on the egress router.
PHP is not supported on ATM devices because a label is part of the ATM cell payload and cannot be removed by the ATM switching hardware
Pop or implicit null label uses value 3 when being advertised to a neighbor.
Provider Network (P-Network): The backbone under control of a Service Provider
Customer Network (C-Network):Network under customer control
CE router:Customer Edge router. Part of the C-network and interfaces to a PE router
Site is connected to the VPN backbone through one or more PE/CE links
PE router Provider Edge router. Part of the P-Network and interfaces to CE routers
P router Provider (core) router, without knowledge of VPN
Route-Target 64 bits identifying routers that should receive the route
Route Distinguisher Attributes of each route used to uniquely identify prefixes among VPNs (64 bits) VRF based (not VPN based)
VPN-IPv4 addresses Address including the 64 bits Route Distinguisher and the 32 bits IP address
VRF VPN Routing and Forwarding Instance Routing table and FIB table Populated by routing protocol contexts
VPN-Aware network, A provider backbone where MPLS-VPN is deployed
Intranet VPN: Intranet VPNs connect sites within an organization. Security mechanisms are usually not deployed in an intranet, because all sites belong to the same organization.
Extranet VPN: Extranet VPNs connect different organizations. Extranets usually rely on security mechanisms to ensure the protection of participating individual organizations. Security mechanisms are usually the responsibility of individual participating organizations.
Access VPN: Access VPNs are virtual private dial-up networks (VPDNs) that provide dialup access into a customer network.
PE routers are faced to CE routers and distribute VPN information through MP-BGP to other PE routers
P routers do not run BGP and do not have any VPN knowledge
PE and CE routers exchange routing information through: EBGP, OSPF , RIPv2, Static routing
Site of Origin (SOO): identifies the originating site
Route-target (RT): identifies the set of sites the route has to be advertised to
RTs are attributes that are attached to a VPNv4 BGP route to indicate its VPN membership. The extended BGP communities of a routing update is used to carry the RT of that update, thus identifying which VPN the update belongs to.
RD is configured in the PE for each VRF
The RD is used only to transform nonunique 32-bit customer IP version 4 (IPv4) addresses into unique 96-bit VPNv4 addresses (also called VPN IPv4 addresses).
RD may or may not be related to a site or a VPN
<16bits type>::<32 bit number>Registered AS number
<16bits type>::<16 bit number>Registered IP address
VRF: VPN Routing and Forwarding Instance( VRF Routing Protocol Context, VRF Routing Tables,VRF CEF Forwarding Tables)
One central site has full routing knowledge of all other sites (of same VPN) = Hub-Site
Other sites will send traffic to Hub-Site for any destination = Spoke-Sites


show commands
show ip route vrf ...
show ip protocol vrf
show ip cef
show tag-switching tdp parameters
show tag-switching interface
show mpls interface
show tag-switching tdp discovery
show tag-switching tdp neighbor
show tag-switching tdp neighbor detail
show tag-switching tdp bindings
show tag-switching forwarding-table
show mpls forwarding-table
show ip cef detail


Sample PE Router Configuration
en
conf t
ip cef
ip vrf Cust
rd 1:100
route-target both 1:100

interface Serial0/0
ip vrf forwarding Cust
ip address 172.16.1.1 255.255.255.252

router eigrp 1
address-family ipv4 vrf Cust
redistribute bgp 1 metric 1000 100 255 1 1500
network 172.16.0.0
network 172.15.0.0
no auto-summary
autonomous-system 101


router bgp 1
no synchronization
no auto-summary
address-family vpnv4
address-family ipv4 vrf Cust
neighbor 10.10.10.102 remote-as 1
neighbor 10.10.10.102 activate
neighbor 10.10.10.102 update-source Loopback0
redistribute eigrp 201


To verify configuration
show ip eigrp vrf Cust neighbors
show ip bgp vpnv4 vrf ...
show ip route eigrp
sh ip vrf route