3

My gateway(router) is connected to DSL.

The gateway connects to 1 wireless transceiver device. 2 fixed computers connect to the router. At the moment of me doing ifconfig 2 fixed computers were connected to the internet. And 1(my laptop) computer was accessing wireless internet. Yet when I do ifconfig I can only see 2 network interfaces: eth0 and eth1(and lo).

Why don't I see 3 network interfaces when I have 3 different internet connections?

5
  • 2
    You are running command on computer or router?
    – user79032
    May 11, 2012 at 12:04
  • I am running the command from my laptop.
    – Bentley4
    May 11, 2012 at 15:05
  • From your laptop, after SSHing to router? If not, don't expect that it'd display router things...
    – user79032
    May 11, 2012 at 15:17
  • I didn't know that before. SSHing to router, is that like port forwarding safely?
    – Bentley4
    May 11, 2012 at 15:20
  • SSHing to router means running commands natively on router.. Not on computer.
    – user79032
    May 11, 2012 at 15:25

4 Answers 4

2

I am not sure if I understand correctly. But you have 1 Wireless gateway and 3 Devices connected to it?

So doing ifconfig only shows PHYSICAL hardware/connections on the PC that ran the command - not the connections available or other device.

ifconfig stands for interface configuration

  • An interface if a virtual or physical layer on the computer that enables it to communicate with other devices using a standard, for example in your case TCP/IP

  • eth0 could be your Wired Network card running at 10/100/1000

  • eth1 is possibly your wirless interface running at a/b/g/n speeds.
  • lo is a virtual interface and is called a loopback and bind to your computer using home (127.0.0.1) or (localhost) or whatever your computers name is(because it loops back to it self)

To see other computers you need to use something like ARP and to find other computers or devices within your network range.

Also as suggested you can use a wireless tool iwconfig to scan for access points (an access point is not an interface- but the access point it self uses an interface to communicates with other devices found in ARP)

And you only have 1 internet connection, not 3.

In total you should have 5 ARP entries - 2 PC's, 1Notebook, 1Switch and 1 Modem

enter image description here

So as you can see in the illustration, each host has an interface of eth0, the gateway has eth0 and the ISP on the other side has eth0. the more interfaces a device has the higher the number.

3
  • 3
    In addition to this, isn't iwconfig for wireless connections?
    – cutrightjm
    May 11, 2012 at 12:05
  • 1
    Interfaces don't have to be physical -- many are not (lo, vlan interfaces, vpn interfaces, virtual interfaces, interfaces created to network virtual machines)
    – FatalError
    May 11, 2012 at 12:52
  • 2
    What is the ARP command to see all the other devices on your network?
    – Bentley4
    May 11, 2012 at 18:18
2

ifconfig shows you interfaces. I.e., you might see an entry for each wired (physical) connection, and one for your wireless.

What ifconfig does not show you is connections. You might be serving hundreds of file transfers to as many connected systems via ethernet, and you would still only see that one ethernet card in ifconfig.

2

ARP for windows

arp -a

enter image description here

ARP in most linux/unix/bsd distros

arp-scan --interface=eth0

enter image description here

0

I guess you have this setup;

           <ISP>
             |
      <Router Machine>
             |
         <Switch>
      /      |      \
Machine 1  Machine 2 WiFi AP

If that's the case of course ifconfig will only show two interfaces.. because you only have two interfaces.

12
  • Where is the answer?
    – Piotr Kula
    May 11, 2012 at 13:45
  • 1
    "because you only have two interfaces." May 11, 2012 at 14:27
  • its obvios the OP does not undestand what ifconfig does. not the number of interfaces displayed. How do you know he has only 2 interfaces? because he wrote that in his question. congratulations on cyclic redundancy reticulation of rhetorically answering his questions.
    – Piotr Kula
    May 11, 2012 at 14:41
  • 1
    @ppumkin: Downvoting because he used ASCII art instead of an image? Really?
    – DevSolar
    May 13, 2012 at 10:32
  • 1
    @ppumkin: His answer is factually correct and sufficiently thought-provoking, just less hand-holding or elaborate than yours. If you don't consider it worthy of an upvote, fine, but your downvote, and incidentally your attitude, is out of place IMHO.
    – DevSolar
    May 13, 2012 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .