Networking Forums

Networking Forums > Computer Networking > Linux Networking > one physical interface, 3 virtual interfaces, and inetd

Reply
Thread Tools Display Modes

one physical interface, 3 virtual interfaces, and inetd

 
 
CptDondo
Guest
Posts: n/a

 
      11-16-2006, 06:47 PM
I have an embedded box with a single ethernet interface that I will
configure as some number of virtual interfaces:

eth0:0 - 192.168.1.1
eth0:1 - 192.168.1.2
eth0:2 - 192.168.1.3

A request will come in on a particular interface and port, say
192.168.1.2:8037 and will invoke a program.

Here's the part I don't understand:

The program that is invoked has to take different action depending on
which IP address was used.

Is there some way for a program invoked by inetd to get the connection
information?

The program acts as an intelligent relay of sorts, acting as a bridge
between the requestor on the network and a piece of hardware connected
to a serial port.

For reasons of scalability, it would be much easier to have 1 serial
mapped to 1 IP address; there are hundreds of these clusters, and some
have 1, 2, 3, or 4 connections.

(Yes I could probably do it with sockets, but I already have the bridge
software written and tested with inetd, so why reinvent the wheel if I
don't have to....)

--Yan
 
Reply With Quote
 
 
 
 
Jack Snodgrass
Guest
Posts: n/a

 
      11-16-2006, 07:54 PM
On Thu, 16 Nov 2006 11:47:08 -0800, CptDondo wrote:

> I have an embedded box with a single ethernet interface that I will
> configure as some number of virtual interfaces:
>
> eth0:0 - 192.168.1.1
> eth0:1 - 192.168.1.2
> eth0:2 - 192.168.1.3
>
> A request will come in on a particular interface and port, say
> 192.168.1.2:8037 and will invoke a program.
>
> Here's the part I don't understand:
>
> The program that is invoked has to take different action depending on
> which IP address was used.
>
> Is there some way for a program invoked by inetd to get the connection
> information?
>
> The program acts as an intelligent relay of sorts, acting as a bridge
> between the requestor on the network and a piece of hardware connected
> to a serial port.
>
> For reasons of scalability, it would be much easier to have 1 serial
> mapped to 1 IP address; there are hundreds of these clusters, and some
> have 1, 2, 3, or 4 connections.
>
> (Yes I could probably do it with sockets, but I already have the bridge
> software written and tested with inetd, so why reinvent the wheel if I
> don't have to....)
>
> --Yan



xinetd will let you bind an application to an ip address and port.
Not sure about inetd. I use xinetd for all my my inetd type things.

jack
--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulated NAT Traversal on Virtual Box | Two Virtual Interface - eth-0/eth1 Sumit Linux Networking 0 06-24-2011 01:09 AM
physical vs. logical network interfaces stf Linux Networking 3 02-09-2008 04:14 PM
ISC DHCP - Two subnets on one physical interface. Dan Linux Networking 2 07-31-2007 06:48 PM
Virtual Ethernet Interfaces Troy C Linux Networking 6 10-10-2004 10:52 PM
Linux API to create logical interface on a physical interface? Zarko Coklin Linux Networking 2 07-18-2004 01:50 AM



1 2 3 4 5 6 7 8 9 10 11