LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-26-2018, 08:49 AM   #1
keif
Member
 
Registered: Apr 2013
Posts: 107

Rep: Reputation: Disabled
setting up clients to establish tcp connection on virtual ip


Hello. I was hoping to get some help with my current situation trying to get clients to connect to a virtual ip instead of a physical interface on a linux server.

Here is the scenerio:

I have 2 Centos servers on the same network:

Code:
Server 1: eth1 - 192.168.99.101 (Physical interface)
Server 2: eth1 - 192.168.99.102 (Physical interface)
Currently on Server 1 I also have a vip configured:

Code:
Server 1: eth1:1 - 192.168.99.100 (virtual ip)
I have a dhcpd.conf file with 4 printer macs to assign ip addresses on the 192.168.99.0 network. Once the printers receive an ip they will connect on TCP 9100.

The goal is to have those printers connect on TCP 9100 on the virtual ip address 192.168.99.100 instead of the physical ip addresses of the eth1 interface.

That way the printers can follow whatever server I add eth1:1 to.

Here is my dhcpd.conf file:

Code:
ddns-update-style interim;
ignore client-updates;

subnet 192.168.99.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.99.100; # virtual ip
        option subnet-mask              255.255.255.0;

        default-lease-time 21600;
        max-lease-time 43200;

        host printer1 {
                hardware ethernet 00:11:62:14:fb:93;
                fixed-address 192.168.99.161;
        }
        host printer2 {
                hardware ethernet 00:11:62:14:fa:4b;
                fixed-address 192.168.99.162;
        }
        host printer3 {
                hardware ethernet 00:11:62:0B:fa:47;
                fixed-address 192.168.99.163;
        }
        host printer4 {
                hardware ethernet 00:11:62:14:1A:2B;
                fixed-address 192.168.99.164;
        }
}
So far the printers have not connected to the virtual interface even though I have the virtual ip in the dhcpd.conf file.

I'm thinking that it's a mac issue. Since the vip uses the same mac as the physical interfaces the printers are just connecting to the physical eth1. Is there any way around this? Any guidance is much appreciated.
 
Old 04-26-2018, 02:59 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,845

Rep: Reputation: 161Reputation: 161
You can add log option to find out why server doesn't take your gateway option.
 
1 members found this post helpful.
Old 05-08-2018, 08:31 AM   #3
keif
Member
 
Registered: Apr 2013
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
You can add log option to find out why server doesn't take your gateway option.
Thank you for the reply. I ended up creating a different solution because I was in a time crunch. But I was not able to figure out how to do this. Maybe when I have more time
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to establish IPv6 TCP connection with IPSec Sony Arpita Linux - Newbie 1 03-25-2014 10:23 AM
mysql driver unable to create a connection due to an inabilityto establish connection jayakumar01 Linux - Server 1 01-04-2012 09:04 AM
need help setting up a bridge connection on Virtual Box (Ubuntu) 3vra Linux - Networking 1 07-23-2009 11:48 AM
Building a Virtual LAN with direct connection between clients stringZ Linux - Networking 3 07-10-2008 07:52 AM
To establish TCP/IP connection over UART vinaybms Linux - Networking 1 03-07-2005 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration