Wifi Connectivity, eth0 and wlan0 interface?

33,338

With DHCP, computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user to configure these settings manually.

So your eth0 and your wlan0 connection will not all ways have the same ip address it may change each time you disconnect and reconnect to the internet since the ip addresses are assigned automatically.

Eth0 and wlan0 are not assigned by your ip, eth0 and wlan0 are device names assigned by ubuntu.

Eth0 is your ehternet connection and wlan0 is your wireless connection but sometimes wlan0 might be called eth1 instead it all depends on the driver your wireless card is using.

Share:
33,338

Related videos on Youtube

user276826
Author by

user276826

Updated on September 18, 2022

Comments

  • user276826
    user276826 over 1 year

    I do not have any problem in Internet connectivity, both in terminal and in browser.

    Few days earlier, I used to get a dynamic ipv4 address to eth0 from my ISP and the interface used to be up and running. I do not know with what of my changes, the ip has migrated to wlan0 ?

    1. Can you please explain, what exactly has happened ? It might help me further to understand the virtual NICs funda !

    2. Can I consider the ip assigned to my PC is wlan0 ip ? (layer 3 ip to connect to external world )

    Thanks.

    Ubuntu 14.04 !
    ifconfig eth0 
    eth0      Link encap:Ethernet  HWaddr 00:1f:16:6c:b0:1f  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    sriduth@sriduth-HP-G60-Notebook-PC:~$ ifconfig wlan0
    wlan0     Link encap:Ethernet  HWaddr 00:24:2c:3b:f8:79  
              inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::224:2cff:fe3b:f879/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:509669 errors:0 dropped:0 overruns:0 frame:0
              TX packets:366807 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:715274922 (715.2 MB)  TX bytes:35266765 (35.2 MB)
    
    sriduth@sriduth-HP-G60-Notebook-PC:~$ ping 192.168.1.102
    PING 192.168.1.102 (192.168.1.102) 56(84) bytes of data.
    64 bytes from 192.168.1.102: icmp_seq=1 ttl=64 time=0.075 ms
    64 bytes from 192.168.1.102: icmp_seq=2 ttl=64 time=0.064 ms
    ^C
    --- 192.168.1.102 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 999ms
    rtt min/avg/max/mdev = 0.064/0.069/0.075/0.010 ms
    
    sriduth@sriduth-HP-G60-Notebook-PC:~$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 wlan0
    10.0.0.0        172.24.4.2      255.255.255.0   UG    0      0        0 br-ex
    172.24.4.0      0.0.0.0         255.255.255.0   U     0      0        0 br-ex
    192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
    192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
    
    sriduth@sriduth-HP-G60-Notebook-PC:~$ cat /etc/network/interfaces
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    sriduth@sriduth-HP-G60-Notebook-PC:~$ cat /etc/hosts
    127.0.0.1   localhost sriduth-HP-G60-Notebook-PC
    127.0.1.1   sriduth-HP-G60-Notebook-PC
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    • Louis Matthijssen
      Louis Matthijssen almost 10 years
      eth0 is ethernet (cable), wlan0 is wireless LAN (wireless). So, if you're using wireless the IP address belongs to wlan0. Both are not virtual interfaces.