Board logo

標題: Change of network segment address on CentOS-based Asterisk server [打印本頁]

作者: 角色    時間: 2011-8-14 11:33     標題: Change of network segment address on CentOS-based Asterisk server

Since the Asterisk server has been moved from Shenzhen to Hong Kong, the network status of the (Shenzhen) CentOS server is

Network segment: 192.168.2.0
Gateway: 192.168.2.1
IP Address: 192.168.2.101

We have to modify the above settings to the followings such that it can be used in Hong Kong:

Network segment: 192.168.1.0
Gateway: 192.168.1.1
IP Address: 192.168.1.101

How to accomplish the above tasks? Please following the instructions:

1) vi /etc/sysconfig/network-scripts/ifcfg-eth0
  1. # Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
  2. DEVICE=eth0
  3. BOOTPROTO=static
  4. BROADCAST=192.168.1.255 (This should be updated)
  5. HWADDR=70:71:BC:xx:xx:xx
  6. IPADDR=192.168.1.101 (This should be updated)
  7. IPV6INIT=yes
  8. IPV6_AUTOCONF=yes
  9. NETMASK=255.255.255.0
  10. NETWORK=192.168.1.0 (This should be updated)
  11. ONBOOT=yes
複製代碼
2. Edit the following file

vi /etc/sysconfig/network
  1. NETWORKING=yes
  2. NETWORKING_IPV6=yes
  3. HOSTNAME=leo
  4. GATEWAY=192.168.1.1 (This should be updated)
複製代碼
3. Restart the new network settings

/etc/init.d/network restart


YH
作者: bubblestar    時間: 2011-8-14 12:34

I think some parameters in the sip.conf should be modified to correspond to and reflect the changes.

sip.conf

[general]
externhost = abc.com (assume your external host name differs in HK)
fromdomain = abc.com (same as above)                                        
localnet = 192.168.1.0/255.255.255.0 (This should also be updated)
作者: 角色    時間: 2011-8-14 13:02

Yeah!The settings shown above are for letting the CentOS be able to connect the external Internet World.

The suggestion given by bubblestar is additional to make your Asterisk server run without any further network problem.

YH
作者: 角色    時間: 2011-8-14 22:40

I think some parameters in the sip.conf should be modified to correspond to and reflect the changes. ...
bubblestar 發表於 2011-8-14 12:34


Bubblestar you are right. With the modifcation (at least the network segment modfication as in sip.conf), registration will fail if the sip client is in the same network segment of 192.168.1.0.

YH
作者: ckleea    時間: 2011-8-14 23:40

There may be other conf files you need to change. E.g. Apache/webmail
作者: 角色    時間: 2011-8-14 23:45

Thank CK. Now I am at the stage of getting my PC engine started. More questions will come out later.

YH
作者: ckleea    時間: 2011-8-14 23:49

What kinds of service you have installed? Sometimes in web applications, you may have input the IP address.

Very important one is mySQL
作者: 角色    時間: 2011-8-15 00:29

For the time being, I wanna install the CentOS and Asterisk 1.8. If I have time, I shall explore the possibility of installation of mySQL as well.

Which version of CentOS that you recommend to use?

YH
作者: ckleea    時間: 2011-8-15 07:57

回復 8# 角色

Still Centos 5.6 not Centos 6. Some one have suggested me to install 64 bits version but I think for simplicity and compatibility, 32 bits will be better. Also my ATOM server can address 4 GB only.

CK
作者: 角色    時間: 2011-8-15 10:15

Thank you for your advice. What is difference if I use CentOS 5.5 as compared to CentOS 5.6 when I install Asterisk 1.8.
作者: ckleea    時間: 2011-8-15 13:11

No difference. For me and bubblestar, we also install another newer kernel to allow us to use USB stick for voice and SMS. You should use Centos 5.6 as the base.
作者: 角色    時間: 2011-8-15 13:49

Copied. I shall take your advice.

YH
作者: ckleea    時間: 2011-8-15 18:52

回復 12# 角色

YH,

Just download a new centos 5.6 DVD (server CD is available) and do the installation.
Or else, the most simple is to grab an AsteriskNOW DVD and install asterisk 1.4 or 1.6
Then do an "yum update"; "remove the asterisk 1.4/1.6 by yum remove"
Go to asterisk download the asterisk 1.8 source and do the compilation.

Enjoy.

CK




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2