1

I have two NIC configured on VM's one IP is assign by DHCP on 172.26.43.XX VLAN and 10.10.10.XX is static ip I am installing cloudera beta 5 on these VM, while detecting the host cloudera is returning back with the 172 VLAN IP of all the hosts but i need cloudera to communicate on 10 VLAN

172.26.43.1 (it have gateway and entry on dns server)

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.26.43.1     0.0.0.0         UG    100    0        0 eth0
10.10.10.0      *               255.255.255.0   U     0      0        0 eth1
172.26.43.0     *               255.255.255.0   U     0      0        0 eth0

hosts file on all the host have only entry of the 10.10.10.XX IP corresponding to hostname.

IP of one of the host is 10.10.10.20

output of commands are below

ip route
default via 172.26.43.1 dev eth0  metric 100
10.10.10.0/24 dev eth1  proto kernel  scope link  src 10.10.10.20
172.26.43.0/24 dev eth0  proto kernel  scope link  src 172.26.43.65

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:a4:dd:27 brd ff:ff:ff:ff:ff:ff
    inet 172.26.43.65/24 brd 172.26.43.255 scope global eth0
    inet6 fe80::a00:27ff:fea4:dd27/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:1d:27:83 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.20/24 brd 10.10.10.255 scope global eth1
    inet6 fe80::a00:27ff:fe1d:2783/64 scope link
       valid_lft forever preferred_lft forever
3
  • 2
    define primary IP... this doesn't exist as a weel known concept (at leat not one known to me). your host should use as source IP whichever is set on the outpointing interface used to reach its destination. this is of course all based on your routing table. you may be miss-enunciating your needs. please clarify.
    – alxgomz
    Jan 24, 2014 at 7:17
  • there is no primary interface. There is one bound to your host name and the one which has default route. It may be the same interface. So the question from @alxgomz is absolutely valid: define primary IP.
    – kofemann
    Jan 24, 2014 at 7:21
  • Apologies for ambiguous terminologies please have a look to updated question. Jan 24, 2014 at 9:58

2 Answers 2

3

"primary IP" is an alias for "whatever your system uses when it originates traffic to the default route". In the absence of source phrases on that route, that's the first address of the interface used (more or less).

So if your address on eth1 is 10.10.10.11, first find out which address the router on that interface has (either with dhclient or by asking your sysadmin -- let's assume that the answer is 10.10.10.1), then do

    ip route change default via 10.10.10.1 dev eth1

Add src 10.10.10.11 to the end if your system has more than one address on that interface.

NB: you might want to use ip route instead of route. Different syntax, but way more features.

13
  • not able to run the command getting response RTNETLINK answers: No such file or directory Jan 24, 2014 at 10:35
  • It should work. Please add the output of ip addr and ip route to your question. Jan 24, 2014 at 10:57
  • I have update the question please have a look Jan 24, 2014 at 11:26
  • Hmm. ip route change default via 10.10.10.1 dev eth1 definitely should work, given your interfaces. Jan 24, 2014 at 11:29
  • 1
    getting the same error :( please see the command >>>ip route change default via 10.10.10.1 dev eth1 output >>> RTNETLINK answers: Operation not permitted Jan 24, 2014 at 12:30
1

this cloudera thing probably relies on hostname resolution. check that the hostname of your host points to the IP 10.x.x.x. for instance, on a debian like system you should check that the hostname configured in /etc/hostname maps to the 10.x.x.x IP in /etc/hosts.

10
  • my hostname file have entry of 10.X.X.X IP of all the hosts. Jan 27, 2014 at 6:59
  • What does the following command returns?: ping -c 1 $(hostname)
    – alxgomz
    Jan 27, 2014 at 7:31
  • PING cdh4hbm.is.co.in (172.26.43.86) 56(84) bytes of data. 64 bytes from 172.26.43.86: icmp_req=1 ttl=64 time=1.13 ms --- cdh4hbm.is.co.in ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.139/1.139/1.139/0.000 ms Jan 27, 2014 at 11:43
  • does your /etc/hosts file really contains an entry 10.x.x.x for cdh4hbm.is.co.in? if So check tout /etc/nsswitch.conf
    – alxgomz
    Jan 27, 2014 at 19:26
  • 1
    there is NO line with : 10.X.X.X cdh4hbm.is.co.in !!! You only have one with cdh4hbm (without the domain). For some reason you hostname in /etc/hostname is probably fqdn. either fix your /etc/hostname to contain non-fqdn name (as per man hostname), or add cdh4hbm.is.co.in in /etc/hosts. That should do the trick
    – alxgomz
    Jan 28, 2014 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .