Hallo, Am Mit, 03 Nov 2010, Norbert Zawodsky schrieb:
Ich würde gerne zu Testzwecken für eine begrenzte Zeit ein virtuelles net-if einrichten. (alles mit statischen ip adressen, nichts dynamisches, kein DHCP) Das letzte Mal als ich das gemacht habe ist viele Jahre + Suse Versionen her und ich kann mich nicht mehr erinnern.
eth0 <== z.B. Adresse 12.34.56.78/29 eth0:1 <== z.B. 12.34.56.79/29
so weit ich es durchschaue ist das im yast definitiv nicht möglich.
Hier, unter openSUSE 11.2/x86_64, die ifcfg-Datei kann auch anders heissen, default ist 'ifcfg-eth-MAC_ADDR_DER_KARTE'. ==== /etc/sysconfig/network/config ==== # [..] LINKLOCAL_INTERFACES="eth0|eth0:1" # [..] ==== ==== /etc/sysconfig/network/ifcfg-eth0 ==== BOOTPROTO='static' ETHTOOL_OPTIONS='' IPADDR='10.0.0.2/24' LABEL_1="1" IPADDR_1="192.168.178.12/24" MTU='1492' NAME='RTL8111/8168B PCI Express Gigabit Ethernet controller' NETWORK='' REMOTE_IPADDR='' STARTMODE='auto' USERCONTROL='no' LINK_OPTIONS="multicast off" ==== Für dich relevant sind hier nur die 2 Einträge mit _1 ;) Ist übrigens in 'man ifcfg' dokumentiert (das mit dem "[suffix]"). Sowie: ==== /etc/sysconfig/network/routes ==== 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2 default 192.168.178.1 - - ==== Ergebnis ist: # ifconfig eth0 Link encap:Ethernet HWaddr 00:.... inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::..../64 Scope:Link UP BROADCAST RUNNING MTU:1492 Metric:1 RX packets:3068 errors:0 dropped:0 overruns:0 frame:0 TX packets:2842 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:651962 (636.6 Kb) TX bytes:554097 (541.1 Kb) Interrupt:27 eth0:1 Link encap:Ethernet HWaddr 00:.... inet addr:192.168.178.12 Bcast:192.168.178.255 Mask:255.255.255.0 UP BROADCAST RUNNING MTU:1492 Metric:1 Interrupt:27 # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 eth0 # ip addr show [..] 2: eth0: <BROADCAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:.... brd ff:ff:ff:ff:ff:ff inet 10.0.0.2/24 brd 10.0.0.255 scope global eth0 inet 192.168.178.12/24 brd 192.168.178.255 scope global eth0:1 inet6 fe80::..../64 scope link valid_lft forever preferred_lft forever # ip route show 192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.12 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2 169.254.0.0/16 dev eth0 scope link 127.0.0.0/8 dev lo scope link default via 192.168.178.1 dev eth0 ==== Achso, beide Rechner hier hängen an einem Switch, und der hängt dann noch an ner Fritzbox. Das praktische an der Sache ist, daß ich per Firewall in 10.0.0.0/24 (das nur über meinen Switch läuft) alles erlauben, und das Fritzbox-Netz 192.168.178.0/24 restriktiv filtern kann. Von der ollen Kiste (.1 bzw. .11) aus: $ traceroute -n 192.168.178.12 traceroute to 192.168.178.12 (192.168.178.12), 30 hops max, 40 byte packets 1 * * * 2 * * * 3 * * * [usw. ...] $ traceroute -n 10.0.0.2 traceroute to 10.0.0.2 (10.0.0.2), 30 hops max, 40 byte packets 1 10.0.0.2 0 ms 0 ms 0 ms $ traceroute -n 192.168.178.1 traceroute to 192.168.178.1 (192.168.178.1), 30 hops max, 40 byte packets 1 192.168.178.1 1 ms 1 ms 1 ms HTH, -dnh --
Wie haßt denn des Spül, wo olle im Kraas umma was ins Ohr flüstern und am End kimmt a kompletta Kaaas an? -- F. Glaser Dienstweg. -- R. Kutil -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org