| 1 | = CSLab Networking = |
| 2 | |
| 3 | DHCP Servers: |
| 4 | * danaos (subnet 147.102.3) |
| 5 | * scirouter (subnet 147.102.4) |
| 6 | |
| 7 | Useful commands: |
| 8 | * `# view /etc/dhcpd.conf`: see and set statically assigned IPs (dhcp runs only on danaos, not on scirouter) |
| 9 | |
| 10 | * `# /usr/local/share/munin/dhcpstatus/dhcpstatus_0.60/scripts/dhcpstatus`: Returns the DHCP status (@ danaos), see the number of available IPs |
| 11 | |
| 12 | * `# nmap -sP 147.102.4.190/26`: See who is connected to the subnet |
| 13 | |
| 14 | * `/etc/init.d/dhcp3-server status`: To see the status of the dhcp server ("restart" to restart it) |
| 15 | |
| 16 | ==== Allocate a static IP ==== |
| 17 | |
| 18 | * At `/etc/network/interface` add (under correct interface): |
| 19 | |
| 20 | {{{ |
| 21 | IP 147.102.4.149 |
| 22 | Broadcast 147.102.4.191 |
| 23 | Gateway 147.102.4.190 |
| 24 | Netmask 255.255.255.192 |
| 25 | }}} |
| 26 | |
| 27 | Add the MAC address and IP at `dhcpd.conf` as above |
| 28 | |
| 29 | ==== Add the domain name to DNS server ==== |
| 30 | |
| 31 | `# vim /etc/bind/cslab.ece.ntua.gr.zone`: Find the ip and change the name on top Add entry and update serial on top of file |
| 32 | |
| 33 | ==== Reverse lookup ==== |
| 34 | |
| 35 | * `# vim 4.102.147.in-addr.arpa.zone` Find the ip and change the name on top |
| 36 | * Add entry and update serial on top of file |
| 37 | * `# rndc reload` |
| 38 | * To test: `# nslookup 147.102.4.149` |
| 39 | * If something is added, e.g. URL: `# service bind9 restart` |