Find the answer to your Linux question:
Results 1 to 2 of 2
I have a weird problem with my /etc/network/interfaces configuration. I have the most simple static setup possible: Code: # cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! tyho's Avatar
    Join Date
    Oct 2010
    Location
    Mwanza, Tanzania
    Posts
    76

    network interfaces configuration


    I have a weird problem with my /etc/network/interfaces configuration. I have the most simple static setup possible:
    Code:
    # cat /etc/network/interfaces
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
          address 192.168.1.1
          broadcast 192.168.1.255
          netmask 255.255.255.0
          network 192.168.1.0
          gateway 192.168.1.1
    Still, it seems like it's not working:
    Code:
    # ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:26:18:00:27:91  
              inet6 addr: fe80::226:18ff:fe00:2791/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1878 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4609 errors:0 dropped:0 overruns:0 carrier:13
              collisions:0 txqueuelen:1000 
              RX bytes:277567 (277.5 KB)  TX bytes:1499447 (1.4 MB)
              Interrupt:45 
    
    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:10859 errors:0 dropped:0 overruns:0 frame:0
              TX packets:10859 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:687746 (687.7 KB)  TX bytes:687746 (687.7 KB)
    
    ppp0      Link encap:Point-to-Point Protocol  
              inet addr:10.140.222.168  P-t-P:10.64.64.64  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              RX packets:6472 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6730 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:3186416 (3.1 MB)  TX bytes:1208047 (1.2 MB)

    The weirdest thing is doing
    Code:
    # ifconfig eth0 192.168.1.1 up
    setups up the interface correctly:
    Code:
    # ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:26:18:00:27:91  
              inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::226:18ff:fe00:2791/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1888 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4620 errors:0 dropped:0 overruns:0 carrier:14
              collisions:0 txqueuelen:1000 
              RX bytes:278384 (278.3 KB)  TX bytes:1501512 (1.5 MB)
              Interrupt:45 
    
    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:10859 errors:0 dropped:0 overruns:0 frame:0
              TX packets:10859 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:687746 (687.7 KB)  TX bytes:687746 (687.7 KB)
    
    ppp0      Link encap:Point-to-Point Protocol  
              inet addr:10.140.222.168  P-t-P:10.64.64.64  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              RX packets:6508 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6772 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:3198722 (3.1 MB)  TX bytes:1213042 (1.2 MB)

    ??? There is no difference between the configuration in the network-file and the command-line setup, still only the latter works?


    btw, since we are talking about network interfaces already:
    It seems like Ubuntu doesn't use /etc/network/interfaces, or at least the Network Manager doesn't. No matter what I do, nothing changes in the file, unless I do it by myself. Where does Ubuntu save the network configuration?

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    network manager doesn't use that file

    if you want to use it you should disable network manager, then you will have to use init.d scripts to start/stop networking

Posting Permissions

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