I talked about ports and services and now I’ll talk about the interface. The interface is the actual network connection that has all that traffic to the ports come through it. It’s that ethernet cable attached to your computer.
Or it’s that connection to the wireless network. It’s the pipe (not a real pipe!) that connects your computer to the Internet. Your computer has one, since you’re reading this blog post on the Internet. Since we’re using Linux® there’s a way to see what interfaces you have. It’s called ifconfig.
If you try to run ifconfig at the commandline, you’ll see:
Alpha:~ computerlamp$ ifconfig -bash: ifconfig: command not found
That means it isn’t in your path. (We’ll talk more about that later). It just means that you have to give the full command line to see the output:
Alpha:~ computerlamp$ /sbin/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:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:480 (480.0 b) TX bytes:480 (480.0 b) eth0 Link encap:Ethernet HWaddr 00:1A:2B:3C:00:00 inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fd91:ae3b:d5e8:aa85:0:0:0:0 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:41620 errors:0 dropped:0 overruns:0 frame:0 TX packets:40231 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21601203 (20.6 MiB) TX bytes:6145876 (5.8 MiB) Interrupt:21 Base address:0xe000
You have at least two interfaces on your system, the first one is your local link. That’s the interface that your computer talks to itself on. It isn’t a real interface, you don’t plug a cable into it, but it’s the basic ‘I’m talking to myself!’ interface that every computer has. The second interface is eth0, or ethernet 0. If you have two ethernet interfaces (meaning you plug two ethernet cables into your computer) you’ll see eth0 and eth1. And then things can get weirder.
Wireless interfaces don’t have a standard. They can be named all sorts of things.
Next time, we’ll talk about what the actual output from ifconfig means.