Hi Guys ,
i have esxi main ip
149.56.22.104
and on that ip , the provider routed to me 1 others ip so that i use it .
so , for now I'm using the esxi and access it gui/ssh on the main ip 149.56.22.104
my problem is i want to give the other ip to 1 machines on the same esxi machine .
i have centos boxe and here is how I'm willing to give them the ips .
i create vmkernel port and gave it ip 10.20.30.1 on the esxi .
the routed the 1 ip that i have to this machine on centos
on centos i have an ip 10.20.30.1 on eth0 of centos and i added the 1 ip as secondary ip.
here is config :
[root@ns529592:~] esxcfg-route -l
VMkernel Routes:
Network Netmask Gateway Interface
149.56.173.246 255.255.255.255 10.20.30.2 vmk1
10.20.30.0 255.255.255.0 Local Subnet vmk1
149.56.22.0 255.255.255.0 Local Subnet vmk0
149.56.173.0 255.255.255.0 10.20.30.2 vmk1
192.168.100.0 255.255.255.0 10.20.30.2 vmk1
default 0.0.0.0 149.56.22.254 vmk0
==================
i can ping the centos ip from esxi :
[root@ns529592:~] ping 149.56.173.246
PING 149.56.173.246 (149.56.173.246): 56 data bytes
64 bytes from 149.56.173.246: icmp_seq=0 ttl=64 time=0.239 ms
64 bytes from 149.56.173.246: icmp_seq=1 ttl=64 time=0.194 ms
--- 149.56.173.246 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.194/0.216/0.239 ms
[root@ns529592:~] ping 10.20.30.2
PING 10.20.30.2 (10.20.30.2): 56 data bytes
64 bytes from 10.20.30.2: icmp_seq=0 ttl=64 time=0.190 ms
64 bytes from 10.20.30.2: icmp_seq=1 ttl=64 time=0.295 ms
--- 10.20.30.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.190/0.242/0.295 ms
[root@ns529592:~]
==============================
centos ip:
[root@pfsense ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:AC:6E:D1
inet addr:10.20.30.2 Bcast:10.20.30.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feac:6ed1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9628 errors:0 dropped:0 overruns:0 frame:0
TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:590011 (576.1 KiB) TX bytes:26009 (25.3 KiB)
eth0:10 Link encap:Ethernet HWaddr 00:0C:29:AC:6E:D1
inet addr:149.56.173.246 Bcast:149.56.173.246 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@pfsense ~]# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
[root@pfsense ~]#
==========
i can ping esxi from centos :
[root@pfsense ~]# ping 10.20.30.1
PING 10.20.30.1 (10.20.30.1) 56(84) bytes of data.
64 bytes from 10.20.30.1: icmp_seq=1 ttl=64 time=0.082 ms
64 bytes from 10.20.30.1: icmp_seq=2 ttl=64 time=0.221 ms
^C
--- 10.20.30.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1052ms
rtt min/avg/max/mdev = 0.082/0.151/0.221/0.070 ms
[root@pfsense ~]# ping 149.56.22.104
PING 149.56.22.104 (149.56.22.104) 56(84) bytes of data.
64 bytes from 149.56.22.104: icmp_seq=1 ttl=64 time=0.082 ms
64 bytes from 149.56.22.104: icmp_seq=2 ttl=64 time=0.228 ms
^C
--- 149.56.22.104 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1577ms
rtt min/avg/max/mdev = 0.082/0.155/0.228/0.073 ms
[root@pfsense ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2046ms
[root@pfsense ~]#
==========================
the problem now is :
i can debug on esxi that the traffic hit the esxi itself for the additional ip 149.56.173.246 ,but it don't go to 10.20.30.2
i did tcpdump on both esxi and centos
the traffic hit the esxi for the ip 149.56.173.246 which is my centos , but it don't reach or go to the cantos box
im not sure why esxi don't route the traffic and I'm sure my routing table is fine
can you help me ?
here is a screen shot for more info about esxi networking
Dropbox - Screenshot 2016-05-18 19.37.43.png
Dropbox - Screenshot 2016-05-18 19.37.43.png
cheers