1
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: Now i found something else to wonder about.. (was: Re: options files) To: isdn4linux@hub-wue.franken.de
2
Date: Thu, 24 Oct 1996 22:47:17 +0200 (MET DST) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
9
> > isdnctrl addif ippp0
10
> > isdnctrl pppbind ippp0
11
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11
13
> > route add -net 194.192.159.0 metric 1 netmask 255.255.255.224 ippp0
14
> > ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 file
15
> > /etc/ppp/options.ippp0
17
> > isdnctrl addif ippp1
18
> > isdnctrl pppbind ippp1
19
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.13
20
--- why do you repeat the ifconfig?
21
probably it should be "ippp1" here?
22
> > route add -net 192.168.1.0 metric 1 netmask 255.255.255.0 ippp1
23
> > ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 file
24
> > /etc/ppp/options.ippp1
26
> Compare the two ifconfig commands, they are for the same interface.
27
> And AFAIK the two interfaces need different ip-adresses.
29
With this I do not agree. It is simply possible to give two interfaces the same local ip address. You may even establish two routes on them. But only the first one found in the routing table will be used by the kernel. So the other route won't have any effect.
31
Configuring two interfaces with the same local IP address does make sense if you want to use as less IP adresses as possible (very honorable as long as IPv6 is not common practice).
32
An interface IP-Adress is used by the kernel to give outgoing packets (not the forwarded packets) a sender IP address within the IP header.
34
To make the IP address 193.89.84.10 (as used in the above example) pingable I would suggest the following (changes ar marked at the right margin):
36
| ifconfig dummy0 193.89.84.10 # module has to be loaded before | route add -host 193.89.84.10 # only to have 193.89.84.10 reachable
40
| ifconfig ippp0 down # to make it exclusively bindable
41
isdnctrl pppbind ippp0
42
| ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11 up | route add -host 193.89.84.11 metric 1 ippp0 | route add -net 194.192.159.0 metric 1 \ | netmask 255.255.255.224 gw 193.89.84.11
43
ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 \
44
file /etc/ppp/options.ippp0
47
| ifconfig ippp1 down # to make it exclusively bindable
48
isdnctrl pppbind ippp1
49
| ifconfig ippp1 193.89.84.10 p-t-p 193.89.84.13 up | route add -host 193.89.84.13 metric 1 ippp0 | route add -net 192.168.1.0 metric 1 \ | netmask 255.255.255.0 gw 193.89.84.13
50
ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 \
51
file /etc/ppp/options.ippp1
54
You may even try the following to "emulate" cisco's dialer rotary group where you may put several BRIs (basic rate interfaces = ISDN S0 [gr.]) into one netmask. Therefore the example would look like (changes aren't marked any more; completely different):
58
# assuming, we are using a network of
59
# 193.89.84.0/255.255.255.240
60
# for a dial up server where
61
# 193.89.84.1 is the IP for the server and
62
# 193.89.84.2-14 are the addresses for remote interfaces.
64
ifconfig dummy0 193.89.84.1 # module has to be loaded before
65
route add -host 193.89.84.1 # only to have 193.89.84.1 reachable
69
RMTNET_ippp0=194.192.159.0
70
RMTMSK_ippp0=255.255.255.224
73
RMTNET_ippp1=192.168.1.0 # masquerading is great!
74
RMTMSK_ippp1=255.255.255.0
77
RMTNET_ippp2="" # you may leave 'em blank
78
RMTNET_ippp2="" # if there is no remote net
80
[...] # fill out to your needs
82
for x in 2 3 4 5 6 7 8 9 10 11 12 13 14
85
isdnctrl addif $IFNAME
86
ifconfig $IFNAME down # to make it exclusively bindable
87
isdnctrl pppbind $IFNAME
88
ifconfig $IFNAME 193.89.84.1 netmask 255.255.255.240 up
89
route add -host 193.89.84.$x metric 1 $IFNAME
90
eval NET="\${RMTNET_${IFNAME}}"
91
eval MSK="\${RMTNET_${IFNAME}}"
92
if [ -n "$NET" -a -n "$MSK" ]
94
route add -net $NET metric 1 netmask $MSK gw 193.89.84.$x
96
eval USER="\${USER_${IFNAME}}"
97
ipppd user "$USER" /dev/$IFNAME 193.89.84.1:193.89.84.$x \
98
file /etc/ppp/options.$IFNAME
102
No warranty, it's untested.
103
But please yell at me (politely) if I'm wrong.
111
/\ Delta Internet GmbH / \ DI Delta Internet GmbH von-Siemens-Str. 12 /____\ Netzwerkdienst & Vertrieb 59757 Arnsberg
112
ALLES NUR AUS LINUX Tel. +49 2932 916 132 Fax 191 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
1
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: Now i found something else to wonder about.. (was: Re: options files) To: isdn4linux@hub-wue.franken.de
2
Date: Thu, 24 Oct 1996 22:47:17 +0200 (MET DST) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
9
> > isdnctrl addif ippp0
10
> > isdnctrl pppbind ippp0
11
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11
13
> > route add -net 194.192.159.0 metric 1 netmask 255.255.255.224 ippp0
14
> > ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 file
15
> > /etc/ppp/options.ippp0
17
> > isdnctrl addif ippp1
18
> > isdnctrl pppbind ippp1
19
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.13
20
--- why do you repeat the ifconfig?
21
probably it should be "ippp1" here?
22
> > route add -net 192.168.1.0 metric 1 netmask 255.255.255.0 ippp1
23
> > ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 file
24
> > /etc/ppp/options.ippp1
26
> Compare the two ifconfig commands, they are for the same interface.
27
> And AFAIK the two interfaces need different ip-adresses.
29
With this I do not agree. It is simply possible to give two interfaces the same local ip address. You may even establish two routes on them. But only the first one found in the routing table will be used by the kernel. So the other route won't have any effect.
31
Configuring two interfaces with the same local IP address does make sense if you want to use as less IP adresses as possible (very honorable as long as IPv6 is not common practice).
32
An interface IP-Adress is used by the kernel to give outgoing packets (not the forwarded packets) a sender IP address within the IP header.
34
To make the IP address 193.89.84.10 (as used in the above example) pingable I would suggest the following (changes ar marked at the right margin):
36
| ifconfig dummy0 193.89.84.10 # module has to be loaded before | route add -host 193.89.84.10 # only to have 193.89.84.10 reachable
40
| ifconfig ippp0 down # to make it exclusively bindable
41
isdnctrl pppbind ippp0
42
| ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11 up | route add -host 193.89.84.11 metric 1 ippp0 | route add -net 194.192.159.0 metric 1 \ | netmask 255.255.255.224 gw 193.89.84.11
43
ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 \
44
file /etc/ppp/options.ippp0
47
| ifconfig ippp1 down # to make it exclusively bindable
48
isdnctrl pppbind ippp1
49
| ifconfig ippp1 193.89.84.10 p-t-p 193.89.84.13 up | route add -host 193.89.84.13 metric 1 ippp0 | route add -net 192.168.1.0 metric 1 \ | netmask 255.255.255.0 gw 193.89.84.13
50
ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 \
51
file /etc/ppp/options.ippp1
54
You may even try the following to "emulate" cisco's dialer rotary group where you may put several BRIs (basic rate interfaces = ISDN S0 [gr.]) into one netmask. Therefore the example would look like (changes aren't marked any more; completely different):
58
# assuming, we are using a network of
59
# 193.89.84.0/255.255.255.240
60
# for a dial up server where
61
# 193.89.84.1 is the IP for the server and
62
# 193.89.84.2-14 are the addresses for remote interfaces.
64
ifconfig dummy0 193.89.84.1 # module has to be loaded before
65
route add -host 193.89.84.1 # only to have 193.89.84.1 reachable
69
RMTNET_ippp0=194.192.159.0
70
RMTMSK_ippp0=255.255.255.224
73
RMTNET_ippp1=192.168.1.0 # masquerading is great!
74
RMTMSK_ippp1=255.255.255.0
77
RMTNET_ippp2="" # you may leave 'em blank
78
RMTNET_ippp2="" # if there is no remote net
80
[...] # fill out to your needs
82
for x in 2 3 4 5 6 7 8 9 10 11 12 13 14
85
isdnctrl addif $IFNAME
86
ifconfig $IFNAME down # to make it exclusively bindable
87
isdnctrl pppbind $IFNAME
88
ifconfig $IFNAME 193.89.84.1 netmask 255.255.255.240 up
89
route add -host 193.89.84.$x metric 1 $IFNAME
90
eval NET="\${RMTNET_${IFNAME}}"
91
eval MSK="\${RMTNET_${IFNAME}}"
92
if [ -n "$NET" -a -n "$MSK" ]
94
route add -net $NET metric 1 netmask $MSK gw 193.89.84.$x
96
eval USER="\${USER_${IFNAME}}"
97
ipppd user "$USER" /dev/$IFNAME 193.89.84.1:193.89.84.$x \
98
file /etc/ppp/options.$IFNAME
102
No warranty, it's untested.
103
But please yell at me (politely) if I'm wrong.
112
/\ Delta Internet GmbH / \ DI Delta Internet GmbH von-Siemens-Str. 12 /____\ Netzwerkdienst & Vertrieb 59757 Arnsberg
113
ALLES NUR AUS LINUX Tel. +49 2932 916 132 Fax 191 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]