one physical interface, 3 virtual interfaces, and inetd

one physical interface, 3 virtual interfaces, and inetd

Post by CptDond » Sat, 18 Nov 2006 04:47:08



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

 
 
 

one physical interface, 3 virtual interfaces, and inetd

Post by Jack Snodgras » Sat, 18 Nov 2006 05:54:53



> 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

 
 
 

1. routing issue and maximum sub interfaces on one physical interface question

Hello, I have been able to successfully ifconfig an address using hme0:255
plus the ip 209.166.169.2, and it shows in ifconfig -a on solaris 2.6.  

But the problem is that it doesn't make it past any of the routers, and I am
also wondering what it the maximum number of sub interfaces we can create on a
physical interface.

Thanks,

Mark Kogon
Stargate Industries
System Administrator

2. Linux emulator for Windows XP?

3. 2 networkaddress on one physical address managed by the gateway with one phisical interface.

4. Reporting hacking attempts?

5. Add a new logical interface on a physical interface with ioctl()

6. Mouse/Keyboard/Monitor Switchbox under X

7. Linux API to create logical interface on a physical interface?

8. Problems installing Linux

9. Interface names for a UNIX machine with more than one interface.

10. dhcpd on for one interface on two interface system ?

11. Two IP address over one physical interface

12. ioctl() to add logical interface on a physical one

13. two logical interfaces on one physical