-1

This is my first time trying to work with an ARP so I'm slightly lost as to what I'm missing. I'm probably going down the wrong track, so lemme know if I'm completely and utterly off.

What I'm trying to do: I'm trying to get one of my servers to have a "name" so that I can access it directly from externally. I added a hostname, but that doesn't seem to have done anything

$ hostname
excalibur

I tried doing the arp -a command and I get the following

$ arp -a
existing.host.local (10.xxx.xxx.xxx) at ipv6 [ether] on etho0
? (10.xxx.xxx.xxx) at ipv6 [ether] on etho0

The 2nd line (the one with the ?) is the one I'm trying to get to be external so that it would be called excalibur.host.local I thought a hostname should be able to handle that, but apparently I'm wrong. I've closed off all ports except for port 25, but I assume that shouldn't have anything to do with it?

Does anyone have guidance as to what I need to be working and/or what I should be searching for to look up and learn on how to set things up? I've been looking around, but the issue is I don't really know what I need to be trying to look up so I'm at a complete loss =/ Thanks in advance =)

TheFiddlerWins
  • 2,973
  • 1
  • 14
  • 22
Aram Papazian
  • 123
  • 1
  • 3
  • 10

1 Answers1

4

I think you want to add it to /etc/hosts on the system you are trying to access it from. ARP maps a network interface's MAC address to an IP address.

DNS and the /etc/hosts file map a hostname/fully qualified domain name to an IP address. So you either need to add a line to /etc/hosts on EVERY external system similar to 10.x.x.x excalibur

or get who ever you get DNS from to add it to their DNS server. This does not let people reach your machine, it just lets them get the right address for it (similar to looking it up a phone number for someone's name). You may want to look into DDNS or another dynamic DNS service.

None of this covers how someone "external" (presumably on the Internet) will actually be able to reach 10.x.x.x since 1) 10.x.x.x (if it really does start with an 10.) is not rotatable to the Internet and 2) You will probably have a firewall preventing internet traffic from reaching your PC.

TheFiddlerWins
  • 2,973
  • 1
  • 14
  • 22
  • Other machines on our subnet can be reached by accessing existing.host.local so I'm assuming our firewall is open enough to allow a second one to exist. If not I can look into changing the firewall. So I'm in the process of adding it to the DNS server (which I assume takes a while like other DNS creations?) but I have 1 side question. I noticed that when I logged in with my windows computer on the network it automatically added the proper name into the arp request (windows_comp_name.host.local) Why would that be if I didn't add a DNS record for that one? – Aram Papazian Aug 23 '13 at 20:36
  • As a side note: I am wanting to access this from inside the subnet anyway (which is why existing.host.local currently works) so the firewall isn't a concern. I'm just wondering if there is a way to do it globally without needing to change DNS as it seems windows was able to do it somehow automatically... – Aram Papazian Aug 23 '13 at 20:56
  • Is this a Windows machine on a domain? Windows can use broadcasts to see other machines on the same network and also has the ability to dynamically register with some DNS servers. Assuming you have network connectivity in the first place ARP is not something to change for name resolution – TheFiddlerWins Aug 23 '13 at 21:03
  • I have 4 machines. 1 is the machine I'm on that is recognizing the other 3 machines. There is existing.host.local, windows.host.local and the ? one. The one I'm trying to get up and running is the ? and is running Ubuntu. Is there a way for an ubuntu server to dynamically register with a DNS server as Windows does? Or would updating the DNS records (and/or the /etc/hosts file) be the optimal way to do that? – Aram Papazian Aug 23 '13 at 21:09
  • Do you have mdns in your /etc/nsswitch.conf file for the "hosts" line? Try "sudo apt-get install avahi-daemon libnss-mdns" on the Ubuntu box, this should make it work with broadcasts similar to your Windows machines. – TheFiddlerWins Aug 23 '13 at 21:33
  • I did not have mdns setup. I went ahead and installed the 2 applications you suggested. I assume there is a wait time before the broadcast occurs and it starts showing up in 'arp -a' ? (Although I switched to 'arp -da' as apparently the -d param refreshes the cache) – Aram Papazian Aug 23 '13 at 21:57
  • ARP has nothing to do with it. Try pinging the other hosts. There is a wait time but it should be very short, worst case try rebooting. – TheFiddlerWins Aug 23 '13 at 22:01
  • After installing avahi I couldn't ping any of the other servers anymore. Once I stopped it I was able to ping again. I assume that was not the intended result? – Aram Papazian Aug 23 '13 at 22:20
  • Thanks for you all your help btw. I ended up just updating the hosts file as that was the best method for what I needed. Thanks for giving me direction and showing me what I needed to lookup =) – Aram Papazian Aug 28 '13 at 14:48