TBLinux:How to change the ip address

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Switch from dhcp to static)
(some clean up)
Line 1: Line 1:
This article will explain how to change the ip address of TMG800/TMG3200 of the Linux host.
+
This article will explain how to change the IP address of TMG800/TMG3200 of the Linux host.
  
 
NOTE: Only the eth0 network interface should be change, eth1 should stays at 172.31.1.2 because it is directly connected to the Tmedia base board.
 
NOTE: Only the eth0 network interface should be change, eth1 should stays at 172.31.1.2 because it is directly connected to the Tmedia base board.
  
== Switch from dhcp to static ==
+
 
 +
== Switch from DHCP to static ==
  
 
'''Modify the eth0 configuration'''
 
'''Modify the eth0 configuration'''
Line 29: Line 30:
  
  
'''Modify the dhcp client configuration.'''
+
'''Modify the DHCP client configuration.'''
  
 
''NOTE:If you don't have a nameserver, remove it from the file, if you do set it to a valid one(DNS).''
 
''NOTE:If you don't have a nameserver, remove it from the file, if you do set it to a valid one(DNS).''
Line 35: Line 36:
 
     vi /etc/resolv.conf
 
     vi /etc/resolv.conf
  
:Example of a dns configuration file without DNS server:
+
:Example of a DNS configuration file without DNS server:
 
     ; generated by /sbin/dhclient-script
 
     ; generated by /sbin/dhclient-script
  
  
:Example of a dns configuration file containing a DNS server (in theory the dns server should configure itself properly):
+
:Example of a DNS configuration file containing a DNS server (in theory the dns server should configure itself properly):
 
     ; generated by /sbin/dhclient-script
 
     ; generated by /sbin/dhclient-script
 
     nameserver 192.168.1.5
 
     nameserver 192.168.1.5
  
'''Modify toolpack.ini file the variable "TBDB_SERVER_PRI" to IP address.'''
+
'''In toolpack.ini, set the variable "TBDB_SERVER_PRI" to the IP address.'''
  
 
:Example:
 
:Example:
 
     TBDB_SERVER_PRI = 172.31.1.2
 
     TBDB_SERVER_PRI = 172.31.1.2
  
== Switch from static to dhcp ==
+
 
 +
== Switch from static to DHCP ==
  
 
'''Modify the eth0 configuration'''
 
'''Modify the eth0 configuration'''
Line 77: Line 79:
 
     vi /etc/resolv.conf
 
     vi /etc/resolv.conf
  
:Example of a dns configuration file without DNS server:
+
:Example of a DNS configuration file without DNS server:
 
     ; generated by /sbin/dhclient-script
 
     ; generated by /sbin/dhclient-script
  
  
:Example of a dns configuration file containing a DNS server (in theory the dns server should configure itself properly):
+
:Example of a DNS configuration file containing a DNS server (in theory the dns server should configure itself properly):
 
     ; generated by /sbin/dhclient-script
 
     ; generated by /sbin/dhclient-script
 
     nameserver 192.168.1.5
 
     nameserver 192.168.1.5
  
'''Modify toolpack.ini file the variable "TBDB_SERVER_PRI" to Hostname.'''
+
'''In toolpack.ini, set the variable "TBDB_SERVER_PRI" to Hostname.'''
  
 
:Example:
 
:Example:
 
     TBDB_SERVER_PRI = TB005376
 
     TBDB_SERVER_PRI = TB005376

Revision as of 08:25, 25 August 2009

This article will explain how to change the IP address of TMG800/TMG3200 of the Linux host.

NOTE: Only the eth0 network interface should be change, eth1 should stays at 172.31.1.2 because it is directly connected to the Tmedia base board.


Switch from DHCP to static

Modify the eth0 configuration

   vi /etc/sysconfig/network-scripts/ifcfg-eth0

NOTE: you need to remove the line DHCP_HOSTNAME

Example:
   DEVICE=eth0
   BOOTPROTO=static
   IPADDR=192.168.1.10
   NETMASK=255.255.255.0
   IPV6ADDR=
   IPV6PREFIX=
   IPV6_AUTOCONF=yes
   ONBOOT=yes

Add the default gateway address in the network configuration file

   vi /etc/sysconfig/network
Example:
   HOSTNAME=TB005376
   NETWORKING=yes
   GATEWAY=192.168.1.1


Modify the DHCP client configuration.

NOTE:If you don't have a nameserver, remove it from the file, if you do set it to a valid one(DNS).

   vi /etc/resolv.conf
Example of a DNS configuration file without DNS server:
   ; generated by /sbin/dhclient-script


Example of a DNS configuration file containing a DNS server (in theory the dns server should configure itself properly):
   ; generated by /sbin/dhclient-script
   nameserver 192.168.1.5

In toolpack.ini, set the variable "TBDB_SERVER_PRI" to the IP address.

Example:
   TBDB_SERVER_PRI = 172.31.1.2


Switch from static to DHCP

Modify the eth0 configuration

   vi /etc/sysconfig/network-scripts/ifcfg-eth0

NOTE: you need to remove the IPADDR and NETMASK lines

Example:
   DEVICE=eth0
   BOOTPROTO=dhcp
   IPV6ADDR=
   IPV6PREFIX=
   IPV6_AUTOCONF=yes
   ONBOOT=yes
   DHCP_HOSTNAME=TB005376

Remove the default gateway address in the network configuration file

   vi /etc/sysconfig/network
Example:
   HOSTNAME=TB005376
   NETWORKING=yes

Modify the dhcp client configuration.

NOTE:If you don't have a nameserver, remove it from the file, if you do set it to a valid one(DNS).

   vi /etc/resolv.conf
Example of a DNS configuration file without DNS server:
   ; generated by /sbin/dhclient-script


Example of a DNS configuration file containing a DNS server (in theory the dns server should configure itself properly):
   ; generated by /sbin/dhclient-script
   nameserver 192.168.1.5

In toolpack.ini, set the variable "TBDB_SERVER_PRI" to Hostname.

Example:
   TBDB_SERVER_PRI = TB005376
Personal tools