View previous topic :: View next topic |
Author |
Message |
MassiveBlue n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 May 2004 Posts: 12 Location: Cottbus
|
Posted: Thu Jun 24, 2004 7:44 am Post subject: [solved] Probleme mit mehreren IPs an einer Netzwerkkarte |
|
|
Hi!
Ich habe folgendes Problem:
eth0 ist mein internes Interface und eth1 mein externes, ich möchte mehrere IPs an eth1 binden, das habe ich auch hinbekommen, aber leider erstellt er für die aliase eth1:1 und so weiter falsche Netzmasken und Broadcasts. Und dadurch setz er auch eine falsche Route in die Routing-Tabelle, wodurch dann viele Hosts nicht erreichbar sind.
Hier meine /etc/conf.d/net
Code: |
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth1="80.243.63.82 broadcast 80.243.63.87 netmask 255.255.255.248"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="192.168.115.99 broadcast 192.168.115.255 netmask 255.255.255.0"
#dhcpcd_eth0="..."
# For adding aliases to a interface
#
alias_eth1="80.243.63.82 80.243.63.84 80.243.63.85"
# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"
# For setting the default gateway
#
gateway="eth1/80.243.63.81"
|
Ausgabe von ifconfig:
Code: |
eth0 Link encap:Ethernet HWaddr 00:60:B0:C3:5E:38
inet addr:192.168.115.99 Bcast:192.168.115.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:474896 errors:0 dropped:0 overruns:0 frame:0
TX packets:547042 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90612574 (86.4 Mb) TX bytes:498066070 (474.9 Mb)
Interrupt:10 Base address:0xfcc0
eth1 Link encap:Ethernet HWaddr 00:50:FC:CC:8F:8D
inet addr:80.243.63.82 Bcast:80.243.63.87 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:381415 errors:0 dropped:0 overruns:0 frame:0
TX packets:246123 errors:0 dropped:0 overruns:0 carrier:0
collisions:146 txqueuelen:1000
RX bytes:476602008 (454.5 Mb) TX bytes:25101684 (23.9 Mb)
Interrupt:5 Base address:0x800
eth1:1 Link encap:Ethernet HWaddr 00:50:FC:CC:8F:8D
inet addr:80.243.63.82 Bcast:80.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x800
eth1:2 Link encap:Ethernet HWaddr 00:50:FC:CC:8F:8D
inet addr:80.243.63.84 Bcast:80.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x800
eth1:3 Link encap:Ethernet HWaddr 00:50:FC:CC:8F:8D
inet addr:80.243.63.85 Bcast:80.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:716 errors:0 dropped:0 overruns:0 frame:0
TX packets:716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:60063 (58.6 Kb) TX bytes:60063 (58.6 Kb)
|
Hier sieht man dass für die Aliase falsche Einstellungen vorgenommen werden, was muss ich in /etc/conf.d/net eintragen, damit die Aliase die gleiche Netzmaske (und so weiter) wie eth1 bekommen?
meine Routing-Tabelle:
Code: |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
80.243.63.80 * 255.255.255.248 U 0 0 0 eth1
192.168.115.0 * 255.255.255.0 U 0 0 0 eth0
80.0.0.0 * 255.0.0.0 U 0 0 0 eth1
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 80.243.63.81 0.0.0.0 UG 0 0 0 eth1
|
80.0.0.0 ist eine falsche Route, die er immer erstellt, wenn ich die Aliase aktiviere, wenn ich sie deaktiviere, ist sie nicht da.
MfG Christian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MassiveBlue n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 27 May 2004 Posts: 12 Location: Cottbus
|
Posted: Thu Jun 24, 2004 7:59 am Post subject: |
|
|
Hab das Problem jetzt selbst gelöst, ich hätte mir nur die /etc/conf.d/net etwas genauer anschauen müssen...
Ich poste meine aktuelle nochmal, falls jemand auch nicht richtig lesen kann
Code: |
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth1="80.243.63.82 broadcast 80.243.63.87 netmask 255.255.255.248"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="192.168.115.99 broadcast 192.168.115.255 netmask 255.255.255.0"
#dhcpcd_eth0="..."
# For adding aliases to a interface
#
alias_eth1="80.243.63.84 80.243.63.85"
# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
broadcast_eth1="80.243.63.87 80.243.63.87"
netmask_eth1="255.255.255.248 255.255.255.248"
# For setting the default gateway
#
gateway="eth1/80.243.63.81"
|
WIchtig sind broadcast_eth1 und netmask_eth1
damit gibt man die Sachen für die Aliase an.
MfG Christian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|