PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Zwei IP´s bei Debian wie ?



localhost
13.11.02, 18:12
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.70

auto eth0:0
iface eth0:0 inet static
address 192.168.1.99
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.70


/////////////////////////////////////////////////////////////////////
ifconfig eth0:0

eth0:0 Link encap:Ethernet HWaddr 00:A0:CC:5A:7A:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xe400

///////////////////////////////////////////////////////////////////////////

Wie geht das nicht ??

tomes
13.11.02, 18:23
# ifconfig eth0:0 192.168.1.99/24 in der Konsole versucht ?
Da wird es daran liegen das beide IP's in selben Netzt liegen. Also einfach mal die Netze verkleinern.

T;o)Mes

P.S.:
# ifconfig eth0 192.168.1.5/27
# ifconfig eth0:0 192.168.1.99/28
# ifconfig
eth0 Protokoll:Ethernet Hardware Adresse 00:E0:7D:92:26:72
inet Adresse:192.168.1.5 Bcast:192.168.1.255 Maske:255.255.255.224
inet6 Adresse: fe80::2e0:7dff:fe92:2672/10 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4807 errors:0 dropped:0 overruns:0 frame:0
TX packets:4353 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:100
RX bytes:2607714 (2.4 Mb) TX bytes:1420087 (1.3 Mb)
Interrupt:12 Basisadresse:0xdf00

eth0:0 Protokoll:Ethernet Hardware Adresse 00:E0:7D:92:26:72
inet Adresse:192.168.1.99 Bcast:192.168.1.255 Maske:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:12 Basisadresse:0xdf00

Nur mal so als Beispiel.

msi
13.11.02, 18:34
afaik kann ein Rechner nicht zwei ips im selben Subnetz haben (und vor allem nicht
wens dieselbe nic is).

localhost
13.11.02, 18:42
wiso das den was muss ich den machen um zwei IP´s im selber netz haben ??

bei www.server4free.de die haben 4 IP´s und sind ja auch in einemen netz

bei ifconfig eth0:0 192.168.1.99/24
SIOCSIFNETMASK: No such device
SIOCSIFADDR: No such device
SIOCSIFFLAGS: No such device

localhost
13.11.02, 18:44
wiso das den was muss ich den machen um zwei IP´s im selber netz haben ??

bei www.server4free.de die haben 4 IP´s und sind ja auch in einemen netz

msi
13.11.02, 18:57
was würde das für einen sinn machen mehrere ips im selben subnetz zu haben??
du kannst die zweite ip in einem anderen subnetz erstellen.

localhost
13.11.02, 19:13
Ich breuchte aber zwei IP´s für zwei mal apche zu benutzen also auf zwei Ip´s

udn wie machen die das bei server4free dan

LKH
13.11.02, 20:25
Hi,

Sinn macht das schon bei namebased virtual hosts des Apache. Gehen tuts auch. Wie man das aber dem Debianskripts beibringt weiss ich leider auch nicht. Manuell mit "ifconfig eth0:0 IP-Adresse" gehts auf jeden Fall. Ich denke mal, dass du nur

auto eth0:0
iface eth0:0 inet static
address 192.168.1.99

eintragen musst. Aber reine Spekulation .... Oder der Kernel ist ohne IP-Aliasing kompiliert.

localhost
13.11.02, 20:40
//////////////////////////////////////////////////
ifconfig eth0:0 192.168.1.99
SIOCSIFADDR: No such device
SIOCSIFFLAGS: No such device
///////////////////////////////////////////////////
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.70

auto eth0:0
iface eth0:0 inet static
address 192.168.2.99
////////////////////////////////////////////////////////////

so hab cih das jetzt was muss den jetzt den noch machen

bernie
13.11.02, 22:42
Hi,

Ehrlich gesagt versteh ich eure Panik nicht, warum sollten 2IPs aus dem selben Subnetz nicht gehen? Das hat doch keine Logik, hier ein Beispiel, wies sicher geht:
---------------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.40.60
netmask 255.255.254.0
network 192.168.40.0
broadcast 192.168.41.255
gateway 192.168.40.1

auto eth0:1
iface eth0:1 inet static
address 192.168.40.61
netmask 255.255.254.0
network 192.168.40.0
broadcast 192.168.41.255
------------------

dann ein

/etc/init.d/networking stop && /etc/init.d/networking start

und die Sache läuft
Ciao, Bernie

localhost
14.11.02, 06:54
Also ich hab das jetzt alles so geändert und es geht nicht muss ich dafür noch was install bei debian oder ??

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

auto eth0:1
iface eth0:1 inet static
address 192.168.1.102
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255



ifconfig
eth0 Link encap:Ethernet HWaddr 00:A0:CC:5A:7A:D0
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:551860 errors:0 dropped:0 overruns:0 frame:0
TX packets:789623 errors:0 dropped:0 overruns:0 carrier:0
collisions:223279 txqueuelen:100
RX bytes:44002666 (41.9 MiB) TX bytes:967072538 (922.2 MiB)
Interrupt:10 Base address:0xe400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1064 (1.0 KiB) TX bytes:1064 (1.0 KiB)



ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 00:A0:CC:5A:7A:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xe400

bernie
14.11.02, 08:55
Hi,

mach mal
ifconfig eth0 down
ifconfig eth0:1 down
/etc/init.d/networking stop
/etc/init.d/networking stop
/etc/init.d/networking start
Manchmal will er bei mir auch nicht.

Ciao, Bernie

localhost
14.11.02, 16:18
GNU nano 1.0.6 File: interfaces

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.254.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

auto eth0:1
iface eth0:1 inet static
address 192.168.1.102
netmask 255.255.254.0
network 192.168.1.0
broadcast 192.168.2.255


hab das jetzt so
und es geht niocht

localhost
14.11.02, 17:35
mm naja ich habs jetzzt nur mit zwei netzwerkarten hinbekommen

also eth0 und eth1 gehtz <-- mit zwei
mit eth0 und eth0:1 gehtz nicht <-- mit einer