Question about ifconfig
Results 1 to 7 of 7

Thread: Question about ifconfig

  1. #1
    Banned
    Join Date
    Feb 2006
    Posts
    18

    Question Question about ifconfig

    when i use if config:
    linux:~ # ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1729 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1729 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:147516 (144.0 Kb) TX bytes:147516 (144.0 Kb)

    ra0 Link encap:Ethernet HWaddr 00:02:44:93:24:4F
    inet addr: 192.168.0.68 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::202:44ff:fe93:244f/64 Scope:Link
    UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:81459 errors:0 dropped:0 overruns:0 frame:0
    TX packets:64563 errors:6 dropped:6 overruns:0 carrier:0
    collisions:20813 txqueuelen:1000
    RX bytes:96893951 (92.4 Mb) TX bytes:8807000 (8.3 Mb)
    Interrupt:11
    It says that my IP on the LAN is 192.168.0.68
    Now when i want to ping the hosts on my LAN:
    linux:~> nmap -sP 192.168.0.0/24

    Starting Nmap 3.95 ( http://www.insecure.org/nmap/ ) at 2006-02-24 08:03 GST
    Host 192.168.0.1 appears to be up.
    Host 192.168.0.64 appears to be up.
    Host 192.168.0.66 appears to be up.
    Host 192.168.0.68 appears to be up.
    Nmap finished: 256 IP addresses (4 hosts up) scanned in 3.687 seconds
    And as you can see 192.168.0.68 is up on the LAN , my question is how can it happen? did i ping myself? how am i mentioned as a live host, and am I really 192.168.0.68?

    --thanks

  2. #2
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    did i ping myself?
    Yep..
    how am i mentioned as a live host,
    Your host responded to an ICMP echo request..
    and am I really 192.168.0.68?
    According to your ifconfig (ra0) output, yes...
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  3. #3
    Banned
    Join Date
    Feb 2006
    Posts
    18
    Okay, so when i want to ping the LAN one of the pings is sent to back to me via the router, and one of the live hosts must be me. begrepen. Really funny! cause i knew that the machines are running windows and always tried to figure out why the OS scan gave me linux!

    -thank you !

  4. #4
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    RX packets:81459 errors:0 dropped:0 overruns:0 frame:0
    TX packets:64563 errors:6 dropped:6 overruns:0 carrier:0
    collisions:20813 txqueuelen:1000
    To digress for a moment, I assume from this that your local network is connected with a hub? Given the decently high # of collisions (20813) versus the mount of transferred traffic (tx+rx) (146022) or around 14% you might benefit from going out and getting a cheap switch
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  5. #5
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    so when i want to ping the LAN one of the pings is sent to back to me via the router
    If I am not mistaken, the ping doesn't go out to the router
    but stays on the local machine, just as if you pinged the
    loopback address 127.0.0.1 (localhost).
    Somebody correct me if I'm wrong.
    I came in to the world with nothing. I still have most of it.

  6. #6
    AO Senior Cow-beller
    Moderator
    zencoder's Avatar
    Join Date
    Dec 2004
    Location
    Mountain standard tribe.
    Posts
    1,177
    Originally posted here by rcgreen
    If I am not mistaken, the ping doesn't go out to the router
    but stays on the local machine, just as if you pinged the
    loopback address 127.0.0.1 (localhost).
    Somebody correct me if I'm wrong.
    Sounds correct, but I wouldn't know how to be certain without asking Someone Smarter Than Me™

    Originally posted here by DutchGeek
    Okay, so when i want to ping the LAN one of the pings is sent to back to me via the router, and one of the live hosts must be me. begrepen. Really funny! cause i knew that the machines are running windows and always tried to figure out why the OS scan gave me linux!

    -thank you !
    Couple of minor, niggeling points here. But I am in a mood and MUST point them out. Is it really a router? Or, as nebulus200 has supposed, is it a hub? Maybe a couple of cheap tin-cans-and-some-string? Communications via osmosis?

    When discussing network problems with hardware involved, you need to be specific. A router is NOT a switch which is NOT a hub. Many vendors (Linksys, D-Link, etc.) have been known to mis-label or simplify commercial products, much to the dismay of the network professionals amongst us. I sincerely doubt you have a router sitting there. It may be one of those home gateway devices, which is essentially a router and switch in one.

    As for it being funny...no. It's not. The command you are executing is performing EXACTLY as you configured it to.

    nmap -sP 192.168.0.0/24

    You asked it to ping 192.168.0.0 with netmask 255.255.255.0. The system you ran this scan from happens to be within that range, so the command sent a ping to the IP address that happened to belong to your local system. Nothing funny about it...it did what you said. *shrug*
    "Data is not necessarily information. Information does not necessarily lead to knowledge. And knowledge is not always sufficient to discover truth and breed wisdom." --Spaf
    Anyone who is capable of getting themselves made president should on no account be allowed to do the job. --Douglas Adams (1952-2001)
    "...people find it far easier to forgive others for being wrong than being right." - Albus Percival Wulfric Brian Dumbledore

  7. #7
    Member
    Join Date
    May 2005
    Posts
    92
    RC,


    If I am not mistaken, the ping doesn't go out to the router
    but stays on the local machine, just as if you pinged the
    loopback address 127.0.0.1 (localhost).
    Somebody correct me if I'm wrong.
    You're right about the 127.0.0.1 never leaving the nic it's designed as the hardware loopback test and should never even touch the line.
    "Experience is the hardest teacher, it gives the test first and the lesson after." Anonymous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •