LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Dynamic network configuration. (http://www.linuxquestions.org/questions/slackware-14/dynamic-network-configuration-4175436427/)

slackinux 11-09-2012 11:49 AM

Dynamic network configuration.
 
Hi to all !

I have a notebook with Slackware 14; I work with different LAN and different IP configuration: static IP, DHCP, bugged DHCP, WiFi, etc.

I use Network Manager, but it does not fit my needs.

I would use a dynamic setup like Debian's guessnet.

Is there any software for Slackware ?

Thank you in advance.

markush 11-09-2012 02:11 PM

Quote:

Originally Posted by slackinux (Post 4825908)
Hi to all !

I have a notebook with Slackware 14; I work with different LAN and different IP configuration: static IP, DHCP, bugged DHCP, WiFi, etc.

I use Network Manager, but it does not fit my needs.
...

What exactly are your needs? and what exactly doesn't work?

Markus

slackinux 11-10-2012 06:18 AM

Quote:

Originally Posted by markush (Post 4825994)
What exactly are your needs? and what exactly doesn't work?

Markus

"Network Manager" works; but I have to set manually the network; all the times !

Also, until I don't apply the correct network configuration, automatic services (like qmail, fetchmail, ntp, etc.) do not work.

I need a software that selects "automagically" the network configuration (at boot time); it should choose the network configuration to apply, due to the:
- responses from a set of tests;
- mappings between test set and networks.

The tests should be based on formal rules predefined at system configuration level (i.e. ping o arping response, ESSID detection, etc.).

- Example (pseudo DSL) --------------------

test_1: ping 123.56.45.21
test_2: essid "FASTWEB-1-0dsadeYFzQK"
test_3: eth2 missing_cable

config_1:
iface eth2
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1

config_2:
iface eth2
address 10.45.1.15
netmask 255.255.0.0
broadcast 10.45.255.255
gateway 10.45.1.1
dns-nameservers 145.125.26.23

config_3:
iface wlan0
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1

map_1:
if test_1 and not test_3 then config_1

map_2:
if test_2 and test_3 then config_3

map_3:
if test_2 then config_2

map_4:
else dhcp

for m in map_[1234]: execute m
-----------------------------------------


Thanks

markush 11-10-2012 07:04 AM

Does any of the networks provide DHCP?

Markus

slackinux 11-11-2012 02:02 PM

Quote:

Originally Posted by markush (Post 4826427)
Does any of the networks provide DHCP?

Markus

Some network provides DHCP; but I need specific configuration.

For example, I need to use specific static IP and query nameserevers other than released by DHCP.

markush 11-11-2012 02:10 PM

Well, when there's DHCP available, you can find out (automatically) in which network you are, so you could write a script which, depending on the dynamic configuration, creates a static one.

It would be more difficult to (automatically) find out in which network you are if there is no DHCP.

Markus

allend 11-11-2012 06:53 PM

With NetworkManager you can have scripts in /etc/NetworkManager/dispatcher.d/ to handle connection customisation. I use this for handling my iptables rules. e.g. http://www.linuxquestions.org/questi...1/#post4579765


All times are GMT -5. The time now is 07:30 AM.