Difference between revisions of "HOWTO Use Fixed IP for the S-bots in IRDIA"

From IridiaWiki
Jump to navigationJump to search
Line 12: Line 12:
 
|164.15.10.150
 
|164.15.10.150
 
|sbot1
 
|sbot1
|18
+
| 6
 
|-
 
|-
 
|164.15.10.151
 
|164.15.10.151
 
|sbot2
 
|sbot2
|26
+
| 8
 
|-
 
|-
 
|164.15.10.152
 
|164.15.10.152
 
|sbot3
 
|sbot3
|30
+
| 9
 
|-
 
|-
 
|164.15.10.153
 
|164.15.10.153
 
|sbot4
 
|sbot4
|15
+
|13
 
|-
 
|-
 
|164.15.10.154
 
|164.15.10.154
 
|sbot5
 
|sbot5
|31
+
|19
 
|-
 
|-
 
|164.15.10.155
 
|164.15.10.155
 
|sbot6
 
|sbot6
|32
+
|22
 
|-
 
|-
 
|164.15.10.156
 
|164.15.10.156
 
|sbot7
 
|sbot7
|33
+
|23
 
|-
 
|-
 
|164.15.10.157
 
|164.15.10.157
 
|sbot8
 
|sbot8
|35
+
|24
 
|-
 
|-
 
|164.15.10.158
 
|164.15.10.158
 
|sbot9
 
|sbot9
|25
+
|26
 
|-
 
|-
 
|164.15.10.159
 
|164.15.10.159
 
|sbot10
 
|sbot10
|24
+
|30
 
|-
 
|-
 
|164.15.10.160
 
|164.15.10.160
 
|sbot11
 
|sbot11
|27
+
|32
 
|-
 
|-
 
|164.15.10.161
 
|164.15.10.161
 
|sbot12
 
|sbot12
|29
+
|35
 
|-
 
|-
 
|164.15.10.162
 
|164.15.10.162
 
|sbot13
 
|sbot13
|3
+
|36
 
|-
 
|-
 
|164.15.10.163
 
|164.15.10.163
 
|sbot14
 
|sbot14
|16
+
|
 
|-
 
|-
 
|164.15.10.164
 
|164.15.10.164

Revision as of 16:08, 4 May 2005

IRDIA assigned some fixed IP to be used by the s-bots in the lab. This howto provides all the information required to access the s-bots and to modify the associations IP/s-bot.

IP Address Range & Associated S-bots

Here below, there is the list of IP addresses allocated to the s-bots. The first column shows the IP address, the second the name stored in the DNS, the third is the actual number of the s-bot binded to the address.

IP DNS Name S-bot #
164.15.10.150 sbot1 6
164.15.10.151 sbot2 8
164.15.10.152 sbot3 9
164.15.10.153 sbot4 13
164.15.10.154 sbot5 19
164.15.10.155 sbot6 22
164.15.10.156 sbot7 23
164.15.10.157 sbot8 24
164.15.10.158 sbot9 26
164.15.10.159 sbot10 30
164.15.10.160 sbot11 32
164.15.10.161 sbot12 35
164.15.10.162 sbot13 36
164.15.10.163 sbot14
164.15.10.164 sbot15

For instance, if you need to login into s-bot number 15, you can type either ssh root@164.15.10.151 or ssh root@sbot2.ulb.ac.be.

How to Avoid to Remember all the IPs of the S-bots and to Login into the Right One

If you use computer names with SSH, usually your computer converts the name into an IP address first by checking into /etc/hosts and then by querying the DNS.

Therefore, in order to avoid to look at this page each time you want to know which is the IP address of s-bot X, you can modify your /etc/hosts and insert something like:

164.15.10.150   sbot19
164.15.10.151   sbot15
164.15.10.152   sbot8
164.15.10.153   sbot12
164.15.10.154   sbot21

After this modification, ssh root@sbot8 will immediately connect to 164.15.10.152.

How are IP Addresses Assigned and How to Change them

When switched on, the s-bots connect to the wireless LAN. The wireless base-station is nobel.ulb.ac.be and works as a bridge between the wireless and the fixed networks. This means that the base-station receives all the packets for the s-bots from the fixed network and routes them into the wireless one, and the other way round too. No manipulation of the packets occurs.

After the sbots connected to the wireless lan, they broadcast a DHCP request for an IP address. Being this a normal packet, the base-station routes it to the fixed network. The DHCP server on iridia.ulb.ac.be receives the request and answers to it.

The DHCP server assignes IP addresses checking the MAC address stored in the request. The server configuration file is /etc/dhcpd.conf on iridia.ulb.ac.be. An entry in this file looks like:

host <HOSTNAME> {
  hardware ethernet <MAC ADDRESS>;
  fixed-address <IP ADDRESS>;
}

The DHCP server must be restarted after having changed this file. To restart, type /etc/init.d/dhcp restart. Then check in /var/log/daemon to see if there are errors occured while the DHCP server was reading the configuation file.



--haiax 15:11, 16 Dec 2004 (CET)