Welcome to http://www.marssoft.de/
 
Tuesday, 11th December 2018 21:23:37 (GMT+1) 

Linux Network Interfaces

Trying network-manager - whow, its great!

/etc/init.d/ifplugd stop

nano /etc/default/ifplugd

[...]
#INTERFACES="eth0"
INTERFACES=""
[...]
/etc/init.d/ifplugd stop
mv /etc/network/interfaces /etc/network/interfaces.bak

nano /etc/network/interfaces

# Loopback networking device
#
auto  lo
iface lo inet loopback
aptitude install network-manager-gnome
adduser emmenlau netdev

Done. Now the nm-applet should appear in the gnome notification-area. Use nm-tool as root to see more detailed statistics.

Other, older configs - pre-Netowrk Manager

Named Interfaces

setup the interfaces:

     iface home inet static
             address 192.168.0.123
             netmask 255.255.255.0
             gateway 192.168.0.1
     
     iface work inet static
             address 81.201.3.123
             netmask 255.255.0.0
             gateway 81.201.1.1

then you can do:

ifup eth0=home

Bring up interface only when cable is plugged in (old)

auto    eth0
iface   eth0 inet dhcp
        pre-up [ `cat /sys/class/net/eth0/iflink` -ne 2 ]

Bring up interface only when cable is plugged in (new)

aptitude install ifplugd
<code>

nano /etc/default/ifplugd

<code>
INTERFACES="eth0"
HOTPLUG_INTERFACES=""
ARGS="--no-shutdown --ignore-fail --delay-up=0 --delay-down=10 --wait-on-fork --ignore-retval"
# -t | --poll-time= SECS
SUSPEND_ACTION="stop"

nano /etc/network/interfaces

# Network Card
# now configured via ifplugd (/etc/default/ifplugd)
iface   eth0            inet dhcp
/etc/init.d/networking restart
ifconfig eth0 down
/etc/init.d/ifplugd restart

WLan with WPA2

setup /etc/network/interfaces

iface   wlan-mars inet dhcp
        wpa-driver wext   
        wpa-ssid MARS    
        wpa-psk u_wish
        wpa-key-mgmt WPA-PSK
        wpa-pairwise TKIP     
dhclient -r wlan0
wpa_cli
# terminate
# quit
ifdown wlan0
ifup wlan0=wlan-mars
scratch/linux_network_interfaces.txt · Last modified: 2014/04/02 22:39 (external edit)