Date: Fri, 23 Feb 1996 21:28:02 +0100 From: Angelo Turetta <ATuretta@stylo.it> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: IP Aliasing: a little confused Message-ID: <c=IT%a=_%p=Regulus%l=SERVERNT960223212801AU005B00@servernt.stylo.it>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
I hope someone can make it more clear.
My Internet router is running 2.0.5R: its NE2000 is assigned the IP 194.21.207.254 out of my class "C" network.
I've other PCs 'Internet enabled' on the same network, and a PPP connection via V34 leased line to my Internet provider.
On the same physical LAN, I've setup an internal IP network using one of the class "C" reserved for internal use by the RFCxxxx (sorry I don't have the RFC number handy :-( 192.168.1.x
In rc.local, I've added:
ifconfig ed1 alias 192.168.1.254 netmask 0xffffff00
ifconfig ed1 alias 194.20.21.28 netmask 0xfffffff0
(the second is for temporarily keeping the old IP addresses I used to have before requesting a class "C")
After boot, my routing table is:
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 194.20.20.37 UGc 25 9 tun0
127.0.0.1 127.0.0.1 UH 2 73 lo0
192.168.1 link#1 UC 0 0
194.20.20.37 194.21.207.250 UH 16 0 tun0
194.20.21.16 link#1 UC 0 0
194.21.207 link#1 UC 0 0
194.21.207.254 127.0.0.1 UGHS 0 0 lo0
224 link#1 UCS 0 0
Now, weirdness # 1: when the router must tell its address to the ethernet, it always uses the one from the lowest numbered network, and not from the same network as the source address: that is, when I traceroute a PC on the internal network from one on the Internet network, I get:
E:\>tracert www.regulus.it
Tracing route to segreteria.regulus.it [192.168.1.1]
over a maximum of 30 hops:
1 <10 ms <10 ms 10 ms unix.regulus.it [192.168.1.254]
2 10 ms 10 ms 10 ms segreteria.regulus.it [192.168.1.1]
And the same happens for packets going through the ppp link.
E:\>tracert www.dsnet.it
Tracing route to maggiore.dsnet.it [194.20.20.15]
over a maximum of 30 hops:
1 <10 ms <10 ms 10 ms unix.regulus.it [192.168.1.254]
2 150 ms 150 ms 160 ms mazzini.dsnet.it [194.20.20.37]
3 160 ms 170 ms 171 ms maggiore.dsnet.it [194.20.20.15]
Is this normal ?????
I'd think if a fixed address must be used, it should be the 'TRUE' one, not one of the aliases.
Weirdness # 2 (worst than first): one of the PCs on the 'Internet' subnet has a dial-up connection to another site. There, the IP addresses are taken from another RFCxxxx reserved network: 10.0.0.0 netmask 255.0.0.0. My side of the link is on the machine at 194.21.207.13.
when I issue this command:
# route add -net 10 194.21.207.13
the new route becomes:
Destination Gateway Flags Refs Use Netif Expire
10 194.21.207.13 UGSc 0 0 tun0
You may see the Netif value is wrong, as it routes packets for the new net to the 'default' interface, rather than the interface through which the gateway is reacheable. Obviously, packets sent to 10.x.x.x are lost.
Is there any way to work around this problem ?
Thanks in advance for any help.
Angelo.
-----------------------------------------------------------------
Angelo Turetta mailto:aturetta@stylo.it
Stylo Multimedia - Bologna - Italy http://www.stylo.it/
[-- Attachment #2 --]
x>" IPM.Microsoft Mail.Note 1 $ $ ! F0AD0845876CCF11B1E00000440136B7
IP Aliasing: a little confused
d # ) &