Sunday, 29 December 2013

CentOS Post Install Configuration

Enable the tftp server
nano /etc/xinetd.d/tftp
change “disable=yes” to “disable=no”
(Ctrl-X>y>ENTER)
Configure the network time server for managing the time displayed on the server and the phones.nano +21 /etc/ntp.conf
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org

Configure time server to start at boot/sbin/chkconfig --level 345 ntpd on

CentOS install

Close ALL port forwards in the firewall  to the server IP we are about to install
Install CentOS from DVD by booting from it.  Set system time to UTC.
Partition /dev/sda1 as “boot” 100Meg ext3
Partition /dev/sda2 as “/ “ 2000Meg ext3 minimum.  No problem using more if you have more
Partition /dev/sda3 as "swap" (optional, not recommended if using flash drive) make the size equivalent to twice the amount of RAM
Set static IP, netmask, gateway, DNS server
Set hostname to something like "asterisk.local".  If you have multiple installs it is important to make this hostname unique for each install so when you get email notifications you will know which PBX is sending it.



If you have 2 ethernet ports make eth0 and eth1 identical except eth0 is active on boot and eth1 is NOT!  That way if eth0 ever fails you can easily switch over the cable and activate eth1.

Ensure that all package groups and modules in default and custom install packages are DE-selected for install (including "base system") so that only a bare minimal install is done:
For performance and security reasons it is important to update the system immediately after install.yum -y update
The following packages also need to be installed with yum:
yum install ncurses-devel tftp-server libtermcap-devel nano ntp wget setuptool gcc gcc-c++ make flex patch bison kernel-devel byacc sendmail cpuspeed system-config-network-tui acpid subversion

Disable Firewall and SELinux
setup agent

Go to firewall configuration and ensure SELinux and Firewall are disabled
Reboot
reboot

Switch virtual interface SVI configuration on gns3

A switch virtual interface (SVI) is a VLAN of switch ports represented by one interface to a routing or bridging system. There is no physical interface for the VLAN and the SVI provides the Layer 3 processing for packets from all switch ports associated with the VLAN.

How Switch virtual interface SVI  works:

This is much simpler than inter VLAN, but disadvantage is high cost of a layer-3 switch.
In SVI configuration we need a layer-3 switch, I use a 3640 router IOS and use the NM-16ESW module for layer-3 switching. The topology I used for switch virtual interface (SVI) is consist of one switch and two hosts one of them is in VLAN 10 and other is in VLAN 20. I have create two switch virtual interface s(SVI) on switch for VLAN 10 and 20, which are responsible for communicating these two VLANs.

 
Configuration for Switch:
SW#vlan database
SW(vlan)#vlan 10 name office1
SW(vlan)#vlan 20 name office2
SW(vlan)#exit
SW(config-if)#interface vlan 10
SW(config-if)#ip address 10.1.1.1 255.255.255.0
SW(config-if)#no shu
SW(config-if)#interface vlan 20
SW(config-if)#ip address 20.1.1.1 255.255.255.0
SW(config-if)#exit
SW(config)#ip routing
SW(config-if)#interface f0/0
SW(config-if)#no shutdown
SW(config-if)# switchport mode access
SW(config-if)# switchport access vlan 10
SW(config-if)#interface f0/1
SW(config-if)#no shutdown
SW(config-if)#switchport mode access
SW(config-if)# switchport access vlan 20

Configuration for Qemu1
tc@box:$ sudo su 
root@box:$ Ifconfig eth0 10.1.1.2 netmask 255.255.255.0
root@box:$ Route add default gw 10.1.1.1 eth0

Configuration for Qemu2
tc@box:$ sudo su 
root@box:$ Ifconfig eth0 20.1.1.2 netmask 255.255.255.0
root@box:$ Route add default gw 20.1.1.1 eth0

Results:
Ping from qemu1 to qemu2 is successful and voice versa.