About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Thu 17 Mar 2005 - 17:29:56 GMT


On Thu, Mar 17, 2005 at 12:42:34PM +0100, Martin Pauly wrote:
> Hello Herbert,
>
> > check with iproute2's 'ip' utility (ip addr ls, ip route ls, ...)
> > to get a better 'understanding' what the legacy ifconfig
> > utility does with interfaces, addresses and routes ...
>
> well, the ip tools seem to do pretty much the same in this respect:
>
> -------- start of transcript ----------------------
> master22:~# ip addr sh
> 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:0e:0c:5c:53:75 brd ff:ff:ff:ff:ff:ff
> 3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:0e:0c:5c:53:74 brd ff:ff:ff:ff:ff:ff
> inet 192.168.1.18/25 brd 192.168.1.127 scope global eth1
> inet 137.248.1.53/25 scope global eth1
> master22:~# ip route sh
> 137.248.1.0/25 dev eth1 proto kernel scope link src 137.248.1.53
> 192.168.1.0/25 dev eth1 proto kernel scope link src 192.168.1.18
> default via 192.168.1.126 dev eth1
> master22:~#
> master22:~# ip addr add 137.248.9.13/27 dev eth0
> master22:~# ip route sh
> 137.248.9.0/27 dev eth0 proto kernel scope link src 137.248.9.13
> 137.248.1.0/25 dev eth1 proto kernel scope link src 137.248.1.53
> 192.168.1.0/25 dev eth1 proto kernel scope link src 192.168.1.18
> default via 192.168.1.126 dev eth1
> master22:~# ip route del 137.248.9.0/27
> master22:~# ip route sh
> 137.248.1.0/25 dev eth1 proto kernel scope link src 137.248.1.53
> 192.168.1.0/25 dev eth1 proto kernel scope link src 192.168.1.18
> default via 192.168.1.126 dev eth1
> master22:~# ip route add 137.248.9.0/27 dev eth0 src 137.248.9.13 table 2
> master22:~# ip route add default via 137.248.9.30 dev eth0 src 137.248.9.13 table 2
> RTNETLINK answers: Network is unreachable
> -------- end of transcript ----------------------
>
> And again, if I switch the order of processing and remove
> 137.248.9.0/27 dev eth0 proto kernel scope link src 137.248.9.13
> _after_ building table 2, everything's fine (and yes, I also tried to use table 100
> instead of table 2, just in case there was something special about it).
>
> So 'ip addr add <my-ip/my-masklen>' also sets an appropriate route
> in the main table which is a reasonable default. But it still isn't clear
> to be why building the second table should depend on some entry
> in the main routing table.

all your examples miss the 'ip rule' settings which actually
select which ips are processed by what table ... so your
setup solely relies on connections/packets getting the 'right'
route in the right? table ...

I really don't want to look into the details of your case but
I suspect that it works 'by-luck' ...

> At least what we can learn from this is that the use of alias ethernet
> interfaces (e.g. eth0:rst1) by vservers does not seem to make any difference.
> BTW: Can I set up alias interfaces with the iproute2 tools?
> ifconfig does it, ip <something> dev eth:<alias> always gives me an error.

yes, if you create a file called 'name' in interfaces/??
and write some string to it ('foo' for example) you'll get
an alias ethx:foo (as described on the flower page)
(or via label on ip)

HTH,
Herbert

> Thanks for your help, anyway
> Martin
>
> --
> Dr. Martin Pauly Fax: 49-6421-28-26994
> HRZ Univ. Marburg Phone: 49-6421-28-23527
> Hans-Meerwein-Str. E-Mail: pauly_at_HRZ.Uni-Marburg.DE
> D-35032 Marburg
>
>
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 17 Mar 2005 - 17:30:25 GMT by hypermail 2.1.3