Mapping IP addresses

Discussion in 'Linux Networking' started by Doug Laidlaw, Jul 6, 2014.

  1. Doug Laidlaw

    Doug Laidlaw Guest

    I have a wireless home network with addresses in the 192.168. . range.
    I expected my router's control panel to have a list of addresses at
    least, but apart from a table with only two MAC addresses, it hasn't.
    Is the only way to look at each networked device and read its address?
    I don't have fixed IP addresses, but they never seem to change. My
    printer has an address at the high end, so that making it active
    doesn't affect others. Apart from the printer, there should be two
    computers and a tablet. The mobile phone isn't part of it.

    I have tried reading the networking HOWTO, but its basic concepts are
    beyond me. Is there a newbie-level solution?
     
    Doug Laidlaw, Jul 6, 2014
    #1
    1. Advertisements


  2. Any devices which have been accessed "recently" should be visible with "arp -a" (sudo /sbin/arp -a).
     
    andrew.williams, Jul 6, 2014
    #2
    1. Advertisements

  3. Doug Laidlaw

    Doug Laidlaw Guest

    It's OK. With only 4 connections in the network, I simply listed them.
     
    Doug Laidlaw, Jul 7, 2014
    #3
  4. Doug Laidlaw

    Moe Trin Guest

    On Tue, 08 Jul 2014, in the Usenet newsgroup comp.os.linux.networking, in
    Ah, the joys of the Dynamic Host Configuration Protocol (DHCP). A lot
    is going to depend on the router.

    Depends - the router might be windoze friendly, and expect you to be
    using the microsoft version of a multicast DNS service _similar_ to,
    but incompatible with the Apple version implemented in Linux as
    Avahi. Samba _might_ be helpful, but I wouldn't count on it.

    ]] I don't have fixed IP addresses, but they never seem to change.

    That might be the way out of this mess. If they are consistent, the
    solution would be to edit the /etc/hosts files or equivalent, adding
    the hostnames/addresses as if they were fixed.

    The basic problem is hostname or address resolution. The contents of
    the packet (or a letter) are essentially the same, and the key you
    are looking for is where to send them (the address on the packet or
    the envelope of the letter). Down at the wire (or wireless) level,
    the packets are delivered by the MAC address. O/S and users don't do
    MAC addresses that well, so the O/S deals with IP addresses and there
    is an automatic network function called ARP that sorts out the map
    between IP and MAC addresses. (Briefly, the networking genie on the
    sending computer yells out [in a broadcast to everyone listening]
    "who had IP address x.x.x.x", and networking genie the computer with
    that address replies "that's me". The broadcast contained the MAC and
    IP address of the sending computer, and the reply has the MAC and IP
    address of the target - so know we know who is who.) Hostnames
    are a human convenience, and the O/S may have a list (/etc/hosts or
    equal) to translate between your human name and the associated IP. If
    the computer has been talking to the target "recently" (60 seconds
    for example), the networking genie remembers the IP to MAC translation
    so it doesn't have to ask by broadcast.
    I'm guessing that means adding them to the /etc/hosts file or equal.

    Old guy
     
    Moe Trin, Jul 8, 2014
    #4
  5. Doug Laidlaw

    Doug Laidlaw Guest

    no, I wrote them down. Took the risk that they might change.
     
    Doug Laidlaw, Jul 8, 2014
    #5
  6. Many home routers allow you to assign a fixed IP address to a fixed MAC
    address. That might be the way to go. Ie, assign fixed IP address to
    each of your machines. That would still allow a guest to come onto the
    network to which you could assign a floating address.
     
    William Unruh, Jul 8, 2014
    #6
  7. Doug Laidlaw

    Moe Trin Guest

    On Tue, 08 Jul 2014, in the Usenet newsgroup comp.os.linux.networking, in
    I don't know your router. They can often be configured to provide
    "fixed" IP addresses based on the MAC address of the client. The
    clients _may_ be configurable to tell the router "my name is $FOO"
    during the boot cycle, and the router may be configured to hand out
    specific addresses based on that hostname. The router may also be
    providing DNS service on your LAN. Local addresses are based on the
    IP handed out, while remote addresses are resolved by relaying the
    request to the ISP's name server.

    DHCP servers without such fixed configurations often hand out
    addresses in order - first requester gets first available address,
    second gets the second, and so on. Thus, if you turn on systems in
    a fixed order each time, they _probably_ will get the same address
    each time - but that's not guaranteed. Other servers try to
    remember the MAC address of each client, and try to hand out the same
    address to that client. The memory is often volatile - if you power
    cycle the router, it may forget those previous relationships.

    Old guy
     
    Moe Trin, Jul 8, 2014
    #7
  8. Doug Laidlaw

    Moe Trin Guest

    On Tue, 8 Jul 2014, in the Usenet newsgroup comp.os.linux.networking, in
    I've now got three laptops at home (in addition to the four desktop
    systems and file servers), but when I use them here, I'm using a
    wired network, and all of the systems on the wired network have fixed
    addresses. Rather than jump through the hoops to tweak a DHCP server
    to provide this, the boot scripts on each system find address, mask,
    gateway, etc. in the appropriate /etc/sysconfig/networking/*
    configuration file. It takes me less time to set that up than to get
    the appropriate MAC address from the client, and add it to the
    /etc/dhcpd.conf (probably adding a typ0 while doing so).

    I do have a DHCP server on the wired (and wireless) networks, but
    unless I have guests who will need network access, it's turned off.
    Using "iwlist wlan0 scanning", I normallly see 5 to 9 networks other
    than my own, so mine is also normally off to avoid wasting bandwidth.
    I have root on the systems here, so "su -c '/etc/rc.d/init.d/dhcpd
    start'" is all it takes if a guest needs access. On boot, that
    server is not started. A cron job sends me mail nightly if the
    server is running, so I'll remember to stop it when the guest leaves.

    Old guy
     
    Moe Trin, Jul 9, 2014
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.