im going nuts since i'm tryin to solve this for nearly a week now.
Scenario: One Server with two different network devices. Each device is plugged into a different company subnet. eth0 is plugged in x.y.5.184/29, while eth1 is plugged into x.y.88.224/27. I want the server to listen on both devices. Server-IP in .5.184/29 shall be x.y.5.186, Server-IP in .88.224/27 shall be x.y.88.253. I'd like to run two different VMs with Apache, so the Server shall – with natpf to the respective VM – listen on x.y.5.186:p1 for VM1 and on x.y.88.253:p2 for VM2
x and y have to be hidden due to privacy issues, but are given values.
So here is the problem: If i tu up eth1, the server is not responding on eth0 and i don't really know why. Here is some output with both devices up:
[user@server ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet x.y.5.186 netmask 255.255.255.248 broadcast x.y.5.191
ether <MAC> txqueuelen 1000 (Etheet)
RX packets 77141 bytes 50779367 (48.4 MiB)
RX errors 27 dropped 0 overruns 26 frame 1
TX packets 83841 bytes 63781133 (60.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet x.y.88.253 netmask 255.255.255.224 broadcast x.y.88.255
ether <MAC> txqueuelen 1000 (Etheet)
RX packets 77911 bytes 6285521 (5.9 MiB)
RX errors 0 dropped 836 overruns 0 frame 0
TX packets 6502 bytes 1057860 (1.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 740 bytes 606784 (592.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 740 bytes 606784 (592.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:67:e6:77 txqueuelen 0 (Etheet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[user@server ~]$ route -n
Keel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 x.y.5.185 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 x.y.88.225 0.0.0.0 UG 10 0 0 eth1
x.y.5.184 0.0.0.0 255.255.255.248 U 0 0 0 eth0
x.y.88.224 0.0.0.0 255.255.255.224 U 10 0 0 eth1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
[user@server ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# ifcfg-eth0
HWADDR=<MAC>
TYPE=Etheet
BOOTPROTO=none
#DNS1=x.y.company.dns
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV4_ROUTE_METRIC=0
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
NAME=SERVER
UUID=<uuid>
DEVICE=eth0
ONBOOT=yes
IPADDR=x.y.5.186
PREFIX=29
GATEWAY=x.y.5.185
[user@server ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth1
# ifcfg-eth1
HWADDR=<MAC2>
TYPE=Etheet
BOOTPROTO=none
#DNS1=x.y.company.dns
DEFROUTE=no
IPV4_FAILURE_FATAL=yes
IPV4_ROUTE_METRIC=10
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
NAME=CLIENT
UUID=<uuid2>
DEVICE=eth1
ONBOOT=no
IPADDR=x.y.88.253
PREFIX=27
GATEWAY=x.y.88.225
So my thought is: might be a route. I deleted /etc/sysconfig/network-scripts/route-eth0 and route-eth1, so those are the defaults.
[user@server ~]$ ip route
default via x.y.5.185 dev eth0 proto static
default via x.y.88.225 dev eth1 proto static metric 10
x.y.5.184/29 dev eth0 proto keel scope link src x.y.5.186
x.y.88.224/27 dev eth1 proto keel scope link src x.y.88.253 metric 1
192.168.122.0/24 dev virbr0 proto keel scope link src 192.168.122.1
i delete the default route for eth1
[root@server user]# ip route del default via x.y.88.225 dev eth1 prot
and still nothing changes. Ping to eth0 ip fails. but if i delete the other route with
[root@server user]# ip route del x.y.88.224/27 dev eth1 proto keel ric 10
eth0 works again, every connection to x.y.5.186 works again, but eth1 stops to work .... As far as i know the metric i used on eth1 should solve the issue, buuuut doesn't. Any routing expert with a thought on this?
Edit: fresh CentOS
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 169
تاريخ: سه
شنبه
1 تير
1395 ساعت: 21:27